5.21.0 (2026-09-18)
Tools
- Zephir 1.5.0
Changed
Phalcon\Db\Adapter\Pdo\AbstractPdo::commit()androllback()now throwPhalcon\Db\Exceptions\NoActiveTransactionwhen the connection has no active transaction, instead of sending a commit, rollback or savepoint statement to the server. #17546 [doc]
Added
Phalcon\Mvc\Model::findFirst()now recognizes theeagerparameter, so relations can be eagerly loaded. #17534 [doc]
Fixed
- PHQL
WITHnaming a model instead of a relation alias always throwingRelationshipNotFound; the fallback checkedPhalcon\Mvc\Model\Manager::getRelationsBetween()for an object, but it returns an array. Ambiguous pairs now throwAmbiguousJoinRelation. #17554 [doc] - PHQL string literals not resolving their escape sequences, so
\nreached the database as a backslash and ann. #17585 [doc] Phalcon\Db\Adapter\Pdo\AbstractPdoleaving the transaction nesting level wrong whenbegin(),commit()orrollback()fails. #17546 [doc]Phalcon\Filter\Validation\Validator\File\AbstractFile::checkUpload()reporting success when the field value is not an uploaded file array; a missing file or a plain string now fails validation. #17541 [doc]Phalcon\Filter\Validation\Validator\File\Resolution\Equal,Max,MinandAspectRationot checking thefalsereturned bygetimagesize(); a file that is not a readable image is now rejected. #17542 [doc]Phalcon\Filter\Validation\Validator\Ipignoring per-fieldallowPrivateandallowReservedarrays; the option is now resolved for the field before it becomes a filter flag. #17548 [doc]Phalcon\Forms\Element\CheckGroupandRadioGroupstoring their choices in the propertyPhalcon\Forms\Element\AbstractElementuses for user options, sosetUserOption()added a choice andsetOptions()removed every user option. #17536 [doc]Phalcon\Forms\Element\Select::addOption()writing with an offset into an object ornulloptions value; the write now happens only when the options value is an array (nullbecomes an empty array). #17536 [doc]Phalcon\Mvc\Model\Manager::getRelationRecords()raisingTypeErroron a compound through-relation markedreusable, and reusing one key for every record. The key is now built from every field the relation covers. #17560 [doc]Phalcon\Mvc\Model\Managerrelation guards throwingTypeErroron a string field list, and the second check inaddHasManyToMany()/addHasOneThrough()comparing the same pair twice. #17556 [doc]Phalcon\Mvc\Model\Resultset::valid()reporting no row for a resultset restored from cache;Phalcon\Mvc\Model\Resultset\Complexstores rows that are already hydrated, so they are objects and not arrays. #17574 [doc]Phalcon\Mvc\Model\Resultset\Simple::current()giving backfalseon a second call at a position with no row; thefalseit caches is a sentinel, andnullis returned as the declared type says. #17568 [doc]Phalcon\Mvc\ModelraisingTypeErroron a composite virtual foreign key violation, and when the case-insensitive column-map lookup ran without a column map. #17558 [doc]Phalcon\Mvc\View\Engine\Volt::preload()raising an error when the engine has no container; the href is given back unchanged.Phalcon\Mvc\View\Engine\Volt\Compiler::compileSource()returningnullin extends mode when the template contributes no blocks. #17565 [doc]Phalcon\Storage\Adapter\StreamandPhalcon\Queue\Adapter\Stream\StreamContextreporting amkdir(): File existswarning when a different process makes the directory first. #17561 [doc]