SlideShare a Scribd company logo
SYMFONY4
What’s New?
“Symfony is a set of PHP Components,
a Web Application framework, a
Philosophy, and a Community — all
working together in harmony.
KEYNOTE
➤ Introduction
➤ What’s new?
➤ Monolith VS Microservice
➤ Symfony Flex
➤ Maker Bundle
➤ New Components!
SYMFONY ROADMAP
WHAT’S NEW?
➤ 30% Smaller Symfony3
➤ No more bundle inheritance!
➤ Bundles App
➤ Dotenv Component
➤ DI - Auto-configure and auto-wiring services
➤ Caching Component
SMALLER?
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.
NO BUNDLES!
BUNDLES DEFINITION
BUNDLES DEFINITION
BUNDLES CONFIG - SYMFONY 3!
BUNDLES CONFIG - SYMFONY 4
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.
SYMFONY FLEX 🎁
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 

FLEX RECIPE!
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:
FLEX RECIPES - CONTRIBUTIONS
FLEX RECIPES - INTERACTIVE
FLEX RECIPES - INTERACTIVE
DISCOVER ALIASES AND PACKS
MAKER BUNDLE
The update of SensioGeneratorBundle, Use make: instead of generate:
MAKER BUNDLE COMMANDS
COMPONENTS
➤ DotENV
➤ Dependency Injection
➤ Workflow
➤ Cache
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:
DEPENDENCY INJECTION
WORKING WITH INTERFACES
AUTOWIRING - WORKING WITH INTERFACES
PUBLIC SERVICE
PUBLIC SERVICE
➤ 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
CREATE WORKFLOW
CREATE WORKFLOW
CREATE WORKFLOW
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
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
SIMPLE CACHING (PSR-16)
MORE ADVANCED CACHING (PSR-6)
ITEM INTERFACE
POOL INTERFACE
MORE ADVANCED CACHING (PSR-6)
CREATE CUSTOM POOL
Cleaning Cache Pools
CONTACT ME
➤ salma.abdelhady@tajawal.com
➤ https://github.com/SalmaAbdelhady
➤ https://www.linkedin.com/in/salmahabdelhady/

More Related Content

What's hot

#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
Elton Stoneman
 
Vagrant
VagrantVagrant
Vagrant
Benoit Borrel
 
Composer
ComposerComposer
Composer
Zaib Un Nisa
 
Short journey into the serverless world
Short journey into the serverless worldShort journey into the serverless world
Short journey into the serverless world
Scott van Kalken
 
Bluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web ApplicationBluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web Application
Craig Trim
 
Docker, OSS and Azure
Docker, OSS and AzureDocker, OSS and Azure
Docker, OSS and Azure
Elton Stoneman
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git together
ColdFusionConference
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
ColdFusionConference
 
Deploying Plone on AWS
Deploying Plone on AWSDeploying Plone on AWS
Deploying Plone on AWS
T. Kim Nguyen
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
Composer intro
Composer introComposer intro
Composer intro
Timothy Hilliard
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
Philippe Lafoucrière
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven Plugin
Olivier Lamy
 
Java and other open source solutions on windows azure
Java and other open source solutions on windows azureJava and other open source solutions on windows azure
Java and other open source solutions on windows azure
Patriek van Dorp
 
How we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use CaseHow we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use Case
coolscreen.de
 
DockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with DockerDockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with Docker
Elton Stoneman
 
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
roblund
 
Modernizing .NET Apps with Docker
Modernizing .NET Apps with DockerModernizing .NET Apps with Docker
Modernizing .NET Apps with Docker
Docker
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016
David Brattoli
 
GenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in ElixirGenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in Elixir
Pete Gamache
 

What's hot (20)

#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Vagrant
VagrantVagrant
Vagrant
 
Composer
ComposerComposer
Composer
 
Short journey into the serverless world
Short journey into the serverless worldShort journey into the serverless world
Short journey into the serverless world
 
Bluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web ApplicationBluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web Application
 
Docker, OSS and Azure
Docker, OSS and AzureDocker, OSS and Azure
Docker, OSS and Azure
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git together
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Deploying Plone on AWS
Deploying Plone on AWSDeploying Plone on AWS
Deploying Plone on AWS
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
 
Composer intro
Composer introComposer intro
Composer intro
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven Plugin
 
Java and other open source solutions on windows azure
Java and other open source solutions on windows azureJava and other open source solutions on windows azure
Java and other open source solutions on windows azure
 
How we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use CaseHow we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use Case
 
DockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with DockerDockerCon 17 EU: Modernizing .NET Apps with Docker
DockerCon 17 EU: Modernizing .NET Apps with Docker
 
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
 
Modernizing .NET Apps with Docker
Modernizing .NET Apps with DockerModernizing .NET Apps with Docker
Modernizing .NET Apps with Docker
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016
 
GenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in ElixirGenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in Elixir
 

Similar to Symfony4 - Deep dive

Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19
Antonio Peric-Mazar
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
Antonio Peric-Mazar
 
Automation in Cloud
Automation in CloudAutomation in Cloud
Automation in Cloud
Abhishek Amralkar
 
How composer saved PHP
How composer saved PHPHow composer saved PHP
How composer saved PHP
Ryan Kilfedder
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
Jackson F. de A. Mafra
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
adrian_nye
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
André Rømcke
 
Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)
Peter Bittner
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
Jason Grimes
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdf
Marian Marinov
 
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil ConferencePhalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
Jackson F. de A. Mafra
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
vjvarenya
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Fabrice Bernhard
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
AFUP_Limoges
 
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Les-Tilleuls.coop
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
Unit testing symfony plugins with php unit
Unit testing symfony plugins with php unitUnit testing symfony plugins with php unit
Unit testing symfony plugins with php unit
Christian Schaefer
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
Jackson F. de A. Mafra
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architecture
Mindfire Solutions
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your Own
Lambert Beekhuis
 

Similar to Symfony4 - Deep dive (20)

Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
 
Automation in Cloud
Automation in CloudAutomation in Cloud
Automation in Cloud
 
How composer saved PHP
How composer saved PHPHow composer saved PHP
How composer saved PHP
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)Avoid the Vendor Lock-in Trap (with App Deployment)
Avoid the Vendor Lock-in Trap (with App Deployment)
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
 
How to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdfHow to successfully migrate to DevOps .pdf
How to successfully migrate to DevOps .pdf
 
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil ConferencePhalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guide
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Unit testing symfony plugins with php unit
Unit testing symfony plugins with php unitUnit testing symfony plugins with php unit
Unit testing symfony plugins with php unit
 
Phalcon - Giant Killer
Phalcon - Giant KillerPhalcon - Giant Killer
Phalcon - Giant Killer
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architecture
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your Own
 

Recently uploaded

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Symfony4 - Deep dive

  • 2. “Symfony is a set of PHP Components, a Web Application framework, a Philosophy, and a Community — all working together in harmony.
  • 3. KEYNOTE ➤ Introduction ➤ What’s new? ➤ Monolith VS Microservice ➤ Symfony Flex ➤ Maker Bundle ➤ New Components!
  • 5. WHAT’S NEW? ➤ 30% Smaller Symfony3 ➤ No more bundle inheritance! ➤ Bundles App ➤ Dotenv Component ➤ DI - Auto-configure and auto-wiring services ➤ Caching Component
  • 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.
  • 11. BUNDLES CONFIG - SYMFONY 3!
  • 12. BUNDLES CONFIG - SYMFONY 4
  • 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.
  • 14.
  • 15.
  • 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:
  • 20. FLEX RECIPES - CONTRIBUTIONS
  • 21. FLEX RECIPES - INTERACTIVE
  • 22. FLEX RECIPES - INTERACTIVE
  • 24. MAKER BUNDLE The update of SensioGeneratorBundle, Use make: instead of generate:
  • 26. COMPONENTS ➤ DotENV ➤ Dependency Injection ➤ Workflow ➤ Cache
  • 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:
  • 30. AUTOWIRING - WORKING WITH INTERFACES
  • 31.
  • 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
  • 46. CONTACT ME ➤ salma.abdelhady@tajawal.com ➤ https://github.com/SalmaAbdelhady ➤ https://www.linkedin.com/in/salmahabdelhady/