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:
Update the
composer.json
file: anysymfony/*
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.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.
I'll see what I can do!
I added ^3.4@dev first to travis matrix of symfony-cmf bundles. Pushing deprecation count to 0 let the build fail. In https://github.com/symfony-cmf/symfony-cmf/issues/254 you can find the current state. As we missed some changes on 3.3 we do have to add some components, that were removed from framework bundle. Most private services had been in phpcr-bundle.
Hint: For those who use our symfony-cmf/testing component (even when its internal), you will be hit by KERNEL_DIR deprecation. On 2.1@dev i added a posibility to expose KERNEL_CLASS.
Ok this is great, BUT in the Documentation front page, there is no exist an article to guide the people to the new "Flex way", it would be nice if someone edit the Documentation to add a Flex article in the list of main articles, actually if you use Ctr+f (find a word) and search for the word "flex" in the main page of Docs there is absolutelly NOTHING. just an idea! greetings! keep up guys
Looking at the page https://github.com/symfony/flex, it says: "WARNING Symfony Flex is alpha software; use it at your own risk..." ok. then is it alpha? beta? is it considered a "good practice"?
@Wilfred you are right about the missing link to Flex guide in the docs index. We've just added and it will be online after the next deploy.
@Ryan, lines 64 is duplicated on line 66.
I made 3 PR during SymfonyCon HackDay but I didn't get any feedback. I realised, that bundles are old. I don't know if anyone uses it. What should I do in this situation?
@Mateusz that's sad, but may happen for old bundles. Maybe you can do a friendly ping to the bundle authors in case they missed it.