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

Update sonata-project/media-bundle recipe #1532

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Update sonata-project/media-bundle recipe #1532

merged 1 commit into from
Jul 24, 2023

Conversation

gremo
Copy link
Contributor

@gremo gremo commented Jul 24, 2023

Q A
License MIT
Packagist

This is a DX update: the recipe upload directory is changed to "uploads" because it's a common folder where place the uploads (for example, see How to upload files).

See also sonata-project/SonataMediaBundle#2408

@github-actions
Copy link

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-contrib/flex/pull-1532/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1532/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'sonata-project/media-bundle:^4.0'
  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.

sonata-project/media-bundle

3.13 vs 4.0
diff --git a/sonata-project/media-bundle/3.13/config/packages/sonata_media.yaml b/sonata-project/media-bundle/4.0/config/packages/sonata_media.yaml
index 7b307c4d..6ecc3869 100644
--- a/sonata-project/media-bundle/3.13/config/packages/sonata_media.yaml
+++ b/sonata-project/media-bundle/4.0/config/packages/sonata_media.yaml
@@ -15,10 +15,10 @@ sonata_media:
 
     cdn:
         server:
-            path: /upload/media
+            path: /uploads/media
 
     filesystem:
         local:
             # Directory for uploads should be writable
-            directory: "%kernel.project_dir%/public/upload/media"
+            directory: "%kernel.project_dir%/public/uploads/media"
             create: false
diff --git a/sonata-project/media-bundle/3.13/config/routes/sonata_media.yaml b/sonata-project/media-bundle/4.0/config/routes/sonata_media.yaml
index 1f9bc8c3..616b91da 100644
--- a/sonata-project/media-bundle/3.13/config/routes/sonata_media.yaml
+++ b/sonata-project/media-bundle/4.0/config/routes/sonata_media.yaml
@@ -1,7 +1,3 @@
-sonata_media_gallery:
-    resource: '@SonataMediaBundle/Resources/config/routing/gallery.xml'
-    prefix: /media/gallery
-
 sonata_media:
     resource: '@SonataMediaBundle/Resources/config/routing/media.xml'
     prefix: /media
diff --git a/sonata-project/media-bundle/3.13/public/upload/media/.gitignore b/sonata-project/media-bundle/4.0/public/uploads/media/.gitignore
similarity index 100%
rename from sonata-project/media-bundle/3.13/public/upload/media/.gitignore
rename to sonata-project/media-bundle/4.0/public/uploads/media/.gitignore

@symfony-recipes-bot symfony-recipes-bot merged commit b538d2b into symfony:main Jul 24, 2023
2 checks passed
@gremo gremo deleted the update-sonata-media branch July 24, 2023 12:02
lanfisis pushed a commit to lanfisis/recipes-contrib that referenced this pull request Jul 25, 2023
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