Skip to content

Fix Bootloader::init methods sorting#1251

Merged
roxblnfk merged 4 commits intospiral:masterfrom
gam6itko:init-method-sort-fix
Apr 9, 2026
Merged

Fix Bootloader::init methods sorting#1251
roxblnfk merged 4 commits intospiral:masterfrom
gam6itko:init-method-sort-fix

Conversation

@gam6itko
Copy link
Copy Markdown
Contributor

@gam6itko gam6itko commented Apr 7, 2026

Right InitMethod sorting

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Exceptions/src/Renderer/ConsoleRenderer.php Outdated
gam6itko and others added 2 commits April 7, 2026 15:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@roxblnfk roxblnfk requested review from butschster and roxblnfk April 8, 2026 17:27
@roxblnfk roxblnfk merged commit 009f751 into spiral:master Apr 9, 2026
10 of 12 checks passed
@roxblnfk roxblnfk changed the title Init method sort fix Bootloader::init method sort fix Apr 9, 2026
@roxblnfk roxblnfk changed the title Bootloader::init method sort fix Fix Bootloader::init method sorting Apr 9, 2026
@roxblnfk roxblnfk changed the title Fix Bootloader::init method sorting Fix Bootloader::init methods sorting Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants