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

feat: allow working in src directory #132

Merged
merged 1 commit into from
Oct 16, 2024
Merged

feat: allow working in src directory #132

merged 1 commit into from
Oct 16, 2024

Conversation

shyim
Copy link
Member

@shyim shyim commented Oct 5, 2024

No description provided.

Copy link

github-actions bot commented Oct 5, 2024

Thanks for the PR 😍

How to test these changes in your application

  1. Add the Shopware flex endpoint in your composer.json to https://raw.githubusercontent.com/shopware/recipes/flex/pull-132/index.json.

    # When jq is installed
    jq '.extra.symfony.endpoint |= [ "https://raw.githubusercontent.com/shopware/recipes/flex/pull-132/index.json" ] + .' composer.json > composer.tmp && mv composer.tmp composer.json

    or manually

    "endpoint": [
        "https://raw.githubusercontent.com/shopware/recipes/flex/pull-132/index.json",
        "https://raw.githubusercontent.com/shopware/recipes/flex/main/index.json",
        "flex://defaults"
    ]
  2. Install the package(s) related to this recipe:

    composer req 'symfony/framework-bundle:^6.4' 'symfony/routing:^6.4'

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/framework-bundle

5.4 vs 6.4
diff --git a/symfony/framework-bundle/5.4/config/services.yaml b/symfony/framework-bundle/6.4/config/services.yaml
index 7de630e..8a44167 100644
--- a/symfony/framework-bundle/5.4/config/services.yaml
+++ b/symfony/framework-bundle/6.4/config/services.yaml
@@ -14,3 +14,10 @@ services:
         # https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type
         #bind:
         #    'bool $isDebug': '%kernel.debug%'
+
+    App\:
+        resource: '../src/'
+        exclude:
+            - '../src/DependencyInjection/'
+            - '../src/Entity/'
+            - '../src/Kernel.php'
diff --git a/symfony/framework-bundle/5.4/manifest.json b/symfony/framework-bundle/6.4/manifest.json
index 6bd1973..4c566fb 100644
--- a/symfony/framework-bundle/5.4/manifest.json
+++ b/symfony/framework-bundle/6.4/manifest.json
@@ -3,6 +3,7 @@
         "Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle": ["all"]
     },
     "copy-from-recipe": {
-        "config/": "%CONFIG_DIR%/"
+        "config/": "%CONFIG_DIR%/",
+        "src/": "%SRC_DIR%/"
     }
 }
diff --git a/symfony/framework-bundle/6.4/src/Controller/.gitignore b/symfony/framework-bundle/6.4/src/Controller/.gitignore
new file mode 100644
index 0000000..e69de29

symfony/routing

5.4 vs 6.4
diff --git a/symfony/routing/6.4/config/routes.yaml b/symfony/routing/6.4/config/routes.yaml
new file mode 100644
index 0000000..41ef814
--- /dev/null
+++ b/symfony/routing/6.4/config/routes.yaml
@@ -0,0 +1,5 @@
+controllers:
+    resource:
+        path: ../src/Controller/
+        namespace: App\Controller
+    type: attribute
diff --git a/symfony/routing/5.4/manifest.json b/symfony/routing/6.4/manifest.json
index 4eb44fd..9b758be 100644
--- a/symfony/routing/5.4/manifest.json
+++ b/symfony/routing/6.4/manifest.json
@@ -1,3 +1,6 @@
 {
-    "composer-scripts": {}
+    "composer-scripts": {},
+    "copy-from-recipe": {
+        "config/": "%CONFIG_DIR%/"
+    }
 }

@shyim shyim force-pushed the allow-working-in-src branch 3 times, most recently from cd5b53e to ba854b1 Compare October 5, 2024 09:22
@shyim shyim force-pushed the allow-working-in-src branch from ba854b1 to 30dea45 Compare October 5, 2024 09:24
@shyim shyim merged commit 1c35045 into main Oct 16, 2024
1 of 2 checks passed
@shyim shyim deleted the allow-working-in-src branch October 16, 2024 11:54
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.

2 participants