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

[MakerBundle] final class & root namespace configuration #1315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jrushlow
Copy link
Contributor

@jrushlow jrushlow commented May 19, 2024

Q A
License MIT
Doc issue/PR see below

PR 1539 implements the generate_final_* functionality for make:crud & make:voter. To keep that PR relatively small and reviewable, PR's will be made for other makers for release v1.61.0

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 19, 2024 18:23
Copy link

github-actions bot commented May 19, 2024

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1315/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1315/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/maker-bundle:^1.61'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

symfony/maker-bundle

1.0 vs 1.61
diff --git a/symfony/maker-bundle/1.61/config/packages/maker.yaml b/symfony/maker-bundle/1.61/config/packages/maker.yaml
new file mode 100644
index 0000000..7fd5b34
--- /dev/null
+++ b/symfony/maker-bundle/1.61/config/packages/maker.yaml
@@ -0,0 +1,12 @@
+when@dev:
+    maker:
+        # tell MakerBundle that all of your classes live in an
+        # Acme namespace, instead of the default App
+        # (e.g. Acme\Entity\Article, Acme\Command\MyCommand, etc)
+        root_namespace: 'App'
+
+        # Tell MakerBundle to make all non-entity classes it generates, "final".
+        generate_final_classes: true
+
+        # Tell MakerBundle to make all entities it generates, "final".
+        generate_final_entities: false
diff --git a/symfony/maker-bundle/1.0/manifest.json b/symfony/maker-bundle/1.61/manifest.json
index 7d42386..d8f4d89 100644
--- a/symfony/maker-bundle/1.0/manifest.json
+++ b/symfony/maker-bundle/1.61/manifest.json
@@ -2,5 +2,8 @@
     "bundles": {
         "Symfony\\Bundle\\MakerBundle\\MakerBundle": ["dev"]
     },
-    "aliases": ["maker", "generator", "make"]
+    "aliases": ["maker", "generator", "make"],
+    "copy-from-recipe": {
+        "config/": "%CONFIG_DIR%/"
+    }
 }

auto-merge was automatically disabled August 29, 2024 16:24

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) August 29, 2024 16:24
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.

1 participant