sulu / skeleton

Project template for starting your new project based on the Sulu content management system
https://sulu.io
MIT License
261 stars 81 forks source link

Follow Rector best practices by disable some SetLists #234

Closed alexander-schranz closed 8 months ago

alexander-schranz commented 8 months ago
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT
Documentation PR sulu/sulu-docs#prnum

What's in this PR?

Follow Rector best practices by disable some SetLists.

Why?

@tomasvotruba recommends disabling this kind of sets for the daily CI and only activate them temporary when doing uprades.

alexander-schranz commented 8 months ago

@prokyonn in bigger project also we did run into memory issues. But the main point why I disable the rules is that rector outputs a huge warning:

Bildschirmfoto 2024-02-09 um 12 53 41

https://getrector.com/blog/5-common-mistakes-in-rector-config-and-how-to-avoid-them

alexander-schranz commented 8 months ago

The alternative would be define the jump from 6.0 -> 6.3 only:

    $rectorConfig->sets([
        SymfonySetList::SYMFONY_61,
        SymfonySetList::SYMFONY_62,
        SymfonySetList::SYMFONY_63,
        SymfonySetList::SYMFONY_CODE_QUALITY,
        SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
    ]);