Skip to content

11.0.0

Latest
Compare
Choose a tag to compare
@freost freost released this 03 Jan 09:32
· 1 commit to 11.0 since this release
f5b0428

The major version bump is due to upping the required PHP version from 8.1 to 8.4 and a several breaking changes. Most applications built using Mako 10 should run on Mako 11 with just a few simple adjustments.

New

  • Mako applications are now better suited to run on application servers like FrankenPHP.
  • The development error view now displays the Mako environment name.
  • Added Connection::blob() method that allows you to easily fetch a blob column as a stream.
  • Added Query::blob() method that allows you to easily fetch a blob column as a stream.
  • The ManyToMany::unlink() and ManyToMany::synchronize() methods now support junction attributes.
  • Enums are now also supported when writing "raw" SQL.
  • Added support for deletes with joins to the MySQL query compiler.
  • The database library will use the new driver specific PDO sub-classes.
  • Added upsert functionality to the query builder. The feature is currently supported by the MySQL, PostgreSQL and SQLite compilers.
  • The database library now allows you to bind stringable objects as query parameters.
  • Added ConnectionManager::getOpenConnections() method.
  • The Time::createFromTimestamp() and TimeImmutable::createFromTimestamp() methods now support microsecond precision.
  • The Time::createFromFormat() and TimeImmutable::createFromFormat() methods now support microsecond precision.
  • It is now possible to customize how JSON request bodies are decoded using the following methods:
    • Body::setJsonMaxDepth() to set the maximum JSON nesting level.
    • Body::setJsonFlags() to set the JSON decoding options.
  • The dependency injection container can now resolve intersection types.
  • Added Deprecated middleware that allows you to easily set the Deprecation and Sunset HTTP headers.
  • Global constraints and middleware will now be listed and sorted by priority when using the app:routes command.
  • The Redis client now supports the following Redis Stack features:
    • Bloom filter
    • Cuckoo filter
    • Count-min sketch
    • JSON
    • Redis query engine
    • Auto-suggest
    • T-digest
    • Time series
    • Top-k
  • Added Redis::executeCommand() helper method that makes it possible to call commands not yet supported by the client.
  • Added Permission enum to make it easier to interact with file permissions.
  • Added Permissions class that can be used to interact with a set of Permission enum instances.
  • Added FileSystem::setPermissions() method that accepts an integer or a Permissions instance.
  • Added FileSystem::hasPermissions() method that accepts an integer or a Permissions instance.
  • Added FileSystem::getPermissions() method that returns a Permissions instance.
  • Added FileSystem::isExecutable() method.
  • Added FileSystem::clearCache() method.
  • Added FileInfo::hasPermissions() method that accepts an integer or a Permissions instance.
  • Added FileInfo::getPermissions() method that returns a Permissions instance.
  • Reactor command names can now be registered with the CommandName attribute.
  • Reactor command descriptions can now be registered with the CommandDescription attribute.
  • Reactor command arguments can now be registered with the CommandArguments attribute.
  • Added new Cursor class that makes it easier to control the CLI cursor.
  • Added a signal handler to make it easier to handle async process control signals.
  • Added a CLI spinner output component.
  • Added a CLI hyperlink component.
  • Added a CLI progress component.
  • Added a CLI progress iterator component.
  • New and improved look of rendered CLI tables.
  • Added a simple way to defer small tasks until after the response has been sent to the client when using FastCGI.

Changes

  • The gatekeeper Session::login() and Session::forceLogin() methods will now return a LoginStatus enum instance instead of a mix of boolean and integer values.
  • Dropped support for underscore separated Redis method calls.
  • Renamed the UUID::sequential() method to UUID::v4Sequential().
  • Renamed the ErrorHandler::handle() method to ErrorHandler::addHandler().
  • Renamed the ErrorHandler::handler() method to ErrorHandler::handle().
  • Renamed the mako\cli\output\helpers namespace to mako\cli\output\components.
  • The Redis cache clear implementation will no longer flush the entire database but instead just deleted the cached keys.

Deprecations

  • Deprecated the Command::$command property. Use the CommandName attribute instead.
  • Deprecated the Command::$description property. Use the CommandDescription attribute instead.
  • Deprecated the Command::getCommand() method.
  • Deprecated the Command::getDescription() method.
  • Deprecated the Command::getArguments() method. Use the CommandArguments attribute instead.
  • Deprecated the Command::progressBar() method. Use the Command::progress() or Command::progressIterator() methods instead.

Improvements

  • Text in CLI alerts can now be styled and the alerts will render properly with text consisting of characters of varying width.
  • More consistent look and feel when creating CLI commands.
  • The preloader generator will now ensure preloading of class, property, method and argument attributes.
  • Various other improvements and optimizations.

Check out the upgrade guide for details on how to upgrade from 10.0.*.

All deprecated features will be removed in Mako 12.0.