Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tomas Votruba:
Introducing Symfony Flex Loader
Dec 21, 2018 @ 15:40:58

In a post to his site Tomas Votruba introduces something that can be helpful for those working with Symfony 4 and Flex to make the "zero-setup configuration" easier to work with: effective use of the Symfony Flex Loader.

Symfony 4 and Flex is heading in direction of zero-setup configuration - no bundles, no extensions, no configuration. You already know how to get rid of Configuration. Flex now loads services instead of Extension class.

But it has an extra price, a lot of new boilerplate code in Kernel. Today you'll learn how to keep your Kernel Flex-ready and clean at the same time.

He starts with an example kernel that loads an extra directory (defined by a "custom path"). He shows how to refactor these examples to "make them small again" making use of the Flex loader package that reduces the number of lines required to accomplish the same end result.

tagged: symfony symfony4 symfonyflex loader kernel tutorial package

Link: https://www.tomasvotruba.cz/blog/2018/12/20/introducing-symfony-flex-loader/


Trending Topics: