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

PHP 8.0 compability. #215

Merged
merged 10 commits into from
Oct 23, 2020
Merged

PHP 8.0 compability. #215

merged 10 commits into from
Oct 23, 2020

Conversation

dotdevio
Copy link
Contributor

As php 8.0 introduces new "match" keyword, library fails to run because of one class:

Coduo\PHPMatcher\Matcher\Pattern\Expander\Match

I renamed class to:

Coduo\PHPMatcher\Matcher\Pattern\Expander\ExpanderMatch

And all errors is gone. tests pass on php8.0 + phpunit 9.4 (phpunit 8.x does not support php 8.x)

@norberttech
Copy link
Member

Hey @dotdevru
thanks for your work to add PHP 8.0 compatibility to php-matcher, that's great!
We can't merge this to branch 5.x because it would mean it's going to be released in 5.1 release however I would rather like to add support for PHP 8.0 and drop support for PHP 7.2 and 7.3 at the same time keeping only PHP 7.4 which is BC Break.

So I can create a new branch 6.x and merge this PR into it reducing supported PHP version to 7.4 and 8.0.
Thanks to that change we can introduce more strict types into this library by using type arguments, properties, and return types.

Sounds good?

@dotdevio
Copy link
Contributor Author

Yes should be fine if its gonna be merged in 6.x and released as new major version because of php version BC.

@norberttech norberttech changed the base branch from 5.x to 6.x October 23, 2020 19:58
@norberttech
Copy link
Member

I created branch 6.x, feel free to remove support for PHP 7.2 & 7.3 which should make all tests green again ✅

Also bumbp phpunit/phpunit:^9.4 to support php8.
@dotdevio
Copy link
Contributor Author

I updated composer.json to php >= 7.4 & phpunit only ^9.4

@norberttech
Copy link
Member

ok, so now mutation tests are failing, I think you must also update phpunit.xml to the latest schema?

@norberttech
Copy link
Member

could you also execute composer cs:php:fix in order to launch automated coding standard fixes?

@dotdevio
Copy link
Contributor Author

ok, so now mutation tests are failing, I think you must also update phpunit.xml to the latest schema?

Yeah u are right in phpunit 9.x there config format changed i updated config.

could you also execute composer cs:php:fix in order to launch automated coding standard fixes?

U mean in github action? Add to the end of static-analyze.yml?

run: "composer static:analyze"

      - name: "CS fix"
        run: "composer cs:php:fix"

@norberttech
Copy link
Member

U mean in github action? Add to the end of static-analyze.yml?

oh no sorry, execute it locally, in the command line, this will automatically fix all issues with coding standards (empty lines, indention, useless spaces etc).

@dotdevio
Copy link
Contributor Author

Should be fine now.

@norberttech norberttech merged commit 14ffe1f into coduo:6.x Oct 23, 2020
@norberttech
Copy link
Member

It's fine! Thanks @dotdevru fixing mutation tests can be handled later

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