Fix test suite and static analysis with CakePHP 5.4#1108
Merged
Conversation
EventDispatcherTrait is no longer generic, so the use tag annotations are reported as errors by PHPStan. Unknown subcommands are rejected before they reach EntryCommand, so the error message differs between 5.3 and 5.4. Only the parts both messages have in common are asserted.
Member
Author
|
The remaining mysql/mariadb failures are not related to this PR: they come from the 5.4 serialization break tracked in cakephp/cakephp#19562 and fixed by cakephp/cakephp#19563. sqlite, pgsql, Windows and cs-stan pass with the changes here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CakePHP 5.4.0 broke the 5.x build; this restores it.
Cake\Event\EventDispatcherTraitis no longer generic, so the fourusetag annotations in the command classes now fail PHPStan withgenerics.notGeneric.EntryCommand, somigrations derpnow errors withUnknown command `cake migrations derp`.instead ofCould not find migrations command named `derp`.. Since the plugin supports^5.3.0, the test only asserts the parts both messages have in common.EntryCommand::execute()still produces its own message on 5.3 and is left untouched.