Skip to content

Releases: phalcon/cphalcon

v4.0.0-alpha.4

31 Mar 17:44
Compare
Choose a tag to compare
v4.0.0-alpha.4 Pre-release
Pre-release

Added

  • Added delimiter and enclosure options to Phalcon\Translate\Adapter\Csv constructor
  • Added Phalcon\Http\Message\* namespace implementing PSR-7 and PSR-17. Introducing:
    • Phalcon\Http\Message\Request
    • Phalcon\Http\Message\RequestFactory
    • Phalcon\Http\Message\Response
    • Phalcon\Http\Message\ResponseFactory
    • Phalcon\Http\Message\ServerRequest
    • Phalcon\Http\Message\ServerRequestFactory
    • Phalcon\Http\Message\Stream
    • Phalcon\Http\Message\StreamFactory
    • Phalcon\Http\Message\UploadedFile
    • Phalcon\Http\Message\UploadedFileFactory
    • Phalcon\Http\Message\Uri
    • Phalcon\Http\Message\UriFactory
    • Phalcon\Http\Message\Stream\Input
    • Phalcon\Http\Message\Stream\Memory
    • Phalcon\Http\Message\Stream\Temp
      The implementation offers PSR-7/PSR-17 compatible components in a different namespace to allow usage of both Request and Response implementations for this version. #11789
  • Added Phalcon\Helper\* namespace, offering easy manipulations for arrays, numbers etc..
    • Phalcon\Helper\Arr
    • Phalcon\Helper\Number
      #13889
  • Added Phalcon\Collection, an object implementing ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Serializable, offering an easy way to handle collections of data such as arrays, superglobals etc. #13886
  • Added Phalcon\Collection, in Phalcon\Http\Message\Request and Phalcon\Http\Message\ServerRequest to handle the headers #13907

Fixed

  • Fixed Phalcon\Image\Adapter\Imagick::_watermark, setImageAlpha() fills the alpha channel with black before execution (replaced by evaluateImage()). Improved imagick compatibility. #13911
  • Fixed Assets Manager hard reference to \Phalcon\Tag, should use DI #12261

Changed

  • Refactored Phalcon\Registry to use the Phalcon\Collection class #13893
  • Refactored Phalcon\Session\Bag to use the Phalcon\Collection class #13893
  • Refactored almost all files of the project to abide by the new coding standard for Phalcon. Certain files have been intentionally left untouched because they will be relaced later on. #13915

Removed

  • Removed Phalcon\Session\BagInterface #13893

v4.0.0-alpha.3

03 Mar 18:10
9fae862
Compare
Choose a tag to compare
v4.0.0-alpha.3 Pre-release
Pre-release

Added

  • Added view:afterCompile and view:beforeCompile events for the Volt compiler #2182
  • Added array merge support to Phalcon\Config::merge
  • Added setBlacklist in Phalcon\Debug to allow the developer to "blacklist" certain variables from the $_REQUEST or $_SERVER superglobals being displayed on screen #13687
  • Changed view engine service closures to no longer receive the dependency injector as the second parameter. Instead use $this for the DI. #11926

Fixed

  • Fixed router and controller parameter inconsistencies (camelize etc.) #13555
  • Fixed invalid opcode in phalcon.so when using docker #13143
  • Fixed storing related model data in Phalcon\Messages\Message. The method is now setMetadata and can be used to store any metadata from any component that emits messages #13811
  • Fixed Dispatcher calling camelize twice and producing incorrect results #12829
  • Fixed Phalcon\Mvc\Model:findFirst to throw an exception when the passed parameter for a primary key is not an array, string or numeric #13336
  • Added Phalcon\Http\ResponseInterface::isSent, that was already used. #13836

Changed

  • Renamed Phalcon\Acl\Subject to Phalcon\Acl\Component #13808
  • Renamed Phalcon\Acl\SubjectInterface to Phalcon\Acl\ComponentInterface #13808
  • Renamed Phalcon\Acl\SubjectAware to Phalcon\Acl\ComponentAware #13808
  • Renamed Phalcon\Acl\Operation to Phalcon\Acl\Role #13808
  • Renamed Phalcon\Acl\OperationInterface to Phalcon\Acl\RoleInterface #13808
  • Renamed Phalcon\Acl\OperationAware to Phalcon\Acl\RoleAware #13808
  • Renamed Phalcon\Acl\AdapterInterface::addOperation to Phalcon\Acl\AdapterInterface::addRole #13808
  • Renamed Phalcon\Acl\AdapterInterface::isOperation to Phalcon\Acl\AdapterInterface::isRole #13808
  • Renamed Phalcon\Acl\AdapterInterface::isSubject to Phalcon\Acl\AdapterInterface::isComponent #13808
  • Renamed Phalcon\Acl\AdapterInterface::addSubject to Phalcon\Acl\AdapterInterface::addComponent #13808
  • Renamed Phalcon\Acl\AdapterInterface::addSubjectAccess to Phalcon\Acl\AdapterInterface::addComponentAccess #13808
  • Renamed Phalcon\Acl\AdapterInterface::dropSubjectAccess to Phalcon\Acl\AdapterInterface::dropComponentAccess #13808
  • Renamed Phalcon\Acl\AdapterInterface::getActiveOperation to Phalcon\Acl\AdapterInterface::getActiveRole #13808
  • Renamed Phalcon\Acl\AdapterInterface::getActiveSubject to Phalcon\Acl\AdapterInterface::getActiveComponent #13808
  • Renamed Phalcon\Acl\AdapterInterface::getOperationss to Phalcon\Acl\AdapterInterface::getRoles #13808
  • Renamed Phalcon\Acl\AdapterInterface::getSubjects to Phalcon\Acl\AdapterInterface::getComponents #13808
  • Renamed Phalcon\Acl\Adapter::getActiveOperation to Phalcon\Acl\AdapterInterface::getActiveRole #13808
  • Renamed Phalcon\Acl\Adapter::getActiveSubject to Phalcon\Acl\AdapterInterface::getActiveComponent #13808
  • Renamed Phalcon\Acl\Adapter\Memory::addOperation to Phalcon\Acl\Adapter\Memory::addRole #13808
  • Renamed Phalcon\Acl\Adapter\Memory::isOperation to Phalcon\Acl\Adapter\Memory::isRole #13808
  • Renamed Phalcon\Acl\Adapter\Memory::isSubject to Phalcon\Acl\Adapter\Memory::isComponent #13808
  • Renamed Phalcon\Acl\Adapter\Memory::addSubject to Phalcon\Acl\Adapter\Memory::addComponent #13808
  • Renamed Phalcon\Acl\Adapter\Memory::addSubjectAccess to Phalcon\Acl\Adapter\Memory::addComponentAccess #13808
  • Renamed Phalcon\Acl\Adapter\Memory::dropSubjectAccess to Phalcon\Acl\Adapter\Memory::dropComponentAccess #13808
  • Renamed Phalcon\Acl\Adapter\Memory::getOperationss to Phalcon\Acl\Adapter\Memory::getRoles #13808
  • Renamed Phalcon\Acl\Adapter\Memory::getSubjects to Phalcon\Acl\Adapter\Memory::getComponents #13808
  • Renamed Phalcon\Mvc\Url to Phalcon\Url #13742
  • Renamed Phalcon\Mvc\UrlInterface to Phalcon\UrlInterface #13742
  • Renamed Phalcon\Mvc\Url\Exception to Phalcon\Url\Exception #13742

Removed

  • Removed the CSS/JS minifiers. This affects the Assets\Filter classes. For now the classes return the original content. #13819, #10118
  • Removed Phalcon\Queue namespace and tests. Beanstalkd is near being abandoned. A new Queue component/adapter will be implemented for queueing needs of the community. #13364

v3.4.3

24 Feb 23:07
08e7bfc
Compare
Choose a tag to compare
  • Provided PHP 7.3 support #13847

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