SF4C2 | Mastering Symfony 4

  • This training helps you master some of the most advanced tools and key concepts of the Symfony framework. Thanks to our expert instructors, learn how to efficiently use the service container and register your own services. You'll also discover how to setup and run a unit and functional tests suite with PHPUnit to improve the quality and stability of your code. Finally, you'll learn how to build, process and validate dynamic forms, securing some areas of your application as well as dealing with a relational database and improving application performance. This training workshop is available online. Contact us and we'll tell you how.
  • Prerequisites

    Mastering Symfony 4 Basics
  • Goals

    In two days only, you'll learn how to master some of the most advanced and key topics of the Symfony 4 framework. This training focuses on mastering the framework configuration thanks to the dependency injection service container and bundles' specific configuration. You'll also learn how to design and validate forms as well as implementing your custom validation rulesets. This workshop also dives into some Doctrine persistence best practices, authentication and authorization mechanisms, unit and functional testing as well as HTTP caching to speed your application.

Full program

Interacting with a SQL Relational Database

  • Installing and configuring the Doctrine ORM
  • Establishing an object-relational mapping with entity classes
  • Linking entities together thanks to relationships mapping
  • Persisting object entities into the SQL database
  • Building dynamic SQL queries thanks to the Doctrine Query Builder object
  • Extracting entities from the database
  • Hosting custom SQL queries in Doctrine repositories objects
  • Encapsulating entities related domain logic into entity classes

Going Further with Forms

  • Designing and processing forms
  • Rendering configurable forms with the options system
  • Triggering custom specific logic when form events arise
  • Customizing the rendering of a Symfony form with form themes
  • Applying data custom validation logic
  • Triggering validation rules according to the form context

Perpetuating the Application with Automated Tests

  • Discovering the PHPUnit unit testing framework
  • Understanding the pros of automating tests
  • Configuring a unit tests suite
  • Creating and executing a unit tests suite
  • Creating and executing a functional tests suite
  • Generating code coverage report

Outsourcing the Business Logic into Services

  • Understanding the dependency injection principle
  • Introducing the Symfony service container
  • Listing all existing Symfony framework services
  • Registering new business services into the container
  • Configuring services with global parameters
  • Leveraging the services auto-registration mechanism
  • Adapting services configuration manually when needed

Decoupling Code with Event Programming

  • Introduction to the Mediator design pattern and its implementation in Symfony (the Event Dispatcher)
  • Discovering the built-in Symfony kernel events
  • Executing custom code whenever an event occurs in the framwork
  • Propagating custom business events through the service layer
  • Connecting custom event listeners / subscribers on the business code

Securing Access to the Application Protected Pages

  • Introduction to authentication and authorization principles
  • Securing a Web site with a traditional login form authentication
  • Setting up a form authentication system with the Guard component
  • Establishing a security policy based on users' permissions
  • Registering custom authorization rules thanks to voters