Open Source?
- My own components.
- Where to share code?
- Didn't bother.
Drupal
Code I could get onboard with
PHP 5
Better object oriented programming support
PHP 5.3
- Introduced namespaces.
- Better code organization.
PHP Standard Recommendations
- PSR-4, PSR-0
- PSR-3
- PSR-7
- Other PSR's
- Future PSR's
PSR-0
File: .../lib/Drupal/book/BookManager.php
namespace Drupal\book;
class BookManager {
...
}
Collaborate
- Any logger implementing PSR-3
- Any HTTP client implementing PSR-7
Reuse
- Symfony, Zend, Doctrine, Twig, and other components.
- Stack Builders to add functionality as middlewares.
Maintain less code
Focus on what makes Drupal "Drupal"
The sites that you build have
- Clean code
- Maintainable code
- Testable code
What PHP-FIG means to Drupal
An account of PHP history and renaissance
— Hussain Abbas / @hussainweb