SlideShare a Scribd company logo
Comment améliorer
le quotidien des
Développeurs PHP ?
hello!
Alexandre Jardin
Senior Back-end Developer @EmakinaFR
Most Common Problems
Local environment used for
development not reliable
Same commands used again
and again every day
Too much time spent by the
team when reviewing the code
Comment améliorer le quotidien des Développeurs PHP ?
1.
Docker
Let’s start with your computer
Containers VS Virtual Machines
Why?
Multiple projects
=
Multiple configurations
Comment améliorer le quotidien des Développeurs PHP ?
Resources used by VMs
How?
docker-compose.yml
“apache” service on port 443 with a shared
volume for project code
“mysql” service on port 3306 with a persistent
volume for databases
Dockerfile
Base
Custom
packages
Custom
configuration
Migration from PHP 5.6 to PHP 7.2
-FROM php:5.6-fpm
+FROM php:7.2-fpm
docker-php-ext-install -j$(nproc) 
[…]
- mcrypt 
[…]
+ yes "" | pecl install apcu-4.0.11 lzf mongo redis && 
+ docker-php-ext-enable apcu lzf mongo redis && 
- yes "" | pecl install apcu lzf mongodb redis && 
- docker-php-ext-enable apcu lzf mongodb redis &&
Symfony Recipes
✘ Docker support in progress
✘ Environment managed by the community
✘ Symfony + Composer + Docker =
https://github.com/symfony/flex/pull/128
Summary
✘ Same environment for each developer
✘ Can be shared with the project source
✘ Light & Fast!
Less time wasted on your environment, more time to develop things.
2.
Code Styles
Focus on substance over form
Why?
Comment améliorer le quotidien des Développeurs PHP ?
“Programs must be written for
people to read, and only
incidentally for machines to
execute.
Abelson & Sussman
How?
PHP-CS-Fixer
ESLint
Summary
✘ Code more readable
✘ Commits more relevant
✘ Code (sometimes) more efficient
No matter what rules you choose, consistency is the key.
3.
Static Analysis
How about (almost) automate the code review?
Why?
Comment améliorer le quotidien des Développeurs PHP ?
Time spent by developers from Codacy studies
Code review
How?
IDE real-time analysis
PHP Static Analysis Tool (PHPStan)
Symfony Linters
✘ Built-in commands
✘ Are able to detect syntax errors
✘ Almost instant
External Services
✘ Codacy
✘ Scrutinizer
✘ SonarQube
✘ SensioLabsInsight
✘ ...
Codacy
Dashboard
Bitbucket integration
Summary
✘ Better autonomy of team members
✘ Positive impact on the overall project quality
✘ Nice learning process
Free or Premium? Choose one or both, it's a must-have!
4.
Security Audits
Are you sure your dependencies are secure?
Why?
Comment améliorer le quotidien des Développeurs PHP ?
Composer
=
Tons of dependencies
83,245,467Number of composer.lock files checked since 2014
22,106,532Total number of vulnerabilities found
7,294,964 = 9%Number of composer.lock files with known vulnerabilities
How?
Roave Security Advisories or SensioLabs Security Checker
Symfony Security Monitoring
Summary
✘ Easy to integrate
✘ Maintained by the community
✘ Can be part of a “quality package”
Nobody wants a security breach in its application...
5.
Makefile
Let's automate a few things
Why?
Comment améliorer le quotidien des Développeurs PHP ?
Daily work
=
Tons of commands
Bash aliases
How?
Overview
Summary
✘ Shared with the project source
✘ Easy to write/maintain
✘ Can be used to share knowledge
Tired of writing a command over and over? Add it in your Makefile!
6.
Git Hooks
Still too many commands?
Why?
Comment améliorer le quotidien des Développeurs PHP ?
Makefile
=
Fewer commands
How?
Default templates
“commit-msg” example
Summary
✘ Can perform additional checks
✘ Can trigger additional processes
✘ Work with any programming language
With custom hooks, Git can fit nearly any workflow you can imagine.
7.
Blackfire
Because performance matters
Why?
Comment améliorer le quotidien des Développeurs PHP ?
“53% of users abandon a website
that takes
more than 3 seconds to load.
Google studies
Clean code
!==
Fast code
How?
Profile example
Metrics/Tests example
Scenarios example
Real examples from a legacy project
Summary
✘ Very easy to install and use
✘ Performance profiling and recommendations
✘ Can also be used for non-regression testing
Before upgrading your infrastructure, have a look to Blackfire!
“Never stop measuring”
Nicolas Grekas
Overview
Docker
Code
Styles
Static
Analysis
Security
MakefileGit HooksBlackfire
thanks!
Any questions?
Email: info@ajardin.fr
GitHub: ajardin // Twitter: alxjrdn

More Related Content

PPTX
Cypress Automation
PDF
Test Automation Infrastructure with Containers
PDF
Cypress e2e automation testing - day1 intor by: Hassan Hameed
PDF
DevOpsDays Singapore Habitat Ignite
PDF
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
PPTX
Continuous Delivery With Selenium Grid And Docker
PDF
PDF
GDGSCL - Docker a jeho provoz v Heroku a AWS
Cypress Automation
Test Automation Infrastructure with Containers
Cypress e2e automation testing - day1 intor by: Hassan Hameed
DevOpsDays Singapore Habitat Ignite
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
Continuous Delivery With Selenium Grid And Docker
GDGSCL - Docker a jeho provoz v Heroku a AWS

What's hot (20)

PDF
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
PDF
Dockerize Laravel Application
PDF
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
PDF
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
PDF
Easy Setup for Parallel Test Execution with Selenium Docker
PPTX
Building a Large Java Codebase with Bazel - Natan Silnitsky
PDF
Testing as a container
PDF
Let’s start Continuous Integration with jenkins
PDF
Drone CI
PDF
Improve your Java Environment with Docker
KEY
Perlbrew
PPTX
Linuxing in London: Docker Intro Workshop
PDF
Docker Best Practices Workshop
PPTX
There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018
PDF
Codecoon - A technical Case Study
PPTX
Itea dev ops_course_topic2
PPTX
Itea dev ops_course_topic1
PDF
Drone Continuous Integration
PDF
Dependencies and Licenses
PDF
Brujug Jenkins pipeline scalability
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
Dockerize Laravel Application
CodeIgniter For Project : Workshop 001 - Install Docker and CodeIgniter
.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Easy Setup for Parallel Test Execution with Selenium Docker
Building a Large Java Codebase with Bazel - Natan Silnitsky
Testing as a container
Let’s start Continuous Integration with jenkins
Drone CI
Improve your Java Environment with Docker
Perlbrew
Linuxing in London: Docker Intro Workshop
Docker Best Practices Workshop
There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018
Codecoon - A technical Case Study
Itea dev ops_course_topic2
Itea dev ops_course_topic1
Drone Continuous Integration
Dependencies and Licenses
Brujug Jenkins pipeline scalability
Ad

Similar to Comment améliorer le quotidien des Développeurs PHP ? (20)

ODP
Building Scalable Development Environments
PDF
Symfony - Introduction
PPTX
The Professional Programmer
PDF
Run stuff, Deploy Stuff
KEY
Confoo
PDF
CakePHP mistakes made
PDF
Enter Cookbook: refactoring under a microscope
PDF
Modernize Your Drupal Development
PDF
php_ebook.pdf
ODP
PHP Code Quality
PDF
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PDF
PHP Development Tools
PPT
Software Engineering in PHP
PDF
Consistent Development Environment with Vagrant and Chef
ODP
The Professional Programmer
PDF
The why and how of moving to php 8
PDF
From dev to ops and beyond - getting it done
PDF
5 Ways to Awesome-ize Your (PHP) Code
PDF
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
PDF
Create a PHP Library the right way
Building Scalable Development Environments
Symfony - Introduction
The Professional Programmer
Run stuff, Deploy Stuff
Confoo
CakePHP mistakes made
Enter Cookbook: refactoring under a microscope
Modernize Your Drupal Development
php_ebook.pdf
PHP Code Quality
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Development Tools
Software Engineering in PHP
Consistent Development Environment with Vagrant and Chef
The Professional Programmer
The why and how of moving to php 8
From dev to ops and beyond - getting it done
5 Ways to Awesome-ize Your (PHP) Code
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Create a PHP Library the right way
Ad

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Modernizing your data center with Dell and AMD
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced IT Governance
PPTX
Cloud computing and distributed systems.
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
20250228 LYD VKU AI Blended-Learning.pptx
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
madgavkar20181017ppt McKinsey Presentation.pdf
NewMind AI Weekly Chronicles - August'25 Week I
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Modernizing your data center with Dell and AMD
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
GamePlan Trading System Review: Professional Trader's Honest Take
Sensors and Actuators in IoT Systems using pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced IT Governance
Cloud computing and distributed systems.
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology

Comment améliorer le quotidien des Développeurs PHP ?