Stable Release in branch 5.1
5.1.10
Released 16 Jul 2026
(22 days ago)
SoftwareCakePHP
Version5.1
Status
End of life
Supported
PHP versions
PHP 8.1+
Initial release5.1.0
13 Sep 2024
(1 year ago)
Latest release5.1.10
16 Jul 2026
(22 days ago)
End of security fixes19 Jul 2026
(Ended 19 days ago)
Release noteshttps://github.com/cakephp/cakephp/releases/tag/5.1.10
Source codehttps://github.com/cakephp/cakephp/tree/5.1.10
Documentationhttps://book.cakephp.org/5/en/index.html
Downloadhttps://book.cakephp.org/5/en/installation.html
CakePHP 5.1 ReleasesView full list

What is New in CakePHP 5.1

CakePHP 5.1 is a minor release that adds useful features while keeping backward compatibility with 5.0. It introduces new database types, validation rules for enums, type-safe casting functions, and better event handling. This version also includes several behavior changes for improved consistency and deprecations to prepare for future updates.

Core and Utility Enhancements

  • New type-safe casting functions: toString(), toInt(), toBool(), toDate(), and toDateTime() return null on failure.
  • pathCombine() utility to join paths without duplicate or trailing slashes.
  • Components now support dependency injection in constructors, similar to controllers.
  • New events in BaseApplication and BasePlugin for global listeners.
  • PluginConfig class to retrieve plugin metadata and versions.

Database and ORM Updates

  • Support for geospatial types: point, linestring, polygon, and geometry.
  • New query methods: SelectQuery::intersect() and SelectQuery::intersectAll().
  • Buffered results methods restored: enableBufferedResults(), disableBufferedResults(), and isBufferedResultsEnabled().
  • Optional JSON mapping for SQLite columns containing "json" in the name (opt-in via config).

Validation Improvements

  • New rules for backed enums: Validation::enum(), Validator::enum(), Validation::enumOnly(), and Validation::enumExcept().

HTTP and Server Features

  • HttpClient emits beforeSend and afterSend events.
  • Http\Server emits Server.terminate event.
  • SecurityHeadersMiddleware supports setPermissionsPolicy().

View and Helper Additions

  • View cells emit Cell.beforeAction and Cell.afterAction events.
  • HtmlHelper::meta() can generate CSRF token meta tags.
  • TextHelper::autoLinkUrls() has new options for stripping protocol and truncating long URLs.
  • New BannerHelper for formatted console banners.

Console and Cache

  • New command: cake plugin list to show loaded plugins.
  • Optional command arguments support default values.
  • Redis cache engine supports TLS connections.

Testing and Other Tools

  • Updated PHPUnit requirement to ^10.5.5 or ^11.1.3.
  • New LogTestTrait for asserting log messages in tests.
  • IntegrationTestTrait::replaceRequest() added.
  • Number formatting supports roundingMode option.

Behavior Changes

Several adjustments for better consistency:

  • Connection config creates unique read/write drivers if keys present.
  • FormHelper no longer adds aria-required on required inputs.
  • Duplicate association names raise exceptions.
  • Truncation methods use UTF-8 ellipsis.
  • Cache group hashing updated (may cause temporary misses).
  • Table::findList() uses space as default separator.

Deprecations

  • _cake_core_ cache key renamed to _cake_translations_.
  • Mailer::setMessage() deprecated.

Why Upgrade to CakePHP 5.1

CakePHP 5.1 adds practical features for modern development, including better database support, validation, and events. It maintains compatibility with 5.0 while introducing improvements that make code safer and more efficient. Developers can take advantage of new tools without major rewrites.

Releases In Branch 5.1

VersionRelease date
5.1.1016 Jul 2026
(22 days ago)
5.1.915 Jul 2026
(23 days ago)
5.1.813 Jul 2026
(25 days ago)
5.1.723 May 2026
(2 months ago)
5.1.623 Feb 2025
(1 year ago)
5.1.516 Jan 2025
(1 year ago)
5.1.412 Dec 2024
(1 year ago)
5.1.209 Nov 2024
(1 year ago)
5.1.103 Oct 2024
(1 year ago)
5.1.013 Sep 2024
(1 year ago)
5.1.0-RC207 Aug 2024
(2 years ago)
5.1.0-RC120 May 2024
(2 years ago)