Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The big upgrade. All the way up to Symfony 7 an...

The big upgrade. All the way up to Symfony 7 and PHP 8.3

In this talk I explain how we started with a poorly tested legacy project with Symfony 3.4 and PHP 7.2 and we took it all the way up to Symfony 7 and PHP 8.3. We talk about all the steps that we took, all the tools that we used, the difficulties that we found along the way and the benefits that we received. The talk includes a lot of samples of the changes that we had to apply at all levels. If we could do it, you can (and should) do it!!

Carlos Granados

June 06, 2024
Tweet

Other Decks in Programming

Transcript

  1. I have been a software developer for more than 30

    years. In the development space I have done everything: I have done games, e-commerce, APIs, backend, frontend, Android, SRE, DevOps... And I have worked with multiple languages and technologies: C++, PHP, Java, JavaScript, SQL, MongoDB, Docker… Carlos Granados PHP 100% Symfony 100%
  2. WizAI was founded in 2001 and its focus is on

    digital signage and intelligent information systems. They provide the right display hardware for their customers and their CMS software wizperZone and enable users to display their digital content in an appealing way. THE COMPANY Started working there in July 2023
  3. • Symfony 3.4 CURRENT STATUS • PHP 7.2 • REST

    API with an Angular NG frontend • Approx. 1K PHP files and 100K LOC • Almost no tests • No CI setup • No containers • No static analysis tools • No common coding standard • Very heterogeneous code base
  4. 06 – ADD BEHAT - Very good integration with Symfony

    - Allows you to cover a lot of code with very few tests - Does not create real HTTP requests, it simulates them by directly calling the Symfony kernel - It is very fast
  5. END RESULT - Database setup with migrations and fixtures -

    Good test code coverage with Behat and PHPUnit - CI pipeline in place - Static Analysis - PSR-12 compliant code base - Code fully updated to Symfony 3.4 and PHP 7.4 - Rector refactoring tool available
  6. END RESULT - Well tested, modern and homogeneous code base

    - Faster code base - Safer code base - Allows us to use all the latest Symfony capabilities - Allows us to use the latest PHP constructs - Matches latest documentation - Matches current presentations