5.1.0
版本发布时间: 2024-09-14 10:53:46
cakephp/cakephp最新发布版本:5.1.0(2024-09-14 10:53:46)
The CakePHP core team is happy to announce the immediate availability of CakePHP 5.1.0. 5.1.0 provides a number improvements to CakePHP. 5.1.0 introduces a small number of deprecation warnings. Any deprecations introduced now will continue to have consistent behavior until their removal in 6.0.0. There is no scheduled date for 6.0.0 at this time.
Upgrading to 5.1.0
You can use composer to upgrade to CakePHP 5.1.0::
php composer.phar require --update-with-dependencies "cakephp/cakephp:5.1.*"
Deprecation Warnings
5.1 introduces a few deprecations. All of these features will continue for the duration of 5.x but will be removed in 6.0. See the migration guide.
What's new in 5.1.0?
The migration guide has a complete list of what's new in 5.1.0. We recommend you give that page a read when upgrading. A few highlights from 5.1.0 are:
-
RedisEngine
now supports TLS connections. -
bin/cake plugin list
has been added to list plugin metadata. - Optional
Command
arguments can now have adefault
value. -
BannerHelper
was added. This command helper can format text as a banner with a colored background and padding. - Components can now use the DI container to have dependencies resolved and provided as constructor parameters just like Controllers and Commands do.
- The
toString
,toInt
,toBool
,toDate
, andtoDateTime
functions were added. They give you a typesafe way to cast request data or other input and returnnull
when conversion fails. -
pathCombine()
was added to help build paths without worrying about duplicate and trailing slashes. - A new
events
hook was added to theBaseApplication
as well as theBasePlugin
class. - Support for
point
,linestring
,polygon
andgeometry
types were added to the Database package. -
SelectQuery::intersect()
andSelectQuery::intersectAll()
were added. -
Client
now emitsHttpClient.beforeSend
andHttpClient.afterSend
events when requests are sent. -
Http\Server
now emitsServer.terminate
event to run logic after the response has been sent in fastcgi environments. In other environments theServer.terminate
event runs before the response has been sent. - View cells now emit events around their actions
Cell.beforeAction
andCell.afterAction
. -
Validation::enum()
,Validator::enum()
,Validation::enumOnly()
, andValidation::enumExcept()
were added to further simplify validating backed enum values. -
HtmlHelper
can now create a meta tag with the CSRF token in it.
Contributors to 5.1.0
Thank you to all the contributors that helped make 5.1 happen:
- Adam Halfar
- ADmad
- Alejandro Ibarra
- Fernando Herrero
- Frank de Graaf (Phally)
- Jamison Bryant
- J.Brabec
- Jozef Grencik
- Kevin Pfeifer
- KrzysiekNDS
- Mark Scherer
- Mark Story
- Maximilian Ruta
- ndm2
- Nicos Panayides
- othercorey
- Robert Pustułka
As always, a huge thanks to all the community members that helped make this release happen by reporting issues and sending pull requests. 5.1.0 is a large release and would not have been possible without the community support and feedback.
What's Next
With 5.1.0 shipped, future feature work will continue on 5.next
and eventually form 5.2.0. Bug fixes for 5.1 will be done in the 5.x
branch, and 5.0 will receive security fixes until the release of 5.3.
The roadmap for 5.x is still under development. We're interested in making the upgrade from 5.0 to 5.1 a smooth one, and would appreciate any feedback you have on upgrade difficulties. Please open an issue and get the discussion started.
1、 cakephp-5-1-0.zip 10.74MB