Skip to content

Releases: phalcon/cphalcon

v4.0.0-alpha.2

02 Feb 17:32
d6da8d8
Compare
Choose a tag to compare
v4.0.0-alpha.2 Pre-release
Pre-release

Added

  • Added notFound() method in Phalcon\Translate\Adapter\NativeArray which returns the key requested if not found. The method can be overriden when extending the class, returning what the developer needs #13007
  • Added Phalcon\Service\Locator, Phalcon\Service\LocatorInterface and Phalcon\Service\LocatorFactoryInterface to allow for the creation of service locators and factories throughout the application #13771
  • Added Phalcon\Http\Request::setParameterFilters. It allows you to preset filters for specific input (i.e. id, name etc.). You can then retrieve the automatcally sanitized values using Phalcon\Http\Request::getFilteredQuery, Phalcon\Http\Request::getFilteredPost and Phalcon\Http\Request::getFilteredPut #13488

Fixed

  • Fixed Phalcon\Mvc\Micro::handle to properly return a response object #13712
  • Fixed Phalcon\Cache\Backend\Libmemcached returning "empty" values being as null when they could be 0, false or empty string. #13497
  • Fixed session adapters to properly implement SessionHandlerInterface::write
  • Fixed Phalcon\Session\Manager to not interact with $_SESSION variable if the session has not been started #13718, #13520
  • Fixed Phalcon\Cli\Console class not found error if handling the same module twice #13724
  • Fixed Phalcon\Cache\Backend\Libmemcached returning "empty" values being as null when they could be 0, false or empty string. #13497
  • Fixed Phalcon\Mvc\View\Engine\Volt\Compiler::functionCall building the incorrect code for the following tags; select, and select_static #13459
  • Fixed Phalcon\Tag\Select not rendering without any options.

Changed

  • Changed the Phalcon\Tag::renderTitle() parameters such as Phalcon\Tag::getTitle() #13706
  • Changed the Phalcon\Html\Tag::renderTitle() parameters such as Phalcon\Html\Tag::getTitle() #13706
  • Changed the Phalcon\Version::get() to follow semantic versioning #13720
  • Changed the Phalcon\Translate\Adapter\NativeArray to accept a new parameter in the constructor triggerError. This will trigger an error if the key is not found #13007
  • Changed the default action of Phalcon\Acl\Memoryto be Acl::DENY instead of Acl::ALLOW #13758
  • Changed Phalcon\Mvc\User\Plugin to Phalcon\Plugin #13749
  • Changed Phalcon\Exception to implement \Throwable interface.#13750
  • Changed Phalcon\Http\Cookie. The httpOnly property is no longer initialised with a value #13464
  • Changed the default action for no arguments of Phalcon\Acl\Memoryto be Acl::DENY instead of Acl::ALLOW #13769
  • Changed the implementation of Phalcon\Filter. It uses a service locator and a service locator factory now. It has more sanitizers now. #13060

v4.0.0-alpha1

25 Dec 12:40
Compare
Choose a tag to compare
v4.0.0-alpha1 Pre-release
Pre-release

THIS RELEASE IS NOT BACKWARDS COMPATIBLE

Added

  • Added Code of Conduct for the project
  • Added Phalcon\Db\Adapter\Pdo\Postgresql::describeReferences to implement custom Postgresql rules 438
  • Added Phalcon\Mvc\Router\RouteInterface::convert so that calling Phalcon\Mvc\Router\Group::add will return an instance that has convert method #13380
  • Added Phalcon\Mvc\ModelInterface::getModelsMetaData #13070
  • Added Phalcon\Validation\Validator\Ip, class used to validate ip address fields. It allows to validate a field selecting IPv4 or IPv6, allowing private or reserved ranges and empty values if necessary. #13574
  • Added Phalcon\Messages\MessageInterface, Phalcon\Messages\Message, Phalcon\Messages\Exception and Phalcon\Messages\Messages to handle all messages for the application (model/validation) #13114
  • Added getHandlerSuffix(), setHandlerSuffix() in Dispatcher, getTaskSuffix(), setTaskSuffix() in the CLI Dispatcher #13468
  • Added ability to set a custom template for the Flash Messenger. #13445
  • Added forUpdate in the Sqlite dialect to override the method from the base dialect. #13539
  • Added TYPE_ENUM in the Mysql adapter. #11368
  • Added more column types for the Mysql adapter. The adapter supports TYPE_BIGINTEGER, TYPE_BIT, TYPE_BLOB, TYPE_BOOLEAN, TYPE_CHAR, TYPE_DATE, TYPE_DATETIME, TYPE_DECIMAL, TYPE_DOUBLE, TYPE_ENUM, TYPE_FLOAT, TYPE_INTEGER, TYPE_JSON, TYPE_JSONB, TYPE_LONGBLOB, TYPE_LONGTEXT, TYPE_MEDIUMBLOB, TYPE_MEDIUMINTEGER, TYPE_MEDIUMTEXT, TYPE_SMALLINTEGER, TYPE_TEXT, TYPE_TIME, TYPE_TIMESTAMP, TYPE_TINYBLOB, TYPE_TINYINTEGER, TYPE_TINYTEXT, TYPE_VARCHAR #13151, #12223, #524, #13225 @zGaron, #12523 @Studentsov, #12471 @ruudboon
  • Added Phalcon\Acl\Adapter\Memory::addRole support multiple inherited #13557
  • Added Phalcon\Tag::renderTitle() that renders the title enclosed in <title> tags. #13547
  • Added hasHeader() method to Phalcon\Http\Response to provide the ability to check if a header exists. #12189
  • Added global setting orm.case_insensitive_column_map to attempt to find value in the column map case-insensitively. Can be also enabled by setting caseInsensitiveColumnMap key in \Phalcon\Mvc\Model::setup(). #11802
  • Added the ability to use FrontendInterface to serialize Model and ResultSet - Inject a serializer object which implements FrontendInterface in DI to use it. #12808
  • Added Phalcon\Mvc\Model\Query\BuilderInterface::offset #13599
  • Added Phalcon\Http\Response\Cookies::getCookies #13591
  • Added Phalcon\Mvc\Model::isRelationshipLoaded to check if relationship is loaded #12772
  • Added an easy way to work with Phalcon and run the tests locally, using nanobox.io #13578
  • Added response handler to Phalcon\Mvc\Micro, Phalcon\Mvc\Micro::setResponseHandler, to allow use of a custom response handler. #12452
  • Added two new events response::beforeSendHeaders and response::afterSendHeaders to Phalcon\Http\Response #10689
  • Added a retainer for the current token to be used during the checkings, so when Phalcon\Security::getToken is called the token used for checkings don't change. #12392
  • Added Phalcon\Html\Tag, a component that creates HTML elements. It will replace Phalcon\Tag in a future version. This component does not use static method calls. #12392
  • Added Phalcon\Paginator\RepositoryInterface for repository the current state of paginator and also optional sets the aliases for properties repository #10985, #10957
  • Added bind support to Phalcon\Mvc\Model\Query\Builder. The Query Builder has the same methods as Phalcon\Mvc\Model\Query; getBindParams, setBindParams, getBindTypes and setBindTypes. #13368
  • Added Phalcon\Html\Breadcrumbs, a component that creates HTML code for breadcrumbs. #13680
  • Added more methods to interfaces.
    • Phalcon\Cli\Router\RouteInterface - delimiter, getDelimiter
    • Phalcon\Cli\DispatcherInterface - setOptions, getOptions
    • Phalcon\Db\AdapterInterface - fetchColumn, insertAsDict, updateAsDict
    • Phalcon\Db\DialectInterface - registerCustomFunction, getCustomFunctions, getSqlExpression
    • Phalcon\Di\ServiceInterface - getParameter, isResolved
    • Phalcon\Events\ManagerInterface - hasListeners
    • Phalcon\Mvc\Model\Query\BuilderInterface - distinct, getDistinct, forUpdate, offset, getOffset
    • Phalcon\Mvc\Model\Transaction\ManagerInterface - setDbService, getDbService, setRollbackPendent, getRollbackPendent
    • Phalcon\Mvc\Model\CriteriaInterface - distinct, leftJoin, innerJoin, rightJoin, groupBy, having, cache, getColumns, getGroupBy, getHaving,
    • Phalcon\Mvc\Model\ManagerInterface - isVisibleModelProperty, keepSnapshots, isKeepingSnapshots, useDynamicUpdate, isUsingDynamicUpdate, addHasManyToMany, existsHasManyToMany, getRelationRecords, getHasManyToMany, registerNamespaceAlias, getNamespaceAlias
    • Phalcon\Mvc\Model\MessageInterface - setModel, getModel, setCode, getCode
    • Phalcon\Mvc\Model\QueryInterface - getSingleResult, setBindParams, getBindParams, setBindTypes, setSharedLock, getBindTypes, getSql
    • Phalcon\Mvc\Model\RelationInterface - getParams
    • Phalcon\Mvc\Model\ResultsetInterface - setHydrateMode, getHydrateMode, getMessages, update, delete, filter
    • Phalcon\Mvc\ModelInterface - getModelsMetaData
    • Phalcon\Session\AdapterInterface - setId, status
    • Phalcon\Validation\MessageInteraface - getCode, setCode
    • Phalcon\CryptInterface - setPadding
    • Phalcon\Mvc\RouterInterface - attach #12676
  • Added Phalcon\Container, a proxy container class to the Phalcon\DI implementing PSR-11 #12295
  • Added Phalcon\Acl\Adapter\Memory::getActiveKey, Phalcon\Acl\Adapter\Memory::activeFunctionCustomArgumentsCount and Phalcon\Acl\Adapter\Memory::getActiveFunction to get latest key, number of custom arguments, and function used to acquire access #12547

Changed

  • Now Phalcon requires the PSR PHP extension to be installed and enabled
  • By configuring prefix and statsKey the Phalcon\Cache\Backend\Redis::queryKeys no longer returns prefixed keys, now it returns original keys without prefix. #13656
  • The Phalcon\Mvc\Application, Phalcon\Mvc\Micro and Phalcon\Mvc\Router now must have a URI to process #12380
  • Response headers and cookies are no longer prematurely sent #12378
  • You can no longer assign data to models whilst saving them #12317
  • The Phalcon\Mvc\Model\Manager::load no longer reuses already initialized models #12317
  • Changed Phalcon\Db\Dialect\Postgresql::describeReferences to generate correct SQL, added "on update" and "on delete" constraints 438
  • Changed catch Exception to Throwable #12288
  • Changed Phalcon\Mvc\Model\Query\Builder::addFrom to remove third parameter $with #13109
  • Phalcon\Forms\Form::clear will no longer call Phalcon\Forms\Element::clear, instead it will clear/set default value itself, and Phalcon\Forms\Element::clear will now call Phalcon\Forms\Form::clear if it's assigned to the form, otherwise it will just clear itself. [#13500](https://gith...
Read more

v3.4.2

02 Dec 18:39
2f55ebb
Compare
Choose a tag to compare
  • Added missing Volt tags to array helper in Phalcon\Mvc\View\Engine\Volt\Compiler::functionCall #13447
  • Added the ability to explicitly define nullable columns (especially timestamp ones) #13099
  • Refactored Phalcon\Db\Adapter\Pdo::query to use PDO's prepare and execute and Phalcon\Db\Adapter::fetchAll to use PDO's fetchAll
  • Fixed Phalcon\Validation\Validator\Numericality to accept float numbers on locales with comma decimal point #13450
  • Fixed Phalcon\Tag so it unsets parameters before passing options array to self::renderAttributes
  • Fixed Phalcon\Http\Response::setFileToSend filename; when file downloaded it had an extra _
  • Fixed Phalcon\Mvc\Model\Query::execute to properly bind parameters to sub queries #11605
  • Fixed Phalcon\Http\Request::getJsonRawBody #13501. It will now return false when the body content is empty, as well as when it encounters an error whilst decoding the JSON content
  • Fixed Phalcon\Validation::preChecking to allow use Phalcon\Db\RawValue as an empty container for isAllowEmpty option #13549, #13573, #12519
  • Fixed object binding and placeholder creation in Phalcon\Db\Adapter::insert and Phalcon\Db\Adapter::update #13058
  • Fixed Phalcon\Config\Adapter\Ini not building config objects properly for numerical keys #12725, #13604
  • Fixed incorrect scope of view variables #12176, #12385, #12648, #12705, #13288
  • Fixed Phalcon\Config::_merge not merging config with numeric properties properly #13351.

v3.4.1

05 Aug 21:39
caeac66
Compare
Choose a tag to compare
  • Changed Phalcon\Cache\Backend\Redis to support connection timeout parameter
  • Fixed Phalcon\Validaiton\Validator\Uniqueness::isUniquenessModel to properly get value of primary key when it has different name in column map #13398
  • Fixed bad performance for repeated Phalcon\Mvc\Router::getRouteByName and Phalcon\Mvc\Router::getRouteById calls for applications with many routes
  • Fixed incorrect tinyblob bind type in Phalcon\Db\Adapter\Pdo\Mysql::describeColumns #13423
  • Fixed Phalcon\Http\Request::getPut to provide json content-type support #12892, #13418

v3.4.0

28 May 05:51
Compare
Choose a tag to compare
  • Added Phalcon\Mvc\Router::attach to add Route object directly into Router #13326
  • Added the ability to listen request:beforeAuthorizationResolve and request:afterAuthorizationResolve events. This ability enables using custom authorization resolvers #13327
  • Added call event afterFetch in Phalcon\Mvc\Model:refresh #12220
  • Added Phalcon\Http\Response::getReasonPhrase to retrieve the reason phrase from the Status header #13314
  • Added Phalcon\Loader::setFileCheckingCallback to set internal file existence resolver #13360
  • Added ability to pass aggregation options for Phalcon\Mvc\Collection::aggregate #12302
  • Added Phalcon\Crypt::setHashAlgo to set the name of hashing algorithm used to the calculating message digest #13379
  • Added Phalcon\Crypt::getHashAlgo to get the name of hashing algorithm used to the calculating message digest #13379
  • Added Phalcon\Crypt::useSigning to set if the calculating message digest must used (NOTE: This feature will be enabled by default in Phalcon 4.0.0) #13379
  • Added Phalcon\Crypt::getAvailableHashAlgos to get a list of registered hashing algorithms suitable for calculating message digest #13379
  • Added Phalcon\Crypt::__construct so now the cipher can be set at object construction and the calculating message digest can be enabled without the need to call setCipher or useSigning explicitly #13379
  • Added Phalcon\Crypt\Mismatch. Exceptions thrown in Phalcon\Crypt will use this class #13379
  • Added Phalcon\Http\Cookie::setSignKey to set sign key used to generate a message authentication code (eg. message digest)
  • Added Phalcon\Http\Response\Cookies::setSignKey to set sign key used to generate a message authentication code (eg. message digest)
  • Changed Phalcon\Crypt::setCipher so that IV length will be reconfigured during setting the cipher algorithm
  • Changed Phalcon\Crypt::setCipher so that method will throw Phalcon\Crypt\Exception if a cipher is unavailable
  • Fixed regression (#13308) for Phalcon\Debug\Dump::output to correctly work with detailed mode #13315
  • Fixed Phalcon\Mvc\Model\Query\Builder::having and Phalcon\Mvc\Model\Query\Builder::where to correctly merge the bind types #11487
  • Fixed Phalcon\Mvc\Model::setSnapshotData to properly sets the old snapshot
  • Do not throw Exception when superglobal does not exist #13252, #13254, #12918

v3.3.2

07 Mar 08:23
9073ca3
Compare
Choose a tag to compare
  • Fixed Phalcon\Db\Dialect\Mysql::modifyColumn to produce valid SQL for renaming the column #13012
  • Fixed Phalcon\Forms\Form::getMessages to return back previous behaviour: return array of messages with element name as key #13294
  • Fixed Phalcon\Mvc\Model\Behavior\SoftDelete::notify to solve the exception that soft deletion renamed model #13302, #13306
  • Fixed E_DEPRECATED error for each() in Phalcon\Debug\Dump #13253

v3.3.1

09 Jan 16:06
Compare
Choose a tag to compare
  • Fixed a boolean logic error in the CSS minifier and a corresponding unit test so that whitespace is stripped #13200
  • Fixed default Volt filter #13242, #13244
  • Fixed Phalcon\Validation\Validator\Date to return code in validation message

v3.3.0

30 Dec 20:26
f0732e9
Compare
Choose a tag to compare
  • Added support of PHP 7.2 and initial support of PHP 7.3
  • Added support for switch/case syntax to the Volt Engine #13107
  • Added Phalcon\Logger\Adapter\Blackhole #13074
  • Added Phalcon\Http\Request::hasHeader to check if certain header exists
  • Added support of 103 (Early Hint) HTTP status code
  • Added router:beforeMount event to Router::mount #13158
  • Added Phalcon\Mvc\Application::sendHeadersOnHandleRequest to enable or disable sending headers by each request handling #13101
  • Added Phalcon\Mvc\Application::sendCookiesOnHandleRequest to enable or disable sending cookies by each request handling #13101
  • Added ability to use PDO option aliases on database connect #13010
  • Added Phalcon\Mvc\Model\MetaData\Apcu #13078
  • Added ability to use string(file path) as a argument in Phalcon\Config\Factory::load()
  • Added Phalcon\Mvc\Mico\Collection::mapVia to map routes via methods
  • Added Phalcon\Mvc\Model::setOldSnapshotData to set old snapshot data separately to current snapshot data
  • Added Phalcon\Http\Response::removeHeader to remove specific header from response
  • Added Phalcon\Mvc\Query::setTransaction to enable an override transaction #13226
  • Fixed Phalcon\Mvc\Model\Query\Builder::getPhql to correct generate PHQL in argument's array when using order DESC or ASC #11827
  • Fixed Phalcon\Db\Dialect\Postgresql::createTable to produce valid SQL for table definition with BOOLEAN types #13132
  • Fixed Phalcon\Db\Dialect\Postgresql::_castDefault to return correct value for BOOLEAN type #13132, phalcon/phalcon-devtools#1118
  • Fixed Phalcon\Mvc\Model::_doLowInsert to correct save snapshot on creation/save identityless models #13166
  • Fixed Phalcon\Mvc\Model::_doLowUpdate to correctly work with Phalcon\Db\RawValue #13170
  • Fixed Phalcon\Mvc\Model::allowEmptyStringValues to correct works with saving empty string values when DEFAULT not set in SQL
  • Fixed Phalcon\Mvc\Model\Behavior\SoftDelete to correctly update snapshots after deleting item
  • Fixed Phalcon\Mvc\Model to set old snapshot when no fields are changed when dynamic update is enabled
  • Fixed Phalcon\Acl\Adapter\Memory::isAllowed to properly pass role and resource objects to custom function if they are objects of the same class
  • Changed Phalcon\Mvc\Model to allow to pass a transaction within the query context #13226

v3.2.4

21 Oct 15:45
Compare
Choose a tag to compare
  • Fixed regression of #13046 by removing injection of dispatcher's parameters (which were never available anyway) #13121
  • Fixed Phalcon\Mvc\Model\Query::_getQualified to correct replace field names in WHERE #12971

v3.2.3

12 Oct 19:50
Compare
Choose a tag to compare
  • Fixed Phalcon\Mvc\Model\Query::_executeSelect threw RuntimeException, if db:beforeQuery() returned false
  • Internal cookies property is now always an array #12978
  • Fixed Phalcon\Validation\Validator\File::validate to work properly with parameter 'message' #12947
  • Fixed Phalcon\Mvc\View::render to render a view with params #13046
  • Fixed Phalcon\Mvc\Model\Manager::getRelationRecords to work properly with provided columns #12972
  • Mark as deprecated no longer used Phalcon\Mvc\Model\Query\Builder::$_with parameter #13023
  • Fixed Phalcon\Dispatcher::dispatch to ensure proper flow for all forward/exception/dispatch event hooks #12931