Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: Test that Transformers are adding only CustomTokens that they define and nothing else #5500

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

keradus
Copy link
Member

@keradus keradus commented Feb 17, 2021

The transformer classes are internal, so we can do whatever we want there without BC promise and upcoming BC breaks warnings.

Let's use the getCustomTokens method to ensure that Transformer is adding only allowed custom tokens, and no other transformer is adding them.

Unfortunately, to implement this check i had to bypass few things (eg access internals), but I couldn't find a good way to do it without refactoring main Tokenizer class into first-class service.

@keradus keradus requested a review from SpacePossum February 17, 2021 00:08
@keradus keradus changed the title 2.18 custom tokens DX: Test that Transformers are adding only CustomTokens that they define and nothing else Feb 17, 2021
@coveralls
Copy link

coveralls commented Feb 17, 2021

Coverage Status

Coverage remained the same at 91.929% when pulling 635068c on keradus:2.18_CUSTOM_TOKENS into e2c6a1a on FriendsOfPHP:2.18.

@keradus keradus added this to the 2.18.3 milestone Mar 1, 2021
@keradus keradus force-pushed the 2.18_CUSTOM_TOKENS branch from 635068c to 9f54f1b Compare March 1, 2021 09:29
@keradus keradus merged commit a8feb63 into PHP-CS-Fixer:2.18 Mar 1, 2021
@keradus keradus deleted the 2.18_CUSTOM_TOKENS branch March 1, 2021 09:42
@keradus keradus mentioned this pull request Mar 3, 2021
17 tasks
This was referenced Mar 11, 2021
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants