CakePHP 3.0 and beyond

download CakePHP 3.0 and beyond

of 36

  • date post

    28-Jul-2015
  • Category

    Software

  • view

    1.678
  • download

    0

Embed Size (px)

Transcript of CakePHP 3.0 and beyond

1. 3.0.0 & Beyond 2. May 15, 2005 3. 3.0.0 March 22 2015 4. Some Things Could Have Been Better 5. 3 Years is a Long Time 6. Lots of Breaking Changes The most weve ever had. 7. Upgrading is Hard 8. Missing Datasource Examples 9. Some Things Went Really Well 10. Community Involvement From the very rst dev release, the community was helping. 11. Documentation Complete on Day 0 12. 80K Downloads in 2 Months 13. The new ORM is Awesome We can thank Jose Lorenzo 14. So, Now What? 15. 2.7.x July 2015 16. 3.1.x July 2015 17. 3.2.x January 2016 18. Mailers Simple conventions for emails. 19. Mailers namespace AppController; use CakeMailerMailerAwareTrait; class UsersController extends AppController { use MailerAwareTrait; public function register() { ... $this->getMailer('User')->send('welcome', [$user]); } } 20. Console Improvements More formatting options 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. ORM Improvements More ways to load relations 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. ElasticSearch A fully featured ODM 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. PSR-7 Http Client and Middleware 27. Continuous Plugin Releases Bake, DebugKit, Migrations, ElasticSearch 28. Backwards Compatible All the way through 3.x 29. Backwards Compatible Public methods wont change their signatures. Public properties will continue to be available. Protected methods may change signatures. Protected properties may change. 30. Upcoming Releases 31. What about PHP5.5? Or 5.6? 32. 4.0 33. Cleanup Remove deprecated features. 34. PHP7 Typehints, return values 35. You can Help 36. Thanks!