Phalcon v6.0.0 and v5.24.0 have been released.
Today is a big day for us. Phalcon v6.0.0 is the first stable release of Phalcon that is written in PHP. On the same day, Phalcon v5.24.0 (and v5.24.1), the C extension, comes out with 64 bug fixes, faster components and support for PHP 8.6.
Phalcon v6.0.0
composer require phalcon/phalcon
For more than ten years, Phalcon was a C extension. To install it, you compiled it, or you found a package for your PHP version and your operating system. Phalcon v6 is a Composer package. There is no extension to compile, and there is no pecl. It has the same Phalcon namespace, the same classes and the same methods as Phalcon v5.
Six years in the making
The first commit of the PHP version is from 2020-08-29. Today is 2026-11-27. That is six years and three months.
- 3,346 commits by 16 contributors.
- 1,484 PHP files and about 166,700 lines of code in
src/. - 3,010 test files with 7,058 test methods, about 277,200 lines of tests.
- 21 pre-releases in five months: 6 alphas, 11 betas and 4 release candidates. 774 of the commits came after the first alpha.
We told the story of the port, and of the PHQL and Volt parsers, in the alpha 1 post. Since then, the work was to close the gaps: each bug that you reported, each edge case that a test found, and each change in cphalcon, which did not stop while we worked.
One test suite, two implementations
The tests of phalcon/phalcon run against cphalcon, the C extension, with no change, except for a small number of exceptions. When a test fails on one side, we fix that side. Thus, when we say that v6 behaves the same as v5, the proof is the test suite: the same tests pass on both.
The parsers
In Phalcon v5, the PHQL, Volt and annotations parsers are C code in the extension. In Phalcon v6, they are PHP packages:
- phalcon/phql: the PHQL parser. Composer installs it with Phalcon.
- phalcon/volt: the Volt parser. Composer installs it with Phalcon.
- phalcon/annotations: the parser of the docblock annotations. Composer does not install it with Phalcon. If your application reads docblock annotations, install it:
composer require phalcon/annotations
Before you upgrade
Phalcon v6 has the same classes and methods as v5, and most applications need only a few changes. Read the upgrade guide before you upgrade. In short:
- Remove the v5 extension first. If PHP loads the extension, PHP uses the v5 classes, and Composer does not load the v6 classes with the same names. Your application then runs a mix of v5 and v6 code, and PHP shows no error. The guide shows how to remove the extension.
- Phalcon v6 does not read the
phalcon.*INI settings. Set them in your bootstrap file withPhalcon\Support\Settings. If you disabled the PHQL literals inphp.ini, v6 accepts them again until you do this:
<?php
use Phalcon\Support\Settings;
Settings::set('orm.events', false);
Settings::set('orm.enable_literals', false);
- Types. Most properties of the v6 classes have types, and some methods return
mixed. If your class extends a Phalcon class and declares a property or a method again, it must use the same type. - Views. PHP runs each template in its own scope. Volt templates do not need a change: remove the compiled templates after the upgrade. A
.phtmltemplate that shares variables with a partial needswithScope(get_defined_vars())before the partial orextract($this->getScope())after it. - Values of the wrong type. Some calls that give a notice in v5 throw a
TypeErrorin v6. - Caches. A parse in PHP takes more time than in C. Use the caches for Volt, the annotations and the model metadata.
Performance
Phalcon v6 runs as PHP code, and Phalcon v5 runs as C code in the extension. We are working on benchmarks that compare the two, so that you have a clear view of the performance impact of v6. As expected, v6 will be slower than v5. We will find exactly how much and we will publish the results on this blog and on our main site, phalcon.io for everyone to see and decide.
Phalcon v5 support
Phalcon v5 is not going away. It keeps its support for at least one year, until Phalcon v7 is out, ensuring enough time for developers to upgrade at their own pace.
Phalcon v5.24.0
In customary fashion, we forgot to generate the
build/files. 5.24.1 rectifies that.
Phalcon v5.24.0 has 307 commits since v5.23.0, with 64 fixes, 16 changes and 30 upgrade notes. The extension now uses Zephir 1.11.0. Some of the upgrade notes are breaking compatibility and we apologize for it - it should have been in a major - but we wanted to offer support for PHP 8.6 as soon as possible.
PHP 8.6
- The extension builds on PHP 8.6. PHP 8.6 removed
zval_dtor(), and the PHQL parser, the Volt parser andPhalcon\Mvc\Urlnow usezval_ptr_dtor_nogc()(#17766). - The PHP 8.6 deprecations are gone. The session adapters implement
create_sid(), and Phalcon usesfloatval()andspl_object_id()in place ofdoubleval()andspl_object_hash()(#17687). - On PHP 8.4 and later, a build from
build/phalcon(PECL, PIE,build/install) uses the JSON functions of PHP again (#16523).
Faster components
We continued the performance work of v5.22.1 and v5.23.0, and added benchmark subjects for Acl, Cache, Config, Flash, Forms, Jwt, Logger, Security, Session and Validation (#17695). These components are now faster:
- The ACL build and
isAllowed()(#17701, #17711). - The cache, the storage adapters and the ACL when no events manager is set (#17703).
- The HTML output of the flash messages (#17704, #17712).
Config::path()and the construction of a config with no type (#17714, #17702).- The logger with no excluded adapters (#17713).
Microwith the default router service (#17715).- The base64url decode of the JWT parser and
Crypt::decryptBase64()(#17705). - The construction of the validators (#17697).
Phalcon\Support\Collection(#17683).- The route index for routes with no host name (#17693).
- The service registration in the factories (#17696).
Security
A security review of the code found a number of problems. This release fixes them:
- ACL: a custom role or component name with the
!delimiter could share the access key of another rule. A rule whose callback cannot be called now denies the access, instead of granting it (#17800). - Assets: a symbolic link to a file that does not exist let the assets manager write a file outside the target folder (#17802).
- Auth: a credential key with a newline at the end was accepted, and two activations of an access gate could share one instance (#17804, #17806).
- Database dialects: the quote character in schema and table names was not escaped, for example in
truncateTable()(#17808). - Annotations cache: each file of the
Streamadapter now starts with<?php __halt_compiler();, so a web request to a cache file shows nothing. Two anonymous classes no longer share one cache file, andread()returnsfalsefor a file that does not hold annotations (#17773, #17810, #17812). - Password hashes:
Security::hash()used the cost4for an emptycostoption, instead of the work factor, and failed for a fractional string cost (#17764, #17779). - Debug page: the page now escapes property names, quotes, class names and file paths, and the blacklist also filters the nested keys (#17729, #17731, #17733, #17736).
Database and models
Postgresql::describeReferences()returns the correct column pairs for composite foreign keys (#17680), and the schema of the referenced table instead of the name of the database (#17816).Sqlite::describeReferences()returns a composite foreign key as one reference with all its columns, and the primary key columns of the referenced table for a key with no referenced columns (#17814, #17815).describeColumns()reports the correct types for SQLitetinyint(1), blob andfloatcolumns, and for PostgreSQLmediumblobcolumns (#17724).listTables()no longer returns MariaDB sequences or PostgreSQL partitions (#17769).Model::save()rolls back the transaction of the related records when an exception occurs (#17756).Model::doLowInsert()reads back the generated id on MySQL when the identity property is0(#17689).- The models manager reads the
Sourceattribute when you useAttributesReader(#17741). - The PHQL parser now reads
orm.enable_literalsandorm.cache_levelfromModel::setup()andSettings::set()(#17797). - The query builder no longer crashes with OPcache for empty
bindorbindTypesarrays (#17725).
Volt
- With
autoescapeon, the output of the escape filters is no longer escaped a second time (#17678). - A
{% call %}block throws an exception, instead of disappearing from the output (#17676). - The second child of a layout renders correctly when
statisfalse(#17674). - The
{% cache %}tag is removed. It now gives a syntax error (#17677).
Debug
Phalcon\Support\Debug received many fixes. It discards the correct output buffers, shows the previous exceptions, and no longer stops for typed properties with no value or for a dump() method that it cannot call (#17733, #17735, #17739, #17743, #17746, #17748).
Upgrading to v5.24.0
Most of the 30 upgrade notes apply only when a class in your application extends a Phalcon class and overrides a method. Read Upgrading from v5.23 to v5.24 before you upgrade. The Upgrade Notes at the end of this post have the same list. These can affect more applications:
- A callback that cannot be called (an unknown function, a method that is not public, or an object with no
__invoke()) now throws aTypeError. Before, Phalcon gave a warning and returnednull. This applies, for example, to the Di service definitions, the filter sanitizers, the dispatcher actions and theMicrohandlers (#17766). - The ACL denies the access for a rule with a callback that it cannot call (#17800).
- With
phqlLiteralsset tofalse, a PHQL statement with a literal throws an exception (#17797). - A resultset from the models cache returns
nullfromgetCache()(#17766). - The session adapters make the session IDs, as 32 hex characters (#17687).
- A custom paginator adapter that overrides
__construct()must callparent::__construct()(#17750). - Earlier versions cannot read the new cache files of the
Streamannotations adapter. Clear theannotationsDirfolder if you go back to an earlier version (#17812). - On SQLite, a table with a composite foreign key gets fewer references from
describeReferences(), so the names of the keys after it change (#17814). - On PostgreSQL,
Reference::getReferencedSchema()gives the name of the schema, for examplepublic, instead of the name of the database (#17816).
PHP implementation
Each change in this release is also in Phalcon v6.0.0, so that the two codebases stay in sync. The v6.0.0 changelog lists them, with the fixes of v6.
Thanks
Thank you to farisbasha, Jeckerson, nadorator and QUAD69 for their work on this release. Thank you to everyone who reported an issue, opened a pull request, or tested an alpha, a beta or a release candidate of v6. And thank you to our backers and to the community, who stayed with us through six years of work that had little to show until this year. This release is yours.
composer require phalcon/phalcon
5.24.0 (2026-11-27)
Tools
- Zephir 1.11.0
Changed
- A callback that cannot be called throws
TypeErrorinstead of a warning andnull. #17766 - Faster ACL build in
Phalcon\Acl\Adapter\Memory. #17701 - Faster HTML output of the
Phalcon\Flashmessages with no icon classes. #17712 - Faster HTML output of the
Phalcon\Flashmessages. #17704 - Faster
Phalcon\Acl\Adapter\Memory::isAllowed(). #17711 - Faster
Phalcon\Cache\Cache, thePhalcon\Storageadapters andPhalcon\Acl\Adapter\Memory::isAllowed()when no events manager is set. #17703 - Faster
Phalcon\Config\Config::path(). #17714 - Faster
Phalcon\Loggercalls with no excluded adapters. #17713 - Faster
Phalcon\Mvc\Microrequests with the default router service. #17715 - Faster base64url decode in the JWT parser and
Phalcon\Encryption\Crypt::decryptBase64(). #17705 - Faster construction of
Phalcon\Config\Configand its adapters when the config has no type. #17702 - Faster construction of the validators in
Phalcon\Filter\Validation. #17697 - Faster item storage, lookup, removal and JSON serialization in
Phalcon\Support\Collection. #17683 - Faster route index build in
Phalcon\Mvc\Routerfor routes with no host name. #17693 - Faster service registration in
Phalcon\Factory\AbstractFactoryand the factories that extend it. #17696 Phalcon\Mvc\Model\Query::clean()now also empties the cache of parsed PHQL statements, the same asPhalcon\Mvc\Model\Manager::__destruct(). #800
Added
- Benchmark subjects for Acl, Cache, Config, Flash, Forms, Jwt, Logger, Security, Session and Validation in
tests/benchmarks. #17695 Phalcon\Support\Settingssupport fororm.cache_levelandorm.unique_cache_id. #800
Fixed
- PHP 8.4+ builds from
build/phalcon(PECL, PIE,build/install) calling the userlandjson_encode()andjson_decode(), becauseconfig.m4checked forHAVE_JSON, which PHP 8.4 removed. #16523 - PHP 8.6 builds failing because PHP 8.6 removed
zval_dtor(): the PHQL parser, the Volt parser andPhalcon\Mvc\Urlnow usezval_ptr_dtor_nogc(). #17766 - PHP 8.6 deprecation for session handlers without
create_sid():Phalcon\Session\Adapter\AbstractAdapterandPhalcon\Session\Adapter\Noopnow implementSessionIdInterfaceandcreate_sid(). #17687 - PHP 8.6 deprecation of
doubleval():Phalcon\Encryption\Security\Uuid\Version1,Phalcon\Encryption\Security\Uuid\Version6andPhalcon\Mvc\Modelnow usefloatval(). #17687 - PHP 8.6 deprecation of
spl_object_hash():Phalcon\Dispatcher\AbstractDispatcherandPhalcon\Html\Link\AbstractLinkProvidernow usespl_object_id(); the keys returned bygetLinks()are now integers. #17687 Phalcon\Acl\Adapter\Memory::addRole()andaddComponent()accepting a customRoleInterfaceorComponentInterfacename with the!delimiter, which let one role, component and access tuple share the access key of another. #17800Phalcon\Acl\Adapter\Memory::isAllowed()granting the access of a rule whose callback cannot be called, for example a function that does not exist or a private method. #17800Phalcon\Acl\Adapter\Memory::isAllowed()not firingacl:afterCheckAccessfor a role that does not exist. #17800Phalcon\Acl\Adapter\Memory::isAllowed()throwingReflectionExceptionfor a rule parameter whose class does not exist. #17800Phalcon\Acl\Adapter\Storagegiving an “Array to string conversion” warning for a snapshot version that is not an integer or a string. #17800Phalcon\Annotations\Adapter\Stream::read()returning the content of a cache file that does not hold aReflectionobject. #17773Phalcon\Annotations\Adapter\Stream::write()writing the cache files with no PHP opening tag, so that a web request to a file in a folder that the web server can reach showed the serialized annotations. #17812Phalcon\Annotations\Adapter\Streamusing one cache file for the anonymous classes of a file whose path has no_, so that a class got the annotations of another class. #17810Phalcon\Assets\Asset::getRealTargetPath()accepting a symbolic link to a file that does not exist, which letPhalcon\Assets\Managerwrite an asset outside the target folder. #17802Phalcon\Auth\Adapter\Model::retrieveByCredentials()accepting a credential key with a newline at the end, instead of throwingInvalidCredentialKey. #17804Phalcon\Auth\Internal\ContainerResolver::resolveFresh()returning the same object for a non-sharedPhalcon\Di\Diservice whose definition is a built object, so that two activations of an access gate could share one instance. #17806Phalcon\Container\Definition\Processor\ObjectProcessor::process()setting a factory closure with no parameters, although the factory is called with the container. #17777Phalcon\Contracts\Db\Adapter\Adapter::fetchColumn()andPhalcon\Db\Adapter\AbstractAdapter::fetchColumn()declaringstring|boolas the return type instead ofmixed. #17755Phalcon\DataMapper\Pdo\Connection\AbstractConnection::__call()giving a warning and aTypeErrorinstead ofUnknownDriverMethodfor a method name that is not a string. #17796Phalcon\Db\Adapter\Pdo\Postgresql::describeColumns()reportingmediumblobcolumns asColumn::TYPE_TEXT. #17724Phalcon\Db\Adapter\Pdo\Postgresql::describeReferences()returning wrong column pairs for composite foreign keys. #17680Phalcon\Db\Adapter\Pdo\Sqlite::describeColumns()reportingtinyint(1)columns asColumn::TYPE_INTEGER. #17724Phalcon\Db\Adapter\Pdo\Sqlite::describeColumns()reporting blob columns asColumn::TYPE_VARCHAR. #17724Phalcon\Db\Adapter\Pdo\Sqlite::describeColumns()usingColumn::TYPE_DECIMALas the bind type offloatcolumns, which stored their values as blobs. #17724Phalcon\Db\Adapter\Pdo\Sqlite::describeReferences()givingnullreferenced columns for a foreign key with no referenced columns, which references the primary key of the referenced table. #17815Phalcon\Db\Adapter\Pdo\Sqlite::describeReferences()giving one reference for each column of a composite foreign key. #17814Phalcon\Db\Dialect::checkColumnType()declaringstringas the return type instead ofint. #17796Phalcon\Db\Dialect::escapeSchema()not escaping the quote character in the schema name, which all the dialects use for the schema of a table, for example inPhalcon\Db\Dialect\Postgresql::truncateTable(). #17808Phalcon\Db\Dialect\Mysql::listTables()returning MariaDB sequences andPhalcon\Db\Dialect\Postgresql::listTables()returning partitions. #17769Phalcon\Db\Dialect\Mysql::truncateTable()andPhalcon\Db\Dialect\Sqlite::truncateTable()not escaping the quote character in the table and schema names. #17808Phalcon\Db\Dialect\Postgresql::describeReferences()giving the name of the database as the referenced schema, instead of the schema of the referenced table. #17816Phalcon\Encryption\Security::hash()passing a numeric stringcostoption on as a string, which gave an invalid Blowfish salt for a fractional value. #17779Phalcon\Encryption\Security::hash()using the cost4instead of the work factor when thecostoption is empty. #17764Phalcon\Forms\Form::getValue()returning the tag factory for the nametagFactory. #17727Phalcon\Html\Escaper\CssEscaperandPhalcon\Html\Escaper\JsEscaperdeclaringstringas the return type of their private escape methods, which returnfalsefor the code point U+0000. #17783Phalcon\Http\Request\Bag\AbstractBag::normalizeKey()declaringstringas the return type instead ofint|string. #17771Phalcon\Image\Adapter\Imagick::processSave()returningnullinstead oftruefor a GIF file. #17788Phalcon\Mvc\Model::doLowInsert()not reading back the generated id on MySQL when the identity property is0. #17689Phalcon\Mvc\Model::save()leaving the transaction of the related records open when an exception is thrown during the save; the transaction is now rolled back before the exception is thrown again. #17756Phalcon\Mvc\Model\Manager::getModelSource()ignoringSourceattributes whenAttributesReaderis configured. #17741Phalcon\Mvc\Model\Query::getCache()declaringPhalcon\Db\Adapter\AdapterInterfaceas the return type instead of?Phalcon\Cache\CacheInterface. #17796Phalcon\Mvc\Model\Query::getIntermediate()throwing aTypeErrorafterparse()got the intermediate representation from the cache. #800Phalcon\Mvc\Model\Query\Builder::__construct()crashing with OPcache when the parameters have emptybindorbindTypesarrays. #17725Phalcon\Mvc\Model\Query\Lang::parsePHQL()ignoring theorm.enable_literalsandorm.cache_levelvalues set withPhalcon\Mvc\Model::setup()orPhalcon\Support\Settings::set(). #17797Phalcon\Mvc\Model\Querygiving an “Undefined array key” warning for a join with noONcondition whenenable_implicit_joinsis disabled; the query still throwsPhalcon\Db\Exceptions\InvalidSqlExpression. #816Phalcon\Mvc\Model\Queryreusing a cached intermediate representation that was built with the other value of theenable_implicit_joinsoption. #800Phalcon\Mvc\Model\Resultset\ComplexandPhalcon\Mvc\Model\Resultset\Simpleputting their cache in the serialized data, which failed for a cache that cannot be serialized, such as a Redis connection. A resultset from the cache now has no cache (getCache()returnsnull). #17766Phalcon\Mvc\View\Engine\Volt\Compiler::compile()rendering serialized blocks for the second child of a layout whenstatisfalse. #17674Phalcon\Mvc\View\Engine\Volt\Compiler::compileCall()silently dropping{% call %}blocks instead of throwing an exception. #17676Phalcon\Mvc\View\Engine\Volt\Compiler::compileEcho()escaping the output of the escape filters (e,escape,escape_attrand others) a second time whenautoescapeis on. #17678Phalcon\Queue\Consumer\Worker::handleSignal()throwing anArgumentCountErrorwhen the worker receives a signal. #17719Phalcon\Storage\Adapter\RedisClusterandPhalcon\Cache\Adapter\RedisClusterusing a string instead of an array as the defaulthostsoption. #17762Phalcon\Support\Debug::debugVar()storing the arguments and objects of each backtrace frame. #17746Phalcon\Support\Debug::onUncaughtException()discarding only one output buffer level. #17739Phalcon\Support\Debug::onUncaughtException()turning a warning raised while rendering into a fatal error and echoing later exception messages without escaping. #17733Phalcon\Support\Debug::setBlacklist()filtering only the top-level keys of the request and server data. #17736Phalcon\Support\Debug\Dump::variable()not escaping public property names in the HTML output. #17729Phalcon\Support\Debug\Dump::variable()printing the key after a skipped key on the same line. #17746Phalcon\Support\Debug\Dump::variable()throwing anErrorin detailed mode for typed properties that have no value. #17735Phalcon\Support\Debug\Renderer\HtmlRenderer::getVarDump()to call reflection on private methods and only on objects. #17743Phalcon\Support\Debug\Renderer\HtmlRenderer::render()dropping invalid UTF-8 text and not escaping quotes, class names and file paths. #17731Phalcon\Support\Debug\Renderer\HtmlRenderer::render()not showing the previous exceptions, and showing files in a Windows\vendor\folder as application code. #17746Phalcon\Support\Debug\Renderer\HtmlRenderer::render()stopping the debug page for objects with adump()method that is not public, is static, has required parameters or does not return an array. #17735Phalcon\Support\Debug\ReportBuilder::build()reading a file again for each frame, and linking Phalcon classes to API pages that do not exist. #17746
Removed
- Removed the
{% cache %}/{% endcache %}Volt tag from the parser; it now raises a syntax error. #17677 - Removed the unused
modekey from the code fragment ofPhalcon\Support\Debug\Report\BacktraceItem::getFragment(). #17748
Upgrade Notes
- A callback that cannot be called (an unknown function or method, a method that is not public, or an object with no
__invoke()) now throws the PHPTypeErrorofcall_user_func()orcall_user_func_array(). Before, Phalcon gave a warning and returnednull. This comes from Zephir 1.9.0. It applies, for example, to thePhalcon\Diservice definitions andcalls, thePhalcon\Filter\Filtersanitizers, thePhalcon\Html\TagFactoryandPhalcon\Support\HelperFactoryhelpers, the dispatcher actions, thePhalcon\Mvc\Microhandlers, the router converters and thePhalcon\Mvc\Model\Resultset::filter()callback. Code that checks for the warning or fornullmust catchTypeError. #17766 - The factory closure that
Phalcon\Container\Definition\Processor\ObjectProcessor::process()sets now declares one optional parameter, the container.Phalcon\Container\Definition\ServiceDefinition::buildService()already calls the factory with the container. A call with no arguments still works, and the returned object does not change. #17777 - The PHQL parser now reads
orm.enable_literalsandorm.cache_levelfromPhalcon\Support\Settings. A value set withPhalcon\Mvc\Model::setup()(phqlLiterals) orSettings::set()now takes priority over the ini value. Before, the parser used only the ini value. WithphqlLiteralsset tofalse, a PHQL statement with a literal now throwsPhalcon\Mvc\Model\Exception. #17797 Phalcon\Acl\Adapter\Memory::addRole()andaddComponent()now throwPhalcon\Acl\Exceptions\ForbiddenDelimiterwhen the name of a customRoleInterfaceorComponentInterfacecontains!, as theRoleandComponentclasses do. #17800Phalcon\Acl\Adapter\Memory::isAllowed()now denies the access when the rule has a callback that the ACL cannot call, for example a function that does not exist or a method that is not public. Before, the ACL ignored the callback and used only the rule. Make sure that each rule callback is a closure, a public method or a function that exists. #17800Phalcon\Acl\Adapter\Memory::isAllowed()now firesacl:afterCheckAccessalso for a role that does not exist, with the result of the default action asgranted. A listener of this event now also gets these checks. #17800Phalcon\Annotations\Adapter\Stream::read()now returnsfalsewhen the cache file does not hold aPhalcon\Annotations\Reflectionobject, for example an object of a class that is not allowed, an array, a string, an integer ornull. Before, it returned that value.get()now parses the class again and writes a new cache file, the same as for a missing cache file. #17773Phalcon\Annotations\Adapter\Stream::write()now puts<?php __halt_compiler();(Stream::FILE_HEADER) at the start of each cache file, andread()removes it.read()still reads a file with no header. An earlier version cannot read the new files: clear theannotationsDirfolder after a downgrade. #17812Phalcon\Auth\Manager::access()now throwsPhalcon\Container\Exceptions\Exceptionwhen the access gate is registered inPhalcon\Di\Dias a built object withset(), as it already did forsetShared(). Register the class name or a closure instead, so that each activation gets a new gate. #17806Phalcon\Cache\AbstractCacheandPhalcon\Storage\Adapter\AbstractAdapternow callfireManagerEvent()only when an events manager is set.Phalcon\Acl\Adapter\Memory::isAllowed()does the same for theacl:afterCheckAccessevent; theacl:beforeCheckAccessevent does not change. A subclass that overrides the protectedfireManagerEvent()method no longer gets these calls when no events manager is set. With an events manager, nothing changes. #17703Phalcon\Config\Config::path()no longer callshas()for each key of the path. It callshas()for the full path and, for the last key, only whenget()returnsnulland the default value is notnull. A subclass ofConfigor of its adapters that overrideshas()no longer controls the key walk. The result ofpath()does not change. A path through a value that is not a collection still throws anError; its message now namesget()instead ofhas(). #17714Phalcon\Config\Config::setData()now callsvalidateType()only when the config has a type. A subclass ofConfigor of its adapters that overrides the protectedvalidateType()method no longer gets this call when the config has no type. With a type, nothing changes. #17702Phalcon\Contracts\Db\Adapter\Adapter::fetchColumn()andPhalcon\Db\Adapter\AbstractAdapter::fetchColumn()now declaremixedas the return type instead ofstring|bool. The returned values do not change: the method returns the value from the database driver, for exampleint,float,stringornull, orfalsewhen the query returns no rows. A class that overridesfetchColumn()can keep thestring|boolreturn type. #17755Phalcon\Db\Adapter\Pdo\Sqlite::describeReferences()now gives one reference for each foreign key. A composite key is one reference with all its columns, in the order of the key. The name of each reference comes from theidofPRAGMA foreign_key_list(foreign_key_<id>), not from the row number. For a table with only single-column keys, the names do not change. For a table with a composite key, the names of the keys that come after it inPRAGMA foreign_key_listchange, because there are fewer references. #17814Phalcon\Db\Dialect::checkColumnType()now declaresintas the return type instead ofstring, andPhalcon\Mvc\Model\Query::getCache()now declares?Phalcon\Cache\CacheInterfaceinstead ofPhalcon\Db\Adapter\AdapterInterface. The returned values do not change:checkColumnType()returns the column type, which is anint, andgetCache()returns the cache, ornullbeforeexecute()runs with thecacheoption. A class that overrides one of these methods must declare a compatible return type (intforcheckColumnType(),?Phalcon\Cache\CacheInterfaceorPhalcon\Cache\CacheInterfaceforgetCache()), or PHP raises a fatal error when it loads the class. #17796Phalcon\Db\Dialect\Postgresql::describeReferences()now gives the schema of the referenced table asREFERENCED_TABLE_SCHEMA, andPhalcon\Db\Adapter\Pdo\Postgresql::describeReferences()gives it inReference::getReferencedSchema(), for examplepublic. Before, both gave the name of the database. Code that comparesgetReferencedSchema()with the name of the database must use the name of the schema. #17816Phalcon\Encryption\Security::hash()now converts a numeric stringcostoption to an integer. A fractional value such as'5.7'becomes5. Before, theCRYPT_BLOWFISH_AandCRYPT_BLOWFISH_Xalgorithms put the string in the salt ($2a$5.7$), andcrypt()returned the failure string*0. Integer costs and integer strings such as'5'give the same hashes as before. #17779Phalcon\Encryption\Security::hash()now uses the work factor (getWorkFactor(), default10) when thecostoption is empty (null,0,'0',falseor''), the same as when the option is missing. Before, it used the cost4. New hashes for these values take longer to make.checkHash()still verifies the older hashes, because each hash keeps its own cost. #17764Phalcon\Flash\AbstractFlashnow returns the default message template as a constant and no longer callstoInterpolate()for it. A subclass ofPhalcon\Flash\DirectorPhalcon\Flash\Sessionthat overrides the protected statictoInterpolate()method gets one call for each message with automatic HTML instead of two. The output does not change. #17704Phalcon\Html\Link\LinkProvider::getLinks()andPhalcon\Html\Link\EvolvableLinkProvider::getLinks()now return arrays keyed byspl_object_id()(integers) instead ofspl_object_hash()(strings). Code that builds or looks up these keys withspl_object_hash()must usespl_object_id().getLinksByRel()is not affected. #17687Phalcon\Http\Request\Bag\AbstractBag::normalizeKey()now declaresint|stringas the return type instead ofstring. The returned values do not change: anintkey is still returned as anint. A class that overridesnormalizeKey()can keep thestringreturn type. #17771Phalcon\Mvc\Model\Manager::getModelSource()now reads thePhalcon\Annotations\Models\MetaData\Sourceattribute of a model class when theannotationsservice usesPhalcon\Annotations\AttributesReader. A model with#[Source('x')]and nosetSource()now uses the tablex, with the model prefix, instead of the name from its class. ASourceattribute with a missing, empty or non-string table now throwsPhalcon\Mvc\Model\Exception. With the default docblock reader, nothing changes. #17741Phalcon\Mvc\Model\Resultset\SimpleandPhalcon\Mvc\Model\Resultset\Complexno longer put their cache in the serialized data (serialize()and__serialize()). A resultset that comes from the models cache, or fromunserialize(), now returnsnullfromgetCache(). Before, it returned a copy of the cache with no connection. Code that needs the cache must get themodelsCacheservice from the container. In data that an older version serialized, the cache entry is ignored. #17766Phalcon\Mvc\Router\Route::getIndexData()now callsgetCompiledHostName()only when the route has a host name. For a route with no host name,getIndexData()[3]is nownull, also when a subclass overridesgetCompiledHostName(). Routing does not change. #17693Phalcon\Paginator\Adapter\AbstractAdapternow creates the repository in its constructor. A custom adapter that overrides__construct()must callparent::__construct(), orgetRepository()throws anError. #17750Phalcon\Queue\Consumer\Worker::handleSignal()now has a second optional parameter. A subclass that overrides this method must declarehandleSignal(int $signal, ?array $info = null): void, or PHP raises a fatal error when it loads the class. #17719Phalcon\Session\Adapter\AbstractAdapterandPhalcon\Session\Adapter\Noopnow implementSessionIdInterfacewithcreate_sid(): string. Subclasses that overridecreate_sid()must declare thestringreturn type. New session IDs now come from the adapter as 32 hex characters, sosession.sid_lengthandsession.sid_bits_per_characterno longer apply to these adapters. Custom handlers that implementSessionHandlerInterfacedirectly must addcreate_sid()andvalidateId()to avoid the PHP 8.6 deprecation. #17687Phalcon\Support\Collection::remove()no longer callshas(), and it calls the protectedprocessKey()method one time instead of two. A subclass that overrideshas()no longer controls whatremove(),__unset()andoffsetUnset()do. #17683Phalcon\Support\Collection::setData()now callsvalidateType()only when the collection has a type. A subclass that overrides the protectedvalidateType()method no longer gets this call (also from the constructor,init(),set(),offsetSet()and__set()) when the collection has no type. With a type, nothing changes. #17683Phalcon\Support\Debugnow records the output buffer level when it is created.onUncaughtException()discards all the output buffers that start after that point and keeps the buffers that started before it, for example fromoutput_bufferingorzlib.output_compressionin php.ini. Before, it discarded only the top buffer, also when that buffer started beforeDebugwas created. To discard the output of your own buffers, createDebugbefore you start them. #17739

