Skip to content

Redefine the scope of MakerBundle - #1800

Merged
GromNaN merged 1 commit into
symfony:1.xfrom
GromNaN:redefine-scope
Aug 13, 2026
Merged

Redefine the scope of MakerBundle#1800
GromNaN merged 1 commit into
symfony:1.xfrom
GromNaN:redefine-scope

Conversation

@GromNaN

@GromNaN GromNaN commented Aug 3, 2026

Copy link
Copy Markdown
Member

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:

  • MakerBundle has become exceptionally hard to maintain. The test suite is slow and complex to debug (each test spins up a temporary project and runs commands).
  • Every new option adds combinatorial complexity, both for users and for maintainers, sometimes turning generators into meta-programming through the CLI.
  • Most of the templates are simple boilerplate that require no AI at all. The complexity lives in advanced generators (notably make:entity).
  • MakerBundle still has real value for newcomers, for training sessions, and for offline / AI-free workflows. Dropping it entirely is not on the table right now.
  • Coding agents with dedicated skills (e.g. Symfony Mate, Laravel Boost style) are a better fit for customization, edge cases, and opinionated variations.

Proposal

Rather than dropping MakerBundle, we narrow its scope:

  • Target audience: newcomers starting a Symfony project without writing boilerplate.
  • Generate code that reflects our current recommended best practices, with sensible defaults and minimal configuration.
  • Reject options and switches that exist only to cover edge cases or personal preferences.
  • Redirect requests for extensibility, custom templates, alternative target directories, or opinionated code shapes to coding agents and skills-based tools.

Examples of requests that fall outside this new scope:

Example of requests that could be accepted, changing the generated code:

The README already warns that generated code can change in any version; this PR makes the underlying philosophy explicit.

@GromNaN
GromNaN requested a review from a team August 3, 2026 09:35
@kbond

kbond commented Aug 3, 2026

Copy link
Copy Markdown
Member

Within this new scope, if we have make:command generate invokable commands, would it still fallback to standard command if invokable commands aren't supported? I ask because these permutations can add up too.

@GromNaN

GromNaN commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Here are the open PRs that fall outside the new scope (to be closed):

Custom templates / paths / namespaces

Extensibility / scaffolding / pluggability

Edge-case options / personal preferences on existing makers

New niche makers

Opinionated code shape changes without clear best-practice consensus

Borderline (could go either way depending on whether the maintainers consider the change a
"new recommended default" rather than an option):

Note: #1746 (make:command invokable by default) is in scope, it changes the default rather
than adding an option.

@GromNaN

GromNaN commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Within this new scope, if we have make:command generate invokable commands, would it still fallback to standard command if invokable commands aren't supported? I ask because these permutations can add up too.

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.
For the make:command example, that means we remove the extends Command version of the generated code; but we can't use Symfony 8.1 Improved Console Input

@stof

stof commented Aug 3, 2026

Copy link
Copy Markdown
Member

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.

@GromNaN

GromNaN commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

MakerBundle: existing makers status vs. new scope

This 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:

  • in-scope the maker fits the new scope as is, only marginal cleanup needed
  • needs-trim in scope but options or code branches should be reduced
  • reconsider may not fit the new scope; needs a decision
  • drop-candidate likely to be removed or moved elsewhere
Maker Status Rationale Action to fit scope / drop
MakeCommand in-scope Simple template, useful for newcomers. Switch default to invokable command (#1746). Drop the non-invokable fallback once LTS supports it.
MakeController in-scope Core scaffold. Keep single recommended shape. Reject options that only tune style.
MakeForm in-scope Core scaffold. Keep; align with current form best practices.
MakeVoter in-scope Small and stable. Keep as is.
MakeSubscriber in-scope Straightforward event subscriber. Keep as is.
MakeListener in-scope Companion to Subscriber, event autodiscovery adds value. Keep, verify all branches still needed.
MakeMessage in-scope Generates message + handler, aligned with Messenger docs. Keep.
MakeMessengerMiddleware in-scope Tiny, correct. Keep.
MakeSchedule in-scope Matches current Scheduler component. Keep.
MakeWebhook in-scope Follows Webhook component. Consider making generated classes final by default (see #1637) as a recommended shape, not an option.
MakeTwigExtension in-scope Minimal. Keep.
MakeTwigComponent in-scope Aligned with ux-twig-component. Keep.
MakeStimulusController in-scope UX Stimulus scaffold, non trivial but well contained. Keep, watch for option creep.
MakeSerializerEncoder in-scope Minimal template. Keep.
MakeSerializerNormalizer in-scope Minimal template. Keep.
MakeValidator in-scope Minimal. Adopt --target (#1744) only if we consider it a recommended default; otherwise reject.
MakeUnitTest in-scope Minimal. Keep.
MakeFunctionalTest needs-trim Overlaps with MakeTest. Merge into MakeTest or delegate to it and remove the separate command.
MakeTest needs-trim Umbrella command that already covers unit / integration / functional. Consolidate MakeUnitTest and MakeFunctionalTest here to reduce duplication.
MakeFixtures in-scope Minimal, common newcomer need. Keep.
MakeDockerDatabase reconsider Docker Compose scaffolding is opinionated and outside the core Symfony concern. Decide: keep as convenience for newcomers, or drop and defer to Symfony recipes and Docker Compose docs.
MakeMigration in-scope Thin wrapper over doctrine-migrations. Keep.
MakeEntity needs-trim Largest and most complex maker. Combinatorial options are the root of the maintenance pain called out in the scope discussion. Freeze the option surface. Reject new options (#1730, #1635, #1661, #1558). Consider extracting advanced relationship editing to a coding agent skill and keeping only the create/update happy path.
MakeCrud needs-trim Second most complex, tied to MakeEntity output. Keep the single recommended layout, reject field-appearance options (#544) and route conflict options (#922).
MakeUser in-scope Core security setup. Keep. Reject niche options (#1722) unless they become defaults.
MakeAuthenticator needs-trim Large legacy command superseded by Security/MakeFormLogin and Security/MakeCustomAuthenticator. Decide whether to deprecate in favour of the two Security/* makers, or clearly document the split.
Security/MakeFormLogin in-scope Matches current recommended auth flow. Keep. Reject #1595 (option to skip interaction).
Security/MakeCustomAuthenticator in-scope Small, focused. Keep. Reject #1594.
MakeRegistrationForm needs-trim Very large; depends on MakeEntity + MakeUser output. Reduce configurability. Freeze on the recommended shape from the latest LTS. Reject #1555, #1723 unless adopted as default.
MakeResetPassword needs-trim Similar profile to MakeRegistrationForm. Same treatment. Reject #1527 (multi entity) and #798 (API Platform).

@javiereguiluz

Copy link
Copy Markdown
Member

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!

@kbond

kbond commented Aug 3, 2026

Copy link
Copy Markdown
Member

I love this!

I think this new scope should have the following rules also:

  • Exclude makers that likely aren't used by beginners (ie make:authenticator)
  • Exclude makers that have a flex recipe that is enough (ie make:schedule)
  • Exclude makers that realistically are only run once (ie make:reset-password)

Here are my opinions on the current list of makers:

  • MakeSubscriber: isn't the best practice to always use listeners now? Maybe we should drop in favor of MakeListener?
  • MakeMessengerMiddleware: imo this is super rare to need
  • MakeSchedule: flex provides a default recipe, rare to need multiple schedules
  • MakeTwigExtension: should upgrade to the attribute method?
  • MakeXTest: I believe the idea was to consolidate into the single make:test
  • MakeAuthenticator/MakeCustomAuthenticator: rare/advanced need
  • MakeFormLogin: single use
  • MakeResetPassword: single use
  • MakeRegistrationForm: single use

Comment thread README.md
Comment on lines +27 to +29
- 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.

@GromNaN GromNaN Aug 5, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@GromNaN

GromNaN commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

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:

  • Keep make:messenger-middleware, make:schedule, make:authenticator, make:security:custom, make:form-login, make:reset-password, make:registration-form. All of them are entry points into an advanced feature. The Flex recipe for Scheduler, for instance, only wires the config; it does not give a task handler to learn from.
  • Drop make:subscriber in favor of make:listener. Two ways to do the same thing, and #[AsEventListener] is the current recommended shape.
  • Migrate make:twig-extension to the #[AsTwigFilter] / #[AsTwigFunction] attributes rather than dropping it.
  • Consolidate make:unit-test and make:functional-test into make:test (already in the needs-trim row).

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.

@GromNaN
GromNaN requested review from javiereguiluz and kbond August 5, 2026 16:41
@GromNaN
GromNaN merged commit e5916e5 into symfony:1.x Aug 13, 2026
@kbond

kbond commented Aug 13, 2026

Copy link
Copy Markdown
Member

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.

@GromNaN
GromNaN deleted the redefine-scope branch August 13, 2026 17:05
GromNaN added a commit that referenced this pull request Aug 19, 2026
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
@GromNaN GromNaN added this to the v1.68.0 milestone Sep 7, 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.

4 participants