- The server command will make up to 10 attempts to find an available port if the default one is in use.
- Added
Container::hasInstanceOf()method. - It is now possible to send additional arguments to authorization policy methods.
- Added bitonal filter to the image library (#258).
Check out the upgrade guide for details on how to upgrade from
6.0.*.
Update using composer update.
- Images will now be rotated in the same direction when using ImageMagick and GD.
The major version bump is due to dropped support for PHP 7.0 and 7.1 and a several breaking changes. Most applications built using Mako 5.7.0 should run on Mako 6.0.0 with just a few simple adjustments.
- Added
optionalvalidation rule. - Added
time_zonevalidation rule. - Added
Validator::validate()method that returns the validated input on success and throws anValidationExceptionon failure. - The container will now inject
nullwhen unable to resolve a nullable or optional class dependency. - Added
Loggerclass that extends the monolog logger with functionality to set global log context parameters (the gatekeeper user id will automatically be added if possible). - Added the
mako\cli\Environmentclass with the following methods:Environment::getDimensions()Environment::getWidth()Environment::getHeight()Environment::hasAnsiSupport()
- Added
Output::getEnvironment()method. - Added
JSON::setCharset()method. - Added
Stream::setType()method. - Added
Stream::setCharset()method. - Added
scopemethod to the ORM query builder. - Added
UUID::toBinary()method. - Added
UUID::toHexadecimal()method. - Added
UUID::sequential()method. - Added
Output::dump()method. - Added authorization to the gatekeeper library.
- Removed the deprecated
FileSystem::mime()method. - Removed the deprecated
FileSystem::hash()method. - Removed the deprecated
FileSystem::hmac()method. - The ORM query builder no longer supports "magic" scope methods. Use the
scopemethod instead. - The
RequestExceptionclass has been renamed toHttpException. - Removed the
Constraintbase class. Constraints should implement theConstraintInterfaceinstead. - Constraints parameters are now injected through the constructor.
- Removed the
Middlewarebase class. Middleware should implement theMiddlewareInterfaceinstead. - Middleware parameters are now injected through the constructor.
- Validator rule parameters are now injected via the constructor.
- Removed the
Output::hasAnsiSupport()method. - The
mako\gatekeeper\Authenticationclass has been renamed tomako\gatekeeper\Gatekeeper. - Several of the
mako\http\Requestmethods have been renamed for consistency:- The
Request::contentType()method has been renamed toRequest::getContentType(). - The
Request::scriptName()method has been renamed toRequest::getScriptName(). - The
Request::ip()method has been renamed toRequest::getIp(). - The
Request::basePath()method has been renamed toRequest::getBasePath(). - The
Request::baseURL()method has been renamed toRequest::getBaseURL(). - The
Request::path()method has been renamed toRequest::getPath(). - The
Request::language()method has been renamed toRequest::getLanguage(). - The
Request::languagePrefix()method has been renamed toRequest::getLanguagePrefix(). - The
Request::method()method has been renamed toRequest::getMethod(). - The
Request::realMethod()method has been renamed toRequest::getRealMethod(). - The
Request::username()method has been renamed toRequest::getUsername(). - The
Request::password()method has been renamed toRequest::getPassword(). - The
Request::referer()method has been renamed toRequest::getReferrer().
- The
- Several of the
mako\http\request\Headersmethods have been renamed for consistency:- The
Headers::acceptableContentTypes()method has been renamed toHeaders::getAcceptableContentTypes(). - The
Headers::acceptableLanguages()method has been renamed toHeaders::getAcceptableLanguages(). - The
Headers::acceptableCharsets()method has been renamed toHeaders::getAcceptableCharsets(). - The
Headers::acceptableEncodings()method has been renamed toHeaders::getAcceptableEncodings().
- The
- Several of the
mako\http\Responsemethods have been renamed for consistency:- The
Response::body()method has been renamed toResponse::setBody(). - The
Response::charset()method has been renamed toResponse::setCharset(). - The
Response::status()method has been renamed toResponse::setStatus(). - The
Response::type()method has been renamed toResponse::setType(). - The
Response::cache()method has been renamed toResponse::enableCaching(). - The
Response::compress()method has been renamed toResponse::enableCompression(). - The
JSON::status()method has been renamed toJSON::setStatus(). - The
Redirect::status()method has been renamed toRedirect::setStatus().
- The
- The
ExtendableTrait::extend()method has been renamed toExtendableTrait::addMethod().
Check out the upgrade guide for details on how to upgrade from
5.7.*.
- Added optional
--exit-codeoption tomigrate.statuscommand.
- It is now possible to eager load relations on a loaded model using the
ORM::include()method. - It is now possible to eager load relations on a result set using the
ResultSet::include()method. - Added
ORM::includes()method that returnstrueif a relation has been loaded andfalseif not. - Added
PaginationInterface::toArray()method. - Added
PaginationInterface::toJSON()method. - The
PaginationInterfaceinterface now extends theJsonSerializableinterface. - The query builder now supports basic tuple comparisons.
- It is now possible to provide a list of superglobal keys to blacklist from the Whoops error view
- It is now possible to set raw cookies.
- Added
FileInfoclass that extendsSplFileInfowith the following methods:FileInfo::getMimeType().FileInfo::getMimeEncoding().FileInfo::getHash().FileInfo::validateHash().FileInfo::getHmac().FileInfo::validateHmac().
- Added
FileSystem::info()method that returns aFileInfoobject. - Added new validation rules:
- Added
hashrule. - Added
hmacrule. - Added
aspect_ratiorule. - Added
exact_dimensionsrule. - Added
max_dimensionsrule. - Added
min_dimensionsrule.
- Added
- Removed the deprecated
mako\security\Passwordclass. - Removed the deprecated
ORM::$existsproperty. - Removed the deprecated
ORM::exists()method. - The gatekeeper
forceLoginmethod now returnstrueif the login is successful and a status code if not. - The JSON representation of a result set returned by the
Query::paginate()method will now be an object where the results are available asdataand pagination information will be available aspagination({"data":[...], "pagination":{...}}). - An exception will be thrown when trying to set a secure session or gatekeeper cookie over a non-secure connection.
- The URL builder will now separate query string parameters with
&instead of&. - The URL builder will now encode query string parameters using PHP_QUERY_RFC3986.
- Deprecated the
FileSystem::mime()method. - Deprecated the
FileSystem::hash()method. - Deprecated the
FileSystem::hmac()method.
- Various improvements and optimizations.
Check out the upgrade guide for details on how to upgrade from
5.6.*.
- Added
Request::basePath()method. - Added
BelongsToPolymorphicrelation. - Added
ORM::$isPersistedproperty. - Added
ORM::isPersisted()method. - Added
Query::sharedLock()convenience method. - It is now possible to use aggregate methods (
count,min,max, etc...) in a subquery context. - Migrations are now executed in a transaction if possible (Postgres, SQLite).
- Added multi database support to migrations.
- Added an option to opt out of atomic
getOrElsefor APCU caching. Use theatomic_get_or_elsekey. - Added
ConnectionManager::close()method. - Added
ConnectionManager::executeAndClose()method. - Added
Connection::close()method (to the database base connection class). - Added new
jsonvalidation rule. - Added new
arrayvalidation rule. - You can now specify which IP version you're validating when using the
ipvalidation rule. - Added
FileSystem::rename()method. - It is now possible to set a custom timeout for Redis connections.
- Added new password hashing library:
- Added new
Bcrypthasher class. - Added new
Argon2ihasher class. - Added new
Argon2idhasher class.
- Added new
- Removed the global
--databasereactor option.
- Deprecated the
ORM::$existsproperty. - Deprecated the
ORM::exists()method. - Deprecated the
mako\security\Passwordclass.
- Various improvements and optimizations.
Check out the upgrade guide for details on how to upgrade from
5.5.*.
- The
Str::slug()method no longer strips dashes from the input string. - Added
hardware,softwareandfurnitureto the list of irregular words used byStr::pluralize().
- Improved handling of invalid i18n keys.
- Fixed issue where the
uniquerule would fail when used with case-insensitive databases.
- You can now use
orin addition to||when printing template variables. - You can now prefix variable names with a
$in template capture blocks.
- The pagination factory no longer requires the view and http services.
- Added
Validator::rule()helper method.
- Migrations will no longer fail with empty description.
- Added
Validator::extend()method. - Added
Validator::addRules()method. - Added
Validator::addRulesIf()method. - Added
ValidatorFactory::extend()method. - Added new validation rules:
- Added
mimetyperule. - Added
max_filesizerule. - Added
is_uploadedrule.
- Added
- Removed
Responsemethods that where deprecated in 5.4:- Removed the
Response::header()method. - Removed the
Response::hasHeader()method. - Removed the
Response::removeHeader()method. - Removed the
Response::clearHeaders()method. - Removed the
Response::cookie()method. - Removed the
Response::signedCookie()method. - Removed the
Response::deleteCookie()method. - Removed the
Response::hasCookie()method. - Removed the
Response::removeCookie()method. - Removed the
Response::clearCookies()method.
- Removed the
- Removed
Validator::registerPlugin()method. - Removed
ValidatorFactory::registerPlugin()method.
- New and improved input validation with support for nested arrays and file validation.
Check out the upgrade guide for details on how to upgrade from
5.4.*.
- Added
Application::startTime()method. - The container now supports replacing previously registered/resolved items:
- Added
Container::replace()method. - Added
Container::replaceSingleton()method. - Added
Container::replaceInstance()method. - Added
Container::onReplace()method.
- Added
- Added
Request::contentType()method. - Added
Response::reset()method. - Added
mako\cli\output\Output::hasAnsiSupport()method. - Added
mako\cli\output\Output::clearLine()method. - Added
mako\cli\output\Output::clearLines()method. - Added
mako\cli\output\formatter\Formatter::stripSGR()method. - Added
mako\cli\output\formatter\FormatterInterface::stripTags()method. - Added
mako\cli\output\helpers\ProgressBar::remove()method. - Added
mako\cli\output\helpers\ProgressBar::setPrefix()method.- Added optional
$prefixparameter to theCommand::progressBar()method.
- Added optional
- Added optional
$priorityparameter to themako\http\routing\Dispatcher::registerMiddleware()method.
- The
Container::factory()method is now public. - The
Request::getBody()method now returns an instance ofmako\http\request\Body. - Removed
Requestmethods that where deprecated in 5.3:- Removed the
Request::get()method. - Removed the
Request::post()method. - Removed the
Request::put()method. - Removed the
Request::patch()method. - Removed the
Request::delete()method. - Removed the
Request::cookie()method. - Removed the
Request::signedCookie()method. - Removed the
Request::file()method. - Removed the
Request::server()method. - Removed the
Request::has()method. - Removed the
Request::data()method. - Removed the
Request::whitelisted()method. - Removed the
Request::blacklisted()method. - Removed the
Request::header()method. - Removed the
Request::acceptableContentTypes()method. - Removed the
Request::acceptableLanguages()method. - Removed the
Request::acceptableCharsets()method. - Removed the
Request::acceptableEncodings()method.
- Removed the
- Removed
Responsefilters:- Removed the
Response::filter()method. - Removed the
Response::getFilters()method. - Removed the
Response::clearFilters()method.
- Removed the
- The
Response::getHeaders()method now returns a response header collection. - The
Response::getCookies()method now returns a response cookie collection. - Removed the
mako\cli\output\formatter\Formatter::hasAnsiSupport()method. - Removed the
mako\cli\output\formatter\FormatterInterface::strip()method. - Arguments are now converted to camel case before being passed to the
executemethod of reactor commands.
- Deprecated the
Response::header()method. - Deprecated the
Response::hasHeader()method. - Deprecated the
Response::removeHeader()method. - Deprecated the
Response::clearHeaders()method. - Deprecated the
Response::cookie()method. - Deprecated the
Response::signedCookie()method. - Deprecated the
Response::deleteCookie()method. - Deprecated the
Response::hasCookie()method. - Deprecated the
Response::removeCookie()method. - Deprecated the
Response::clearCookies()method.
- Unit tests now run using PHPUnit 6.
- Removed unnecessary function calls in Redis client.
- Various improvements and optimizations.
Check out the upgrade guide for details on how to upgrade from
5.3.*.
- The
Request::getData()method will now return the parsed body for POST requests that do not contain form data.
- The
GDimage processor will no longer fail when using uppercase file extensions when saving.
- The
GDimage processor now usesimagecopyresampledinstead ofimagecopyresizedwhen resizing images.
- Columns with
nullvalues will no longer be updated unnecessarily when usingORM::save().
- Added
Connection::pairs()method. - Added
Query::pairs()method. - Added
Collection::merge()method. Collection::map()callables can now accept the item key as a second argument.Collection::filter()callables can now accept the item key as a second argument.- It is now possible to auto assign variables to views using the
ViewFactory::autoAssign()method. - JSON responses can now set the response status code.
- It is now possible to capture output in a template using the new
{% capture:name %}...{% endcapture %}blocks. - Added
{% nospace %}...{% endnospace %}blocks to template syntax that will remove all whitespace between HTML tags. - Added
PaginationInterface::isValidPage()method. - Mako is now using Whoops for displaying exception details.
- It is now possible to register route constraints with the router.
- It is now possible to set and update junction attributes.
- Added
Request::getQuery()method. - Added
Request::getPost()method. - Added
Request::getHeaders()method. - Added
Request::getCookies()method. - Added
Request::getBody()method. - Added
Request::getData()method. - Added
Request::getFiles()method. - Added
Request::getServer()method. - Added
Parameters::whitelisted()method. - Added
Parameters::blacklisted()method.
- Moved the
ContainerAwareTraittrait to themako\syringe\traitsnamespace. - Moved the
ControllerHelperTraittrait to themako\http\routing\traitsnamespace. - Moved the
ConfigurableTraittrait to themako\common\traitsnamespace. - Moved the
ExtendableTraittrait to themako\common\traitsnamespace. - Moved the
FunctionParserTraittrait to themako\common\traitsnamespace. - Moved the
NamespacedFileLoaderTraittrait to themako\common\traitsnamespace. - The
Str::slug()method now usesrawurlencodeinstead ofurlencode. - All HTTP middleware must now implement the
mako\http\routing\middleware\MiddlewareInterface. - HTTP middleware is now registered with the route dispatcher.
- The
Route::when()method has been renamed topatterns. - Renamed the
Request::body()method togetRawBody. - Renamed the
Request::bodyAsStreammethodgetRawBodyAsStream.
- Deprecated the
Request::get()method. - Deprecated the
Request::post()method. - Deprecated the
Request::put()method. - Deprecated the
Request::patch()method. - Deprecated the
Request::delete()method. - Deprecated the
Request::cookie()method. - Deprecated the
Request::signedCookie()method. - Deprecated the
Request::file()method. - Deprecated the
Request::server()method. - Deprecated the
Request::has()method. - Deprecated the
Request::data()method. - Deprecated the
Request::whitelisted()method. - Deprecated the
Request::blacklisted()method. - Deprecated the
Request::header()method. - Deprecated the
Request::acceptableContentTypes()method. - Deprecated the
Request::acceptableLanguages()method. - Deprecated the
Request::acceptableCharsets()method. - Deprecated the
Request::acceptableEncodings()method.
Deprecated methods will be removed in 5.4.0.
Check out the upgrade guide for details on how to upgrade from
5.2.*.
- Fixes issue that prevents accidental login after logout. The issue would occur if the
mako\gatekeeper\adapters\Session::getUser()method got called after themako\gatekeeper\adapters\Session::logout()method if the user had a "remember me" cookie.
- The
Memcache::putIfNotexists()andMemcached::putIfNotexists()methods will now support TTLs longer than 30 days.
- Errors will now be logged even if the default error handler isn't called.
ManyToMany::synchronize()will no longer execute unnecessary and invalid queries that cause exceptions.
- Package config overrides will now merge properly with original config.
- Package config overrides now merges with original config.
- Now possible to insert databases rows with only default values.
- Added
ManyToMany::alongWith()method.
- Batch queries will no longer fail when having criteria.
- Will now automatically unlock locked used accounts when the lock time has expired.
- Fixed language cache bug that was introduced in 5.2.0.
- Added
putIfNotexists()method to all cache adapters. - The
apcu,memcached,memory,nullandrediscache stores now implement the newmako\cache\stores\IncrementDecrementInterfaceinterface. - 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.
- The
Gatekeeperlibrary 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 amako\cache\stores\StoreInterfaceinstance instead of amako\cache\Cacheinstance.
- The reactor
--envflag now works as expected.
- 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.*.
- Request::getParsed() no longer fails if the content type header contains a character set.
- The function parser is now less strict when it comes to function names.
- JSONP responses are now handled by the JSON response builder.
- Added a optional
NullableTraitto the ORM. - Added
Command::STATUS_SUCCESSconstant. - Added
Command::STATUS_ERRORconstant. - Added
cache.removecommand. - Added
cache.clearcommand. - Added
application.base_urlconfig key. - Now possible to set middleware priority.
- The ORM now allows you to configure the foreign key name using the
$foreignKeyNameproperty.
- 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.
- ORM::getForeignKey() now uses Str::camel2underscored() instead of strtolower().
Check out the upgrade guide for details on how to upgrade from
5.0.*.
- Query compiler will now properly escape JSON path segments.
- MySQL query compiler will now unquote extracted JSON values.
- The query builder now supports set operations.
- Now possible to customize the width of progressbars.
- Deprecated the query convenience trait. It will be removed in Mako 5.1.0.
- The image library will now show an error when trying to open a unsupported image type.
- Various optimizations.
- Now possible to return a status/exit code from reactor commands.
- Reverted breaking changes to compiled templates that were introduced in 5.0.17.
- CLI error handler will no longer fail when displaying a generic error message.
- 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.
- Various optimizations.
- Now possible to access route parameters outside route actions.
- Migration rollback now works as expected.
- Various optimizations.
- Don't resolve singletons multiple times when using the container aware trait.
- Fixed an issue where strict reactor commands would fail when called with a "global" option.
- Fixed issue with
Gatekeeper::forceLogin().
- Error handler now supports
xdebug.overload_var_dump.
ORM::toArray()will no longer try to convertfalseto an array.
- Corrected the return type of the
View::assign()method.
- The
$shouldTouchOnInsert,$shouldTouchOnUpdateand$shouldTouchOnDeleteproperties of theTimestampedTraitnow work as expected.
- 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.
- The redis client will no longer assume that it has recieved the data it asked for.
- The Redis client now reads data in 4096 byte chunks to avoid issues with large values.
Request::file()now returnsUploadedFileobjects.
- Redis cache store is now instantiated with the configured class whitelist.
- Added
Connection::yield()andQuery::yield()methods that allow you to iterate over result sets using a generator.
- Fixed
Query::first()fetch mode bug.
- Query pagination now works as expected with distinct selections.
Query::countDistinct()now supports an array of columns names.
- Simplified stack trace for JSON error responses.
- Query pagination now works as expected with grouping.
- The output escaper now accepts null values.
- Fixed validation bug.
- 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_keycommand 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.
Query::null()has been renamed toQuery::isNull().Query::orNull()has been renamed toQuery::orIsNull().Query::notNull()has been renamed toQuery::isNotNull().Query::orNotNull()has been renamed toQuery::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
intinstead ofinteger. - ORM values can now be casted to booleans using
boolinstead ofboolean. - An exception will be thrown when trying to get a non-existing item from collection.
- The
HTML::registerTag()method has been removed. UseHTML::extend()instead. - Routing middleware replaces route filters.
- The
Routes::methods()method has been renamed toRoutes::register(). - The
Route::setNamespace()method has been renamed toRoute::namespace(). - The
Controller::beforeFilter()has been renamed toController::beforeAction(). - The
Controller::afterFilter()has been renamed toController::afterAction(). - Custom view renderers must now be added using the
ViewFactory::extend()method. - Removed the
APCandXCachecache 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,jsonResponseandjsonpReponse. - Removed the MCRYPT encrypter.
- Removed the
Crypto::encryptAndSign()andCrypto::validateAndDecrypt()methods. All encrypted data is now signed and validated by default. - Renamed
FileSystem::includeFile()toFileSystem::include(). - Renamed
FileSystem::requireFile()toFileSystem::require(). - Renamed
FileSystem::includeFileOnce()toFileSystem::includeOnce(). - Renamed
FileSystem::requireFileOnce()toFileSystem::requireOnce(). - Renamed
FileSystem::isDirectoryEmpty()toFileSystem::isEmpty(). - Renamed
FileSystem::exists()toFileSystem::has(). - Renamed
FileSystem::delete()toFileSystem::remove(). - Renamed
FileSystem::getContents()toFileSystem::get(). - Renamed
FileSystem::putContents()toFileSystem::put(). - Renamed
FileSystem::prependContents()toFileSystem::prepend(). - Renamed
FileSystem::appendContents()toFileSystem::append(). - Renamed
FileSystem::truncateContents()toFileSystem::truncate().
- 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!
- Fixed the docblock return type for
CacheManager::instance().
Container::call()now supports function calls in addition to closure and method calls.
URLBuilder::toRoute()will now allow falsy parameters (0, 0.0, '0').
- Fixed a leap year related bug in the
Timeclass.
- Less restrictive version requirements of third party libraries.
- Cache will now throw an exception if the store is unavailable.
- ETag caching will now work as expected when using mod_deflate with Apache > 2.4.0.
- Better support for routes containing multibyte characters.
- PHP7 compatibility.
- The query builder can now generate working SQLite queries with an
INclause where the values come from a subquery. - The
beforeandaftervalidation filters will now work as expected.
- The query builder now supports joins with nested conditions.
- The
beforeandaftervalidation filters will now work as expected.
- Only include
pagesarray in pagination data whenmax_page_links> 0.
- Clean URLs should now work as expected when using the local development server.
- The progress bar will no longer fail when
0is passed as the item count.
- Better parameter binding for prepared statements.
This update requires you to change the data type of the
users.bannedandusers.activatedfields fromSETtoBOOL(orTINYINT(1)).
- The
Pagination::paginate()method is now public.
- Eager loading criteria now work as expected when eager loading in chunks.
- Now possible to eager load more than 1000 unique ids when using SQLite and Oracle (#151).
- 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.
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.phpconfiguration file. - Added 3 new fields to the gatekeeper users table.
- 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.
- Fixed bug in
app.routescommand.
- Fixed language cache issue.
Query::column()andQuery::first()will now generate a more optimized query.
- The command line error handler will now include the error location in the output.
- Added
Output::setFormatter()method. - Added
Output::isMuted()method.
- The redis client will no longer try to authenticate when no password is provided.
- 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,webandcli.
This update requires a small change to the
app/config/application.phpconfiguration file.
- Brand new reactor command line tool.
- Added optional
$columnparameter to theQuery::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
tokenvalidation rule. - Gatekeeper will automatically rehash passwords if needed.
- Added
attribute,css,urlandjsescaping filters. - Escape filters are now also available in plain PHP views.
- Moved
init.phpfile from the framework core to the application. - Removed the
MAKO_VERSIONconstant (useMako::VERSIONinstead). - Removed the
Password::isLegacyHash()method. - Removed the
$legacyCheckparameter from thePassword::validate()method. - Renamed
Session::generateToken()method toSession::generateOneTimeToken. - Renamed
Session::validateToken()method toSession::validateOneTimeToken. - Renamed
tokenvalidation rule toone_time_token.
This release comes with a few minor breaking changes. Check out the migration guide here.
- Gatekeeper will use the provided "auth_key" configuration value.
- Fixed validation bug.
- Fixed routing bug.
- 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.
- Moved all http exceptions to the
mako\http\exceptionsnamespace. - Renamed the
PageNotFoundExceptiontoNotFoundException. - Controllers, Tasks and Migrations now use the
ContainerAwareTraittrait by default. - The
ORM::builder()method is now public. - The
Route::constraints()method has been renamed toRoute::when().
This release comes with a few minor breaking changes. Check out the migration guide here.
- Fixed query builder bug.
- Fixed MCrypt autoloading issue (#120).
- Added
Time::formatLocalizedmethod. - Added
TimeZoneclass. - Added a Stopwatch class (#113).
- Added support for nested template extension.
- Added optional migration descriptions.
- Added
rendershortcut method to the view factory class. - It is now possible to configure Gatekeeper to identify users using their username instead of their email.
- The
Timeclass has been moved to the tomako\chrononamespace. - The
localeconfig option has been removed. You now have to set the appropriate locale for each language instead. - The
ViewFactory::createmethod will now return an instance ofmako\view\Viewinstead of an implementation ofmako\view\renderers\RendererInterface. - Moved
app/routes.phptoapp/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::currentmethod will now include the current query parameters by default. - Default Mcrypt encryption mode changed from ECB to CBC.
- Removed the
app/packagesdirectory. 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.
- Fixed issue with date casting in the ORM.
- Added missing returns in gatekeeper user implementation.
- 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.
- 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_cachekey to your application configuration file.
- Now possible to configure the date output format when converting ORM records to array and/or json.
- Escape exception message in debug template.
- Improved ORM::toArray() and ORM::toJson methods.
- Fixed bug in the file based cache store.
- Image library now uses the correct image quality when saving.
- Image library watermarking now works as expected.
- The error handler is no longer loading external JavaScript libraries.
- Namespaced the helper functions to avoild naming collisions with global functions.
- Added
mako\get_class_traits()helper function to improve detection of trait usage.
- Fixed bug where User::isMemberOf would return NULL if group id was used instead of group name.
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
NOTa 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.