Skip to content

change: Migrate static analysis to Mago#28

Merged
remipelhate merged 31 commits into
mainfrom
change/migrate-static-analysis-to-mago
Jun 5, 2026
Merged

change: Migrate static analysis to Mago#28
remipelhate merged 31 commits into
mainfrom
change/migrate-static-analysis-to-mago

Conversation

@remipelhate

@remipelhate remipelhate commented Jun 4, 2026

Copy link
Copy Markdown
Member

This PR replaces PHPCS Fixer, PHPStan and Rector with Mago in order to simplify our tooling setup. No more separate configuration files for the different static analysers, everything is defined in mago.toml. In addition, Mago runs much faster than any of these other static analysis tools, both locally and within workflows.

Important

Mago is less "flexible" than some of its alternatives and strictly enforces PER-CS coding standards. This means that some of the internals may be formatted slightly differently from what we're used to. Changes made to the internals were done to fix the reported issues, though I believe some of them could be refactored slightly better (but that was not the goal in this PR).

@remipelhate remipelhate force-pushed the change/migrate-static-analysis-to-mago branch from 1593e50 to 334961a Compare June 4, 2026 09:40
@remipelhate remipelhate force-pushed the change/migrate-static-analysis-to-mago branch from 334961a to 1a185cf Compare June 4, 2026 09:43
@remipelhate remipelhate force-pushed the change/migrate-static-analysis-to-mago branch 2 times, most recently from c3d3c50 to ef441a3 Compare June 4, 2026 17:34
@remipelhate remipelhate force-pushed the change/migrate-static-analysis-to-mago branch from ef441a3 to d3e79d6 Compare June 4, 2026 17:37
@remipelhate remipelhate self-assigned this Jun 4, 2026
This was implementated to allow using the constraint on Laravel’s TestResponse object. However, there is no need for it. This can be solved by passing $response->json() instead of the TestResponse instance.
@remipelhate remipelhate force-pushed the change/migrate-static-analysis-to-mago branch from 5785cd9 to e17e2cf Compare June 5, 2026 08:46
@remipelhate remipelhate marked this pull request as ready for review June 5, 2026 08:48
Comment thread src/Laravel/Constraint/Eloquent/ModelComparatorTest.php
Comment thread src/Factories/ImmutableFactoryTest.php Outdated
@remipelhate remipelhate merged commit 3a74d9d into main Jun 5, 2026
5 checks passed
@remipelhate remipelhate deleted the change/migrate-static-analysis-to-mago branch June 5, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants