github phalcon/cphalcon v5.21.0

2 hours ago

5.21.0 (2026-09-18)

Tools

  • Zephir 1.5.0

Changed

  • Phalcon\Db\Adapter\Pdo\AbstractPdo::commit() and rollback() now throw Phalcon\Db\Exceptions\NoActiveTransaction when 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 the eager parameter, so relations can be eagerly loaded. #17534 [doc]

Fixed

  • PHQL WITH naming a model instead of a relation alias always throwing RelationshipNotFound; the fallback checked Phalcon\Mvc\Model\Manager::getRelationsBetween() for an object, but it returns an array. Ambiguous pairs now throw AmbiguousJoinRelation. #17554 [doc]
  • PHQL string literals not resolving their escape sequences, so \n reached the database as a backslash and an n. #17585 [doc]
  • Phalcon\Db\Adapter\Pdo\AbstractPdo leaving the transaction nesting level wrong when begin(), commit() or rollback() 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, Min and AspectRatio not checking the false returned by getimagesize(); a file that is not a readable image is now rejected. #17542 [doc]
  • Phalcon\Filter\Validation\Validator\Ip ignoring per-field allowPrivate and allowReserved arrays; the option is now resolved for the field before it becomes a filter flag. #17548 [doc]
  • Phalcon\Forms\Element\CheckGroup and RadioGroup storing their choices in the property Phalcon\Forms\Element\AbstractElement uses for user options, so setUserOption() added a choice and setOptions() removed every user option. #17536 [doc]
  • Phalcon\Forms\Element\Select::addOption() writing with an offset into an object or null options value; the write now happens only when the options value is an array (null becomes an empty array). #17536 [doc]
  • Phalcon\Mvc\Model\Manager::getRelationRecords() raising TypeError on a compound through-relation marked reusable, and reusing one key for every record. The key is now built from every field the relation covers. #17560 [doc]
  • Phalcon\Mvc\Model\Manager relation guards throwing TypeError on a string field list, and the second check in addHasManyToMany() / 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\Complex stores rows that are already hydrated, so they are objects and not arrays. #17574 [doc]
  • Phalcon\Mvc\Model\Resultset\Simple::current() giving back false on a second call at a position with no row; the false it caches is a sentinel, and null is returned as the declared type says. #17568 [doc]
  • Phalcon\Mvc\Model raising TypeError on 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() returning null in extends mode when the template contributes no blocks. #17565 [doc]
  • Phalcon\Storage\Adapter\Stream and Phalcon\Queue\Adapter\Stream\StreamContext reporting a mkdir(): File exists warning when a different process makes the directory first. #17561 [doc]

Removed

Don't miss a new cphalcon release

NewReleases is sending notifications on new releases.