-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[NFR]: cphalcon - phalcon alignment #17055
Copy link
Copy link
Closed
Labels
5.0The issues we want to solve in the 5.0 releaseThe issues we want to solve in the 5.0 release6.0The issues we want to solve in the 6.0 releaseThe issues we want to solve in the 6.0 releasenew feature requestPlanned Feature or New Feature RequestPlanned Feature or New Feature Request
Metadata
Metadata
Assignees
Labels
5.0The issues we want to solve in the 5.0 releaseThe issues we want to solve in the 5.0 release6.0The issues we want to solve in the 6.0 releaseThe issues we want to solve in the 6.0 releasenew feature requestPlanned Feature or New Feature RequestPlanned Feature or New Feature Request
Type
Fields
Give feedbackNo fields configured for Feature.
Projects
StatusShow more project fields
Implemented
StatusShow more project fields
Implemented
Deep analysis reveals just above 100 divergences between cphalcon v5 and phalcon v6.
This is a tracking issue.
cphalcon vs phalcon Deep Dive: 120 Divergences
Acl
dropComponentAccessBUG in cphalcon (string arg silently ignored)fireManagerEventcall inisAllowed(cphalcon passesthisas data, phalcon passesnull)descriptiondefault value in Component/Role (nullvs'', return typestring|nullvsstring)isAllowedparameters default (nullvs[])accessGrantedassignment when no access found (nullvsfalse)activeKeywhen canAccess returns false (rawfalsevs converted tonull)instanceof ReflectionNamedType)funcvsfunctionsallowOrDenyvalidation approach (inline vs extracted method)firePsrEventmethod (cross-cutting)Application
getModuleexception type (ModuleNotRegisteredvs genericException)__constructacceptsContainer\Collectionin phalcon only__constructnull handling (cphalcon preserves existing, phalcon always overwrites)Assets
Asset::throwExceptionexception type (CannotReadAssetvs generic)Manager::getexception type (CollectionNotFoundvs generic)Managermissingexists()deprecated method in phalconManager::outputexception types (6 granular missing in phalcon)Manager::processParametersmissinghelper->reset()in phalconAutoload
setFileCheckingCallbackvalidation (cphalcon validates callable, phalcon accepts any string)checkDirectoriesvalidation (LoaderDirectoriesNotArrayvsTypeError)setFileCheckingCallbacknull closure signature (1 param vs 0 params)Cache
false, phalcontrue)checkKeyexception type (InvalidCacheKeyvsInvalidArgumentException)checkKeysmethod missing in phalcon (usesiterabletype hint instead)doGetMultipleRedis detection (instanceofvs exact class name)getExceptionClassabstract method missing in phalconCli
Console::setArgument--key=val=otherBUG in phalcon (explodeloses values after 2nd=)Console::handleexception types (4 granular missing)Console::handlerouter method name (getParametersvsgetParams)Console::handleContainer type awareness (acceptable)Config
Config::mergeexception for invalid input (InvalidMergeDatavsTypeError)Config::setPathDelimiternull acceptance (cphalcon allows null, phalcon doesn't)Config/Adapter/Iniexception type (CannotLoadConfigFilevs generic)Config/Adapter/Yamlexception types (MissingYamlExtension,CannotLoadConfigFilevs generic)Config/Adapter/JsonJSON error handling (cphalconDecodehelper throws, phalconjson_decodeswallows)Config/Adapter/Groupedinsensitive flag propagation (cphalcon propagates, phalcon doesn't)ConfigFactoryexception types (3 granular missing)ConfigFactory::newInstanceGrouped adapter default (cphalcon passes null, phalcon defaults'php')Contracts
Contracts/Db/ColumnmissinggetComment()in cphalconContracts/Db/Column::getTypeValuesreturn type (array|stringvsarray|string|int)Contracts/Db/DialectmissinglistViews()in cphalconContracts/Db/Dialect::dropTableschemaName required vs optionalContracts/Db/Result::fetchAllparameter count (0 vs 3)Contracts/Db/Result::fetchArrayreturn type (varvsarray)Db
Db/Adapter/AbstractAdapter::insertexception types (2 granular missing)Db/Adapter/AbstractAdapter::setupstatic method missing in phalconDb/Adapter/AbstractAdapter::createTableexception (TableMustHaveColumnvs generic)Db/ColumnmissingprocessColumnTypein cphalconDi
Di::getafterServiceResolve event can REPLACE instance -- MAJOR (phalcon captures return, cphalcon doesn't)Di::getinstance check after beforeServiceResolve (=== nullvs!is_object())Diexception types (ServiceCannotBeResolved,CircularAliasReference, etc.)DiArrayAccess methods (inline vsDiArrayAccessTrait)DiloadFromPhp/loadFromYaml/loadFromConfig (inline vsDiLoadTrait)Events -- MAJOR DIVERGENCE (B1: port cphalcon to phalcon)
fire()with no-colon event names (cphalcon throws, phalcon tries PSR-14 dispatch)fire()response reentrancy (cphalcon stashes/restores, phalcon clobbers)fireQueuevisibility (publicvsfinal protected)Dispatcher
AbstractDispatcherhandler hook caching (cphalcon caches, phalcon doesn't)AbstractDispatcherhandleException/throwDispatchException (dynamic calls in cphalcon)DispatcherInterfacemethod naming (getParameter/getParametersvsgetParam/getParams)Encryption
Crypt::isValidDecryptLengthstrlen vs mb_strlen -- BUG in phalconCryptexception types (10+ granular missing)Crypt::decrypthash length caching (cphalcon caches, phalcon recalculates)Cryptmethod name (decryptGetUnpaddedvsdecryptUnpadCbcEcb)mb_strlenvsstrlen-- SYSTEMATIC (4 classes affected)CryptInterface::decryptBase64/encryptBase64key parameter type (stringvsmixed)Security::hashcrypt/password_hash return not cast in cphalconToken/Parser::decodeHeadersJSON decoding inconsistency in phalconInvalidArgumentException)Securitygranular exception types (10+)Filter
Filter::FILTER_STRING_LEGACYconstant missing in phalconFilter::getexception type (FilterNotRegisteredvs generic)Validation::validatebeforeValidation/afterValidation argument count -- BEHAVIORAL (3 args vs 2)Validation::validatevalidator type validation (cphalcon guards, phalcon trusts)Validation::failsnull safety (cphalcon checks null, phalcon doesn't)Validation::setLabelsreturn type (voidvsstatic)Http
Http\Request::getServerArraymissing in phalcon (Category A3)Http\RequestimplementsEventsAwareInterfacein phalcon onlyHttp\Responseclass hierarchy (standalone vs extendsInjectable)Flash
AbstractFlash::prepareEscapedMessageescaper method name (escapeHtml()vshtml())AbstractFlash::getEscaperServiceexception and container logicAbstractFlash::outputMessagetype validation (FlashMessageNotStringOrArrayvsTypeError)Flash\Session::has()falsy vs strict null check -- BEHAVIORALFlash\Session::SESSION_KEYvisibility (publicvsprivate)Forms
Form::isValiddata parameter type (cphalcon acceptsnull, phalcon requiresarray)Form::isValidentity fallback logic (cphalcon: any non-object, phalcon: null only)Logger
Logger::logmessage type -- Stringable support (phalcon acceptsStringable)AbstractLoggerlevel constants location (class vsEnum)Messages
Messagesexception types (MessagesNotIterable,MessageNotObjectvs generic)Support
Collection::getIteratorArrayIterator vs Generator -- BEHAVIORALSession
Session\Manager::start()order of operations -- BEHAVIORALSession\Manager::getAdapter()return type (missing|nullin cphalcon)Storage
Storage\Adapter\AbstractAdapterevent cancellable flag (same as Cache DIV 25)Storage\Adapter\AbstractAdapter::getSerializer()return type (missing|nullin cphalcon)Paginator
QueryBuilder::paginate()GROUP BY multiple columns -- BUG in phalconQueryBuilder::paginate()page zero validation (cphalcon defaults to 1, phalcon allows 0)Time
FrozenClock::adjust()error handler safety in pre-8.3 (potential BUG in cphalcon)Translate
NativeArraymissing deprecatedexists()in phalconHtml
Escaper::__constructparameter count (0 vs 3 optional)Escaper::escapeHtml()deprecated in cphalcon, missing in phalconImage
Mvc
Mvc\Model::findFirst/findstatic:: vs self:: -- CRITICAL (breaks inheritance)Mvc\Model::fireEvent/fireEventCancel-- MASSIVE architectural divergence (typed event system)Mvc\Model::appendMessagesFrommissing in cphalconMvc\Modelexception types (35+ granular missing)Mvc\Model\Querymethod naming (_prepare*vsprepare*)Mvc\Model\ResultsetmissinggetResult()andrefresh()in phalconMvc\Model\Managermethod differences (deprecatedexists*vs newremoveBehavior)Mvc\Routerexception types (16 granular missing)Mvc\Model\Behaviorbase class name (BehaviorvsAbstractBehavior)Mvc\Url::get()parameter count (5 vs 4)Mvc\Viewexception types (7 granular missing)Mvc\View\Engine\Volt\Compilerexception types (21 granular missing)