0
PHP-FIG: PAST, PRESENT AND FUTURE
@PHILSTURGEON #PHPJOBURG14
HUMBLE BEGINNINGS
BACK IN ANCIENT 2009
http://healthland.time.com/2012/04/27/humility-a-quiet-underappreciated-strength/
PSR-0
AUTOLOADING STUFF
Not many people cared…
… including me
PSR-0
AUTOLOADING STUFF
vendor/PEAR/Mail/SMTP.php
vendor/Symfony/Core/Request.php
vendor/Zend/Mail/Message.php
PSR-0
AUTOLOADING STUFF
<?php namespace TestPackageFooBar;
class Baz {}
$instance = new
PackageFooBarBaz();
$instance = ne...
NOT SO HUMBLE BITS
GRUMBLE GRUMBLE
wiki.php.net/rfc/splclassloader
fig.php.net
26 for, 21 against =
nope
PSR-1 & 2
A.K.A TABS V SPACES
MY INVOLVEMENT
BRITISH INVASION
PSR-3
LOGGING SOUNDS EASY, BUT…
github.com/Seldaek/monolog
$log = new Logger('name');
$log->pushHandler(new
StreamHandler(...
PSR-3
LOGGING SOUNDS EASY, BUT…
StreamHandler
RotatingFileHandler
SyslogHandler
ErrorLogHandler
NativeMailerHandler
SwiftM...
STYLE OR LOGGING?
SO WHICH IS IT:
SOUNDS LIKE PEP
PYTHON DID IT!
legacy.python.org/dev/peps/
P 4 Deprecation of Standard Modules
P 7 Style Guide for C Code
P 8 Style Guide for Python
Code
P 12 Sample reStructured Te...
ZEN OF PYTHON
LITERALLY ANYTHING
http://legacy.python.org/dev/peps/pep-0020/
Beautiful is better than
Explicit is better t...
PSR-4
NEW AND SHINY? OR SATAN!!!
vendor/pear/mail/src/PEAR/Mail/SMTP.php
vendor/symfony/framework/src/Symfony/Core/
Reques...
PSR-4
NEW AND SHINY? OR SATAN!!!
vendor/pear/mail/src/SMTP.php
vendor/symfony/framework/src/Core/Request.php
vendor/zend/m...
PSR-0
vendor/hpatoio/bitly-api/src/Bitly/Api/BitlyClient.php
new BitlyApiBitlyClient();
PSR-4
vendor/hpatoio/bitly-api/src...
PSR-5
DOCBLOCKS ARE FUN
WORKFLOW BYLAW
GETTING THINGS ON TRACK
PSR-6
blog.tedivm.com/stash
CACHE ALL THE THINGS!
GETTING THINGS ON TRACK
PSR-7
HTTP ADAPTERS ARE NOT FUN
BuzzHttpAdapter
CurlHttpAdapter
GuzzleHttpAdapter
SocketHttpAdapter
ZendHttpAdapter
geocod...
PSR-8
http://en.wikipedia.org/wiki/Free_Hugs_Campaign
pyrocms.com
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
PHP-FIG: Past, Present and Future
Upcoming SlideShare
Loading in...5
×

PHP-FIG: Past, Present and Future

1,712

Published on

In 2009 the PHP-FIG created PSR-0: an autoloading standard that helped to change the landscape of PHP forever, thanks in no small part to its integration with Composer. Well, PSR-0 was built in a land before PHP had namespaces, when Horde and PEAR were prevalent and Composer was but a twinkle in the eye of two developers. In December 2013 PSR-4 was released as a newer, shinier version of that standard.

The FIG has more standards happening, some of which may be out just in time for this talk.

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • Hello. Bitly-api now support PSR-4 here the code https://github.com/hpatoio/bitly-api

    Bye.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
1,712
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
16
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "PHP-FIG: Past, Present and Future"

  1. 1. PHP-FIG: PAST, PRESENT AND FUTURE @PHILSTURGEON #PHPJOBURG14
  2. 2. HUMBLE BEGINNINGS BACK IN ANCIENT 2009 http://healthland.time.com/2012/04/27/humility-a-quiet-underappreciated-strength/
  3. 3. PSR-0 AUTOLOADING STUFF Not many people cared… … including me
  4. 4. PSR-0 AUTOLOADING STUFF vendor/PEAR/Mail/SMTP.php vendor/Symfony/Core/Request.php vendor/Zend/Mail/Message.php
  5. 5. PSR-0 AUTOLOADING STUFF <?php namespace TestPackageFooBar; class Baz {} $instance = new PackageFooBarBaz(); $instance = new PackageFoo_Bar_Baz(); github.com/philsturgeon/psr0-naming-oddity
  6. 6. NOT SO HUMBLE BITS GRUMBLE GRUMBLE wiki.php.net/rfc/splclassloader fig.php.net 26 for, 21 against = nope
  7. 7. PSR-1 & 2 A.K.A TABS V SPACES
  8. 8. MY INVOLVEMENT BRITISH INVASION
  9. 9. PSR-3 LOGGING SOUNDS EASY, BUT… github.com/Seldaek/monolog $log = new Logger('name'); $log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); // add records to the log $log->addWarning('Foo'); $log->addError('Bar');
  10. 10. PSR-3 LOGGING SOUNDS EASY, BUT… StreamHandler RotatingFileHandler SyslogHandler ErrorLogHandler NativeMailerHandler SwiftMailerHandler PushoverHandler HipChatHandler FlowdockHandler SocketHandler AmqpHandler GelfHandler CubeHandler RavenHandler ZendMonitorHandler NewRelicHandler LogglyHandler RollbarHandler SyslogUdpHandler LogEntriesHandler FirePHPHandler ChromePHPHandler BrowserConsoleHandler RedisHandler MongoDBHandler CouchDBHandler DoctrineCouchDBHandler ElasticSearchHandler DynamoDbHandler
  11. 11. STYLE OR LOGGING? SO WHICH IS IT:
  12. 12. SOUNDS LIKE PEP PYTHON DID IT! legacy.python.org/dev/peps/
  13. 13. P 4 Deprecation of Standard Modules P 7 Style Guide for C Code P 8 Style Guide for Python Code P 12 Sample reStructured Text PEP Template SF 234 Iterators SF 378 Format Specifier for Thousands Separator SOUNDS LIKE PEP PYTHON DID IT!
  14. 14. ZEN OF PYTHON LITERALLY ANYTHING http://legacy.python.org/dev/peps/pep-0020/ Beautiful is better than Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts.
  15. 15. PSR-4 NEW AND SHINY? OR SATAN!!! vendor/pear/mail/src/PEAR/Mail/SMTP.php vendor/symfony/framework/src/Symfony/Core/ Request.php vendor/zend/mail/src/Zend/Mail/Message.php
  16. 16. PSR-4 NEW AND SHINY? OR SATAN!!! vendor/pear/mail/src/SMTP.php vendor/symfony/framework/src/Core/Request.php vendor/zend/mail/src/Message.php
  17. 17. PSR-0 vendor/hpatoio/bitly-api/src/Bitly/Api/BitlyClient.php new BitlyApiBitlyClient(); PSR-4 vendor/hpatoio/bitly-api/src/BitlyClient.php new BitlyApiBitlyClient(); PSR-4 (Better) vendor/hpatoio/bitly/src/Client.php new HpatoioBitlyClient();
  18. 18. PSR-5 DOCBLOCKS ARE FUN
  19. 19. WORKFLOW BYLAW GETTING THINGS ON TRACK
  20. 20. PSR-6 blog.tedivm.com/stash CACHE ALL THE THINGS! GETTING THINGS ON TRACK
  21. 21. PSR-7 HTTP ADAPTERS ARE NOT FUN BuzzHttpAdapter CurlHttpAdapter GuzzleHttpAdapter SocketHttpAdapter ZendHttpAdapter geocoder-php.org
  22. 22. PSR-8 http://en.wikipedia.org/wiki/Free_Hugs_Campaign
  23. 23. pyrocms.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×