发布于 2016-07-30 00:19:18 | 106 次阅读 | 评论: 0 | 来源: 网友投递
Phalcon开源PHP框架
PhalconPHP 是一个使用 C 扩展开发的 PHP Web 框架,提供高性能和低资源占用。
PhalconPHP 3.0.0 正式发布了,由于新版BC问题,根据semver,2.1.x不再发布,改为3.0.0。
下载地址:
https://github.com/phalcon/cphalcon/archive/v3.0.0.tar.gz
更新日志:
PHP 5.3 and 5.4 are now fully deprecated
PhalconMvcModelValidation is now deprecated in favor of PhalconValidation
Changed default hash algorithm in PhalconSecurity to CRYPT_BLOWFISH_Y
Changed constructor of PhalconMvcModel to allow pass an array of initialization data
Removed support for prefixes strategy in PhalconLoader
Now PhalconMvcView supports many views directories at the same time
An absolute path can now be used to MvcView::setLayoutsDir
Fixed odd view behavior#1933 related to setLayout() and pick()
PhalconDi is now bound to services closures allowing use PhalconDi as $this to access services within them
If an object is returned after firing the event beforeServiceResolve in PhalconDi this overrides the default service localization process
Placeholders :controller and :action in MvcRouter now defaults to /([\w0-9\_\-]+) instead of /([\a-zA-Z0-9\_\-]+)
Modifier #u (PCRE_UTF8) is now default in regex based routes in MvcRouter
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 MvcMicro handler takes it as the body of the response
MvcRouterRoute now escapes characters such as . or + to avoid unexpected behaviors
Closures used as handlers inMvcMicro are now bound to the $app instance
Routes now can have an associated callback that can override the default dispatcher + view behavior
PhalconMvcModel now implements JsonSerializable making easy serialize model instances
When destructing a MvcModelManager PHQL cache is clean
Method isSetOption in PhalconValidationValidatorInterface marked as deprecated, please use hasOption
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 method PhalconHttpResponse::setJsonContent
Now PhalconEventsEvent implements PhalconEventsEventInterface
PhalconEventsEvent::getCancelable renamed to PhalconEventsEvent::isCancelable
Removed PhalconEventsManager::dettachAll in favor of PhalconEventsManager::detachAll
PhalconMvcModelCriteria::getOrder renamed to PhalconMvcModelCriteria::getOrderBy
Added method getOption() in PhalconMvcModelRelationInterface
Added ability to spoof HTTP request method
Added FULLTEXT index type to PhalconDbAdapterPdoMysql
Fixed the use of the annotation router with namespaced controllers
Added PhalconAclRoleAware and PhalconAclResourceAware Interfaces, Now you can pass objects to PhalconAclAdapterInterface::isAllowed as roleName and resourceName, also they will be automatically passed to function defined in PhalconAclAdapterInterface::allow or PhalconAclAdapterInterface::deny by type
PhalconAclAdapterInterface::allow and PhalconAclAdapterInterface::deny have 4th argument - function, which will be called when using PhalconAclAdapterInterface::isAllowed
PhalconAclAdapterInterface::isAllowed have 4th argument - parameters, you can pass arguments for function defined in PhalconAclAdapterInterface:allow or PhalconAclAdapterInterface::deny as associative array where key is argument name
Added method getActionSuffix() in PhalconDispatcherInterface
CLI parameters are now handled consistently.
Added PhalconMvcControllerBindModelInterface and associated model type hint loading through dispatcher.
Added PhalconDispatcher::hasParam().
PhalconCliConsole and PhalconMvcApplication now inherit PhalconApplication.
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 PhalconCliDispatcherInterface, PhalconCliTaskInterface, PhalconCliRouterInterface and PhalconCliRouterRouteInterface.
Added PhalconMvcCollection::update, PhalconMvcCollection::create and PhalconMvcCollection::createIfNotExist
Removed __construct from all interfaces #11410
Fires the dispatch:beforeException event when there is any exception during dispatching #11458
Added OR operator for PhalconMvcModelQueryBuilder methods: betweenWhere, notBetweenWhere, inWhere and notInWhere
Fixed bug of destroy method of PhalconSessionAdapterLibmemcached
Added PhalconCacheBackendMemcache::addServers to enable pool of servers for memcache
Added setLastModified method to PhalconHttpResponse
Added PhalconValidationValidatorDate
Added PhalconQueueBeanstalk::ignore() It removes the named tube from the watch list for the current connection.
Added PhalconQueueBeanstalk::pauseTube() Can delay any new job being reserved for a given time.
Added PhalconQueueBeanstalk::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 PhalconQueueBeanstalk::listTubeUsed() Returns the tube currently being used by the client.
Added PhalconQueueBeanstalk::listTubesWatched() Returns a list tubes currently being watched by the client.
Added PhalconQueueBeanstalk::peekDelayed() Return the delayed job with the shortest delay left.
Added PhalconQueueBeanstalk::jobPeek() Return job.
Mcrypt is replaced with openssl in PhalconCrypt
Default encrypt algorithm in PhalconCrypt is now changed to AES-256-CFB
Removed methods setMode(), getMode(), getAvailableModes() in PhalconCryptInterface
Added PhalconAssetsManager::exists() to check if collection exists
PhalconMvcModelManager::load() now can load models from aliased namespaces
PhalconMvcModelTransactionManager now correctly keeps account of transactions #11554
PhalconDbDialectSqlite now maps additional column types to SQLite columns equivalents.
PhalconSecurity is using now PhalconSecurityRandom
Enforced that PhalconSecurity::getToken() and PhalconSecurity::getTokenKey() return a random value per request not per call
PhalconSecurity::getToken() and PhalconSecurity::getTokenKey() are using now PhalconSecurity::_numberBytes instead of passed as a argument or hardcoded value
PhalconSecurity::hash() corrected not working CRYPT_STD_DES, CRYPT_EXT_DES, MD5, CRYPT_SHA256
PhalconSecurity::hash() CRYPT_SHA512 fixed wrong salt length
Added missing unit-tests for PhalconSecurity
Fixed Filter::add method handler #11581
Removed PhalconSession #11340
PhalconTag::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 PhalconMvcModelQueryBuilder::getJoins() - to get join parts from query builder
Fixed PhalconDbDialectOracle::prepareTable() to correctly generate SQL for table aliases #11799
Fixed PhalconMvcModelResultset::update() - removed endless loop queries
The cache backend adapters now returns boolean on call PhalconCacheBackendInterface::save
Fixed the Session write callback #11733
Added 'PhalconLoader::registerFiles' & 'PhalconLoader::getFiles'. This allows you to add files to the autoloader
Added PhalconSecurity::hasLibreSsl and PhalconSecurity::getSslVersionNumber
Added new setter PhalconEscaper::setDoubleEncode() - to allow setting/disabling double encoding
Added PhalconCacheFrontendMsgpack - Added Msgpack Support for Frontend Cache
PhalconDebugDump 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 in PhalconValidationValidatorUniqueness.
PhalconValidationValidatorAlpha now correctly validates non-ASCII characters #11386
PhalconValidationValidatorDigit now correctly validates digits #11374
Added PhalconValidationCombinedFieldsValidator, validation will pass array of fields to this validator if needed
Added ability to autoescape Flash messages #11448
Fixed PhalconConfig::merge for working with php7
Added ability to use custom delimiter for PhalconText::camelize and PhalconText::uncamelize #10396
Added support of CONNECT, TRACE and PURGE HTTP methods
Refactored PhalconHttpRequest::getHttpHost. Now it always return host name or empty string. Optionally validates and clean host name #2573
Added PhalconHttpRequest::getPort. To get information about the port on which the request is made.
Added PhalconHttpRequest::setStrictHostCheck and PhalconHttpRequest::isStrictHostCheck to manage strict validation of host name.
Fixed matching host name by PhalconMvcRoute::handle when using port on current host name #2573
Fixed PhalconText:dynamic() to allow custom separator #11215
Fixed PhalconValidation::appendMessage to allow append message to the empty stack #10405
Fixed PhalconSessionFlash::getMessages. Now it returns an empty array in case of non existent message type request #11941
Amended PhalconMvcRouterInterface and PhalconMvcRouter. Added missed addPurge, addTrace and addConnect methods
Fixed incorrect query when using NULL fields with PhalconValidationValidatorUniqueness
Fixed PhalconFormsForm::getValue. Now Elements can have names that match with the internal Form getters #10398
Add setContentLength() method to PhalconHttpResponse
Fixed PhalconMvcModelManager::_mergeFindParameters - Merging conditions #11987
Renamed PhalconHttpRequest::isSoapRequest to PhalconHttpRequest::isSoap and PhalconHttpRequest::isSecureRequest to PhalconHttpRequest::isSecure. Left the originals functions as aliases and marked them deprecated.
Fixed wildcard inheritance in PhalconAclAdapterMemory #12004
Dropped support of Oracle #12008
Improved PhalconMvcCollection::findById. Added check if a id in a valid format #12010
Added convert option to PhalconValidationValidatorUniqueness to convert values to do the database lookup #12005