-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for PHP 8.1 #44
Conversation
…nting deprecation notice of passing null to is_dir Signed-off-by: Andi Rückauer <[email protected]>
…ror by static code analyzer Signed-off-by: Andi Rückauer <[email protected]>
…up() Signed-off-by: Andi Rückauer <[email protected]>
… passed Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
To make {
"ignore_php_platform_requirements": {
"8.1": true
}
} |
Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
…patibility Signed-off-by: Andi Rückauer <[email protected]>
…h PHP 8.1 Upgrade composer/composer to 2.0.14 to add compatibility with new key format of GitHub tokens Signed-off-by: Andi Rückauer <[email protected]>
…1 compatibility Signed-off-by: Andi Rückauer <[email protected]>
As version Would be happy to get some hints on the four argument errors. With the unreferenced param and |
Since the psalm errors are not related to the diff, there is no way of adding comments to those lines by using github. I will list the issues below and add suggestions on how to fix these:
Okay, to make psalm happy, we could
Just change unused params to
This could be fixed by adding generics to the
So it seems that we somehow have an annotation which is
Just change this to |
I definitely want to deep-dive more into this as I did plenty of work to make both composer v1 and v2 compatible with this component. dropping v1 because of a minor PHP version should be avoided at any cost. Could you probably re-add composer v1 as a dependency (and ensure that it will be installed when using But maybe this component needs also a different CI pipeline so we have better coverage for the dedicated composer versions. I'll think about that somewhen in the next weeks. Please ping me here or on slack if you think I might've forgotten this (which could probably be true). |
Signed-off-by: Andi Rückauer <[email protected]>
…alized in setUp() Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
*/ | ||
public function __construct($projectDirectory = '') | ||
public function __construct(string $projectDirectory = '') |
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.
This change introduce compatibility break, because changes public interface
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.
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.
Sadly, __construct
has some special behavior if it comes to arguments. So this is actually no BC break until the type-hint matches what we do state in the @var
annotation.
(sidenote: imho laminas-component-installer
is not a library and thus, semver does not really make sense here at all. But actually, we do not differ between libraries and components like this (composer plugin))
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.
fun-fact: this constructor argument is only added for unit tests so we can pass virtual filesystem directory
…tives for Psalm unnecessary Signed-off-by: Andi Rückauer <[email protected]>
Signed-off-by: Andi Rückauer <[email protected]>
- Bumps minimum supported PHP version to 7.4 - Updates to laminas-coding-standard 2.3 series - Bumps minimum supported PHPUnit version to 9.5.5 - Updates how package replaces zend-component-installer by converting "replace" rule to a "conflict" rule against all versions, and removing the laminas-zendframework-bridge. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
…ts deprecations to exceptions Signed-off-by: Matthew Weier O'Phinney <[email protected]>
- Import the `ReturnTypeWillChange` attribute (`@use` annotation does not work for engine purposes) - All dependencies are now installable under PHP 8.1, so no need to ignore platform requirements 🎉 Signed-off-by: Matthew Weier O'Phinney <[email protected]>
The majority of these are due to third-party packages not providing specific enough of return type hints, leading to "mixed assignment" and similar. Others are due to usage of things like filter/reduce/walk whereby we are operating on a subset of all arguments, but the last one is required for the operation (unused closure argument). I did refactor the PackageProviderDetectionFactory to be more clear about what it provides, and to ensure it never passes a null argument. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
Description
PHP 8.1 support.
This also fixes known incompatibilites with PHP 8.1 described in #35 and #36.