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

Merge pull request #421 from PHPCSStandards/develop

Release 1.0.0

df0ef52315e941762d5e48ba0ebbf7bdc3c8e6e8 authored almost 2 years ago by Juliette <[email protected]>
Merge pull request #420 from PHPCSStandards/feature/changelog-1.0.0

Changelog for PHPCSUtils 1.0.0

8d3b6cb4f3116b3bd6a24e5cf491b5cb2163f70c authored almost 2 years ago by Juliette <[email protected]>
Changelog for PHPCSUtils 1.0.0

6eebd6e2c15d55b4852eaf7a712864393b113fd1 authored almost 2 years ago by jrfnl <[email protected]>
Merge pull request #419 from PHPCSStandards/feature/ghactions-add-workflow-to-generate-website

GH Pages/GH Actions: generate the documentation instead of committing it

117c80753ac348dd61ce9e7e0ad5e6a7cc131d8d authored almost 2 years ago by Juliette <[email protected]>
Generate the documentation instead of committing it - step 2

This commit adds the following:
* A GH Actions workflow.
This workflow will:
- Generate ...

b93b09adb6b5d96988ea775191c518acd7410d77 authored about 2 years ago by jrfnl <[email protected]>
Generate the documentation instead of committing it - step 1

This removes all files containing some form of "generated" documentation.
This includes:
* The `...

d26da0d3ba3b1c161678b1877ad6d3b62e6a7f21 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #418 from PHPCSStandards/feature/ghpages-minor-tweaks

GH Pages: minor tweaks

caf53797ba99775647ab9d1f5a6b6c50b73b8181 authored about 2 years ago by Juliette <[email protected]>
Merge pull request #417 from PHPCSStandards/feature/readme-minor-tweak

README: minor improvement to installation instructions

c110b8a1416dc3abf23ded163b928f4561a790da authored about 2 years ago by Juliette <[email protected]>
GH Pages: minor tweaks

... to the configuration and the sidebar layout.

c2f35425bc5952947b823ef39f60657a1e9e28d1 authored about 2 years ago by jrfnl <[email protected]>
README: minor improvement to installation instructions

f354030063a1bf95fe16de2db3ddbf912b33b447 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #416 from PHPCSStandards/develop

Release 1.0.0-rc1

a98f01ed64002e2638540c53ce71e240a84a3317 authored about 2 years ago by Juliette <[email protected]>
Merge pull request #415 from PHPCSStandards/feature/changelog-1.0.0-rc1

Changelog for PHPCSUtils 1.0.0-rc1

95a8d74570f41d8ade077b25f6ffbed999745096 authored about 2 years ago by Juliette <[email protected]>
Changelog for PHPCSUtils 1.0.0-rc1

a17a7eb8d7d681c8682628e38ef7092cc6fec991 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #414 from PHPCSStandards/docs-website/update-docs

Docs website: update for release of PHPCSUtils 1.0.0-rc1

289fa92bff573f4137da78f1435299f1326b7246 authored about 2 years ago by Juliette <[email protected]>
Docs website: sync readme changes into docs index.md

0fc772706625f1e9aaea7b85a26ddbb96dc4812d authored about 2 years ago by jrfnl <[email protected]>
Doc website: update documentation for PHPCSUtils 1.0.0-rc1

The docs have been regenerated using phpDocumentor 3.3.1 with `--visibility=public,protected`.

63048265a73815ad8be0a62403daca323c6e59af authored about 2 years ago by jrfnl <[email protected]>
Collections: minor doc tweak

afe29475fe6e2d8b5860d0ee006c5ee222ba47c6 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #413 from PHPCSStandards/feature/various-doc-fixes

Various doc fixes

ee693aa686088dcc5f48b0d61f7336266952aaa3 authored about 2 years ago by Juliette <[email protected]>
Various doc fixes

e2c27f62c1d42659ad6c123e74920063c1da2941 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #412 from PHPCSStandards/variables/getmemberproperties-typestring-extra-tests

Variables::getMemberProperties(): add tests with comments and whitespace in types

eec1c7342653af2f1da3a5aa713491c331352c69 authored about 2 years ago by Juliette <[email protected]>
Variables::getMemberProperties(): add tests with comments and whitespace in types

.. to safeguard that those do not get included in the `type` string.

ac257d88c59d7571b609a402f62b89ba5b4b2537 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #410 from PHPCSStandards/feature/remove-deprecated-functionality

Remove deprecated functionality

2bf0fe8cfdfb0bb806534810edbab45e54a85483 authored about 2 years ago by Juliette <[email protected]>
Utils\ControlStructures: remove the deprecated `getDeclareScopeOpenClose()` method

Use the the `scope_opener`/`scope_closer` on the `T_DECLARE` token instead.

Follow up to #347.

b77eece54137def764f4211b4e52fef8eb8e4ba1 authored about 2 years ago by jrfnl <[email protected]>
Utils\FunctionDeclarations: remove the deprecated arrow function related methods

Use the `T_FN` token directly instead.

Follow up to #347.

2e61e3accd6a7cfb3963d6405e972d084166f834 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: make deprecated properties `private`

... and remove the remaining methods without logic (but which had a name change one way or the o...

709420f98452e5d4ac0536099d9f5e376af5478b authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: remove previously deprecated methods

Follow up to #347.

6a3f4750bc7f4bd7697acb86266aef530ac573e2 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: remove the deprecated `$OONameTokens` property.

Use the `PHPCSUtils\Tokens\Collections::namespacedNameTokens()` method instead.

Follow up to #1...

234d76a5de14596a26ed5bf6126e0075fe11ecb3 authored about 2 years ago by jrfnl <[email protected]>
Tokens\Collections: remove the deprecated `$magicConstants` property.

Use the PHPCS native `Tokens::$magicConstants` property or the `PHPCSUtils\BackCompat\BCTokens::...

23b5e3491cdc4eb6c28732cb692a4959b6d85a7b authored about 2 years ago by jrfnl <[email protected]>
Drop the PHPCS23Utils standard

... which provided the basis of the compatibility layer with PHPCS 2.x. This is no longer needed...

01e688a81cac0828686f54e04c84730534253cec authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #409 from PHPCSStandards/feature/remove-last-deprecated-property-usage

IsShortArrayOrList: switch to Collections method

08826c2bd611ba8faf0a96e17aed1194cc9ee095 authored about 2 years ago by Juliette <[email protected]>
IsShortArrayOrList: switch to Collections method

Oops... looks like I missed one in the earlier switch-over.

ae9b19d5e1253b72df25d1557fa59f3a09d30e74 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #407 from PHPCSStandards/lists/getopenclose-only-accept-openers

Lists::getOpenClose(): efficiency fix - only accept list open tokens

ae30b422de0a8a6528a9271174bd370d920595c4 authored about 2 years ago by Juliette <[email protected]>
Merge pull request #406 from PHPCSStandards/arrays/getopenclose-only-accept-openers

Arrays::getOpenClose(): efficiency fix - only accept array open tokens

425abc304449bace9d85c1d613f3017ed284549e authored about 2 years ago by Juliette <[email protected]>
Lists::getOpenClose(): efficiency fix - only accept list open tokens

The `Lists::getOpenClose()` method only _handled_ list open tokens, but _accepted_ both open as ...

530fd5be7a08ac2130351d5ea0ef421ae08f21c0 authored about 2 years ago by jrfnl <[email protected]>
Arrays::getOpenClose(): efficiency fix - only accept array open tokens

The `Arrays::getOpenClose()` method only _handled_ array open tokens, but _accepted_ both open a...

f655b41d4cb4752644d820ae27d86be191848045 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #405 from PHPCSStandards/feature/collections-add-listopentokens

Collections: add new `listOpenTokensBC()` method

6e2cb6e9fec47a928e70525ae2bc5e2ce90e750a authored about 2 years ago by Juliette <[email protected]>
Collections: add new `listOpenTokensBC()` method

Includes correction to the `@since` tag of the previously added `Collections::$constantModifierK...

c46701b52e5fe031de1e710240e632badccdf368 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #404 from PHPCSStandards/feature/ghactions-tweaks

GH Actions: various tweaks / PHP 8.2 not allowed to fail

3d9a543fa603c680cc84739b36ce0057b9c93dda authored about 2 years ago by Juliette <[email protected]>
GH Actions: update PHP versions in workflows

PHP 8.2 has been released today :tada: and the `setup-php` action has announced support for PHP ...

39c410372079f678840776764864f3ea7d3fe1cd authored about 2 years ago by jrfnl <[email protected]>
GH Actions: minor simplification

... of the bash `date` command in the earlier pulled cache busting.

0a0cfe64cbbf4056b38063c09eaa4b1a0b4cf777 authored about 2 years ago by jrfnl <[email protected]>
GH Actions: use PHP `latest`

... for those tasks where the PHP version isn't that relevant.

604b1b1bbfdea8ea51726be08f470a9748901b51 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #403 from PHPCSStandards/feature/controlstructures-hasbody-bugfix-single-line-control-structures

ControlStructures::hasBody(): handle no body due to PHP close tag

ad3207d6a8053d755d166f6184dd22d50ff2d305 authored about 2 years ago by Juliette <[email protected]>
ControlStructures::hasBody(): handle no body due to PHP close tag

When a control structure condition is directly followed by a PHP close tag, a semicolon is silen...

234f7223540abde4c5118d9f8816865b11cc8c15 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #402 from PHPCSStandards/feature/ghactions-cache-busting

GH Actions: bust the cache semi-regularly

d9555ffa03a2f8ad73ed44f7801a22973e915b65 authored about 2 years ago by Juliette <[email protected]>
GH Actions: bust the cache semi-regularly

Caches used in GH Actions do not get updated, they can only be replaced by a different cache wit...

c27ed54e496649335c7db12003022237b90e6794 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #401 from PHPCSStandards/objectdeclarations/getclassproperties-add-token-pointers

ObjectDeclarations::getClassProperties(): add token pointer indexes to return array

41ef0af5d9694f5daadcc69a185bd20e5e3569ae authored about 2 years ago by Juliette <[email protected]>
ObjectDeclarations::getClassProperties(): add token pointer indexes to return array

... as quite some sniffs will need those anyway and it prevents having to duplicate the token wa...

1ba890433a92991b833f742c27360a599006d796 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #400 from PHPCSStandards/feature/collections-constantmodifierkeywords

Collections: add new `constantModifierKeywords()` method

c3effcb6f82a12647d6ef62f3f19d9b20818b879 authored about 2 years ago by Juliette <[email protected]>
Collections: add new `constantModifierKeywords()` method

c60b4d439df38b040c6741eef56a60decbe7dd05 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #399 from PHPCSStandards/develop

Release 1.0.0-alpha4

37c6da9a0aede973974ae02ef1af2dd641355e86 authored about 2 years ago by Juliette <[email protected]>
Merge pull request #398 from PHPCSStandards/feature/changelog-1.0.0-alpha4

Changelog for PHPCSUtils 1.0.0-alpha4

e3bb76d8320e376404d36e5de949825899ad8945 authored about 2 years ago by Juliette <[email protected]>
Changelog for PHPCSUtils 1.0.0-alpha4

379efa887b9a96dd90e6b887d4622e84c3f296f1 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #397 from PHPCSStandards/feature/290-follow-up-branch-rename

Update all references to the main branch from `master` to `stable`

f530fbc6a9588a087cd553e51c7d7d6fe8246f1f authored about 2 years ago by Juliette <[email protected]>
Update all references to the main branch from `master` to `stable`

... ahead of actually renaming the branch (just before release).

f3b2b9820c7063ceab9975d43178b9651b8083e4 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #396 from PHPCSStandards/docs-website/update-configuration-and-content

Docs website: update for release of PHPCSUtils 1.0.0-alpha4

21c03f1987f46b5ffb473e0386e74d8c3b90a42f authored about 2 years ago by Juliette <[email protected]>
Docs website: sync readme changes into docs index.md

ba0f993873bf8ad7ee5f6e31d817785e7cd3bbc8 authored about 2 years ago by jrfnl <[email protected]>
GH Pages: minor tweaks to the configuration file

Includes adding a `commonmark` configuration to prevent Commonmark blindly stripping _all_ HTML.

00fc5ee97a283885506ca174f4dcc383585d5e16 authored about 2 years ago by jrfnl <[email protected]>
GH Pages: minor template tweaks

* Always display link to the project on GH.
The `site.github.is_project_page` key does not s...

4a80d51d38d4a0e963939c401df9484514f7fa23 authored about 2 years ago by jrfnl <[email protected]>
Doc website: update documentation for PHPCSUtils 1.0.0-alpha4

The docs have been regenerated using phpDocumentor 3.3.1 with `--visibility=public,protected`.

265bff6861e1fb2b1738d37b6b1579848e6cc7a5 authored about 2 years ago by jrfnl <[email protected]>
Doc website: regen of PHPCSUtils 1.0.0-alpha3 documentation

... using the latest released version of phpDocumentor (`3.3.1`) so the diff for the actual rege...

b172b3a91c28ac805d2e800113e699ec0c8abea0 authored about 2 years ago by jrfnl <[email protected]>
Doc website: update the phpDocumentor configuration

... after recent fixes in phpDocumentor3.

ac66cb6ce0f681fe8e851b917db6176c058be060 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #395 from PHPCSStandards/feature/various-misc-updates

Docs: miscellanuous other updates

ce90dbfc8b186ce288a7087eb8af620819cd2a1b authored about 2 years ago by Juliette <[email protected]>
Composer: remove the `phpcs2` keyword

97f5dd2e807576b069418b6c5dfa86fa22f9ab14 authored about 2 years ago by jrfnl <[email protected]>
Misc/configs: update links

441270a10b2317772317ec83b63fba2922419c86 authored about 2 years ago by jrfnl <[email protected]>
README/Changelog: various improvements

Includes:
* Updating the "Tested on PHP" badge to include PHP 8.2.
* A few `http` to `https` fix...

0bdd41186a8cd7b2c3dbec29ef75a32ce10c742a authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #394 from PHPCSStandards/feature/various-doc-fixes

Docs: various updates to the docblocks and inline comments

34bcef60543b1397ef50ca57303ac438f34c1f5c authored about 2 years ago by Juliette <[email protected]>
Merge pull request #393 from PHPCSStandards/feature/various-minor-cleanup-and-tweaks

CS/QA: minor clean-up

e3aa8ab9bf9e725be7424b7c3410e95e0be6b344 authored about 2 years ago by Juliette <[email protected]>
CS/QA: various minor clean-up

fd2686474a43c4a83f621a21807835183f4e35e5 authored about 2 years ago by jrfnl <[email protected]>
Docs: various updates to the docblocks and inline comments

Includes:
* Fixing some spelling errors.
* Adding missing `@since` tags.
* Adding missing link d...

e7a3d6363c48bb640d7647afc786a6219d078184 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #392 from PHPCSStandards/utils/isshortlist-isshortarray-refactor-improve-performance

IsShortArrayOrList: refactor for better accuracy and improved performance

75e13f41377e66a814770a2ecae8837c19511026 authored about 2 years ago by Juliette <[email protected]>
Tests/IsShortArrayOrList: add even more tests

A significant number of these tests would previously lead to incorrect results for the short lis...

6cd5532006de10d26438d5b661b865b3220fcf4a authored about 2 years ago by jrfnl <[email protected]>
IsShortArrayOrList: refactor for accuracy and improved performance [3]

This is step 3 in a refactor to improve short list/short array determination.

This refactor add...

a6b0cf1297a353ef53a706ec431c74e5bd2afbc7 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: add tests with match expressions (PHP 8.0)

e22e1f297087c1aa7653f6ee44155db3e959c9d3 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: add tests with attributes (PHP 8.0)

37eabc66fe6c691f99fcff4eca5d10a8373dcf2c authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: add extra test with arrow function (PHP 7.4)

d2c4a4186b381c2e8df23a5289fcf728778fefd0 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: add extra test with array unpacking (PHP 7.4/8.1)

c23599095ec32075cc3e70f1aa7ad34e1b2e62e9 authored about 2 years ago by jrfnl <[email protected]>
Arrays::isShortArray()/Lists::isShortList(): consolidate the caching [2]

This is step 2 in a refactor to improve short list/short array determination.

While caching had...

36c0cf7255a04fe1ca44d3908efd2095a674a92f authored about 2 years ago by jrfnl <[email protected]>
IsShortArrayOrList: only accept bracket opener tokens

As the new `IsShortArrayOrListWithCache` class will now be the entry point to the `IsShortArrayO...

c387f30b2eedcc6c164cb0dd7795806baf9bca71 authored about 2 years ago by jrfnl <[email protected]>
IsShortArrayOrList::isShortArrayBracket(): account for newly discovered tokenizer issue

Turns out a square bracket after a non-braced control structure is always tokenized as `T_OPEN_S...

5a038f79d1c626094b7ae8ca8e80238c09a8fc98 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: split test file [3]

Split off the tests which are specific to the `IsShortArrayOrList::isInForeach()` method to a de...

ad46d8113abda635b2691b22b090a12c4cde26e7 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: split test file [2]

Split off the tests which are specific to the `IsShortArrayOrList::isSquareBracket()` method to ...

e02006aef00e10492544f21a8d662eecfed397df authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrListTest: minor improvements

Make sure all named data sets use keys within the data set as well for a more readable data prov...

2711dd96c90f1e9ab51bfae2b6d4a91e648518de authored about 2 years ago by jrfnl <[email protected]>
IsShortArrayOrList::isInForeach(): improve logic

This commit improves the stability of the `IsShortArrayOrList::isInForeach()` method by:
* Using...

b7f3904971eac5109afeecdca00f658b5ddf08bc authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList::isShortArrayBracket: enhance and expand the tests

Making sure that:
1. All types of nesting is being tested, i.e. start of outer, middle of outer,...

8570c9c7a92aa6a048420aa965d2207143babf68 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: move original tests

This commit moves the original test set for the `IsShortArrayOrList` functionality from the `Uti...

4e7c1194a2f37d86c3709116068cf825eb2dfec1 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: refactor to directly use the `IsShortArrayOrList` class

This commit updates most tests to use the `IsShortArrayOrList` class directly instead of going v...

b711d9e1d51800fef0661971086972075755e66c authored about 2 years ago by jrfnl <[email protected]>
Arrays::isShortArray()/Lists::isShortList(): consolidate the logic [1]

This is step 1 in a refactor to improve short list/short array determination.

In this commit, t...

7d512752622956f8a0ea089984c63dd8d5625e39 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: split test file [1]

Split off the tests which are specific to the `IsShortArrayOrList::__construct()` method to a de...

bd71b8ad3b821bc82d17175aa23bc4c0cdd6dd95 authored about 2 years ago by jrfnl <[email protected]>
Tests/IsShortArrayOrList: various test enhancements

* Add test with PHP 8.0 nullsafe object operators to safeguard against a potential tokenizer iss...

26dcd69108a0294358318512290ed87d578eccf0 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #391 from PHPCSStandards/utils/messagehelper-stringtoerrorcode-optionally-lowercase-it

MessageHelper::stringToErrorcode(): add option to lowercase the text

9a6d622d7aae21704a29bfb92ed317540b246a3a authored about 2 years ago by Juliette <[email protected]>
MessageHelper::stringToErrorcode(): add option to lowercase the text

Includes tests.

6106f810bad9a13130bf74bfdd1c78f0275141b1 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #390 from PHPCSStandards/utils/context-new-inattribute-method

:sparkles: New `Context::inAttribute()` method

6c3e9be58a8288e341580031a0f6dc3bf5113972 authored about 2 years ago by Juliette <[email protected]>
:sparkles: New `Context::inAttribute()` method

... to determine whether an arbitrary token is within an attribute.

Includes unit tests.

bdf70c8c2afa599d3bd3d6bbae8a9ae15b784e94 authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #389 from PHPCSStandards/feature/phpcs-fix-ruleset

PHPCS: fix ruleset

e13d929c60cc7b4b20b6b1238697621da86f2c19 authored about 2 years ago by Juliette <[email protected]>
GH Actions: harden the workflow against PHPCS ruleset errors

If there is a ruleset error, the `cs2pr` action doesn't receive an `xml` report and exits with a...

276b6f8c51f4a3f09f6b66490f5c4b7c4b14ea1b authored about 2 years ago by jrfnl <[email protected]>
PHPCS: fix ruleset

The sniff this exclusion refers to is not (yet) in use in PHPCSDevCS.

3734842cba0efd5a62ae90ee839696f5b0a9b60f authored about 2 years ago by jrfnl <[email protected]>
Merge pull request #388 from PHPCSStandards/feature/ghactions-various-tweaks

GH Actions: various tweaks

0c2289a51bb285d8515091d10b078e1841743564 authored about 2 years ago by Juliette <[email protected]>
Merge pull request #387 from PHPCSStandards/dependabot/github_actions/xt0rted/markdownlint-problem-matcher-2

GH Actions: Bump xt0rted/markdownlint-problem-matcher from 1 to 2

be3eff37672713877fc70f124a4b1efb7bcef79d authored about 2 years ago by Juliette <[email protected]>
GH Actions: update a few links in inline comments

404dcb183f937c687ff6e38e38eaf56b9d4720e3 authored about 2 years ago by jrfnl <[email protected]>
GH Actions: update Ruby for GH Pages workflow

... as per https://pages.github.com/versions/

23557436065ac1d497f0bd095cb62713da5e6d2e authored about 2 years ago by jrfnl <[email protected]>