-
Notifications
You must be signed in to change notification settings - Fork 18
PHP 8 compatibility #49
Conversation
| "sort-packages": true, | ||
| "platform": { | ||
| "php": "7.1.0" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be hard for you to produce a good lock file if you remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a lock file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also https://github.com/doctrine/cache doesn't have this in its composer.json file either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a policy that is enforced in some but not all repositories to avoid issues with external tools such as phpcs, phpstan, Psalm etc.
|
Looks declaration changed in nightly |
Nope - version of PHP 8 being used is very very old.... jan 2020 :) |
|
Well that's not fair this is failing because the build now uses composer 2 and the dependencies of the project are not compatible :( |
|
You can upgrade to coding-standard 6, that will fix it ;) |
|
I did it for you in #50, you can rebase and drop the commit about reverting to Composer 1 :) |
9f425ff to
f3ade86
Compare
| "phpstan/phpstan": "^0.11.0 || ^0.12.20", | ||
| "phpstan/phpstan-phpunit": "^0.11.0 || ^0.12.16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that part is necessary for PHPStan, is it?
| "phpstan/phpstan": "^0.11.0 || ^0.12.20", | |
| "phpstan/phpstan-phpunit": "^0.11.0 || ^0.12.16", | |
| "phpstan/phpstan": "^0.12.20", | |
| "phpstan/phpstan-phpunit": "^0.12.16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order for composer to be able to resolve for 7.1 to 8.0 I found these changes necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? 0.12 is compatible with PHP 7.1 …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but this library fails badly on 0.12 :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so it's locked to 0.11 in composer.lock, is that it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - I've added a comment to .travis.yml to this effect.
|
So the last commit passes all tests including the nightly build. Yay. The previous commit failed the nightly build (php 8.0 - because as it is nightly fails are allowed there). |
|
Thanks @alexpott ! |
Fixes doctrine/reflection on PHP 8. Updates composer.json to allow PHP 8 and uses class aliases and traits to account for changes in \ReflectionClass and \ReflectionMethod
Related to #43