Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CakePHP 3.0 and beyond

2,714 views

Published on

Review of the 3.0 release, and future plans for CakePHP. Given at CAke

Published in: Software
  • Be the first to comment

CakePHP 3.0 and beyond

  1. 1. 3.0.0 & Beyond
  2. 2. May 15, 2005
  3. 3. 3.0.0 March 22 2015
  4. 4. Some Things Could Have Been Better
  5. 5. 3 Years is a Long Time
  6. 6. Lots of Breaking Changes The most we’ve ever had.
  7. 7. Upgrading is Hard
  8. 8. Missing Datasource Examples
  9. 9. Some Things Went Really Well
  10. 10. Community Involvement From the very first dev release, the 
 community was helping.
  11. 11. Documentation Complete on Day 0
  12. 12. 80K Downloads 
 in 2 Months
  13. 13. The new ORM is Awesome We can thank Jose Lorenzo
  14. 14. So, Now What?
  15. 15. 2.7.x July 2015
  16. 16. 3.1.x July 2015
  17. 17. 3.2.x January 2016
  18. 18. Mailers Simple conventions for emails.
  19. 19. Mailers namespace AppController; use CakeMailerMailerAwareTrait; class UsersController extends AppController { use MailerAwareTrait; public function register() { ... $this->getMailer('User')->send('welcome', [$user]); } }
  20. 20. Console Improvements More formatting options
  21. 21. Shell Helpers $func = function ($progress) { // Do work $progress->increment(); }; $this->helper(‘progress’)->output($func); $progress = $this->helper('progress'); // Progress through 300 things $progress->init(['total' => 300]); $progress->increment($i); $progress->draw();
  22. 22. ORM Improvements More ways to load relations
  23. 23. ORM Improvements // Lazy eager loading $articles = $this->Articles->find()->all(); $enrichedArticles = $this->Articles->eagerLoad( $articles, ['Users', 'Tags'] ); // Not matching - find bookmarks not tagged with X $query = $this->Bookmarks->find() ->notMatching('Tags', function ($q) { return $q->where(['Tags.name' => 'Awesome']); });
  24. 24. ElasticSearch A fully featured ODM
  25. 25. ElasticSearch use CakeElasticSearchType; $invoices = new Type('invoices'); $query = $invoices->find() ->where([ 'name.first' => 'jose', 'age >' => 29, 'or' => [ 'tags in' => ['cake', 'php'], 'interests not in' => ['c#', 'java'] ] ]);
  26. 26. PSR-7 Http Client and Middleware
  27. 27. Continuous Plugin Releases Bake, DebugKit, Migrations, ElasticSearch
  28. 28. Backwards Compatible All the way through 3.x
  29. 29. Backwards Compatible • Public methods won’t change their signatures. • Public properties will continue to be available. • Protected methods may change signatures. • Protected properties may change.
  30. 30. Upcoming Releases
  31. 31. What about PHP5.5? Or 5.6?
  32. 32. 4.0
  33. 33. Cleanup Remove deprecated features.
  34. 34. PHP7 Typehints, return values
  35. 35. You can Help
  36. 36. Thanks!

×