We are happy to announce that Phalcon v5.14.2 has been released!
Phalcon 5.14.2 addresses 11 bugs and several changes, plus adds more functionality to the framework (see below). Some of the features have been requested a long time ago, and we are happy to finally be able to introduce them and clean up the issue tracker, which between cphalcon and phalcon stands to around 65 issues. We have not seen such a low number in a very long time :)
v5
Db
- Added support for operators
@@,@>,<@,&&,||,->,->>,#>,#>>(each has a different meaning for each RDBMS) - Added Geometry support (
Point,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon,GeometryCollection) and read-side hydration of spatial columns. - Added table comments support
Filter
New AspectRatio validator for uploaded images
Session
- Enabling session locks (
session.lazy_write) - Added opt-in session locking for Redis
Storage
- Added a
stripPrefixoption (defaulttrue) to thePhalcon\Storage/Phalcon\Cacheadapters.
Community
A huge thanks to our community for helping out with bug fixing and more importantly bug reporting!
Changelog
5.14.2 (2026-06-12)
Tools
- Zephir Parser v2.0.4
- Zephir 0.23.0 (development - 27535f802)
Changed
- Changed
Phalcon\Cli\Console::handle()to process module definitions the same way asPhalcon\Mvc\Application::handle(). The module is now resolved through the inheritedgetModule(), so an unregistered module throwsPhalcon\Application\Exceptions\ModuleNotRegistered(asConsole::getModule()already did) instead ofPhalcon\Cli\Console\Exceptions\ConsoleModuleNotRegistered.Closuremodule definitions are now supported and are invoked with the container, matching MVC. A definition that is neither an array nor aClosurethrows the newPhalcon\Cli\Console\Exceptions\InvalidModuleDefinitioninstead ofInvalidModuleDefinitionPath. #17107 - Changed
Phalcon\Config\Adapter\Ini::parseIniString()to usePhalcon\Config\Config::DEFAULT_PATH_DELIMITERfor the key nesting separator instead of a hardcoded.(no behavior change). #17134 - Changed
Phalcon\Config\Adapter\JsonandPhalcon\Config\Adapter\Phpto throwPhalcon\Config\Exceptions\CannotLoadConfigFilewhen the configuration file cannot be read, instead of failing inside the JSON decoder (Json) or with a fatalrequireerror (Php). All file based Config adapters now share the same failure contract. #17134 - Changed
Phalcon\Config\ConfigFactoryto resolve adapter-specific constructor arguments (modeforini,callbacksforyaml) through a single internal parameter map consulted by bothload()andnewInstance(), instead of two hardcoded switches.load()now also resolves theymladapter name / file extension to theyamladapter. #17134 - Consolidated the
allowEmptyhandling ofPhalcon\Filter\Validationinto the validator (Phalcon\Filter\Validation\AbstractValidator::isAllowEmpty()). The per-fieldallowEmptymap is also honored. #17124 - Moved the resolution of an array
attributeoption fromPhalcon\Filter\Validation\AbstractValidator::getOption()intoPhalcon\Filter\Validation\Validator\Uniqueness::getOption(). #17124
Added
- Added
Phalcon\Filter\Filter::getDefaultMapper(), for mapper services used also byPhalcon\Filter\FilterFactory::getServices(). #17124 - Added
Phalcon\Filter\Validation\Validator\File\Resolution\AspectRatio, validating that an uploaded image has an exact aspect ratio. Theratiooption uses the16x9format (per-field array form supported) and is compared with integer cross-multiplication, so the dimensions must match exactly: 1920x1080 matches16x9, 1366x768 does not. Also available through the compositePhalcon\Filter\Validation\Validator\Filevia theaspectRatioandmessageAspectRatiooptions. #17104 - Added
SessionUpdateTimestampHandlerInterfacesupport to thePhalcon\Sessionadapters (Noop,Stream,Redis,Libmemcached), enabling PHP’ssession.lazy_write(on by default): when the session data is unchanged at close, PHP now callsupdateTimestamp()instead ofwrite().Streamtouches the session file without rewriting its data;RedisandLibmemcacheddelegate towrite()to refresh the TTL. Withsession.use_strict_modeenabled, the newvalidateId()rejects uninitialized session ids. #17129 - Added a
stripPrefixoption (defaulttrue) to thePhalcon\Storage/Phalcon\Cacheadapters, controlling whether a leading prefix is stripped from incoming keys (the behavior introduced for #17089).Phalcon\Session\Adapter\RedisandPhalcon\Session\Adapter\Libmemcacheddisable it by default: session ids are externally generated, so an id that happens to start with the prefix text must not collide with another session. #17127 - Added an optional
Phalcon\Config\ConfigFactoryconstructor parameter toPhalcon\Config\Adapter\Grouped. The factory is created once and reused for every configuration fragment, so custom adapters registered on a supplied factory are now visible when loading grouped configurations. #17134 - Added dialect-specific operators to PHQL:
@@,@>,<@,&&,||,->,->>,#>,#>>. Each is parsed into a binary expression and emitted only by the dialects that support it (PostgreSQL: all nine; MySQL:->,->>; SQLite:||,->,->>); using an operator on a dialect that does not support it throwsPhalcon\Db\Exceptions\UnsupportedOperator. The jsonb existence operators (?,?|,?&,@?) and the~regex family are intentionally unsupported - use their function equivalents (e.g.jsonb_exists(),regexp_like()). #14954 #14579 - Added geometry value objects under
Phalcon\Db\Geometry(Point,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon,GeometryCollection) and read-side hydration of spatial columns. Whenorm.cast_on_hydrateis enabled, spatial column values (MySQL WKB / PostGIS EWKB) are decoded into these objects on model read; otherwise the raw value is returned unchanged. #17110 #14769 #13670 - Added opt-in session locking to
Phalcon\Session\Adapter\Redis, preventing concurrent requests from racing on the same session (stale reads / lost writes). When enabled with the newlockingEnabledconstructor option,read()acquires a per-session lock (SET NX EX, retried with pauses) andclose()/destroy()release it with a token-guarded delete, so an adapter can only remove a lock it still owns. A read that cannot acquire the lock throwsPhalcon\Session\Adapter\Exceptions\AdapterRuntimeError. Tunable via thelockExpiry(lock TTL in seconds, default30),lockRetries(maximum attempts, default100) andlockWaitTime(microseconds between attempts, default50000) options. Locking is off by default. #17126 - Added table comment support to the MySQL and PostgreSQL dialects. Comment values are single-quote escaped (the existing PostgreSQL column-comment emission is now escaped as well). SQLite has no native table comment and ignores the option. #15258
- Added the
Phalcon\Contracts\Filter\Sanitizerinterface and moving array recursion inPhalcon\Filter\Filter::sanitize(). #17124
Fixed
- Fixed
Phalcon\Config\Config::cloneEmpty()so thatfilter(),map(),sort()andwhere()no longer fail on adapter instances (Ini,Json,Php,Yaml,Grouped). The override clones the current instance and replaces its data instead of invoking the adapter constructor with the parent(array $data, ...)signature. #17134 - Fixed
Phalcon\Config\Config::merge()emptying the configuration before validating its argument. Invalid merge data still throwsPhalcon\Config\Exceptions\InvalidMergeData, but the current configuration now survives intact. #17134 - Fixed
Phalcon\Config\Config::setData()bypassing thePhalcon\Support\Collectionruntime type guard: atypepassed to the constructor is now enforced on leaf values at every nesting depth (arrays become nested Config objects, which validate their own leaves). Nested Config objects also inherit thestrictNullandtypeflags in addition toinsensitive. #17134 - Fixed
Phalcon\Http\Cookie::send()fataling when the cookie has a non-empty definition and no DI container is set. The session integration (service lookup, started check, and the_PHCOOKIE_key convention) is now consolidated in privategetStartedSession()/getSessionKey()helpers shared bydelete(),restore()andsend(). #17127 - Fixed
Phalcon\Mvc\Model::groupResult()declaring aPhalcon\Mvc\Model\ResultsetInterfacereturn type while returning a scalar (int,float,string, ornull) for non-grouped aggregate queries (count(),sum(),average(),maximum(),minimum()). The return type declaration has been removed (@return int|float|string|null|ResultsetInterface), so model subclasses can overridegroupResult()without risking aTypeError. #17114 - Fixed
Phalcon\Mvc\Model::save()andPhalcon\Mvc\Model::update()to run the record-existence check on the write connection instead of the read connection. On master-replica setups, replication lag could make the check miss a row already written to the master, causingsave()to attempt anINSERTinstead of anUPDATE, orupdate()to fail withRecord cannot be updated because it does not exist.create()has used the write connection since #14256. #17105 - Fixed
Phalcon\Session\BagcallinggetDI()on itsPhalcon\Session\ManagerInterfaceconstructor parameter - a method the interface does not declare - which fataled for any manager implementing only the interface. The container is now captured only when the manager provides one. #17127 - Fixed
Phalcon\Session\Manager::start()deleting valid session cookies whensession.sid_bits_per_characteris6: the cookie sanity check now accepts the full PHP session ID alphabet ([a-zA-Z0-9,-]) instead of alphanumerics only. #17127 - Fixed the Volt parser raising
Syntax error, unexpected token DEFAULTwhen thedefaultfilter (e.g.{{ value|default('text') }}) is used inside a{% switch %}block. The worddefaultis now treated as the{% default %}clause only when it directly follows the opening{%delimiter inside a switch; everywhere else it is parsed as a plain identifier, so the filter,{{ default }}and{% set default = ... %}all work inside switch-case blocks. #16003 - Fixed the
Phalcon\Storage/Phalcon\Cacheadapters to accept keys already carrying the adapter prefix, so keys returned bygetKeys()can be passed straight back toget(),has(),delete(),deleteMultiple(),set(),setForever(),increment()anddecrement().Phalcon\Storage\Adapter\AbstractAdapternow strips a leading prefix from incoming keys. #17089 - Fixed the alternative installation script (
build/install) to set the installedphalcon.soto mode0644aftermake install. The PHP build system installs shared extensions with theinstalldefault mode0755; shared objects only need read permission. #17113
Removed
- Removed
Phalcon\Cli\Console\Exceptions\ConsoleModuleNotRegisteredandPhalcon\Cli\Console\Exceptions\InvalidModuleDefinitionPath, superseded byPhalcon\Application\Exceptions\ModuleNotRegisteredandPhalcon\Cli\Console\Exceptions\InvalidModuleDefinition. #17107
Upgrade
Developers can upgrade using PIE
pie install phalcon/cphalcon-5.14.2
To compile from source, follow our installation document
Chat - Q&A
Support
Social Media
Videos
<3 Phalcon Team