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

How to improve the daily life of PHP developers?

How to improve the daily life of PHP developers?

In this presentation, which takes less than an hour, we will discuss several tools that can help us be more effective as PHP developers. From local environments to code quality, security, performance, and tasks automation.

Initially published at https://fr.slideshare.net/AFUP_Limoges/comment-amliorer-le-quotidien-des-dveloppeurs-php.

Alexandre Jardin

June 20, 2018
Tweet

More Decks by Alexandre Jardin

Other Decks in Technology

Transcript

  1. 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
  2. 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
  3. 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 && \
  4. Symfony Recipes ✘ Docker support in progress ✘ Environment managed

    by the community ✘ Symfony + Composer + Docker = https://github.com/symfony/flex/pull/128
  5. 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.
  6. “ Programs must be written for people to read, and

    only incidentally for machines to execute. Abelson & Sussman
  7. Summary ✘ Code more readable ✘ Commits more relevant ✘

    Code (sometimes) more efficient No matter what rules you choose, consistency is the key.
  8. 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!
  9. 83,245,467 Number of composer.lock files checked since 2014 22,106,532 Total

    number of vulnerabilities found 7,294,964 = 9% Number of composer.lock files with known vulnerabilities
  10. Summary ✘ Easy to integrate ✘ Maintained by the community

    ✘ Can be part of a “quality package” Nobody wants a security breach in its application...
  11. 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!
  12. 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.
  13. “ 53% of users abandon a website that takes more

    than 3 seconds to load. Google studies
  14. 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!