πŸ“° CakePHP 4.0 πŸ“ Strawberry is out, a new Chapter for PHP dev

πŸ“… December 17th, 2019 ⏲️ 1 min 21 secs

What is CakePHP?

CakePHP is a free, open-source, rapid development framework for PHP. It’s a foundational structure for programmers to create web applications. Since it’s based on MVC architecture, that makes it structured, rapid and more flexible.

Today, the CakePHP team released the new version : AlphaΒ version in April. A new chapter for CakePHP with a stable API. CakePHP 3.x moves into maintenance mode while 2.x moves into security release mode.

How to upgrade 3.x website?

CakePHP 4.0 contains a lot of breaking changes and it’s not compatible with 3.x releases. If you attempt to migrate your website you have to follow thisΒ migration guide.Β It’s covering all the deprecated, removed, and new features.

Additionally, CakePHP team offers anΒ upgrade guideΒ which gives a step-by-step guide and CLI tool to help us upgrade our application. To help improve these documents we have to help them collect more feedback from up while upgrading by opening issues in theΒ official repository

Key Features

  • PHP 7.2 required.
  • Streamlined APIs with all deprecated methods and behavior removed.
  • Additional typehints across the framework giving you errors faster.
  • Improved error messages across the framework.
  • A refreshed application skeleton design.
  • New database types for fixed length strings (CHAR), datetime with microseconds, and datetime with timezone types.
  • TableΒ now featuresΒ OrFailΒ methods that raise exceptions on failure making error handling more explicit and straightforward.
  • Middleware for CSP headers, Form tampering prevention, and HTTPS enforcement.
  • Cake\Routing\AssetΒ to make generating asset URLs simple from anywhere in your application code.
  • FormHelperΒ now generates HTML5 validation errors.
  • FormHelperΒ now generates HTML5 datetime input elements.

Source: https://bakery.cakephp.org/2019/12/15/cakephp_400_released.html