Design Patterns and PHP 8 in Drupal Core - From Procedural to Object-Oriented Programming
Drupal Association via YouTube
Overview
Syllabus
Intro
Procedural programming
Extended using hooks
Challenges with Drupal 7
Object oriented programming
Scenario - Car Manufacturing
Dependency Injection - Scenario
Dependency Injection - implementation
Real world is complicated!
Dependency Injection - Drupal
Enter Electric Batteries!
Electric Battery (engine?)
Adapter pattern - Drupal
Observer Pattern - Drupal
Design Patterns - benefits
Named Arguments
Deprecated Dynamic Properties
[In Discussion] Using Weakmap for container serialization solution
Attributes in place of Annotations
Use appropriate type hints wherever possible
What does this mean for the community?
Taught by
Drupal Association