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

Fix/php cs fixer break contexts #16

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

camilledejoye
Copy link

@camilledejoye camilledejoye commented Jan 13, 2023

Q A
Branch? main (didn't find current 3.x branch)
Bug fix? yes
New feature? no
Deprecations? no
Tickets none
License MIT
Doc PR

The commit php-cs-fixer broke some steps definition in a few contexts.
The rule doctrine_annotation_spaces remove spaces around parentheses for Doctrine annotations but it works with a blacklist which is not including Given, When and Then.

It also introduced the declare(strict_types=1); which generates error in multiple places.
For instance in the DebugContext there is:

$featureName = urlencode(str_replace(' ', '_', $scope->getFeature()->getTitle()));

But getTitle returns string|null because the title is optional, which generates TypeError exceptions hiding the real failure of the test.
In Asserter::assertContains() we use preg_quote to perform the check but the expected value could be something else than a string and tests fails even though they were passing before.

@soyuka soyuka merged commit eeefcd7 into soyuka:main Jan 20, 2023
@camilledejoye camilledejoye deleted the fix/php-cs-fixer-break-contexts branch January 20, 2023 10:12
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