Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/PHPCSStandards/PHPCSUtils

A suite of utility functions for use with PHP_CodeSniffer
https://github.com/PHPCSStandards/PHPCSUtils

GH Actions: update the xmllint-problem-matcher

The `xmllint-problem-matcher` action runner has released a new version which updates it to use n...

e741f083ecba9eec91e7eb055a5d3819d2a025a7 authored about 2 years ago by jrfnl <[email protected]>
GH Actions: fix use of deprecated `set-output`

GitHub has deprecated the use of `set-output` (and `set-state`) in favour of new environment fil...

d31bd8a9b3a5e013f183a68d956c54ecb09080c1 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #347 from PHPCSStandards/feature/drop-support-phpcs-lt-371

Drop support for PHPCS < 3.7.1

0ff0080528871027ce332a939728c5b7397665cf authored about 2 years ago by Juliette <[email protected]>
Tokens\Collections: remove remaining work-arounds for PHPCS < 3.7.1

3b413c1c566b91719c64ed4b791332ebe224a9b8 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: deprecate the returnTypeTokensBC() method

This method is no longer needed.

20d072e9e82b7dae7d887c280313fb659637506d authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: deprecate the propertyTypeTokensBC() method

This method is no longer needed.

d428a8246c76c724ddb2cf5a417ddf710e2caa37 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: deprecate the parameterTypeTokensBC() method

This method is no longer needed.

f7cc50ac97036d4aeeba60897dceb561c3597d72 authored about 2 years ago by jrfnl <[email protected]>
Utils\FunctionDeclarations: remove support for PHPCS < 3.7.1

Includes deprecating the `isArrowFunction()` and `getArrowFunctionOpenClose()` methods.

Note: a...

b5d170e59201ac42a8cf3790bf53f050647e5639 authored about 2 years ago by jrfnl <[email protected]>
Utils\Numbers: remove support for PHPCS < 3.7.1

Includes removing the following constants:
* `Numbers::REGEX_NUMLIT_STRING`
* `Numbers::REGEX_HE...

1cf6a8cef087e3fd5fbc3dc636211e751120b2a4 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: deprecate the work-arounds which were in place to support arrow functions

This means the following methods are now deprecated:
* `PHPCSUtils\Tokens\Collections::arrowFunc...

282f6a4046248b49c6d90be75d61557e5858a688 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: remove the `nullsafeObjectOperatorBC()` and the `objectOperatorsBC()` methods

These methods were introduced to support detecting whether a token was part of a nullsafe object...

2f33ac4504d40b8cf09810f311982afcd8e26d7b authored about 2 years ago by jrfnl <[email protected]>
Utils\Operators: remove support for PHPCS < 3.7.1

Includes moving select tests from the `IsReferenceDiffTest` case file to the `isReference` case ...

232d1f0c649dda1e39b53d5fe18ddb20244896be authored about 2 years ago by jrfnl <[email protected]>
Utils\Operators::isNullsafeObjectOperator(): remove the method

This method was introduced to support detecting whether a token was part of a nullsafe object op...

ca96ca9232efe2635114a3ddf7fd5127a10608ac authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: remove the work-arounds which were in place to support union types

dc69ffe973153e9a424a86ae317a3fe7c6ba2e4b authored about 2 years ago by jrfnl <[email protected]>
Utils\UseStatements: remove support for PHPCS < 3.7.1

e2d9093af4e68ef80dd75c4ece07f009c7de6b45 authored about 2 years ago by jrfnl <[email protected]>
Utils\Operators::isTypeUnion(): remove the method

This method was introduced to support detecting whether a `&` was used as a union type separator...

c6b0a99eec407fca7dc615246f46f315fb9d93a2 authored about 2 years ago by jrfnl <[email protected]>
Utils\Variables: remove support for PHPCS < 3.7.1

da1ea05485db8e4a3934e8b013ca1ab2569a337c authored about 2 years ago by jrfnl <[email protected]>
Utils\PassedParameters: remove support for PHPCS < 3.7.1

38cbcfca1a1aa8bbd9b92c17c6d43a6dafbe0324 authored about 2 years ago by jrfnl <[email protected]>
Utils\Parentheses: remove support for PHPCS < 3.7.1

e39b37437f23a5cf7c9de283eda3c4b29a7b296d authored about 2 years ago by jrfnl <[email protected]>
Utils\ObjectDeclarations: remove support for PHPCS < 3.7.1

231e1957a1c1b4922d2aaf55c688a3dbe97296dc authored about 2 years ago by jrfnl <[email protected]>
Utils\Namespaces: remove support for PHPCS < 3.7.1

4b1bc7ab28017583d5b530360455ef1b12dbe860 authored about 2 years ago by jrfnl <[email protected]>
Utils\TextStrings: remove support for PHPCS < 3.7.1

Includes removing the `getEndOfDoubleQuotedString()` method, which is no longer needed.

The met...

4f32289776869774e5b22da7069fae5a4cd94e16 authored about 2 years ago by jrfnl <[email protected]>
Utils\Arrays: remove support for PHPCS < 3.7.1

Note: this does **not** remove BC support from the `Arrays::isShortArray()` method (yet). This w...

12172e27b00c4d2a6007e23ee3bba89e216e387a authored about 2 years ago by jrfnl <[email protected]>
Utils\MessageHelper::hasNewLineSupport(): remove the method

This method was introduced to support detecting whether new lines in error messages are supporte...

c6fb2ded54e9a1790a7abed470a1964bff65c71c authored about 2 years ago by jrfnl <[email protected]>
Utils\ControlStructures: remove support for PHPCS < 3.7.1

Includes deprecating the `getDeclareScopeOpenClose()` method, which is now redundant.

Note: as ...

e9cd164ae7ea01a9757fa941dec9f0490205f493 authored about 2 years ago by jrfnl <[email protected]>
Utils\Lists: remove support for PHPCS < 3.7.1

Note: this does **not** remove BC support from the `Lists::isShortList()` method (yet). This wil...

e3a8ce9bbd6a2f35d1add2a0f52adf84a32fc9ce authored about 2 years ago by jrfnl <[email protected]>
Tokens\TokenHelper\TokenExistsTest: remove three tests

... which no longer actually test anything with the current minimum PHPCS version.

3abea99fd60a3336357231476633c180ae4c12a9 authored about 2 years ago by jrfnl <[email protected]>
TestUtils\UtilityMethodTestCase: remove support for PHPCS < 3.7.1

c8a438ec141bd41dceea255919827fee0c1949a8 authored about 2 years ago by jrfnl <[email protected]>
BackCompat\BCTokens: remove support for PHPCS < 3.7.1

This commit removes support for PHPCS < 3.7.1 for the functionality in the `PHPCSUtils\BackCompa...

d29761b2deb8c6c57f15c5b033f426a332c17906 authored about 2 years ago by jrfnl <[email protected]>
Fixers\SpacesFixer: remove support for PHPCS < 3.7.1

58cfce149947238ad2945d2bd68bd4c69832d680 authored about 2 years ago by jrfnl <[email protected]>
BackCompat\BCFile: remove support for PHPCS < 3.7.1

This commit removes support for PHPCS < 3.7.1 for the functionality in the `PHPCSUtils\BackCompa...

1bd5a8dc9ffb13e8cb47c227ead9d278af7f8b58 authored about 2 years ago by jrfnl <[email protected]>
Utils: minor efficiency tweak after BCTokens cleanup

Use the PHPCS native token arrays when there are no backcompat issues as static property access ...

06fa948595299d2a7a399fff67ffb70d8eadce00 authored about 2 years ago by jrfnl <[email protected]>
BackCompat\Helper: remove support for PHPCS 2.x

Includes removing test work-arounds and skips related to PHPCS 2.x.

Includes a minor test tweak...

865a39ff685d0d409ae36d89a85611e233abea1a authored about 2 years ago by jrfnl <[email protected]>
Composer: add PHPCSDevCS to the dependencies

PHPCSDevCS was previously not added to the `require-dev` dependencies as the minimum supported P...

6147ab7444109bf7a129b5fafc5de08f8cd49b8e authored about 2 years ago by jrfnl <[email protected]>
Test bootstrap: remove condition related to PHPCS 2.x

9f8ba469b7b6e30e6894607484f475e0fcce3c0c authored about 2 years ago by jrfnl <[email protected]>
Drop support for PHPCS < 3.7.1

This:
* Updates the minimum PHPCS requirement in `composer.json`.
* Updates the minimum PHPCS ve...

4787f192ce4abab36ae16539dc4d96f0e0b26e93 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #346 from PHPCSStandards/feature/various-minor-test-tweaks

Feature/various minor test tweaks

6242122151eb7ecbe22a33cd260b0ab1db8501a5 authored about 2 years ago by Juliette <[email protected]>
UseStatements::SplitImportUseStatement: minor test tweak

... to make sure a case where there is no whitespace after the comma separating multiple stateme...

c8bfe545071faa6dee210217250140e86b748722 authored about 2 years ago by jrfnl <[email protected]>
GetMethodParametersTest: minor test order tweak

... to make comparison of the test file with the PHPCS native tests more straight forward.

82cac1257539023619ffa7c35a2456a05a9b0d5d authored about 2 years ago by jrfnl <[email protected]>
UnchangedTokenArraysTest: make properties private

e6099fcc31a83542f1df236678783357eb0d5530 authored about 2 years ago by jrfnl <[email protected]>
GetClassPropertiesDiffTest: minor testmarker tweak

4f24bf25503440f760a12e63a85dde5411cf440c authored about 2 years ago by jrfnl <[email protected]>
FindEndOfStatementTest: fix broken test

The `return 0;` statement belongs with the `testStaticArrowFunction` test and was introduced to ...

4f3248267d726702d918394dbc0e585cf20d3434 authored about 2 years ago by jrfnl <[email protected]>
HasParametersTest: minor clean up

3a8e0798ae2798aa238e93ee83a28c2627720e77 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #345 from PHPCSStandards/feature/isreferencetest-various-improvements

IsReferenceTest: use named data sets and other test improvements

f73178b68a24ca6ba77f8567443d7f6c3b1b15fe authored about 2 years ago by Juliette <[email protected]>
IsReferenceTest: use named data sets

cc3a32b71a7cf2c58df34d4deac55c34f79df0be authored about 2 years ago by jrfnl <[email protected]>
IsReferenceTest: fix three incorrect test names

92145bf46699d93a1cc19b432e5412ffe9498671 authored about 2 years ago by jrfnl <[email protected]>
IsReferenceTest: minor test order tweak

... to make comparison of the test file with the PHPCS native tests more straight forward.

58e62add6f74816ddde58672286f22e0888afaf1 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #344 from PHPCSStandards/feature/start-using-phpcsutils-native-exceptions

New `PHPCSUtils\Exceptions\InvalidTokenArray` Exception

2519d98fd7998f2188f7b5f12f2c1090bac9fb55 authored about 2 years ago by Juliette <[email protected]>
New `PHPCSUtils\Exceptions\InvalidTokenArray` Exception

This introduces the first PHPCSUtils native exception, which will extend the PHPCS native `PHP_C...

635b88dd0e4c42c0618b580b6ec438f7650a6e01 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #343 from PHPCSStandards/feature/tests-minor-tweaks

Tests: minor cleanup

23542d969da8e23d147b6e62a5e585f9772af12e authored over 2 years ago by Juliette <[email protected]>
Tests: minor cleanup

Follow up on PR 305. By setting the minimum PHPUnit 9.x version to 9.3, we no longer have to bac...

7fbb99bbdc74b4c4b6c5399a4655d8db4689ba45 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #341 from GaryJones/patch-2

Add "static analysis" Composer keyword

8d100f07534809aa7031629e9da1bab4f32be393 authored over 2 years ago by Juliette <[email protected]>
Add "static analysis" Composer keyword

As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a key...

91ffe7bf2f6544e3c0f66a7211fad7a062fa959c authored over 2 years ago by Gary Jones <[email protected]>
Merge pull request #340 from PHPCSStandards/controlstructures/getdeclarescopeopenclose-more-tests-and-handle-php-close-tag

ControlStructures::getDeclareScopeOpenClose(): support closing the declare statement with PHP cl...

a7637509c70affcaec4f544ef87d6e59a0abe30e authored over 2 years ago by Juliette <[email protected]>
ControlStructures::getDeclareScopeOpenClose(): support closing the declare statement with PHP close tag

... and also add tests to confirm that "multi-directive" statements are handled correctly.

dd5df13f70666f41958105cc45266602a16afaf9 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #338 from PHPCSStandards/feature/gitattributes-update

.gitattributes: update for newly added config files

b8018c70b85074a8a89ee61e53422efe3468f598 authored over 2 years ago by Juliette <[email protected]>
.gitattributes: update for newly added config files

5537f175f6d3b2272c8833229b6ad82260fa42e9 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #337 from PHPCSStandards/feature/getversiontest-update-phpcs-version

GetVersionTest: update for release of PHPCS 3.7.1

47132037a5d3d51fdb7e03ae835e12b8a76472c0 authored over 2 years ago by Juliette <[email protected]>
Merge pull request #336 from PHPCSStandards/feature/ghactions-automate-phpcs-version-update-pr

GH Actions: add new workflow to automate repeated task

8823a07010ff89f05e13ff892d9a85f46fcd3fa3 authored over 2 years ago by Juliette <[email protected]>
GH Actions: add new workflow to automate repeated task

The `GetVersionTest` test class contains a constant which should be set to the PHPCS version num...

27b6f3f4732c5063e38e839251efd7da92f13dc6 authored over 2 years ago by jrfnl <[email protected]>
GetVersionTest: update for release of PHPCS 3.7.1

af6925a42da330852f4ce1e50cd686b85cdd8a7d authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #335 from PHPCSStandards/operators/isunaryplusminus-allow-for-match-arrows

Operators::isUnaryPlusMinus(): allow for match control structures

262736b1065ecdabb6c8668510ecb96f8bbddae6 authored over 2 years ago by Juliette <[email protected]>
Operators::isUnaryPlusMinus(): allow for match control structures

The double arrow in PHP 8.0 match control structures has its own `T_MATCH_ARROW` token.
This tok...

45e23640396ff0d25ecfa2d9cdf6073ce78b0f23 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #332 from PHPCSStandards/feature/new-internal-cache-classes-with-implementations

New (internal) Cache and NoFileCache classes + implement use of these

b65fbd47c38202a667ea3930a4a51c5c8b9ca434 authored over 2 years ago by Juliette <[email protected]>
Tests/bootstrap: allow for running the tests with/without caching

This commit sets up a mechanism in the test `bootstrap.php` file to turn the cache on/off depend...

7f6443b95462e2c40400289a276cc865252575cd authored over 2 years ago by jrfnl <[email protected]>
GH Actions: run the tests twice - once with cache, once without

Adjust the GH actions test workflows to run the complete test suite once with the cache turned o...

ecfef72f50f4252ae97d5c958348d8a673564df8 authored over 2 years ago by jrfnl <[email protected]>
TextStrings::getStripEmbeds(): implement use of the new `NoFileCache` class

Depending on the size of the text string, this function _could_ become pretty slow/performance i...

ca495418ac0d47267143e8154716607ca1d7cd90 authored over 2 years ago by jrfnl <[email protected]>
Arrays::getDoubleArrowPtr(): implement use of the new `Cache` class

While this function will generally be _fast_ for array entries _with_ a double arrow, it will be...

4397a87398763a51188e9ab69fba8b1cb70bfde2 authored over 2 years ago by jrfnl <[email protected]>
UseStatements::splitImportUseStatement(): implement use of the new `Cache` class

Depending on whether or not group use or multi-use statements are used, this method can involve ...

4f301b941be6ece01d1d0894d48e3d4f58e8e4fe authored over 2 years ago by jrfnl <[email protected]>
Lists::getAssignments(): implement use of the new `Cache` class

While most list only involve a few assignment, for more complex and nested list structures, spli...

87170bc494f01bfb54d0a88d46c952bd762aa5ab authored over 2 years ago by jrfnl <[email protected]>
Arrays::isShortArray()/Lists::isShortList(): implement use of the new `Cache` class

These are easily the most used functions as well as the slowest functions (when dealing with lar...

56e15f347ec2745a8120d977d8cd1c012ce40ba8 authored over 2 years ago by jrfnl <[email protected]>
Namespaces::findNamespacePtr(): implement use of the new `Cache` class

This method searches up in a file to try and find an applicable namespace declaration.
As non-sc...

4924df8ba687de9ca028461635ef27cca3853469 authored over 2 years ago by jrfnl <[email protected]>
TextStrings::getEndOfCompleteTextString(): implement use of the new `Cache` class

This method finds the end of a potentially multi-line text string.
While most text strings are s...

e5e874884991b1151f794fb649abaf736adfb265 authored over 2 years ago by jrfnl <[email protected]>
PassedParameters::getParameters(): implement use of the new `Cache` class

While most function calls only involve a few parameters, splitting out an array into the individ...

a27c2f8b8ac255a6aeca3527e70cb7e3a9184299 authored over 2 years ago by jrfnl <[email protected]>
FunctionDeclarations::getArrowFunctionOpenClose(): implement use of the new `Cache` class

While arrow functions are generally only small snippets of code, as they don't always have a cle...

88640db709f85b2c654915355acdd53bc7055e9f authored over 2 years ago by jrfnl <[email protected]>
ControlStructures::getDeclareScopeOpenClose(): implement use of the new `Cache` class

As `declare` constructs using alternative syntax can be long, determining the scope opener/close...

5a5bce0a33d64fd8949cdf7857783c65e5b7de3b authored over 2 years ago by jrfnl <[email protected]>
:sparkles: New (internal) `Cache` and `NoFileCache` classes

... to allow for caching the results of processing intensive utility methods.

The `Cache` class...

24da15ea622d3b5121048684a8d7b2f75f181137 authored over 2 years ago by jrfnl <[email protected]>
[NoFile]Cache: allow for disabling the cache in test situations

Includes:
* Additional tests to cover this change on the off-chance that someone will use this f...

76b8cb9f32c9184897e67a9ccb2e93a1cacec7d6 authored over 2 years ago by jrfnl <[email protected]>
Tests: add TypeProviderHelper class

Based on a similar class I wrote for the Requests library.

If/when that class get published as ...

7cad4fd0dd490df75607c3d04649131588bcc40b authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #334 from PHPCSStandards/feature/tests-minor-tweaks-to-allow-for-repeat-test-runs

Tests: minor tweaks to allow for running tests on repeat

a0de510f5987b64456795e2b437353f63046d4a1 authored over 2 years ago by Juliette <[email protected]>
Tests: minor tweaks to allow for running tests on repeat

... using the PHPUnit `--repeat` option.

Note: this option was already available in PHPUnit 4.x...

2b966c110e37bb2a8f3de5b536a6a1bfa2b98af9 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #333 from PHPCSStandards/feature/tests-use-param-names-in-dataproviders

Tests: use parameter names in data provider test cases

5cd4b0446fc423854091372c77f15dccd1fa788c authored over 2 years ago by Juliette <[email protected]>
Tests: use parameter names in data provider test cases

... when the data set array contains more than one item.

This is done to lower the cognitive lo...

99a76f9a086379867b1cdea717d46fc65738c536 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #331 from PHPCSStandards/feature/various-code-coverage-fixes

QA/Tests: various code coverage tweaks

cbcf363a86f93cdd3b01490a0a32ba3f48d76176 authored over 2 years ago by Juliette <[email protected]>
GH Actions/coverage: add extra (debug) step

While the feedback shown in the `setup-php` step is awesome, it doesn't show the version of Xdeb...

d8263d2e9b047685d304a314cbb7ba0f787b5040 authored over 2 years ago by jrfnl <[email protected]>
PHPUnit config: isolate a number of tests from the main test suite

The functions being tested in these three test classes all use function local `static` variables...

047929b5e1681f91de861a63ee0d8b21f5f7d3f1 authored over 2 years ago by jrfnl <[email protected]>
Tests: add select `@codeCoverageIgnore` annotations

... for code which is only in place as defensive coding, but shouldn't be reachable under normal...

2ed664c55869df85dd62f9ee3b382146131d91f0 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #328 from PHPCSStandards/passedparameters/hasparameters-account-for-parent-tokenization-change

PassedParameters::hasParameters(): account for upstream tokenization change for `parent`

6b4a0e8a2f0b4f2019cc35ee4d8bdb5312c999ce authored over 2 years ago by Juliette <[email protected]>
PassedParameters::hasParameters(): account for upstream tokenization change for `parent`

Upstream PR squizlabs/PHP_CodeSniffer 3546, which is included in PHPCS 3.7.0, changed the tokeni...

21059b549b90e5dd86b189f76f41f74af3f46bc2 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #330 from PHPCSStandards/feature/various-minor-code-tweaks

QA: various minor code tweaks

28ac79bc34a2827176d06c25f62e2d2e6ef980b8 authored over 2 years ago by Juliette <[email protected]>
Collections::returnTypeTokens(): minor code simplification

bc04066e59365b8d98b7b1f5c8337854c78af81f authored over 2 years ago by jrfnl <[email protected]>
CS/QA: use fully qualified function calls

8f1710ee6d9053f4d49d08241386c881ca8362d4 authored over 2 years ago by jrfnl <[email protected]>
BCTokens::functionNameTokens(): minor simplification

Follow up to PR 327. This simplifies the code a little.

8532ea1e89985be6c486cc6627e48f2f3a8dd09f authored over 2 years ago by jrfnl <[email protected]>
QA: remove unused use statements

93a484f7747627892be9037f5fabbbeb72483ad8 authored over 2 years ago by jrfnl <[email protected]>
QA: use strict comparisons

a6c98f1b747b9167d0dcb452c2dc8bf780db9439 authored over 2 years ago by jrfnl <[email protected]>
CS: use pre-increment instead of post-increment

a7bc760632cf6b0dae366adcf7eb4a6bc9768da1 authored over 2 years ago by jrfnl <[email protected]>
Tokens\Collections: minor code order tweak

Keep the order of the methods alphabetic.

5dfa6171ff8afb3c89465c7b0973879aa209ddb0 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #329 from PHPCSStandards/feature/tests-simplify-covers-tags

Tests: simplify the `@covers` tags in a couple of test files

fcdd2f8b944731831920ab4240a3f298a37e6001 authored over 2 years ago by Juliette <[email protected]>
Tests: simplify the `@covers` tags in a couple of test files

c19c9eea81f51b3a21a1a646509923d87d85c2b1 authored over 2 years ago by jrfnl <[email protected]>
Merge pull request #327 from PHPCSStandards/backcompat/bctokens-functionnametokens-sync-with-upsteam

BCTokens::functionNameTokens(): sync with upstream

18e785dfdff0466c1972f6a9db8368d58facd864 authored over 2 years ago by Juliette <[email protected]>