Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v6.0.x #738 +/- ##
==========================================
+ Coverage 75.82% 77.38% +1.56%
==========================================
Files 500 505 +5
Lines 28709 28939 +230
==========================================
+ Hits 21768 22394 +626
+ Misses 6941 6545 -396 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
In raising this pull request, I confirm the following:
A new, clean-slate dependency injection container has been implemented as
Phalcon\Container, replacing the existingPhalcon\Containernamespace.Architecture
ContainerimplementsService\Collection(aligned withservice-interop) which itself extendsIocContainer(fromioc-interop/interface).ContainerFactoryimplementsIocContainerFactory. Resolution interfaces are aligned withresolver-interop.Key Features
get()returns a shared (singleton) instance;new()always creates a fresh instancebind()— maps an interface to a concrete implementationextend()— decorate an existing service after registrationLazy\EnvandLazy\CsEnvfor environment variable resolutionGet,NewInstance,Call,GetCall,NewCall,StaticCall,FunctionCall,ArrayValues,CallableGet,CallableNew,Env,CsEnv) plusLazyFactorystatic factory for ergonomic constructionServiceDefinitionis mutable during registration; frozen on first resolution (reflection cached, setters locked, definition becomes serializable for future warm-boot caching)Service\Providerinterface;Provider\WebandProvider\Clipre-wire all standard Phalcon framework services with interface bindings where available and string aliases for backward compatibilityInterop Alignment
ioc-interopservice-interopresolver-interopStructure
src/Container/
Container.php/ContainerFactory.phpDefinition/-ServiceDefinition,DefinitionType,ServiceLifetime,Processor/Exception/-ContainerThrowable,Invalid,NotFoundProvider/-Web,CliResolver/-Resolver+ interop interfaces +Lazy/Service/-Collection,Definition,Lifetime,Provider,Throwable