We are very happy to announce the release of v4.0.0 Release Candidate (RC) 1!.
We cannot thank your community enough! We said this before but it is worth repeating: our community is what drives this project forward and makes it better with every release!
As we are getting closer to the stable version of v4, this release has addressed a good number of outstanding issues, but also bugs found during testing. We only have one actual issue to resolve for v4 and 33 documents to revise.
You can see the remaining cards for v4 in our project page.
Regarding the documents, you can check our progress in this issue:
https://github.com/phalcon/docs/issues/2322
In this version we are using Zephir 0.12.4 which offers a lot stricter type checks. As a result we have discovered a lot of interface to class misalignments and have fixed them.
We are also working to upgrade all of our sample applications to v4. Vokuro is nearly completed (minor enhancements remain such as code coverage) and work is already underway for phalcon-api.
Changelog
Added
- Added optional boolean parameter to
Phalcon\Http\Request::getURI()(as well as its interface) which indicates whether or not the method should return only the path without the query string
Changed
- Changed
Phalcon\Url::getto use implementation behindPhalcon\Helper\Str::reduceSlashesto reduce slashes #14331 - Changed
Phalcon\Http\Headers\set()to return self for a more fluent interface - Changed
Phalcon\Assets\Manager,Phalcon\Cli\Router,Phalcon\Dispatcher\AbstractDispatcher,Phalcon\Html\Tag,Phalcon\Http\Cookie,Phalcon\Http\Request,Phalcon\Http\Response\Cookies,Phalcon\Mvc\Model,Phalcon\Mvc\Router,Phalcon\Security,Phalcon\Session\Managerto usePhalcon\Di\AbstractDiAwarefor container functionality #14351 - Changed
Phalcon\Securityto allowsessionandrequestin the constructor #14351 - Changed
Phalcon\Session\Managerto allowrouterin the constructor #14351 - Changed
Phalcon\Flash\Directto allowescaperin the constructor #14349 - Changed
Phalcon\Flash\Sessionto allowescaperin the constructor #14349 - Changed
Phalcon\Di\AbstractDIAwaretoPhalcon\Di\AbstractInjectionAware#14359 - Changed
Phalcon\Di\Serviceto use DI to initializestringbased services when possible #14342 - Changed
Phalcon\Mvc\Router\Annotationsto be able to handle patterns az prefixes #14259 - Changed
Phalcon\Mvc\Router\Group::routesto an array as default #14259 - Changed
Phalcon\Mvc\Model::assignchanged order of parameters to $data, $whiteList, $dataColumnMap #14386 - Changed
Phalcon\Helper\Arr::arrayToObjecttotoObject#14389 - Changed
Phalcon\Events\EventsAwareInterface::getEventsManagerandPhalcon\Di\Injectable::getEventsManagerto return alsonull#14404 - Changed
Phalcon\Logger\Adapter\AbstractAdapter::addto now returnthis#14404 - Changed
Phalcon\Mvc\RouterInterfacemethods signature to returnRouteInterfaceinstead ofvoid:Phalcon\Mvc\RouterInterface::setDefaultActionPhalcon\Mvc\RouterInterface::setDefaultActionPhalcon\Mvc\RouterInterface::setDefaultControllerPhalcon\Mvc\RouterInterface::setDefaultModulePhalcon\Mvc\RouterInterface::setDefaults
- Changed return types for following interfaces:
Phalcon\Mvc\Router\RouteInterface::setNamefromvoidtoRouteInterfacePhalcon\Mvc\Router\RouteInterface::viafromvoidtoRouteInterfacePhalcon\Session\ManagerInterface::__getfromvoidtovar
Fixed
- Fixed
Phalcon\Helper\Str::includesto return correct result #14301 - Fixed
Phalcon\Loggermoved to correct namespace #14263 - Fixed
Phalcon\Session\Adapter\AbstractAdapter::read()to return ““(empty string) whenSession/Adapter/*::get()returns null #14314 - Fixed
Phalcon\Cache\Exceptionto extend Phalcon\Exception - Fixed
Phalcon\Cache\InvalidArgumentExceptionto extend Phalcon\Exception - Fixed
Phalcon\Collection\Exceptionto extend Phalcon\Exception - Fixed
Phalcon\Storage\Adapter\AbstractAdapter::initSerializerto throw exception ifnull === $this->serializerFactory && null === $this->serializer#14324 - Fixed
Phalcon\Storage\Adapter\Redis::getAdapter()to provide a persistent id for redis persistent connection #14334 - Fixed
Phalcon\Session\Adapter\Streamto not override configured save path #14265 - Fixed
Phalcon\Http\Response::setFileToSendto properly handle non-ASCII filenames #13919 - Fixed
Phalcon\Security::getSessionTokenreturn value #14346 - Fixed
Phalcon\Flash\*interfaces formessage()to returnstring/null#14349 - Fixed
Phalcon\Paginator\Adapter\AbstractAdapterthrow exception iflimit <= 0#14303 - Fixed
Phalcon\Mvc\Model\Query\BuilderEmpty table alias in query #14366 - Fixed
Phalcon\Db\Adapter\PdoFactoryto reference the correct interface #14381 - Fixed
Phalcon\Db\Dialect\MysqlFixed missing schema in constraint for create table #14378 - Fixed
Phalcon\Mvc\Model::hasChanged()andgetChangedFields()returning false values whencastOnHydrateoption is on. #14376 - Fixed
Phalcon\Mvc\Model::create()Using write connection to prevent replica lag #14256 - Fixed return types for following methods to satisfy interface declaration:
Phalcon\Acl\Adapter\AbstractAdapter::setDefaultActionPhalcon\Application\AbstractApplication::setEventsManagerPhalcon\Firewall\Adapter\AbstractAdapter::setAlwaysResolvingRolePhalcon\Firewall\Adapter\AbstractAdapter::setEventsManagerPhalcon\Mvc\Router::handlePhalcon\Storage\Serializer\AbstractSerializer::getDataPhalcon\Storage\Serializer\AbstractSerializer::setDataPhalcon\Mvc\Dispatcher::forwardPhalcon\Mvc\Model::setConnectionServicePhalcon\Mvc\Model::setReadConnectionServicePhalcon\Mvc\Model::setWriteConnectionServicePhalcon\Mvc\Model\Query\Builder::setDIPhalcon\Mvc\Router\Annotations::handlePhalcon\Session\Bag::setPhalcon\Session\Manager::remove
- Fixed
Phalcon\Di::remove()to remove service. #14396
Removed
- Removed
Phalcon\Plugin- duplicate ofPhalcon\DI\Injectable#14359 - Removed
Phalcon\Mvc\Collectionand all related references. 4.0 will not support mongo as it is being re-implemented to take advantage of the latest Mongo driver (see #13697) #14361 - Removed
Phalcon\Session\Manager::registerHandler- duplicate functionality #14381 - Removed
Phalcon\Html\Tag- duplicate functionality #14381 - Removed
voidreturn type for all constructors #14401
Installation/Upgrade
The packages in packagecloud.io are being updated (at the time of this post) and will be ready soon. You will need to use the mainline repository to install v4.0.0-rc1. You can also download the zip file, as well as DLLs for Windows, from our release page here.
You can also clone the repository and checkout the tag, and then run
zephir fullclean
zephir build
to install the new extension. Detailed installation instructions can be found in our documentation page.
Note: It might take a bit of time for the DEB and RPM packages to be built from when this blog post is published.
Thank you
Once again a huge thank you to all of our contributors! You guys have helped us a lot. You can help us even more by installing this version and testing it. If you find bugs, please report them in our Github Issues page. Alternatively you can always join us in our Discord server or our Forum.
Finally, don’t forget to star our project on GitHub and follow us on our social media:
Chat - Q&A
Support
Social Media
Videos
<3 Phalcon Team