recipes-contrib
recipes-contrib copied to clipboard
Add sulu form bundle 2.4 recipe
Q | A |
---|---|
License | MIT |
Packagist | sulu/form-bundle |
The 2.4 not longer requires enabling of the esi and fragments configuration. So the following was removed: https://github.com/symfony/recipes-contrib/blob/7645718b41e85fdadea21149322cbabf9c2d4840/sulu/form-bundle/2.2/config/packages/sulu_form.yaml#L9-L11
Thanks for the PR 😍
How to test these changes in your application
-
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-1386/index.json # On Windows SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1386/index.json
-
Install the package(s) related to this recipe:
composer req 'symfony/flex:^1.16' composer req 'sulu/form-bundle:^2.4'
-
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.
sulu/form-bundle
2.0 vs 2.2
diff --git a/sulu/form-bundle/2.0/config/packages/sulu_form.yaml b/sulu/form-bundle/2.2/config/packages/sulu_form.yaml
index 345b99de..fd741d41 100644
--- a/sulu/form-bundle/2.0/config/packages/sulu_form.yaml
+++ b/sulu/form-bundle/2.2/config/packages/sulu_form.yaml
@@ -3,6 +3,8 @@ sulu_form:
from: "%env(SULU_ADMIN_EMAIL)%"
to: "%env(SULU_ADMIN_EMAIL)%"
sender: "%env(SULU_ADMIN_EMAIL)%"
+ media:
+ protected: true
framework:
esi: true
2.2 vs 2.4
diff --git a/sulu/form-bundle/2.2/config/packages/sulu_form.yaml b/sulu/form-bundle/2.4/config/packages/sulu_form.yaml
index fd741d41..1f5cde76 100644
--- a/sulu/form-bundle/2.2/config/packages/sulu_form.yaml
+++ b/sulu/form-bundle/2.4/config/packages/sulu_form.yaml
@@ -1,11 +1,8 @@
sulu_form:
+# csrf_protection: true # requires additional changes see: https://github.com/sulu/SuluFormBundle/blob/2.4.0/Resources/doc/csrf.md
mail:
from: "%env(SULU_ADMIN_EMAIL)%"
to: "%env(SULU_ADMIN_EMAIL)%"
sender: "%env(SULU_ADMIN_EMAIL)%"
media:
protected: true
-
-framework:
- esi: true
- fragments: true
diff --git a/sulu/form-bundle/2.2/post-install.txt b/sulu/form-bundle/2.4/post-install.txt
index a46c13c7..051f4d23 100644
--- a/sulu/form-bundle/2.2/post-install.txt
+++ b/sulu/form-bundle/2.4/post-install.txt
@@ -2,5 +2,6 @@
1. Print the sql statements required to update your database schema by running php bin/console doctrine:schema:update --dump-sql.
2. If the statements look fine to you, run the same command using --force to execute them.
3. Make sure your user has all the necessary permissions for the SuluFormBundle.
+ 4. Use bin/console sulu:form:generate-form to create a dummy form.
* Read the documentation at https://github.com/sulu/SuluFormBundle/blob/2.x/Resources/doc/index.md
@fabpot Thx :)