Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make:controller] generate final controller class #1588

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented Aug 30, 2024

Adds the ability to generate controllers with the final PHP class keyword based on MakerBundle's config preferences.

  • enhances the ClassData object to handle instantiation with absolute class name values. E.g. \Foo\Bar\Controller and in turn, calling getNamespace() will not include the root_namespace e.g. Foo\Bar
  • adds test assertions to compare the generated controller to a known test fixture (expected controller)
  • Generator's createClassFromClassData() is able to generate regular classes and controller classes based on the $isController method argument. This will eventually replace the existing Generator::createClass() && Generator::createController() methods.

@jrushlow jrushlow added Feature New Feature Status: Needs Work Additional work is needed labels Aug 30, 2024
@jrushlow jrushlow added this to the v1.62.0 milestone Aug 30, 2024
@jrushlow jrushlow force-pushed the feature/final/controller branch from e9192e4 to a35a19b Compare September 25, 2024 17:54
@jrushlow jrushlow marked this pull request as ready for review September 25, 2024 19:32
@jrushlow jrushlow added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels Sep 25, 2024
@jrushlow jrushlow force-pushed the feature/final/controller branch from 8c8566e to fc279fe Compare September 26, 2024 22:47
@jrushlow jrushlow merged commit 3280a5d into symfony:main Sep 26, 2024
9 checks passed
@jrushlow jrushlow deleted the feature/final/controller branch September 26, 2024 23:15
@jrushlow jrushlow mentioned this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant