Symfony News

Helping Prepare for Symfony 4 Bundle Support

It's an exciting time to work with Symfony. At the end of this month, Symfony 4 will be released and Flex will become the official way to build new Symfony apps. The community and core team are already working hard to find and fix bugs. In fact, you can help by testing the latest beta release. We're also working hard on the documentation to make sure it's up to date for the release! If you want an easy way to contribute, read the master branch of the documentation. See something wrong our not-yet-updated? Send us a pull request.

Help Needed! Making Community Bundles Symfony 4 Compatible

But there is one really big area where we need your help: making the most popular community bundles compatible with Symfony 4. In most cases, it's easy! But because the community has many bundles, we need a team effort!

Want to help make sure the ecosystem is ready for Symfony 4? Great! Here's what you can do:

Check out the list of bundles to find one that is not-yet-compatible: docs.google.com/spreadsheets/d/1mFHQPp. Find a bundle that either needs Symfony 4 support or that is missing a Flex recipe. Both are great ways to contribute.

Making a Bundle Compatible with Symfony 4

If you want to make a bundle compatible with Symfony 4, here are the basic steps:

  1. Update the composer.json file: any symfony/* libraries need to have |4.0 added to it. For example, you would change "symfony/form": "~3.0" to "symfony/form": "~3.0|^4.0". See a pull request in FOSUserBundle for a full example.

  2. Update the bundle's .travis.yml file so that it is tested against Symfony 4. Want an example? See the same pull request from FOSUserBundle.

That's it! Submit a pull request with these changes and see what happens. If there are failures, you'll need to check the UPGRADE document for 4.0. One common issue is that services automatically become private in Symfony 4. So, you may need to set public="true" on the bundle's services to keep them public. Again, an example speaks 100 words: github.com/knpuniversity/oauth2-client-bundle/pull/68

When you've created the pull request, add a comment in the spreadsheet!

Creating a Recipe for a Bundle

Another great way to contribute is to add a Flex recipe for a bundle (or library). Of course, not all bundles need a recipe: if the bundle has no configuration and installing it is as simple as enabling the bundle in the kernel, then skip it! Flex will auto-generate a recipe.

For details on creating a recipe, see github.com/symfony/recipes. Once you've created a pull request for the recipe, add a comment in the spreadsheet!

If you have any other questions or thoughts, let us know in the comments.

Thanks for helping us make Symfony 4 a wonderful new version.


Be trained by Symfony experts - 2017-11-22 Cologne - 2017-12-4 Lyon - 2017-12-4 Lyon


About us

What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...

Resources

Find us on Twitter

Find us on Facebook