In December 2015, PHP 7.0 was released marking a new milestone for PHP and web application developers. We thought all was going to be easy to migrate to PHP 7.0. Unfortunately, many extensions and tools we use weren’t ready yet. In December 2016 PHP 7.1 was released, and the urgency to update became real as PHP 5.6 was nearing end-of-life. In this talk, I describe the analysis and the challenges we faced migrating towards PHP 7.1 so you can learn how to defeat those challenges if you plan to migrate too.
2. Michelangelo van Dam
‣ Pro PHP consultant at in2it
‣ President of PHPBenelux
‣ Open-Source contributor
‣ Conference Speaker
‣ ZCE and ZF-CE
in itPROFESSIONAL PHP SERVICES
10. IMPORTANT QUESTIONS
HOW CAN WE MOVE TO PHP 7?
▸ Review PHP 7's changelog
▸ are we still using deprecated functions?
▸ are we using PHP extensions?
▸ do we depend on 3rd party packages?
11. THE BEST WAY TO LEARN…
I PRESENTED ON PHP 7
▸ Required me to do the research
▸ Needed to engage with PHP core developers
▸ Played with the code base
▸ Simulated small challenges
▸ Reviewed the results
▸ BONUS: I could speak at meetups!!!
12. PRESENTING ON A SUBJECT IS THE BEST
WAY TO BECOME AN EXPERT ON THAT
SUBJECT.
Cal Evans (@CalEvans)
TWEETABLE QUOTE
13. FINDING ANSWERS
CODE ANALYSIS
▸ Reviewing codebases against PHP 7 change log
▸ Reviewing critical extensions and removing non-critical extensions
▸ Negotiate roadmaps with 3rd party vendors and software suppliers
▸ Discussing with the PHP community (global and local)
▸ To see what others have done (and learn from their experiences)
▸ To understand the position of projects and frameworks
20. WHAT WE ALREADY DID
IMPROVE GOING FORWARD
▸ Elimination of non-compatible code
▸ Refactored code base
▸ Better understanding of our weaknesses
▸ Separation of responsibilities
22. THE ANALYSIS
LIST OF TOOLS WE USED
▸ Phan: https://github.com/etsy/phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and
attempts to prove incorrectness rather than correctness.
▸ PHPStan: https://github.com/phpstan/phpstan
PHP Static Analysis Tool - discover bugs in your code without running it!
▸ PHPCompatibilty: https://github.com/wimg/PHPCompatibility
PHP Compatibility check for PHP_CodeSniffer
27. THE COMMUNITY IS STRONG
SHARING AS WE GO FORWARD
▸ Sharing our issues & solutions
▸ Promoting PHP 7.1
▸ Improve adoption rate
▸ Becoming an expert in upgrades
▸ Learning more about PHP 7
28. TO CHANGE IS DIFFICULT. NOT TO
CHANGE IS FATAL.
William Pollard
TWEETABLE QUOTE
32. QUICK RECAP
TIMELINE
▸ Sep 2015: Research starts with PHP 7.0.0 RC3
▸ Dec 2015: Release of PHP 7.0.0
▸ Mar 2016: Planning starts
▸ Jul 2016: Preparation development starts
▸ Nov 2016: Testing phase starts
▸ Dec 2016: Release of PHP 7.1.0
▸ Jan 2017: Upgrade completed 🎉
33. in it2PROFESSIONAL PHP SERVICES
Michelangelo van Dam
Zend Certified Engineer
training@in2it.be - www.in2it.be
T @in2itvof - F in2itvof
PHPUnit
Getting Started
Advanced Testing
Zend Framework 3
Fundamentals
Advanced
Azure PHP
Quick time to market
Scale up and out
Security
Locking down
web apps
PHPBootcamp
PHP 7 from
Zero to Hero
DevOps
Continuous
Deployment
www.dragonbe.com
T @DragonBe - F DragonBe
Slides: https://in2.se/road-to-php71