Skip to content

[sulu/formbundle] Adding support for version 3#1941

Merged
symfony-recipes-bot merged 1 commit intosymfony:mainfrom
mamazu:form_bundle
Feb 10, 2026
Merged

[sulu/formbundle] Adding support for version 3#1941
symfony-recipes-bot merged 1 commit intosymfony:mainfrom
mamazu:form_bundle

Conversation

@mamazu
Copy link
Contributor

@mamazu mamazu commented Feb 10, 2026

Q A
License MIT
Packagist https://packagist.org/packages/sulu/form-bundle

Adding build recipie for the Sulu 3 version of the FormBundle.

/cc @alexander-schranz

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) February 10, 2026 16:34
@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-1941/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1941/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'sulu/form-bundle:^3.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.

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
2.4 vs 3.0
diff --git a/sulu/form-bundle/2.4/config/packages/sulu_form.yaml b/sulu/form-bundle/3.0/config/packages/sulu_form.yaml
index 1f5cde76..8f606ed8 100644
--- a/sulu/form-bundle/2.4/config/packages/sulu_form.yaml
+++ b/sulu/form-bundle/3.0/config/packages/sulu_form.yaml
@@ -1,5 +1,5 @@
 sulu_form:
-#   csrf_protection: true # requires additional changes see: https://github.com/sulu/SuluFormBundle/blob/2.4.0/Resources/doc/csrf.md
+#   csrf_protection: true # requires additional changes see: https://github.com/sulu/SuluFormBundle/blob/3.0/Resources/doc/csrf.md
     mail:
         from: "%env(SULU_ADMIN_EMAIL)%"
         to: "%env(SULU_ADMIN_EMAIL)%"
diff --git a/sulu/form-bundle/2.4/config/routes/sulu_form_admin.yaml b/sulu/form-bundle/3.0/config/routes/sulu_form_admin.yaml
index bac30391..3df594dc 100644
--- a/sulu/form-bundle/2.4/config/routes/sulu_form_admin.yaml
+++ b/sulu/form-bundle/3.0/config/routes/sulu_form_admin.yaml
@@ -1,4 +1,3 @@
 sulu_form_api:
-    resource: "@SuluFormBundle/Resources/config/routing_api.yml"
-    type: rest
+    resource: "@SuluFormBundle/Resources/config/routing_api.yaml"
     prefix: /admin/api
diff --git a/sulu/form-bundle/2.4/post-install.txt b/sulu/form-bundle/3.0/post-install.txt
index 051f4d23..10833fd0 100644
--- a/sulu/form-bundle/2.4/post-install.txt
+++ b/sulu/form-bundle/3.0/post-install.txt
@@ -4,4 +4,4 @@
     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
+  * Read the documentation at https://github.com/sulu/SuluFormBundle/blob/3.0/Resources/doc/index.md

@symfony-recipes-bot symfony-recipes-bot merged commit f8a90ef into symfony:main Feb 10, 2026
1 of 2 checks passed
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