Releases: phalcon/cphalcon
Releases · phalcon/cphalcon
v4.0.0-alpha.4
Added
- Added
delimiter
andenclosure
options toPhalcon\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 bothRequest
andResponse
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 implementingArrayAccess
,Countable
,IteratorAggregate
,JsonSerializable
,Serializable
, offering an easy way to handle collections of data such as arrays, superglobals etc. #13886 - Added
Phalcon\Collection
, inPhalcon\Http\Message\Request
andPhalcon\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 byevaluateImage()
). Improved imagick compatibility. #13911 - Fixed Assets Manager hard reference to \Phalcon\Tag, should use DI #12261
Changed
- Refactored
Phalcon\Registry
to use thePhalcon\Collection
class #13893 - Refactored
Phalcon\Session\Bag
to use thePhalcon\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
Added
- Added
view:afterCompile
andview:beforeCompile
events for the Volt compiler #2182 - Added array merge support to
Phalcon\Config::merge
- Added
setBlacklist
inPhalcon\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
inphalcon.so
when using docker #13143 - Fixed storing related model data in
Phalcon\Messages\Message
. The method is nowsetMetadata
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
toPhalcon\Acl\Component
#13808 - Renamed
Phalcon\Acl\SubjectInterface
toPhalcon\Acl\ComponentInterface
#13808 - Renamed
Phalcon\Acl\SubjectAware
toPhalcon\Acl\ComponentAware
#13808 - Renamed
Phalcon\Acl\Operation
toPhalcon\Acl\Role
#13808 - Renamed
Phalcon\Acl\OperationInterface
toPhalcon\Acl\RoleInterface
#13808 - Renamed
Phalcon\Acl\OperationAware
toPhalcon\Acl\RoleAware
#13808 - Renamed
Phalcon\Acl\AdapterInterface::addOperation
toPhalcon\Acl\AdapterInterface::addRole
#13808 - Renamed
Phalcon\Acl\AdapterInterface::isOperation
toPhalcon\Acl\AdapterInterface::isRole
#13808 - Renamed
Phalcon\Acl\AdapterInterface::isSubject
toPhalcon\Acl\AdapterInterface::isComponent
#13808 - Renamed
Phalcon\Acl\AdapterInterface::addSubject
toPhalcon\Acl\AdapterInterface::addComponent
#13808 - Renamed
Phalcon\Acl\AdapterInterface::addSubjectAccess
toPhalcon\Acl\AdapterInterface::addComponentAccess
#13808 - Renamed
Phalcon\Acl\AdapterInterface::dropSubjectAccess
toPhalcon\Acl\AdapterInterface::dropComponentAccess
#13808 - Renamed
Phalcon\Acl\AdapterInterface::getActiveOperation
toPhalcon\Acl\AdapterInterface::getActiveRole
#13808 - Renamed
Phalcon\Acl\AdapterInterface::getActiveSubject
toPhalcon\Acl\AdapterInterface::getActiveComponent
#13808 - Renamed
Phalcon\Acl\AdapterInterface::getOperationss
toPhalcon\Acl\AdapterInterface::getRoles
#13808 - Renamed
Phalcon\Acl\AdapterInterface::getSubjects
toPhalcon\Acl\AdapterInterface::getComponents
#13808 - Renamed
Phalcon\Acl\Adapter::getActiveOperation
toPhalcon\Acl\AdapterInterface::getActiveRole
#13808 - Renamed
Phalcon\Acl\Adapter::getActiveSubject
toPhalcon\Acl\AdapterInterface::getActiveComponent
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::addOperation
toPhalcon\Acl\Adapter\Memory::addRole
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::isOperation
toPhalcon\Acl\Adapter\Memory::isRole
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::isSubject
toPhalcon\Acl\Adapter\Memory::isComponent
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::addSubject
toPhalcon\Acl\Adapter\Memory::addComponent
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::addSubjectAccess
toPhalcon\Acl\Adapter\Memory::addComponentAccess
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::dropSubjectAccess
toPhalcon\Acl\Adapter\Memory::dropComponentAccess
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::getOperationss
toPhalcon\Acl\Adapter\Memory::getRoles
#13808 - Renamed
Phalcon\Acl\Adapter\Memory::getSubjects
toPhalcon\Acl\Adapter\Memory::getComponents
#13808 - Renamed
Phalcon\Mvc\Url
toPhalcon\Url
#13742 - Renamed
Phalcon\Mvc\UrlInterface
toPhalcon\UrlInterface
#13742 - Renamed
Phalcon\Mvc\Url\Exception
toPhalcon\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
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