Releases: ray-di/Ray.Compiler
Releases · ray-di/Ray.Compiler
1.13.1
1.13.0
1.12.3
Fixed
- Additional array type handling improvements (#128)
New Contributors
- @apple-x-co made their first contribution in #128
Full Changelog: 1.12.2...1.12.3
1.12.2
1.12.1
1.12.0
Changed
- Use
override()in Compiler and remove BuiltinModule from CompilerModule - Use
override()instead ofinstall()for CompilerModule [#116] - Move Code4Dependency to src-deprecated and exclude from Psalm
Added
- Introduce Code4Dependency class and incorporate into DependencyCode
- Add Symfony PHP 8.3 polyfill and Override attributes
- Add PHP 8.5 support to CI
- Add LLM documentation for Ray.Compiler [#118]
Fixed
- Remove duplicated class [#116]
- Fix PHP 7.2 compatibility in CompilerModuleOverrideTest
- Use domain types from Types.php and fix PHPStan type errors
Full Changelog: 1.11.0...1.12.0
1.11.0
What's Changed
- Update PHP versions in CI workflow and update QA tools latest by @koriym in #114
- CompileVisitor using the visitor pattern and CompiledInjector by @koriym in #115
The dependencies of nikic/PHP-Parser have been removed, and the entire system has been rewritten using a fast compiler based on the Visitor pattern.
The on-demand compilation has been removed, and a compile injector has been added that only uses simple, clean, compiled code.
Basic Usage
Pre-compile your dependencies:
use Ray\Compiler\Compiler;
$compiler = new Compiler();
// Compile Ray.Di bindings to PHP files
$compiler->compile(
$module, // AbstractModule: Your application's module
$scriptDir // string: Directory path where compiled PHP files will be generated
);Use the compiled injector:
use Ray\Compiler\CompiledInjector;
$injector = new CompiledInjector($scriptDir);
$instance = $injector->getInstance(YourInterface::class);Note: The on-demand compiler will be deprecated.
Full Changelog: 1.10.6...1.11.0