Merged
Conversation
fix return Bad Middleware when using class string name
Collaborator
|
Hey there! Thanks for the contribution! Looks like there's a unit test to fix and then I can merge this in. Thanks for that! |
Contributor
Author
|
I have fixed the route test cases, but it seems that in testing with PHP 8.4 and later versions, got some other error not caused by this. Run composer test-ci
PHPUnit 9.6.31 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.15
Configuration: /home/runner/work/core/core/phpunit.xml
Random Seed: 1766723030
............................................................... 63 / 425 ( 14%)
............................................................... 126 / 425 ( 29%)
............................................................... 189 / 425 ( 44%)
..................E
Time: 00:00.089, Memory: 12.00 MB
There was 1 error:
1) tests\commands\ControllerCommandTest::testControllerAlreadyExists
ErrorException: flight\commands\AbstractBaseCommand::addOption(): Implicitly marking parameter $mode as nullable is deprecated, the explicit nullable type must be used instead
/home/runner/work/core/core/vendor/flightphp/runway/src/commands/AbstractBaseCommand.php:90
/home/runner/work/core/core/flight/commands/ControllerCommand.php:11
/home/runner/work/core/core/flight/core/Loader.php:205
/home/runner/work/core/core/tests/commands/ControllerCommandTest.php:70
/home/runner/work/core/core/vendor/bin/phpunit:122
ERRORS!
Tests: 208, Assertions: 411, Errors: 1.
Script phpunit handling the test-ci event returned with error code 2
Error: Process completed with exit code 2. |
n0nag0n
approved these changes
Dec 27, 2025
Collaborator
|
Thanks for your help with this and runway! I'll version this in a little bit! |
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.
fix return
Bad Middlewarewhen using class string name in router.then run
php runway routesin terminal.before fix:
after fix: