Version 3.0.0
andresgutierrez
released this
29 Jul 19:26
·
8453 commits
to master
since this release
- PHP 5.3 and 5.4 are now fully deprecated
Phalcon\Mvc\Model\Validation
is now deprecated in favor ofPhalcon\Validation
- Changed default hash algorithm in
Phalcon\Security
toCRYPT_BLOWFISH_Y
- Changed constructor of
Phalcon\Mvc\Model
to allow pass an array of initialization data - Removed support for prefixes strategy in
Phalcon\Loader
- Now
Phalcon\Mvc\View
supports many views directories at the same time - An absolute path can now be used to
Mvc\View::setLayoutsDir
- Fixed odd view behavior#1933 related to setLayout() and pick()
Phalcon\Di
is now bound to services closures allowing usePhalcon\Di
as $this to access services within them- If an object is returned after firing the event
beforeServiceResolve
inPhalcon\Di
this overrides the
default service localization process - Placeholders
:controller
and:action
inMvc\Router
now defaults to/([\\w0-9\\_\\-]+)
instead of/([\\a-zA-Z0-9\\_\\-]+)
- Modifier
#u
(PCRE_UTF8) is now default in regex based routes inMvc\Router
- Return 'false' from an action disables the view component (same as
$this->view->disable()
) - Return a string from an action takes it as the body of the response (same as return
$this->response->setContent('Hello world')
) - Return a string from an
Mvc\Micro
handler takes it as the body of the response Mvc\Router\Route
now escapes characters such as . or + to avoid unexpected behaviors- Closures used as handlers in
Mvc\Micro
are now bound to the $app instance - Routes now can have an associated callback that can override the default dispatcher + view behavior
Phalcon\Mvc\Model
now implementsJsonSerializable
making easy serialize model instances- When destructing a
Mvc\Model\Manager
PHQL cache is clean - Method
isSetOption
inPhalcon\Validation\ValidatorInterface
marked as deprecated, please usehasOption
- Added internal check "allowEmpty" before calling a validator. If it option is true and the value of empty, the validator is skipped
- Added default header:
Content-Type: "application/json; charset=UTF-8"
in methodPhalcon\Http\Response::setJsonContent
- Now
Phalcon\Events\Event
implementsPhalcon\Events\EventInterface
Phalcon\Events\Event::getCancelable
renamed toPhalcon\Events\Event::isCancelable
- Removed
Phalcon\Events\Manager::dettachAll
in favor ofPhalcon\Events\Manager::detachAll
Phalcon\Mvc\Model\Criteria::getOrder
renamed toPhalcon\Mvc\Model\Criteria::getOrderBy
- Added method
getOption()
inPhalcon\Mvc\Model\RelationInterface
- Added ability to spoof HTTP request method
- Added FULLTEXT index type to
Phalcon\Db\Adapter\Pdo\Mysql
- Fixed the use of the annotation router with namespaced controllers
- Added
Phalcon\Acl\RoleAware
andPhalcon\Acl\ResourceAware
Interfaces, Now you can pass objects toPhalcon\Acl\AdapterInterface::isAllowed
asroleName
andresourceName
, also they will be automatically passed to function defined inPhalcon\Acl\AdapterInterface::allow
orPhalcon\Acl\AdapterInterface::deny
by type Phalcon\Acl\AdapterInterface::allow
andPhalcon\Acl\AdapterInterface::deny
have 4th argument - function, which will be called when usingPhalcon\Acl\AdapterInterface::isAllowed
Phalcon\Acl\AdapterInterface::isAllowed
have 4th argument - parameters, you can pass arguments for function defined inPhalcon\Acl\AdapterInterface:allow
orPhalcon\Acl\AdapterInterface::deny
as associative array where key is argument name- Added method
getActionSuffix()
inPhalcon\DispatcherInterface
- CLI parameters are now handled consistently.
- Added
Phalcon\Mvc\Controller\BindModelInterface
and associated model type hint loading through dispatcher. - Added
Phalcon\Dispatcher::hasParam()
. Phalcon\Cli\Console
andPhalcon\Mvc\Application
now inheritPhalcon\Application
.- Fixed
afterFetch
event not being sent to behaviors - Fixed issue with radio not being checked when default value is 0 #11358
- Fixed issue with
Model::__set
that was bypassing setters #11286 - Fixed issue with
Model::__set
that was setting hidden attributes directly when setters are not declared #11286 - Added
Phalcon\Cli\DispatcherInterface
,Phalcon\Cli\TaskInterface
,Phalcon\Cli\RouterInterface
andPhalcon\Cli\Router\RouteInterface
. - Added
Phalcon\Mvc\Collection::update
,Phalcon\Mvc\Collection::create
andPhalcon\Mvc\Collection::createIfNotExist
- Removed
__construct
from all interfaces #11410 - Fires the
dispatch:beforeException
event when there is any exception during dispatching #11458 - Added
OR
operator forPhalcon\Mvc\Model\Query\Builder
methods:betweenWhere
,notBetweenWhere
,inWhere
andnotInWhere
- Fixed bug of
destroy
method ofPhalcon\Session\Adapter\Libmemcached
- Added
Phalcon\Cache\Backend\Memcache::addServers
to enable pool of servers for memcache - Added
setLastModified
method toPhalcon\Http\Response
- Added
Phalcon\Validation\Validator\Date
- Added
\Phalcon\Queue\Beanstalk::ignore()
It removes the named tube from the watch list for the current connection. - Added
\Phalcon\Queue\Beanstalk::pauseTube()
Can delay any new job being reserved for a given time. - Added
\Phalcon\Queue\Beanstalk::kick()
It moves jobs into the ready queue. If there are any buried jobs, it will only kick buried jobs. Otherwise it will kick delayed jobs. - Added
\Phalcon\Queue\Beanstalk::listTubeUsed()
Returns the tube currently being used by the client. - Added
\Phalcon\Queue\Beanstalk::listTubesWatched()
Returns a list tubes currently being watched by the client. - Added
\Phalcon\Queue\Beanstalk::peekDelayed()
Return the delayed job with the shortest delay left. - Added
\Phalcon\Queue\Beanstalk::jobPeek()
Return job. - Mcrypt is replaced with openssl in
Phalcon\Crypt
- Default encrypt algorithm in
Phalcon\Crypt
is now changed toAES-256-CFB
- Removed methods setMode(), getMode(), getAvailableModes() in
Phalcon\CryptInterface
- Added
Phalcon\Assets\Manager::exists()
to check if collection exists Phalcon\Mvc\Model\Manager::load()
now can load models from aliased namespacesPhalcon\Mvc\Model\Transaction\Manager
now correctly keeps account of transactions #11554Phalcon\Db\Dialect\Sqlite
now maps additional column types to SQLite columns equivalents.Phalcon\Security
is using nowPhalcon\Security\Random
- Enforced that
Phalcon\Security::getToken()
andPhalcon\Security::getTokenKey()
return a random value per request not per call Phalcon\Security::getToken()
andPhalcon\Security::getTokenKey()
are using nowPhalcon\Security::_numberBytes
instead of passed as a argument or hardcoded valuePhalcon\Security::hash()
corrected not working CRYPT_STD_DES, CRYPT_EXT_DES, MD5, CRYPT_SHA256Phalcon\Security::hash()
CRYPT_SHA512 fixed wrong salt length- Added missing unit-tests for
Phalcon\Security
- Fixed
Filter::add
method handler #11581 - Removed
Phalcon\Session
#11340 - Phalcon\Tag::getTitle() shows a title depending on prependTitle and appendTitle
- Using a settable variable for the Mongo Connection Service name instead of a hard coded string #11725
- Added new getter
Phalcon\Mvc\Model\Query\Builder::getJoins()
- to get join parts from query builder - Fixed
Phalcon\Db\Dialect\Oracle::prepareTable()
to correctly generate SQL for table aliases #11799 - Fixed
Phalcon\Mvc\Model\Resultset::update()
- removed endless loop queries - The cache backend adapters now returns boolean on call
Phalcon\Cache\BackendInterface::save
- Fixed the Session write callback #11733
- Added '\Phalcon\Loader::registerFiles' & '\Phalcon\Loader::getFiles'. This allows you to add files to the autoloader
- Added
Phalcon\Security::hasLibreSsl
andPhalcon\Security::getSslVersionNumber
- Added new setter
Phalcon\Escaper::setDoubleEncode()
- to allow setting/disabling double encoding - Added
Phalcon\Cache\Frontend\Msgpack
- Added Msgpack Support for Frontend Cache Phalcon\Debug\Dump
skip debugging di, fix detecting private/protected properties- Added option to validate multiple fields with one validator(fix uniqueness validator as well), also removes unnecessary
model => $this
inPhalcon\Validation\Validator\Uniqueness
. Phalcon\Validation\Validator\Alpha
now correctly validates non-ASCII characters #11386Phalcon\Validation\Validator\Digit
now correctly validates digits #11374- Added
Phalcon\Validation\CombinedFieldsValidator
, validation will pass array of fields to this validator if needed - Added ability to autoescape Flash messages #11448
- Fixed
Phalcon\Config::merge
for working with php7 - Added ability to use custom delimiter for
Phalcon\Text::camelize
andPhalcon\Text::uncamelize
#10396 - Added support of
CONNECT
,TRACE
andPURGE
HTTP methods - Refactored
Phalcon\Http\Request::getHttpHost
. Now it always return host name or empty string. Optionally validates and clean host name #2573 - Added
Phalcon\Http\Request::getPort
. To get information about the port on which the request is made. - Added
Phalcon\Http\Request::setStrictHostCheck
andPhalcon\Http\Request::isStrictHostCheck
to manage strict validation of host name. - Fixed matching host name by
Phalcon\Mvc\Route::handle
when using port on current host name #2573 - Fixed
Phalcon\Text:dynamic()
to allow custom separator #11215 - Fixed
Phalcon\Validation::appendMessage
to allow append message to the empty stack #10405 - Fixed
Phalcon\Session\Flash::getMessages
. Now it returns an empty array in case of non existent message type request #11941 - Amended
Phalcon\Mvc\RouterInterface
andPhalcon\Mvc\Router
. Added missedaddPurge
,addTrace
andaddConnect
methods - Fixed incorrect query when using NULL fields with
Phalcon\Validation\Validator\Uniqueness
- Fixed
Phalcon\Forms\Form::getValue
. Now Elements can have names that match with the internal Form getters #10398 - Add
setContentLength()
method toPhalcon\Http\Response
- Fixed
Phalcon\Mvc\Model\Manager::_mergeFindParameters
- Merging conditions #11987 - Renamed
Phalcon\Http\Request::isSoapRequest
toPhalcon\Http\Request::isSoap
andPhalcon\Http\Request::isSecureRequest
toPhalcon\Http\Request::isSecure
. Left the originals functions as aliases and marked them deprecated. - Fixed wildcard inheritance in
Phalcon\Acl\Adapter\Memory
#12004 - Dropped support of Oracle #12008
- Improved
Phalcon\Mvc\Collection::findById
. Added check if aid
in a valid format #12010 - Added
convert
option toPhalcon\Validation\Validator\Uniqueness
to convert values to do the database lookup #12005