Releases: phalcon/cphalcon
Releases · phalcon/cphalcon
v4.0.0-alpha.2
Added
- Added
notFound()
method inPhalcon\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
andPhalcon\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 usingPhalcon\Http\Request::getFilteredQuery
,Phalcon\Http\Request::getFilteredPost
andPhalcon\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 asnull
when they could be0
,false
or emptystring
. #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 asnull
when they could be0
,false
or emptystring
. #13497 - Fixed
Phalcon\Mvc\View\Engine\Volt\Compiler::functionCall
building the incorrect code for the following tags;select
, andselect_static
#13459 - Fixed
Phalcon\Tag\Select
not rendering without any options.
Changed
- Changed the
Phalcon\Tag::renderTitle()
parameters such asPhalcon\Tag::getTitle()
#13706 - Changed the
Phalcon\Html\Tag::renderTitle()
parameters such asPhalcon\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 constructortriggerError
. This will trigger an error if the key is not found #13007 - Changed the default action of
Phalcon\Acl\Memory
to beAcl::DENY
instead ofAcl::ALLOW
#13758 - Changed
Phalcon\Mvc\User\Plugin
toPhalcon\Plugin
#13749 - Changed
Phalcon\Exception
to implement\Throwable
interface.#13750 - Changed
Phalcon\Http\Cookie
. ThehttpOnly
property is no longer initialised with a value #13464 - Changed the default action for no arguments of
Phalcon\Acl\Memory
to beAcl::DENY
instead ofAcl::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
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 callingPhalcon\Mvc\Router\Group::add
will return an instance that hasconvert
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
andPhalcon\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 toPhalcon\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 settingcaseInsensitiveColumnMap
key in\Phalcon\Mvc\Model::setup()
. #11802 - Added the ability to use FrontendInterface to serialize Model and ResultSet - Inject a
serializer
object which implementsFrontendInterface
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
andresponse::afterSendHeaders
toPhalcon\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 replacePhalcon\Tag
in a future version. This component does not use static method calls. #12392 - Added
Phalcon\Paginator\RepositoryInterface
for repository the current state ofpaginator
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 asPhalcon\Mvc\Model\Query
;getBindParams
,setBindParams
,getBindTypes
andsetBindTypes
. #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 thePhalcon\DI
implementing PSR-11 #12295 - Added
Phalcon\Acl\Adapter\Memory::getActiveKey
,Phalcon\Acl\Adapter\Memory::activeFunctionCustomArgumentsCount
andPhalcon\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
andstatsKey
thePhalcon\Cache\Backend\Redis::queryKeys
no longer returns prefixed keys, now it returns original keys without prefix. #13656 - The
Phalcon\Mvc\Application
,Phalcon\Mvc\Micro
andPhalcon\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
toThrowable
#12288 - Changed
Phalcon\Mvc\Model\Query\Builder::addFrom
to remove third parameter$with
#13109 Phalcon\Forms\Form::clear
will no longer callPhalcon\Forms\Element::clear
, instead it will clear/set default value itself, andPhalcon\Forms\Element::clear
will now callPhalcon\Forms\Form::clear
if it's assigned to the form, otherwise it will just clear itself. [#13500](https://gith...
v3.4.2
- 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'sprepare
andexecute
andPhalcon\Db\Adapter::fetchAll
to use PDO'sfetchAll
- Fixed
Phalcon\Validation\Validator\Numericality
to accept float numbers on locales with comma decimal point #13450 - Fixed
Phalcon\Tag
so it unsetsparameters
before passing options array toself::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 usePhalcon\Db\RawValue
as an empty container forisAllowEmpty
option #13549, #13573, #12519 - Fixed object binding and placeholder creation in
Phalcon\Db\Adapter::insert
andPhalcon\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
- 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
andPhalcon\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
- Added
Phalcon\Mvc\Router::attach
to addRoute
object directly intoRouter
#13326 - Added the ability to listen
request:beforeAuthorizationResolve
andrequest:afterAuthorizationResolve
events. This ability enables using custom authorization resolvers #13327 - Added call event
afterFetch
inPhalcon\Mvc\Model:refresh
#12220 - Added
Phalcon\Http\Response::getReasonPhrase
to retrieve the reason phrase from theStatus
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 callsetCipher
oruseSigning
explicitly #13379 - Added
Phalcon\Crypt\Mismatch
. Exceptions thrown inPhalcon\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 throwPhalcon\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
andPhalcon\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
- 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 foreach()
inPhalcon\Debug\Dump
#13253
v3.3.1
v3.3.0
- 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 toRouter::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 withBOOLEAN
types #13132 - Fixed
Phalcon\Db\Dialect\Postgresql::_castDefault
to return correct value forBOOLEAN
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 withPhalcon\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
v3.2.3
- 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