Redefine the scope of MakerBundle - #1800
Conversation
|
Within this new scope, if we have |
I would choose to support only the latest LTS version (currently 7.4), to avoid putting too much pressure on upgrading PHP and the installed packages for newcomers, while making it easier to adopt the latest features in the generated code. |
|
I agree with @GromNaN here. Changing the default code of a maker should happen only once that new code is available in LTS. And dropping support for the old LTS allows to simplify the maintenance (projects stuck on the old LTS can stick to the last release of the bundle supporting it). A new maker for a whole new feature might rely on non-LTS feature (i.e. we can add new makers for new released features even if they are not yet part of the LTS), with a check for the compatible version of dependencies. |
MakerBundle: existing makers status vs. new scopeThis report reviews every maker currently shipped by MakerBundle against the new scope (target newcomers, generate best-practice code, minimal configuration, latest LTS only, no extensibility, no edge-case options). Status legend:
|
|
Jérôme, I love this proposal. I agree 100% on it. Thanks a lot for your work here and I hope others agree so we can start closing all those issues/PRs out of the scope. Thanks! |
|
I love this! I think this new scope should have the following rules also:
Here are my opinions on the current list of makers:
|
| - Only the latest Symfony LTS is supported. The generated code targets that | ||
| LTS. New makers for post-LTS features may still be added, with a runtime | ||
| check on the required dependency versions. |
There was a problem hiding this comment.
|
Thanks for the extra rules. I would refine the target audience a bit: the bundle is for developers who are new to a given Symfony feature, not only for absolute Symfony beginners. From that angle, "single-use per project" is not the same as "low value": that single time is exactly when the developer is learning the feature and benefits the most from a working skeleton. Applied to the list:
So the exclusion rule I would adopt is narrower: drop makers whose output is fully covered by the Flex recipe or that duplicate another maker, but keep the ones that scaffold a working example of a feature, even if a project only runs them once. This scope is not set in stone: if a better way to scaffold projects emerges, either through richer Flex recipes or through another mechanism, we can revisit it and shift more responsibility away from MakerBundle. I updated the README scope section accordingly. |
01b70ff to
727708c
Compare
|
Missed this comment, I agree with you. Dropping the single-use maker's is too big a leap currently as we don't have an alternative yet. |
This PR was squashed before being merged into the 1.x branch. Discussion ---------- Remove the PHP CS Fixer integration ## Summary Following the scope discussion in #1800, this removes the PHP CS Fixer integration: - `TemplateLinter`, the bundled 3.5 MB `php-cs-fixer.phar`, the fallback config file and the `MAKER_PHP_CS_FIXER_BINARY_PATH` / `MAKER_PHP_CS_FIXER_CONFIG_PATH` env vars are gone; - `MakerCommand` no longer post-processes the generated files (and no longer prints the linter message in verbose mode). About `@kbond`'s question on PHP-Parser prettyprint: generated code already looks right without the linter. The skeleton templates are hand-formatted, and the `ClassSourceManipulator` / PHP-Parser output is exactly what the fixtures in `tests/Util/fixtures/` pin down, since the linter only ran at the very end of `MakerCommand` and never in those tests. Devs who want a stricter style can run their own fixer on `src/`, as `@wouterj` suggested. Fix #1801 Commits ------- 5e40bf0 Remove the PHP CS Fixer integration
Following a discussion among Symfony core team members about the future of MakerBundle and its relationship with Symfony Mate (part of
symfony/ai), this PR documents a clearer, narrower scope for the project.Context
Key points that emerged from the discussion:
make:entity).Proposal
Rather than dropping MakerBundle, we narrow its scope:
Examples of requests that fall outside this new scope:
make:entitynon-nullable option (make:entity to generate non-nullable fields #1679)Example of requests that could be accepted, changing the generated code:
$form->createView()in controllers (Update Controller.tpl.php to use createView() method by default #1709)The README already warns that generated code can change in any version; this PR makes the underlying philosophy explicit.