SlideShare a Scribd company logo
1 of 46
Download to read offline
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 DockerElton Stoneman
 
Short journey into the serverless world
Short journey into the serverless worldShort journey into the serverless world
Short journey into the serverless worldScott van Kalken
 
Bluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web ApplicationBluemix - Deploying a Java Web Application
Bluemix - Deploying a Java Web ApplicationCraig Trim
 
Dev objective2015 lets git together
Dev objective2015 lets git togetherDev objective2015 lets git together
Dev objective2015 lets git togetherColdFusionConference
 
Deploying Plone on AWS
Deploying Plone on AWSDeploying Plone on AWS
Deploying Plone on AWST. 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
 
Tomcat Maven Plugin
Tomcat Maven PluginTomcat Maven Plugin
Tomcat Maven PluginOlivier 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 azurePatriek 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 Casecoolscreen.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 DockerElton 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 2016roblund
 
Modernizing .NET Apps with Docker
Modernizing .NET Apps with DockerModernizing .NET Apps with Docker
Modernizing .NET Apps with DockerDocker
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016David Brattoli
 
GenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in ElixirGenRetry: Simple Exponential Backoff in Elixir
GenRetry: Simple Exponential Backoff in ElixirPete 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 #ipc19Antonio 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 #phpsrbAntonio Peric-Mazar
 
How composer saved PHP
How composer saved PHPHow composer saved PHP
How composer saved PHPRyan Kilfedder
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerJackson 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 Systemadrian_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 2014André 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 ComposerJason 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 .pdfMarian Marinov
 
Prizm Installation Guide
Prizm Installation GuidePrizm Installation Guide
Prizm Installation Guidevjvarenya
 
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 unitChristian Schaefer
 
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 architectureMindfire Solutions
 
Plugins And Making Your Own
Plugins And Making Your OwnPlugins And Making Your Own
Plugins And Making Your OwnLambert 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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

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/