-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing CompileVisitor using the visitor pattern #112
Conversation
WalkthroughThe updates encompass various refinements, including dependency version adjustments in Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Client
participant AirInjector
participant Dependency
Client->>AirInjector: getInstance(interface, name)
AirInjector->>AirInjector: Check Singleton Cache
AirInjector-->>Client: Return Instance (if cached)
AirInjector->>Dependency: Load Dependency
Dependency-->>AirInjector: Return Instance
AirInjector->>Client: Return Instance
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Outside diff range and nitpick comments (1)
src/Compiler.php (1)
15-40
: Thecompile
method inCompiler
is well-implemented, with clear separation of concerns and effective use of assertions for type safety. Consider adding more detailed comments to explain the process steps.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
vendor-bin/tools/composer.lock
is excluded by!**/*.lock
Files selected for processing (52)
- .gitignore (1 hunks)
- composer.json (3 hunks)
- docs/exmaple/DevInjectorContext.php (1 hunks)
- docs/exmaple/ProdInjectorContext.php (1 hunks)
- phpcs.xml (2 hunks)
- phpstan.neon (1 hunks)
- src-deprecated/AbstractInjectorContext.php (1 hunks)
- src-deprecated/AopCode.php (1 hunks)
- src-deprecated/CachedInjectorFactory.php (1 hunks)
- src-deprecated/Code.php (1 hunks)
- src-deprecated/ContextInjector.php (1 hunks)
- src-deprecated/DependencyCode.php (1 hunks)
- src-deprecated/DependencySaver.php (1 hunks)
- src-deprecated/DiCompiler.php (1 hunks)
- src-deprecated/FactoryCode.php (1 hunks)
- src-deprecated/FunctionCode.php (1 hunks)
- src-deprecated/GraphDumper.php (2 hunks)
- src-deprecated/InjectorFactory.php (1 hunks)
- src-deprecated/IpQualifier.php (1 hunks)
- src-deprecated/NodeFactory.php (1 hunks)
- src-deprecated/Normalizer.php (2 hunks)
- src-deprecated/OnDemandCompiler.php (1 hunks)
- src-deprecated/OverrideLazyModule.php (1 hunks)
- src-deprecated/PrivateProperty.php (1 hunks)
- src-deprecated/ScriptInjector.php (1 hunks)
- src-deprecated/ScriptinjectorModule.php (1 hunks)
- src/AirInjector.php (1 hunks)
- src/CompileInjector.php (1 hunks)
- src/CompileVisitor.php (1 hunks)
- src/Compiler.php (1 hunks)
- src/InjectionPoint.php (2 hunks)
- src/InstallBuiltinModule.php (1 hunks)
- src/InstanceScript.php (1 hunks)
- src/Scripts.php (1 hunks)
- tests/AssistedTest.php (1 hunks)
- tests/CachedFactoryTest.php (1 hunks)
- tests/CompileInjectorTest.php (4 hunks)
- tests/CompilerTest.php (1 hunks)
- tests/DependencyCompilerTest.php (4 hunks)
- tests/DiCompilerTest.php (3 hunks)
- tests/Fake/Assisted/FakeAssistedConsumer.php (3 hunks)
- tests/Fake/Assisted/FakeToBindModule.php (1 hunks)
- tests/Fake/CompileVisitor/FakeFoo.php (1 hunks)
- tests/Fake/CompileVisitor/FakeFooInterface.php (1 hunks)
- tests/Fake/CompileVisitor/FakeFooModule.php (1 hunks)
- tests/Fake/CompileVisitor/FakeFooProvider.php (1 hunks)
- tests/Fake/Deep/FakeInjectorContext.php (1 hunks)
- tests/Fake/FakeCarModule.php (1 hunks)
- tests/Fake/MultiBindings/FakeMultiBindingsModule.php (2 hunks)
- tests/Fake/MultiBindings/FakeSetNotFoundWithProvider.php (1 hunks)
- tests/MultiBindingTest.php (6 hunks)
- tests/ScriptInjectorTest.php (3 hunks)
Files not reviewed due to errors (4)
- tests/Fake/MultiBindings/FakeMultiBindingsModule.php (no review received)
- src/InjectionPoint.php (no review received)
- composer.json (no review received)
- src-deprecated/AopCode.php (no review received)
Files skipped from review due to trivial changes (26)
- .gitignore
- docs/exmaple/DevInjectorContext.php
- phpstan.neon
- src-deprecated/CachedInjectorFactory.php
- src-deprecated/Code.php
- src-deprecated/ContextInjector.php
- src-deprecated/DependencyCode.php
- src-deprecated/DependencySaver.php
- src-deprecated/FactoryCode.php
- src-deprecated/FunctionCode.php
- src-deprecated/GraphDumper.php
- src-deprecated/InjectorFactory.php
- src-deprecated/IpQualifier.php
- src-deprecated/NodeFactory.php
- src-deprecated/Normalizer.php
- src-deprecated/OnDemandCompiler.php
- src-deprecated/OverrideLazyModule.php
- src-deprecated/PrivateProperty.php
- src-deprecated/ScriptinjectorModule.php
- tests/AssistedTest.php
- tests/CachedFactoryTest.php
- tests/CompileInjectorTest.php
- tests/DiCompilerTest.php
- tests/Fake/CompileVisitor/FakeFooInterface.php
- tests/Fake/Deep/FakeInjectorContext.php
- tests/Fake/MultiBindings/FakeSetNotFoundWithProvider.php
Additional comments not posted (29)
tests/Fake/CompileVisitor/FakeFoo.php (1)
3-7
: ClassFakeFoo
correctly implementsFakeFooInterface
for testing purposes.tests/Fake/CompileVisitor/FakeFooProvider.php (1)
3-13
: ClassFakeFooProvider
correctly implementsProviderInterface
and provides instances ofFakeFoo
.tests/Fake/Assisted/FakeToBindModule.php (1)
12-12
: Ensure the binding forFakeAssistedConsumer
is intended to be unqualified.Verification successful
The search results indicate that
FakeAssistedConsumer
is used in various test cases and is bound inFakeToBindModule
without specifying a concrete implementation or provider. This suggests that the unqualified binding might be intentional for testing purposes.
FakeAssistedConsumer
is defined intests/Fake/Assisted/FakeAssistedConsumer.php
.- It is used in multiple test methods in
tests/AssistedTest.php
.Given this context, it appears that the unqualified binding is indeed intentional and used for testing scenarios.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if `FakeAssistedConsumer` is intended to be unqualified. # Test: Search for other bindings of `FakeAssistedConsumer`. Expect: No other bindings or a specific reason for unqualified binding. rg --type php $'bind(FakeAssistedConsumer::class)'Length of output: 51
Script:
#!/bin/bash # Description: Verify if `FakeAssistedConsumer` is intended to be unqualified by searching for documentation or comments. # Search for comments or documentation mentioning `FakeAssistedConsumer`. rg --type php 'FakeAssistedConsumer' --context 5 # Search for the definition of `FakeAssistedConsumer` to understand its usage. rg --type php 'class FakeAssistedConsumer'Length of output: 3997
src/CompileInjector.php (1)
26-26
: MethodgetInstance
correctly delegates instance creation toAirInjector
.docs/exmaple/ProdInjectorContext.php (1)
Line range hint
1-18
: Class setup inProdInjectorContext
is correctly configured for production dependencies.tests/Fake/CompileVisitor/FakeFooModule.php (1)
25-30
: The DI configuration inFakeFooModule
is straightforward and correctly sets up the binding forFakeFooInterface
.tests/Fake/Assisted/FakeAssistedConsumer.php (1)
17-17
: Transition from PHPDoc annotations to PHP 8 attributes inFakeAssistedConsumer
is correctly implemented.Also applies to: 29-29, 44-44
src/Scripts.php (1)
13-40
: Implementation of theScripts
class is clear and effectively utilizes PHP standard functions for managing script entries.tests/Fake/FakeCarModule.php (1)
28-32
: Addition of new bindings inFakeCarModule
is correctly done, with appropriate use ofScope::SINGLETON
for certain components.src-deprecated/ScriptInjector.php (2)
25-30
: Constructor logic is well-implemented, ensuring proper initialization of the injector and handling of the module compilation.
36-38
: MethodgetInstance
correctly delegates toAirInjector
, maintaining clean separation of concerns.src-deprecated/DiCompiler.php (2)
23-42
: Constructor effectively sets up the injector and compiles the module, ensuring thatInjectorInterface
is bound correctly.
48-50
: MethodgetInstance
correctly delegates toAirInjector
, maintaining clean separation of concerns.src/CompileVisitor.php (1)
28-139
: The implementation ofCompileVisitor
adheres to the visitor pattern effectively, handling various types of dependency injections and component interactions within theRay\Compiler
context.phpcs.xml (1)
Line range hint
31-43
: The exclusions in the coding standard configuration are extensive. Ensure that these exclusions do not inadvertently allow code quality issues to pass unnoticed.tests/DependencyCompilerTest.php (1)
47-55
: Ensure that the PHP version requirement (@requires PHP 8.3
) is justified by the use of features exclusive to this version.tests/MultiBindingTest.php (1)
Line range hint
45-91
: The type annotations forMap<FakeEngineInterface>
are consistently used, which is good for type safety and clarity.src/AirInjector.php (1)
18-168
: TheAirInjector
class is well-implemented with clear separation of concerns and robust handling of singletons and prototype instances.src/InstanceScript.php (1)
30-179
: TheInstanceScript
class effectively manages the script generation process, ensuring that dependencies are correctly instantiated and configured.tests/CompilerTest.php (9)
36-49
: Validate the integration ofFakeFooInterface
withCompiler
andAirInjector
.The test method
testCompile
correctly checks the integration ofFakeFooInterface
with theCompiler
andAirInjector
classes by asserting the instance types. This is a good practice to ensure that the components are interacting as expected.
51-64
: Check singleton behavior in DI container.The test
testCompileSingleton
effectively verifies that the singleton scope is respected by the DI container, ensuring that the same instance is returned on multiple calls.
66-78
: Review binding to instance with annotations.The method
testToInstance
correctly tests the binding of an instance with a specific annotation. This is crucial for testing DI functionality related to annotated bindings.
80-92
: Ensure provider-based dependency injection.The
testCompileProvider
method properly tests the DI container's ability to handle provider-based injections, which is a key feature for flexible dependency management.
94-112
: Complex DI configurations test.The
testCompileComplex
method thoroughly tests complex DI configurations involving multiple bindings and scopes. This comprehensive testing is essential for ensuring the robustness of the DI system.
114-132
: Test AOP integration with DI.The
testCompileAop
method effectively tests the integration of AOP (Aspect-Oriented Programming) features with the DI system, which is important for ensuring that aspects are correctly applied.
134-152
: Check for multiple interceptors in AOP.The
testCompileAopDubleInterceptor
method correctly tests the application of multiple interceptors, ensuring that AOP behaviors are compounded as expected.
154-178
: Test various types of instance bindings.The
testCompileInstnce
method (note the typo in the method name) tests bindings of various types to instances, which is crucial for ensuring the flexibility and correctness of the DI container.
180-192
: Test binding to null.The
testCompileNull
method tests the functionality of binding interfaces to null, which is important for handling optional dependencies in the DI container.tests/ScriptInjectorTest.php (1)
132-137
: Ensure proper DI configuration intestDependInjector
.The
testDependInjector
method correctly sets up a DI configuration and asserts the type of an injected property, which is essential for verifying dependency injection functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/Compiler.php (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/Compiler.php
Implemented the new VisitorInjector class with a comprehensive structure for managing script directories, registering loaders, and singleton patterns. Also, adjusted the related test cases in CompilerTest to use this newly added VisitorInjector class instead of the previous ScriptInjector.
The 'VisitorInjector' class was renamed to 'AirInjector' to better represent its functionality. It no longer contains the 'functions' property because it was not being used. Correspondingly, 'CompilerTest' has been updated to instantiate 'AirInjector' instead of 'VisitorInjector'.
Refactored the compile method in 'Compiler' class to include weaving aspect and saving scripts. Aspect-Oriented Programming (AOP) was introduced by adding a new 'AopCompiler' in the compile method. Accordingly, test cases in 'CompilerTest' were modified to accommodate the changes. Additionally, unused functions have been removed from 'AirInjector'.
This commit extends and refactors the CompileVisitor and Compiler. In 'Compiler.php', the container is now derived from InstallBuiltinModule. 'CompileVisitor.php' is also updated to process all scalar values and handle specific interfaces like 'InjectorInterface', 'InjectionPointInterface', and 'MethodInvocationProvider'. Corresponding test expectations have also been updated.
This commit improves the management of non-scalar instances in CompileVisitor class. Specifically, it includes support for arrays, null, and objects. Detailed tests for these new conditions have also been added.
The Compiler class has been modified to support NullObject compilation. This update comes along with the addition of comments that provide better clarity on the sequence of operations including aspect weaving and dependency compilation. The overall changes consequently improve the task execution for script dependencies.
This commit significantly cleans up and refactors the ScriptInjector class, removing surplus variables and methods for improved simplicity and maintainability. The constructor has also been simplified and the injector is now leveraging the newly
Optimized the way qualifiers are retrieved in `InjectionPoint.php`. It now relies on method annotations rather than serialized objects from the file system. This refactoring enhances performance and maintainability and eliminates external dependencies on file I/O operations. The new approach retrieves qualifier directly from method annotations, significantly improving code efficiency.
Simplified the DiCompiler class by changing instantiation and reducing the use of properties. Instances now use AirInjector instead of many separate components. This makes the class more focused and efficient. Some methods have been deprecated as
Prevent not to deleted by cs-fix. Assertions have been added to the AirInjector class to check if the 'injectionPoint' passed in is callable. This will ensure that the 'injectionPoint', which is critical for instance creation, is always in a valid state before being used, thereby reducing potential errors.
Otherwise, the AOP of the NullObject will not be factored in. The code has been adjusted to first compile the NullObject before weaving the Aspects in the Compiler.php file. This change in order enhances the efficiency and proper structuring of the code. The alteration could have implications for how dependencies are managed and resolved.
The changes made help in ensuring that dependencies ($injectionPoint, $prototype, $injector, $singleton) are callable before they get used in two anonymous functions. These checks can prevent potential issues which could arise when a non-callable dependency is mistakenly passed.
Simplified the CompileVisitor class by moving logic for argument addition to the InstanceScript class. Now, the container is directly passed to the InstanceScript instead of being kept in the CompileVisitor. The refactoring also introduced context handling for providers and trimmed unused exceptions.
The "install" method in InstallBuiltinModule.php is replaced with "override" to prevent potential conflicts. In the MapModule.php, the binding to the MultiBindings class is removed as it's no longer necessary. Additionally, the deleteFiles function call in the setUp method of MultiBindingTest.php is commented out.
The import statements in ScriptInjector.php, DiCompiler.php and DependencyCode.php have been cleaned up, with all unused imports removed. This simplifies the code and improves readability. Additionally, minor formatting changes have also been made for better consistency.
The commit includes changes made primarily to test cases to improve code readability, with some minor fixes. It takes away few unused imports, adds 'declare(strict_types=1)', standardizes formatting for anonymous classes in multiple files, and corrects some variable assignments. The commit also modifies some bindings to singleton scope, and adds new binding definitions in 'FakeMultiBindingsModule.php'.
Several classes have been officially deprecated in this commit. These classes have been relocated into the "src-deprecated" directory. The corresponding tests have been cleaned as well. Additionally, all affected classes have been marked as deprecated in the code comments for clarity. Minor changes in third-party dependencies in composer.lock file are included as well.
The "nikic/php-parser" package has been removed from the list of dependencies in composer.json. This change suggests that
Replaced the native PHP function file_put_contents with a custom class FilePutContents to write scripts to a file in Scripts.php. This allows for enhanced error handling and file writing flexibility.
Several test files underwent minor changes, including updating temporary file paths, adjusting assertEquals checks, syntax refinements, and tidying up some unused PHP version requirements. The modifications primarily focused on improving readability and accuracy of the tests.
The changes include updating the version of `ray/di` package from `^2.16` to `dev-visitor as 2.17` and removing `ray/aop` package. Furthermore, the `ray/di` package was moved from the "require-dev"
The versions of PHP used in the continuous integration workflow have been adjusted. Previously, it was testing against versions 7.2, 7.3, 7.4, 8.0, 8.1, and 8.2. This commit updates the testing environment
This update modifies the file lookup loop in AirInjector.php. It ensures that each script file is included only once to avoid potential issues arising from multiple inclusions.
The 'testUnbound' function was removed from DiCompilerTest.php as it was not needed. This update helps streamline the testing process by removing redundant or unnecessary tests.
An explicit requirement for PHP 8.3 has been added to the `testDependencyCompile` and
Removed the unused import statements from DiCompilerTest.php and CompilerTest.php to enhance the readability of the code and comply with clean code principles. The removed imports were "Unbound" from DiCompilerTest.php and "count" from CompilerTest.php.
Refactor code for clarity and optimization Updated several files to improve code readability and efficiency. Refactored conditions to check for null using strict comparison. Added doc comments for better code type hinting. Removed redundant assertion checks. Adjusted PHP code sniffer configuration.
Ray.Di has it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- codecov.yml (1 hunks)
- src/Compiler.php (1 hunks)
- src/InstanceScript.php (1 hunks)
- src/Scripts.php (1 hunks)
- tests/CompilerTest.php (1 hunks)
- tests/Fake/CompileVisitor/FakeBar.php (1 hunks)
- tests/Fake/CompileVisitor/FakeBaz.php (1 hunks)
- tests/Fake/CompileVisitor/FakeQux.php (1 hunks)
Files skipped from review due to trivial changes (1)
- codecov.yml
Files skipped from review as they are similar to previous changes (4)
- src/Compiler.php
- src/InstanceScript.php
- src/Scripts.php
- tests/Fake/CompileVisitor/FakeBaz.php
Additional comments not posted (2)
tests/Fake/CompileVisitor/FakeBar.php (1)
5-10
: ClassFakeBar
correctly implements its constructor with dependency injection.Verification successful
The interface
FakeFooInterface
is defined in the codebase, specifically intests/Fake/CompileVisitor/FakeFooInterface.php
. This confirms that the constructor inFakeBar
correctly references an existing interface.
tests/Fake/CompileVisitor/FakeFooInterface.php
:interface FakeFooInterface
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `FakeFooInterface` is defined in the expected namespace. # Test: Search for the interface definition. Expect: Definition found. ast-grep --lang php --pattern $'namespace Ray\\Compiler\\CompileVisitor { interface FakeFooInterface { $$$ } }'Length of output: 225
Script:
#!/bin/bash # Description: Verify that `FakeFooInterface` is defined in the codebase. # Test: Search for the interface definition. Expect: Definition found. rg 'interface FakeFooInterface'Length of output: 107
tests/CompilerTest.php (1)
24-241
: The test classCompilerTest
is comprehensive, covering various scenarios and correctly using dependency injection.Verification successful
The classes
Compiler
,AirInjector
, andScripts
are defined in the codebase, as evidenced by the search results:
Compiler
is defined insrc/Compiler.php
.AirInjector
is defined insrc/AirInjector.php
.Scripts
is defined insrc/Scripts.php
.This confirms that the necessary classes and interfaces used in
CompilerTest
are present in the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all classes and interfaces used in `CompilerTest` are defined in the expected namespaces. # Test: Search for the class and interface definitions. Expect: Definitions found. ast-grep --lang php --pattern $'namespace Ray\\Compiler { class Compiler { $$$ } }' ast-grep --lang php --pattern $'namespace Ray\\Compiler { class AirInjector { $$$ } }' ast-grep --lang php --pattern $'namespace Ray\\Compiler { class Scripts { $$$ } }'Length of output: 598
Script:
#!/bin/bash # Description: Verify that all classes and interfaces used in `CompilerTest` are defined in the expected namespaces. # Test: Search for the class and interface definitions. Expect: Definitions found. rg 'namespace Ray\\Compiler;\s*class Compiler' --files-with-matches rg 'namespace Ray\\Compiler;\s*class AirInjector' --files-with-matches rg 'namespace Ray\\Compiler;\s*class Scripts' --files-with-matchesLength of output: 211
Script:
#!/bin/bash # Description: Verify that all classes and interfaces used in `CompilerTest` are defined in the expected namespaces. # Test: Search for the class and interface definitions in all PHP files. Expect: Definitions found. rg 'class Compiler' --glob '*.php' rg 'class AirInjector' --glob '*.php' rg 'class Scripts' --glob '*.php'Length of output: 318
@coderabbitai review |
Actions PerformedReview triggered.
|
@coderabbitai Approve ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
The "ray/di" package version in composer.json has been updated from a dev-visitor version to a stable 2.17 version. This alteration ensures that a stable, tested version of the "ray/di" package is utilized, thereby enhancing the application's trustworthiness and stability.
The import statement for NullCache from the CachedFactoryTest has been removed as it was not being used within the test file. This makes the code cleaner and easier to maintain by reducing unnecessary dependencies.
The version of PHPStan dependency has been updated from 1.11.1 to 1.11.2 in composer.lock. Reference and timestamp have also been updated accordingly. This brings the project up-to-date with
Unused import, Ray\Di\NullCache, has been removed from CachedInjectorFactory.php file. This improves the readability of the code and maintains a cleaner codebase, minimizing extraneous or unnecessary elements.
The "doctrine/cache" requirement has been updated in composer.json file to allow for either versions 1.0 or 2.2. This change will increase the range of compatible Doctrine Cache versions and improve the package's flexibility for different project environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
vendor-bin/tools/composer.lock
is excluded by!**/*.lock
Files selected for processing (4)
- composer.json (3 hunks)
- src-cached-injector-factory/CachedInjectorFactory.php (1 hunks)
- src-cached-injector-factory/NullCache.php (1 hunks)
- tests/CachedFactoryTest.php (2 hunks)
Files skipped from review due to trivial changes (1)
- src-cached-injector-factory/NullCache.php
Files skipped from review as they are similar to previous changes (3)
- composer.json
- src-cached-injector-factory/CachedInjectorFactory.php
- tests/CachedFactoryTest.php
The version of the "ray/di" package was updated from "2.x-dev" to "^2.17". This change ensures that the project is using a more stable version of the "ray/di" dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
vendor-bin/tools/composer.lock
is excluded by!**/*.lock
Files selected for processing (1)
- composer.json (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- composer.json
This commit upgrades various packages in composer.lock including "amphp/amp", "amphp/byte-stream", "composer/package-versions-deprecated", "composer/pcre", "composer/semver
@NaokiTsuchiya Ray.Diのリリースに対応しました。 |
@coderabbitai review |
Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
@coderabbitai Could you approve? |
@coderabbitai This PR will eliminate the problem with #78! |
Tip For best results, initiate chat on the files or code changes. @koriym, that's great to hear! It sounds like the changes introduced in this PR, particularly the adoption of the visitor pattern and the new code assembly method, are well-aligned to tackle the problem outlined in issue #78. I'm optimistic that this will effectively resolve the issues with unbound interface dependencies. Looking forward to seeing the positive impact of these changes in action! |
Moved to #115 |
Stop using php-parser and assemble code with strings. Also, compile using the visitor pattern.
Summary by CodeRabbit
Chores
.gitignore
to exclude/tests/Fake/tmp
.composer.json
to modify version constraints for dependencies and adjust static analysis configuration.req-check
incomposer.json
.composer-require-checker.json
to adjust allowed types.Refactor
AbstractInjectorContext
class and added@psalm-immutable
annotation.use Ray\Di\NullCache;
fromCachedInjectorFactory.php
.New Features
AirInjector
class implementingInjectorInterface
for managing singleton instances and dynamic class loading.Bug Fixes
CachedFactoryTest.php
forCachedInjectorFactory::getInstance()
.Closes #78