As a symfony developer what you should take care when symfony standard edition is legacy:

As a symfony developer what you should take care when symfony standard edition is legacy:

Now symfony standard edition is legacy. So no need to worry much just go threw article and understand whats new in symfony 4 if standard edition is legacy now.

This is the main difference in Symfony 4 from symfony 2 and symfony 3.

Older symfony versions provide by default doctrine, twig, form, validation, profiler, annotations and many other components. But some time user do not want to use it. Suppose what if user do not want to doctrine or twig? Still he has doctrine and twig in his dependency. That makes symfony heavy framework. When starting a new project developers do not like to assemble things manually. So symfony 2 and 3 provides standard edition for developers to start a big project. But was hard to scale down project and decrease dependency if user do not require some packages.

Symfony 2 and 3 are big success and in years developers are now aware with composer and dependency injection. So adding/removing a new package is not a big deal. So symfony chose optimised solution which makes symfony a light weight than earlier.

So in symfony 4 flex came in to play. Flex can scale up and down project very easily.

Symfony flex is a composer plugin. It modifies behaviour of composer require, update and remove commands.

If your app is flex enabled then before and after execution composer task, symfony can perform tasks.

So when you download symfony 4 composer create-project symfony/skeleton my_project, you have to manually install doctrine, twig, profiler, form, validation and many other components and libraries. And its not a big deal. Install only those dependency which you need in your project.

For symfony 4: Install following famous optional components for symfony if you wish to add them in your peoject:

Run symfony via in built server: composer require server --dev, then php bin/console server:start Secutity checker: composer require sec-checker

Want route to add in annotation? Then try composer require annotations

Like symfony profiler? composer require --dev profiler

Want to include awesome twig in your peoject? composer require twig

Want to use powerful symfony form composer require form

Like simple and smart Symfony validator component? composer require validator

And love to use Symfony with Doctrine? composer require doctrine maker So here we are installing doctrine and maker. Doctrine you know, but with maker you lots of things quick like

One example: Want to make entity? php bin/console make:entity Product

Now i think you are good to go...

Do not like approch above approach of assemble components manually? then there read below. Symfony standard edition was great, which served many years but core symfony developers think for scalable applications which developers scale up and down easily.

In standard edition it was very hard to scale down application or remove any dependency. So symfony 4 is a major release so they have done this new thing. To accomplish this symfony has introduced Symfony Flex.

Symfony core developers saw most symfony projects require those dependency which symfony was providing in its standard edition. So there is another solution.

So if you are familier with silex and if you love micro frameworks like it and want to use symfony then try light weight version of symfony 4 which you can install via composer create-project symfony/skeleton my_project.

If you want dependencies like doctrine, twig, form, validaiton, profiler when you install symfony then try composer create-project symfony/website-skeleton.

Enjoy! Scale your project as you wish.

Final words: Current projects will not be affected. So don't worry. And start your new website in symfony or convert your old website in symfony 🙂