From Good To SOLID: How to Become a Better PHP Developer? - Katerina Trajchevska - PHP UK 2019
https://adevait.com/
Single Responsibility Principle
Do only one thing in a class.
Open-Closed Principle
Extend, don’t modify.
Liskov Substitution Principle
Don’t switch classes, unless you’re sure that they can give the same result.
Interface Segregation Principle
Create small interfaces.
Dependency Inversion
Depend on interfaces, not classes.
Test to Break Principles - Rob Waller - PHP UK Conference 2019
https://www.youtube.com/watch?v=JDwFyRXbVHQ&list=PL_aPVo2HeGF9Hf1dr6lI7f6jJ48zqcz_f&index=3&t=0s
- Break large methods into smaller private methods.
- Unit testing.
Test to work
Does the code work when given the correct input?
Test to break
Can the system be broken:
- Can the car be started using a screwdriver?
- Do seatbelts and airbags work when it crashes.
declare strict_types = 1
Email validation example.
Ignorance Complexity Problem.
PHPUnit - annotations.
- Check for exception messages.
Better to throw exception than continue and do something horrible.
Everything is Awesome - Paul Verbeek Mast - PHP UK Conference 2019
https://www.youtube.com/watch?v=gzUL5cPhD8Q&list=PL_aPVo2HeGF9Hf1dr6lI7f6jJ48zqcz_f&index=8
Running Your PHP Site on AWS Lambda - Neal Brooks - PHP UK Conference 2019
https://www.youtube.com/watch?v=TTyIBOnpI9s&list=PL_aPVo2HeGF9Hf1dr6lI7f6jJ48zqcz_f&index=9