Changelog


5.2.0 (2017-05-08)

Update using composer update.

New

  • Added putIfNotexists() method to all cache adapters.
  • The apcu, memcached, memory, null and redis cache stores now implement the new mako\cache\stores\IncrementDecrementInterface interface.
  • Added Collection::getValues() method.
  • Added Collection::each() method.
  • Added Collection::map() method.
  • Added Collection::filter() method.
  • It is now possible to pass custom PDO options to a connection.
  • It is now possible to format numbers in i18n strings using the <number> tag.

Changes

  • The Gatekeeper library has been rewritten. It is now possible to implement custom authentication adapters.
  • The Gatekeeper::basicAuth() method will now always return a boolean value.
  • Headers will now be set with the case that they where defined with.
  • The CacheManager::instance() method now returns a mako\cache\stores\StoreInterface instance instead of a mako\cache\Cache instance.

Bugfixes

  • The reactor --env flag now works as expected.

Improvements

  • The ORM will now use fully qualified column names in the relation query criterion.
  • Various improvements and optimizations.

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


5.1.3 (2017-02-17)

Update using composer update.

Bugfixes

  • Request::getParsed() no longer fails if the content type header contains a character set.

5.1.2 (2017-01-25)

Update using composer update.

Changes

  • The function parser is now less strict when it comes to function names.

5.1.1 (2017-01-17)

Update using composer update.

Changes

  • JSONP responses are now handled by the JSON response builder.

5.1.0 (2017-01-16)

Update using composer update.

New

  • Added a optional NullableTrait to the ORM.
  • Added Command::STATUS_SUCCESS constant.
  • Added Command::STATUS_ERROR constant.
  • Added cache.remove command.
  • Added cache.clear command.
  • Added application.base_url config key.
  • Now possible to set middleware priority.
  • The ORM now allows you to configure the foreign key name using the $foreignKeyName property.

Changes

  • The response class will no longer auto render views. Views should be rendered in the controller.
  • Removed the query convenience trait.
  • Removed support for "piped" validation rules.
  • New syntax for passing parameters to middleware.
  • New syntax for passing parameters to validation rules.

Bugfixes

  • ORM::getForeignKey() now uses Str::camel2underscored() instead of strtolower().

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


5.0.23 (2017-01-01)

Update using composer update.

Bugfixes

  • Query compiler will now properly escape JSON path segments.
  • MySQL query compiler will now unquote extracted JSON values.

5.0.22 (2016-12-28)

Update using composer update.

New

  • The query builder now supports set operations.
  • Now possible to customize the width of progressbars.

Changes

  • Deprecated the query convenience trait. It will be removed in Mako 5.1.0.

Bugfixes

  • The image library will now show an error when trying to open a unsupported image type.

Improvements

  • Various optimizations.

5.0.21 (2016-12-15)

Update using composer update.

New

  • Now possible to return a status/exit code from reactor commands.

5.0.20 (2016-12-12)

Update using composer update.

Bugfixes

  • Reverted breaking changes to compiled templates that were introduced in 5.0.17.

5.0.19 (2016-12-10)

Update using composer update.

Bugfixes

  • CLI error handler will no longer fail when displaying a generic error message.

5.0.18 (2016-12-07)

Update using composer update.

New

  • Now possible to update JSON values using the unified JSON query syntax.
  • Now possible to bind parameters to raw SQL when using the query builder.

Improvements

  • Various optimizations.

5.0.17 (2016-12-01)

Update using composer update.

New

  • Now possible to access route parameters outside route actions.

Bugfixes

  • Migration rollback now works as expected.

Improvements

  • Various optimizations.

5.0.16 (2016-11-24)

Update using composer update.

Bugfixes

  • Don't resolve singletons multiple times when using the container aware trait.

5.0.15 (2016-11-17)

Update using composer update.

Bugfixes

  • Fixed an issue where strict reactor commands would fail when called with a "global" option.

5.0.14 (2016-11-08)

Update using composer update.

Bugfixes

  • Fixed issue with Gatekeeper::forceLogin().

Improvements

  • Error handler now supports xdebug.overload_var_dump.

5.0.13 (2016-11-02)

Update using composer update.

Bugfixes

  • ORM::toArray() will no longer try to convert false to an array.

5.0.12 (2016-11-01)

Update using composer update.

Bugfixes

  • Corrected the return type of the View::assign() method.

5.0.11 (2016-10-14)

Update using composer update.

Bugfixes

  • The $shouldTouchOnInsert, $shouldTouchOnUpdate and $shouldTouchOnDelete properties of the TimestampedTrait now work as expected.

Improvements

  • The redis client now supports dash-separated commands.
  • Checking a ORM relation with isset() will now lazy load it if it hasn't already been loaded.

5.0.10 (2016-10-11)

Update using composer update.

Bugfixes

  • The redis client will no longer assume that it has recieved the data it asked for.

5.0.9 (2016-10-11)

Update using composer update.

Bugfixes

  • The Redis client now reads data in 4096 byte chunks to avoid issues with large values.

5.0.8 (2016-10-11)

Update using composer update.

Changes

  • Request::file() now returns UploadedFile objects.

Bugfixes

  • Redis cache store is now instantiated with the configured class whitelist.

5.0.7 (2016-10-08)

Update using composer update.

New

  • Added Connection::yield() and Query::yield() methods that allow you to iterate over result sets using a generator.

5.0.6 (2016-10-06)

Update using composer update.

Bugfixes

  • Fixed Query::first() fetch mode bug.

5.0.5 (2016-10-06)

Update using composer update.

Bugfixes

  • Query pagination now works as expected with distinct selections.

Improvements

  • Query::countDistinct() now supports an array of columns names.

5.0.4 (2016-10-05)

Update using composer update.

Changes

  • Simplified stack trace for JSON error responses.

5.0.3 (2016-10-05)

Update using composer update.

Bugfixes

  • Query pagination now works as expected with grouping.

5.0.2 (2016-10-05)

Update using composer update.

Bugfixes

  • The output escaper now accepts null values.

5.0.1 (2016-10-05)

Update using composer update.

Bugfixes

  • Fixed validation bug.

5.0.0 (2016-10-04)

Update using composer update.

New

  • The query builder now supports row-level locking.
  • The query builder now has a unified syntax for querying JSON fields.
  • New and simplified pagination functionality when using the query builder.
  • Added Query::havingRaw() method.
  • Added Query::orHavingRaw() method.
  • Added Query::columns() method.
  • Added Query::countDistinct() method.
  • Added support for transaction savepoints.
  • Added Collection::extend() method.
  • Added cluster support to the Redis client.
  • Added IPv6 support to the Redis client.
  • Added support for persistent connections to the Redis client.
  • Now possible to define verbatim template blocks.
  • Now possible to pass extra variables to included templates.
  • Custom cache stores can be added using the CacheManager::extend() method.
  • Custom encrypters can be added using the CryptoManager::extend() method.
  • Added IPv4 and IPv6 utilities.
  • You can now set a subnet when setting the IP adresses of trusted proxies.
  • The character set will automatically be added to RSS and ATOM content-type headers.
  • Added support for contextual dependency injection.
  • You now have to whitelist the classes you want the framework to deserialize (cache and session stores).
  • Added FileSystem::hash() method.
  • Added FileSystem::hmac() method.
  • Added app.generate_key command that can be used to generate secure encryption keys.
  • Added unordered list CLI output helper.
  • Added ordered list CLI output helper.
  • Added Output::clear() method.
  • Reactor will now suggest a task or option name if an invalid one is used.
  • Added support for strict commands.
  • Added FireTrait that makes it easier to call a command from within a command.

Changes

  • Query::null() has been renamed to Query::isNull().
  • Query::orNull() has been renamed to Query::orIsNull().
  • Query::notNull() has been renamed to Query::isNotNull().
  • Query::orNotNull() has been renamed to Query::orIsNotNull().
  • Query::all() now returns a result set instead of an array.
  • ORM read-only functionality is now handled using a trait.
  • The ORM::isReadOnly() method has been removed.
  • ORM records will no longer be made read-only when using joins.
  • ORM values can now be casted to intergers using int instead of integer.
  • ORM values can now be casted to booleans using bool instead of boolean.
  • An exception will be thrown when trying to get a non-existing item from collection.
  • The HTML::registerTag() method has been removed. Use HTML::extend() instead.
  • Routing middleware replaces route filters.
  • The Routes::methods() method has been renamed to Routes::register().
  • The Route::setNamespace() method has been renamed to Route::namespace().
  • The Controller::beforeFilter() has been renamed to Controller::beforeAction().
  • The Controller::afterFilter() has been renamed to Controller::afterAction().
  • Custom view renderers must now be added using the ViewFactory::extend() method.
  • Removed the APC and XCache cache stores.
  • Removed the Response::file() method.
  • Removed the Response::stream() method.
  • Removed the Response::redirect() method .
  • Removed the Response::back() method.
  • Added a ControllerHelperTrait with the following methods: fileResponse, streamResponse, redirectResponse, jsonResponse and jsonpReponse.
  • Removed the MCRYPT encrypter.
  • Removed the Crypto::encryptAndSign() and Crypto::validateAndDecrypt() methods. All encrypted data is now signed and validated by default.
  • Renamed FileSystem::includeFile() to FileSystem::include().
  • Renamed FileSystem::requireFile() to FileSystem::require().
  • Renamed FileSystem::includeFileOnce() to FileSystem::includeOnce().
  • Renamed FileSystem::requireFileOnce() to FileSystem::requireOnce().
  • Renamed FileSystem::isDirectoryEmpty() to FileSystem::isEmpty().
  • Renamed FileSystem::exists() to FileSystem::has().
  • Renamed FileSystem::delete() to FileSystem::remove().
  • Renamed FileSystem::getContents() to FileSystem::get().
  • Renamed FileSystem::putContents() to FileSystem::put().
  • Renamed FileSystem::prependContents() to FileSystem::prepend().
  • Renamed FileSystem::appendContents() to FileSystem::append().
  • Renamed FileSystem::truncateContents() to FileSystem::truncate().

Improvements

  • Miscellaneous improvements and optimizations.

Mako 5.0 is a major version update that contains a few minor breaking changes. Make sure to read the upgrade instructions!


4.5.14 (2016-08-30)

Update using composer update.

Bugfixes

  • Fixed the docblock return type for CacheManager::instance().

4.5.13 (2016-08-09)

Update using composer update.

Improvements

  • Container::call() now supports function calls in addition to closure and method calls.

4.5.12 (2016-08-02)

Update using composer update.

Bugfixes

  • URLBuilder::toRoute() will now allow falsy parameters (0, 0.0, '0').

4.5.11 (2016-06-29)

Update using composer update.

Bugfixes

  • Fixed a leap year related bug in the Time class.

Improvements

  • Less restrictive version requirements of third party libraries.

4.5.10 (2016-02-03)

Update using composer update.

Improvements

  • Cache will now throw an exception if the store is unavailable.

4.5.9 (2015-11-26)

Update using composer update.

Bugfixes

  • ETag caching will now work as expected when using mod_deflate with Apache > 2.4.0.

Improvements

  • Better support for routes containing multibyte characters.

4.5.8 (2015-11-17)

Update using composer update.

Improvements

  • PHP7 compatibility.

4.5.7 (2015-11-04)

Update using composer update.

Bugfixes

  • The query builder can now generate working SQLite queries with an IN clause where the values come from a subquery.
  • The before and after validation filters will now work as expected.

Improvements

  • The query builder now supports joins with nested conditions.

4.3.5, 4.4.6 (2015-11-04)

Update using composer update.

Bugfixes

  • The before and after validation filters will now work as expected.

4.5.6 (2015-09-11)

Update using composer update.

Improvements

  • Only include pages array in pagination data when max_page_links > 0.

4.5.5 (2015-07-08)

Update using composer update.

Bugfixes

  • Clean URLs should now work as expected when using the local development server.

4.5.4 (2015-06-17)

Update using composer update.

Bugfixes

  • The progress bar will no longer fail when 0 is passed as the item count.

Improvements

  • Better parameter binding for prepared statements.

This update requires you to change the data type of the users.banned and users.activated fields from SET to BOOL (or TINYINT(1)).


4.5.3 (2015-05-07)

Update using composer update.

Changes

  • The Pagination::paginate() method is now public.

4.5.2 (2015-04-24)

Update using composer update.

Bugfixes

  • Eager loading criteria now work as expected when eager loading in chunks.

4.5.1 (2015-04-20)

Update using composer update.

Bugfixes

  • Now possible to eager load more than 1000 unique ids when using SQLite and Oracle (#151).

4.5.0 (2015-04-15)

Update using composer update.

New

  • Now possible to send multiple headers with the same field-name.
  • Added Request::getRoute() method.
  • Added Response::hasHeader() method.
  • Added Response::hasCookie() method.
  • Added Response::removeCookie() method.
  • Added Image::getHeight() method.
  • Added Image::getWidth() method.
  • Added Image::getDimensions() method.
  • Added brute force throttling to the Gatekeeper library.
  • Added a command bus library #138.
  • New and improved event handler.

Changes

  • Str::slug() will now encode non-ascii characters as recommened by RFC-3986.
  • Minor changes in the application and package directory structures.
  • Added brute force throttling settings to the app/config/gatekeeper.php configuration file.
  • Added 3 new fields to the gatekeeper users table.

Improvements

  • Now possible to select a custom set of columns through a many-to-many relation.
  • Various optimizations.

This release comes with a few minor breaking changes. Check out the migration guide here.


4.4.5 (2015-03-06)

Update using composer update.

Bugfixes

  • Fixed bug in app.routes command.

4.3.4, 4.4.4 (2015-02-19)

Update using composer update.

Bugfixes

  • Fixed language cache issue.

4.4.3 (2015-02-04)

Update using composer update.

Improvements

  • Query::column() and Query::first() will now generate a more optimized query.

4.4.2 (2015-02-03)

Update using composer update.

Improvements

  • The command line error handler will now include the error location in the output.

4.4.1 (2015-02-02)

Update using composer update.

New

  • Added Output::setFormatter() method.
  • Added Output::isMuted() method.

Bugfixes

  • The redis client will no longer try to authenticate when no password is provided.

Improvements

  • Controllers no longer need to extend the Mako base controller.
  • Global reactor options are now sorted alphabetically.
  • You can now separate package booting into core, web and cli.

This update requires a small change to the app/config/application.php configuration file.


4.4.0 (2015-01-26)

Update using composer update.

New

  • Brand new reactor command line tool.
  • Added optional $column parameter to the Query::column() method.
  • Added Mako core class.
  • Added Password::needsRehash() method.
  • Added Request::isSafe() method.
  • Added Session::getToken() method.
  • Added Session::regenerateToken() method.
  • Added Session::validateToken() method.
  • Added token validation rule.
  • Gatekeeper will automatically rehash passwords if needed.
  • Added attribute, css, url and js escaping filters.
  • Escape filters are now also available in plain PHP views.

Changes

  • Moved init.php file from the framework core to the application.
  • Removed the MAKO_VERSION constant (use Mako::VERSION instead).
  • Removed the Password::isLegacyHash() method.
  • Removed the $legacyCheck parameter from the Password::validate() method.
  • Renamed Session::generateToken() method to Session::generateOneTimeToken.
  • Renamed Session::validateToken() method to Session::validateOneTimeToken.
  • Renamed token validation rule to one_time_token.

This release comes with a few minor breaking changes. Check out the migration guide here.


4.0.11, 4.1.5, 4.2.3, 4.3.3 (2015-01-19)

Update using composer update.

Bugfixes

  • Gatekeeper will use the provided "auth_key" configuration value.

4.3.2 (2014-12-07)

Update using composer update.

Bugfixes

  • Fixed validation bug.

4.3.1 (2014-12-02)

Update using composer update.

Bugfixes

  • Fixed routing bug.

4.3.0 (2014-11-27)

Update using composer update.

New

  • Added ViewFactory::exists() method.
  • Views are now cascading. This means that you can override package views in your application.
  • Language files are now cascading. This means that you can override package language files in your application.
  • Mako now includes default 403, 404, 405 error views that can easily be overriden.
  • The ORM will now also forward non-static calls to the query builder.
  • Added Connection::table() convenience method.
  • Added Container::call() method (#116).
  • Route actions are now executed by the Container::call() method (#118).
  • Route filters are now executed by the Container::call() method (#119).
  • Added a session NULL store.

Changes

  • Moved all http exceptions to the mako\http\exceptions namespace.
  • Renamed the PageNotFoundException to NotFoundException.
  • Controllers, Tasks and Migrations now use the ContainerAwareTrait trait by default.
  • The ORM::builder() method is now public.
  • The Route::constraints() method has been renamed to Route::when().

This release comes with a few minor breaking changes. Check out the migration guide here.


4.0.10, 4.1.4, 4.2.2 (2014-11-21)

Update using composer update.

Bugfixes

  • Fixed query builder bug.

4.0.9, 4.1.3, 4.2.1 (2014-11-14)

Update using composer update.

Bugfixes

  • Fixed MCrypt autoloading issue (#120).

4.2.0 (2014-09-26)

Update using composer update.

New

  • Added Time::formatLocalized method.
  • Added TimeZone class.
  • Added a Stopwatch class (#113).
  • Added support for nested template extension.
  • Added optional migration descriptions.
  • Added render shortcut method to the view factory class.
  • It is now possible to configure Gatekeeper to identify users using their username instead of their email.

Changes

  • The Time class has been moved to the to mako\chrono namespace.
  • The locale config option has been removed. You now have to set the appropriate locale for each language instead.
  • The ViewFactory::create method will now return an instance of mako\view\View instead of an implementation of mako\view\renderers\RendererInterface.
  • Moved app/routes.php to app/routing/routes.php.
  • Filters must now be defined in app/routing/filters.php.
  • You can now use class filters in addition to closures.
  • The UrlBuilder::current method will now include the current query parameters by default.
  • Default Mcrypt encryption mode changed from ECB to CBC.
  • Removed the app/packages directory. Packages will now be installed in the packagist vendor directory.
  • Removed the global helper functions. They have been replaced with a trait and a class (NamespacedFileLoaderTrait and ClassInspector).

This release comes with a few minor breaking changes. Check out the migration guide here.


4.1.2 (2014-09-05)

Update using composer update.

Bugfixes

  • Fixed issue with date casting in the ORM.

4.0.8, 4.1.1 (2014-09-01)

Update using composer update.

Bugfixes

  • Added missing returns in gatekeeper user implementation.

4.1.0 (2014-08-20)

Update using composer update.

New

  • Added sepia filter to the image library.
  • Added negate filter to the image library.
  • Added pixelate filter to the image library.
  • Added brightness adjustment to the image library.
  • Added sharpening to the image library.
  • Now possible to create and restore temporary snapshots when using the image library.
  • Added support for language caching.
  • Added Connection::isAlive() method.
  • Added Connection::reconnect() method.
  • Added Connection::beginTransaction() method.
  • Added Connection::commitTransaction() method.
  • Added Connection::rollBackTransaction() method.
  • Added Connection::getTransactionNestingLevel() method.
  • Added Connection::inTransaction() method.
  • It is now possible to configure the ORM to automatically typecast values.
  • PageNotFoundExceptions now includes the request method and path (#108).
  • Now possible to register custom view renderers without having to implement a custom view factory.
  • Added Application::isCommandLine() method.
  • Added ErrorHandler::disableLoggingFor() method.

Changes

  • The logger and errorHandler services are no longer required for an application to work.
  • Removed the the ORM::$dateTimeColumms property. Use the new typecast feature instead.
  • Selecting specific columns when using the ORM will no longer make the records read-only. Joining however, will do.

You must also add the language_cache key to your application configuration file.


4.0.7 (2014-08-18)

Update using composer update.

New

  • Now possible to configure the date output format when converting ORM records to array and/or json.

Bugfixes

  • Escape exception message in debug template.

4.0.6 (2014-08-5)

Update using composer update.

Improvements

  • Improved ORM::toArray() and ORM::toJson methods.

4.0.5 (2014-07-24)

Update using composer update.

Bugfixes

  • Fixed bug in the file based cache store.

4.0.4 (2014-07-04)

Update using composer update.

Bugfixes

  • Image library now uses the correct image quality when saving.
  • Image library watermarking now works as expected.

4.0.3 (2014-07-02)

Update using composer update.

Improvements

  • The error handler is no longer loading external JavaScript libraries.

4.0.2 (2014-07-01)

Update using composer update.

Changes

  • Namespaced the helper functions to avoild naming collisions with global functions.

Bugfixes

  • Added mako\get_class_traits() helper function to improve detection of trait usage.

4.0.1 (2014-06-26)

Update using composer update.

Bugfixes

  • Fixed bug where User::isMemberOf would return NULL if group id was used instead of group name.

4.0.0 (2014-06-26)

Mako 4.0.0 is a complete rewrite where the main focus has been on improving testability, extensibility, security and the overall quality of the framework.

Mako 4 also includes a bunch of new features. Here are some of them:

  • A new and improved RESTful routing system
  • A brand new authentication library
  • A smart and easy to use dependecy injection container
  • Timestamped and OptimisticLocking traits for the ORM
  • An image manipulation library that supports both GD and ImageMagick

Check out the documentation for the full list of changes.

Note that this is NOT a one step upgrade but the API changes have been kept to a minimum so upgrading a project from Mako 3.6.x shouldn't pose too many problems.

Top