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
Bumps [xt0rted/markdownlint-problem-matcher](https://github.com/xt0rted/markdownlint-problem-mat...
e24655e912b2b6d0da152e843c7fe6c8b7d513f7 authored about 2 years ago by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>As the `korelstar/xmllint-problem-matcher` repo now has a long-running `v1` branch, this update ...
753488aaf741570fdee2954c8d30c13cae04da2a authored about 2 years ago by jrfnl <[email protected]>UtilityMethodTestCase::skipJSCSSTestsOnPHPCS4(): rename test file
1a8057988c4fdc2adfd3f23a7533f6b0812b5e6a authored about 2 years ago by Juliette <[email protected]>UtilityMethodTestCase::getTargetToken(): throw exception when method called without tokenized te...
f8e211022add38ab686b3c1d9cb1c4f2a183fe39 authored about 2 years ago by Juliette <[email protected]>77ab4256e92116c28ffe9b277f4a1b59ea447d8a authored about 2 years ago by jrfnl <[email protected]>
Follow up on 382 which made the method `static`.
As the method _could_ conceivably now be calle...
53e38c02242cde86efea96a8eb8fcb95e4354a23 authored about 2 years ago by jrfnl <[email protected]>AbstractArrayDeclarationSniff: use available token array collection
1e251c66037ca5073f23a4a2149d224d88a95ff8 authored about 2 years ago by Juliette <[email protected]>20347fa8f94f222246b12afc8c6f5a6a306016ef authored about 2 years ago by jrfnl <[email protected]>
PHP 8.1 | Utils\PassedParameters: change named param implementation/named params after variadic
f89d144d07b8ea00715f98a0f42b301438c27ec7 authored about 2 years ago by Juliette <[email protected]>Follow up on 235 and 361.
As of PHP 8.1, named parameters after argument unpacking in function ...
0effc58e4dffb69beca8fba15c8a5ff89420e5b5 authored about 2 years ago by jrfnl <[email protected]>UtilityMethodTestCase::getTargetToken(): change to a static method
3f75cc5e019c09f975801b24a0305a4066939a5b authored about 2 years ago by Juliette <[email protected]>The method effectively was already `static` as it didn't use `$this`. Making it explicitly stati...
8aebf8a4fa5e44d5211a2c91e8aeabdc04c09720 authored about 2 years ago by jrfnl <[email protected]>Collections: add new `shortArrayListOpenTokensBC()` token array
e11d8f990590b54c1c44f2ed5ca5326dd6cc517b authored about 2 years ago by Juliette <[email protected]>Includes tests.
Includes implementing the new token array in all the appropriate places.
8ee11f261f02d190796fa3da1b87e08705fb53d8 authored about 2 years ago by jrfnl <[email protected]>AbstractArrayDeclarationSniff::getActualArrayKey(): improve handling of escaped embedded vars
18f5d8fae440664ac2cf13e79d53b5476667ef8a authored about 2 years ago by Juliette <[email protected]>... in heredocs by using the new `TextStrings::stripEmbeds()` method.
Includes additional tests.
e7f28ccca0316709318ad151b347dc24e30c9d21 authored about 2 years ago by jrfnl <[email protected]>FunctionDeclarations::getParameters(): add caching
0fb0345b48dc6685502bb6d1028228a809e357e7 authored about 2 years ago by Juliette <[email protected]>Follow up on 332
While most function declarations will be quite straight-forward, for function ...
c8136436905e6007b3bb31cda80e1213f8ba620c authored about 2 years ago by jrfnl <[email protected]>QA: make all classes final
be2cdceba0707bacdb249de1c155128698b744ef authored about 2 years ago by Juliette <[email protected]>... as there can never be a (grand-)child class.
34fdeb5352f00ba008139eb400e80d6744e827d8 authored about 2 years ago by jrfnl <[email protected]>The "class vs sniff name" matcher in the PHPCS autoloader does not handle sniffs classes extendi...
fcc9cc97e7004a389b943600be0bcc5e6f9f9ee1 authored about 2 years ago by jrfnl <[email protected]>Tests: use abstract base class for the `Operators::isUnaryPlusMinus()` tests
be649f0dbe82b7baadd3779ce343df17fdc3092d authored about 2 years ago by Juliette <[email protected]>fc5129fad9dd2006d464c5716cdc32a1db484283 authored about 2 years ago by jrfnl <[email protected]>
Tests: use abstract base class for the `SpacesFixer` tests
2c438c816c45fa913b9810ce0939053db1193bb6 authored about 2 years ago by Juliette <[email protected]>f8b46b31da3a4b9c803e9d25e9e4bf96f8511bea authored about 2 years ago by jrfnl <[email protected]>
Tests: move extra tests to the "risky" group
0e8991c3666b4cd723c31fe4f95116f8a5fe7a27 authored about 2 years ago by Juliette <[email protected]>... as those are basically testing PHPCS itself and not the code in PHPCSUtils, so may start fai...
6b4a752afcf586d6c5f65277c1009c7980890bab authored about 2 years ago by jrfnl <[email protected]>UtilityMethodTestCase::getTargetToken(): throw an exception when delimiter not found
1e4177626176d7f040223570a7011c152ed65361 authored about 2 years ago by Juliette <[email protected]>PR 273 updated the UtilityMethodTestCase::getTargetToken()``method to fail a test with a descri...
2ec3cbd2f3fb2497f1a80367f11ffacc2fde2986 authored about 2 years ago by jrfnl <[email protected]>UtilityMethodTestCase::getTargetToken(): throw a custom exception when target token not found
2970e547c6ebbe1844b17ea07a779d1625d477b7 authored about 2 years ago by Juliette <[email protected]>PR 248 introduced the option to throw an exception when the target token couldn't be found (inst...
a58b17591ba0926ab182407f6efacb9533ab7ca6 authored about 2 years ago by jrfnl <[email protected]>UtilityMethodTestCase: split a test class in two
189222e2a813658aea58ef80cf7766c19cc28ba4 authored about 2 years ago by Juliette <[email protected]>The tests for the `UtilityMethodTestCase::getTargetToken()` had a hidden dependency on the `test...
d0b91a3cc53fadc7a67b7d65f98770fe0c895533 authored about 2 years ago by jrfnl <[email protected]>BCFile::findStartOfStatement(): sync in new tests from upstream + add extra tests
79164c603cbf1e7a64ffe403dd2c08a0708f2d35 authored about 2 years ago by Juliette <[email protected]>
Refs:
* https://github.com/squizlabs/PHP_CodeSniffer/commit/ef80e53de0e3c78f1a5599310d2b9803061a...
When inside a `switch` `case`/`default` `break`/`continue`/`return`/`exit`/`throw` statement, th...
39a6967f1dc2c0542f92b2be35590b4614e3ce7a authored about 2 years ago by jrfnl <[email protected]>Follow up on version drop/ remove some more code
3cb1d7d166002ae9716a7fdf4f173a1b1c1022f1 authored about 2 years ago by Juliette <[email protected]>f729956e89758df2e149270642661d3812ae917d authored about 2 years ago by jrfnl <[email protected]>
Remove a line which was only added to the test case file for a PHPCS cross-version support issue...
4b03f3b4b01bcd2455e566fa4e867f5e08d7461e authored about 2 years ago by jrfnl <[email protected]>The "valid identifier" check was only in place to handle BC for PHPCS < 3.6.0 and should no long...
1974cf5bcf4c48864ddc94c74076649c382ccbde authored about 2 years ago by jrfnl <[email protected]>Follow up on 250 and 347.
PR 250 introduced a polyfill for the PHPCS native `Tokens::tokenName(...
d10defdd7ed411432149c5ff529834738cbd3509 authored about 2 years ago by jrfnl <[email protected]>PHP 8.2: add support for `true` type
c2a08c5e491ccdde07c58438c4e99150a2ddc447 authored about 2 years ago by Juliette <[email protected]>PHP 8.2 | ObjectDeclarations::getClassProperties(): add support for readonly classes
bdc9d704d8fae097ca67ceac3604d78712c1ee32 authored about 2 years ago by Juliette <[email protected]>PHP 8.2 | Scopes::isOOConstant(): add support for constants in traits
50cb5356448b28e9edcc371bf53b02763029a9f2 authored about 2 years ago by Juliette <[email protected]>As pulled in upstream PR 3662 (not yet merged)
Ref:
* squizlabs/PHP_CodeSniffer 3662
As pulled in upstream PR 3662 (not yet merged)
Ref:
* squizlabs/PHP_CodeSniffer 3662
As pulled in upstream PR 3662 (not yet merged)
Ref:
* squizlabs/PHP_CodeSniffer 3662
PHP 8.2 introduces `readonly` classes. The `readonly` keyword can be combined with the `abstract...
770fcfb51aa9d57329d11aa3faea82aab9d84411 authored about 2 years ago by jrfnl <[email protected]>As of PHP 8.2, it is allowed to declare constants in traits.
This commit adds support for detec...
67f489819240c1a2e9fa8cb4974c67033a955220 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1: add support for intersection types
dd41a730c5aad1f13e719e4463f4d3c1864f02b0 authored about 2 years ago by Juliette <[email protected]>
Ref:
* squizlabs/PHP_CodeSniffer 3581
Co-authored-by: Jaroslav Hanslík <[email protected]>
a3c3e0e8c582820eb3bfbb5ed897b126045c7217 authored about 2 years ago by jrfnl <[email protected]>
Ref:
* squizlabs/PHP_CodeSniffer 3581
Co-authored-by: Jaroslav Hanslík <[email protected]>
b68597849a15b517f120564645c45011e7bfb0fa authored about 2 years ago by jrfnl <[email protected]>Sync with upstream PRs 3581 which added support for PHP 8.1 intersection types to the method.
R...
0e869371fb3ac56992c5501b2782f0c95e8b7ee7 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 | BCFile/FunctionDeclarations::get[Method]Parameters(): add test with new in initializers
422e688a6d2458ab864a8d3fa7a1732c4b366747 authored about 2 years ago by Juliette <[email protected]>... to verify this is handled correctly.
91dc05c35b1b5ff9ddf1a49f95f6a167447eff9c authored about 2 years ago by jrfnl <[email protected]>PHP 8.1: add support for readonly properties
b847a9592738dc07d0e20d17dfdecfba82c24776 authored about 2 years ago by Juliette <[email protected]>PHP 8.1 | PassedParameters::hasParameters(): prevent false positives for first class callable de...
7472c96d4084427976127e8d4803f5bc528ca7f6 authored about 2 years ago by Juliette <[email protected]>
> ... in constructor property promotion.
>
> Note: the `property_readonly` key will always be ad...
Includes:
* Updating the `Collections::$propertyModifierKeyword` property to allow for the `T_RE...
PHP 8.1 introduced a new callback declaration syntax, called "first class callables".
This synta...
PHP 8.1 | PassedParameters::getParameters(): document test with named params after argument unpa...
81d22d0bbf1f37c05296ead629b9c23955ecb89e authored about 2 years ago by Juliette <[email protected]>BCTokens: add support for new `contextSensitiveKeywords` token array
b1a488948f3fc7e5a409c549438a71d13f5320c7 authored about 2 years ago by Juliette <[email protected]>PHP 8.1 | BCFile/FunctionDeclarations::get[Method]Properties(): add tests with `never` type
712799c47e6a230d0153e8256195255bb8a038da authored about 2 years ago by Juliette <[email protected]>Prior to PHP 8.1, using named arguments after a variadic argument in a function call was a compi...
190a5e548f67d2ccbc24466e61744fbdf39f976a authored about 2 years ago by jrfnl <[email protected]>... as introduced in PHPCS 3.7.0 and updated in PHPCS 3.7.1.
Upstream PR 3484 introduces a new ...
4530d89463313705229f81b1caa9737c091205ef authored about 2 years ago by jrfnl <[email protected]>
Ref:
* squizlabs/PHP_CodeSniffer 3582
Co-authored-by: Jaroslav Hanslík <[email protected]>
a5a9bbbfe627f4b4f7c6dac7a3491f02cc7f460e authored about 2 years ago by jrfnl <[email protected]>PHP 8.1: add support for enums
ebcd67cce6834e40edd77e978aee4299a4ef81bd authored about 2 years ago by Juliette <[email protected]>Handle enums in the same way as interface properties (neither are supported by PHP).
> Neither ...
71f6c6d4d680872c049aca8facc724b916705fc2 authored about 2 years ago by jrfnl <[email protected]>f90dd123b575b9c4cb999474c927a1afa851f38e authored about 2 years ago by jrfnl <[email protected]>
> An `enum` declaration can implement one or more interfaces.
>
> This commit updates the `File:...
... to verify the method correctly throws an exception.
699289db2d64009dbdfa036578deed1f668273ab authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 introduced a new type of OO structure: enums.
Enums are a named structure, so the `BCFi...
59c43ca316a5246c789ae8e5f2da5f3bf25bf017 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 introduced a new type of OO structure: enums.
Unlike classes, properties are not allowe...
d693735313073d49e071744e54e19cd6de204053 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 introduced a new type of OO structure: enums.
Alike classes, methods can be declared in...
ef4ead677c8ff0a27489fe7e30b9ef02b7337371 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 introduced a new type of OO structure: enums.
Alike classes, constants can be declared ...
6451f9f3e29ebe81cc19816c7bb6f0c75e166e85 authored about 2 years ago by jrfnl <[email protected]>PHP 8.1 introduced a new type of OO structure: enumerations, which uses the `enum` keyword / `T_...
5f07dad26a7d71102b08cc1f80e8bed5a178d3a2 authored about 2 years ago by jrfnl <[email protected]>PHP 8.0: add support for attributes
0b2f4e1a9d38a8957a213a87139994c12e0f3c65 authored about 2 years ago by Juliette <[email protected]>As of PHP 8.0, attributes can be attached to functions, closures, arrow functions, classes, inte...
d3a448e0ffa33c8c1f5b308f3b73f0abc246af10 authored about 2 years ago by jrfnl <[email protected]>Sync with upstream PR 3203 which ensures that attributes for properties are correctly regarded a...
174ee37aa575ff5b23c75025b80b2e8fd5db44ca authored about 2 years ago by jrfnl <[email protected]>Efficiency tweak: skip over potentially large attribute declarations when walking up to find a n...
d6a85810f9a88f2cab9febe8594255e95237d154 authored about 2 years ago by jrfnl <[email protected]>As of PHP 8.0, attributes can be attached to functions, closures, arrow functions, classes, inte...
4c2803602af28347fa1232baa4dde195cc3dfa4b authored about 2 years ago by jrfnl <[email protected]>> This commit adds handling of parameter attributes to the `File::getMethodParameters()` method ...
19aa5768db443f28e18ae1acbcfa2148635d28ae authored about 2 years ago by jrfnl <[email protected]>PHP 8.0: add support for match expressions
25ac2cdb883d29e7f6b34ec6da83942811022d3e authored about 2 years ago by Juliette <[email protected]>PHP 8.0 introduced match expressions as an new control structure.
While a `match` expression wi...
390e964e4fb53d2e14b5a8c2c6278a6c40a1acaf authored about 2 years ago by jrfnl <[email protected]>PHP 8.0 introduced match expressions, which can contain arrays in both the match "case" as well ...
f5f91ee80321f232c0b7a6b6053170f4cc43e502 authored about 2 years ago by jrfnl <[email protected]>PHP 8.0 | BCFile/FunctionDeclarations::get[Method]Parameters(): add tests with trailing commas
dbc671c13ac96c361bd06f14452f5eba33be52e0 authored about 2 years ago by Juliette <[email protected]>Since PHP 8.0, trailing commas are allowed in parameter lists and closure `use` lists.
This add...
8e35043d2c0a28b8e505e69bbe8cea0fc4f9fc8e authored about 2 years ago by jrfnl <[email protected]>PHP 7.4/8.1 | PassedParameters::getParameters(): add tests with array unpacking in array express...
290da2e3856aa0d3fb5ca541deab46bf8ba69245 authored about 2 years ago by Juliette <[email protected]>Adds tests to verify compatibility with PHP 7.4 array unpacking in array expressions and PHP 8.1...
9eea60bf3486ee786b072ef24cdcd34f0d2179aa authored about 2 years ago by jrfnl <[email protected]>BCFile/FunctionDeclarations::get[Method]Parameters: sync in new test from upstream
a46cb7223b4fcded2c9349bd4b4db99af64b5d29 authored about 2 years ago by Juliette <[email protected]>BCFile/FunctionDeclarations::get[Method]Properties(): add extra test
db3a456c13045b1dd202cf41b7c9e651d4a47b04 authored about 2 years ago by Juliette <[email protected]>Add test documenting behaviour for comments
This test demonstrates and documents the existing b...
b09e02b137611c9169a12573943c82dc02706b69 authored about 2 years ago by jrfnl <[email protected]>... to safeguard against a tokenizer issue which was fixed in PHPCS 3.5.7.
Ref: squizlabs/PHP_C...
b6adfc2fe31aea1993628e36008cb3f2c1385b78 authored about 2 years ago by jrfnl <[email protected]>BCFile::findEndOfStatement(): sync in new tests from upstream
96dd2afe2068d531b14e1089b972a5b28c2e76ef authored about 2 years ago by Juliette <[email protected]>
Refs:
* https://github.com/squizlabs/PHP_CodeSniffer/commit/faff2f08399546faa306f6903b3df3920a46...
Tokens\Collections: simplify by implementing a magic __callStatic() method
28794c7566962a27a8d29f28d1f898adf1eed4c9 authored about 2 years ago by Juliette <[email protected]>... for all methods without logic and where there has been no name-change between the (now depre...
dabffea738615c83875525d7e33cf22dc4d94676 authored about 2 years ago by jrfnl <[email protected]>Move most pertinent documentation to the properties and remove it from the methods in anticipati...
cf6fd6a2a168a840dc4bad4bf0582187a2a8820a authored about 2 years ago by jrfnl <[email protected]>As much as possible, make all methods use (`private`) properties for the actual token arrays.
I...
fde54385ad154f01c9c1955cd4a4a1fd552d6b33 authored about 2 years ago by jrfnl <[email protected]>GH Actions: various updates
b6ceb805322ccdf680e86992d469827e306c7b35 authored about 2 years ago by Juliette <[email protected]>