Fix Bootloader::init methods sorting#1251
Merged
roxblnfk merged 4 commits intospiral:masterfrom Apr 9, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the ordering of bootloader #[InitMethod] / #[BootMethod] execution to match the documented “higher priority first” behavior, and updates test fixtures/expectations accordingly.
Changes:
- Sort init/boot attributed methods by descending priority in
BootloadManager\Initializer. - Update bootloader attribute priorities and test expectations to validate the corrected ordering deterministically.
- Apply minor code-style/consistency tweaks in a few tests and console-related code.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Boot/src/BootloadManager/Initializer.php | Switches method-priority sorting to descending order (krsort) so higher priorities run first. |
| src/Boot/tests/BootloadManager/InitializerAttributesTest.php | Updates expected init/boot method order to reflect descending priority execution. |
| src/Boot/tests/Fixtures/BootloaderWithAttributes.php | Adjusts attribute priorities to unique values to make ordering assertions deterministic. |
| src/Exceptions/src/Renderer/ConsoleRenderer.php | Modifies VT100 support check call site (global function qualification changed). |
| src/Console/src/Console.php | Ensures posix_isatty is explicitly invoked from the global namespace. |
| src/Core/tests/InvokerTest.php | Makes closures static in several tests. |
| src/Console/tests/PromptArgumentsTest.php | Normalizes attribute formatting spacing in anonymous class usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
roxblnfk
approved these changes
Apr 8, 2026
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.
Right InitMethod sorting