7. NO BUNDLES INHERITANCE
• Controllers: define a route with the same path as the controller you want to override and implement your own logic.
• Templates: use the common template overriding mechanism with the traditional app/Resources/<BundleName>/views/
<templateName>.html.twig dir or the new templates/bundles/<BundleName>/<templateName>.html.twig dir on Symfony 3.4 and
higher; you can also use Twig namespaces to define new templates under the same namespace as the bundle you want to
customize.
• Routing: don't load the bundle routes or apply the same technique as controllers.
• Services and Configuration: use compiler passes or service decoration.
• Entities: not possible unless the bundle provides a mapped superclass.
• Forms: use form extensions.
• Validation: not possible unless the bundle provides validation groups.
• Translations: not related to bundle inheritance; just override the right translation domain.
13. Monolith vs Micro
➤ Includes Everything!
➤ Silex VS. Symfony SE
➤ It ships with code that isn‘t
used in all individual projects.
The Symfony SE is often
perceived as being „big“.
➤ Removing not needed
functionality is a cumbersome
task.
17. What is Symfony Flex?
• Flex prefers composition over inheritance.
• New project start with almost no dependencies.
• Only needed features are added by developers.
• hooks into the Composer workflow
• automatically enables Symfony bundles
• executes predefined recipes when packages are installed
• recipes are removed when packages are uninstalled
19. The supported environments are dev, prod, test and all (which enables the bundle in all environments):
FLEX RECIPE!
The previous recipe is transformed into the following PHP code:
27. DOTENV COMPONENT
The Dotenv Component parses .env files to make environment variables
stored in them accessible via getenv(), $_ENV or $_SERVER.
Access the value with getenv() in your code:
34. ➤ Place: the states a workflow can be in
➤ Transition: an action that brings the workflow from one place into another
➤ Definition: the places of a workflow and the transitions to get from one place to another
➤ Marking: the current state of the workflow, stored in a MarkingStore
WORKFLOW COMPONENT
38. WORKFLOW EVENTS
➤ workflow.leave before a place is left
➤ workflow.transition before a transition is applied
➤ workflow.enter before a place is entered
➤ workflow.entered after a place has been entered
➤ workflow.completed after a transition was applied
➤ workflow.announce announces all enabled transitions
More On workflow: twig functions, more events check: https://symfony.com/doc/current/workflow/usage.html
39. THE CACHE COMPONENT
➤ The Cache component provides an extended PSR-6 implementation as well as a PSR-16 "Simple Cache"
implementation for adding cache to your applications. It is designed to have a low overhead and it ships with
ready to use adapters for the most common caching backends.
➤ support to convert PSR-16 caches to PSR-6 adapters and vice versa.
➤ i.e: PSRs stands for PHP Standard Recommendations