Releases: ray-di/Ray.Compiler
Releases · ray-di/Ray.Compiler
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.
![compiler image](https://private-user-images.githubusercontent.com/529021/409343942-008439ee-9a6f-45ce-926c-10f0f6c2c23c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTk0NDIsIm5iZiI6MTczOTI5OTE0MiwicGF0aCI6Ii81MjkwMjEvNDA5MzQzOTQyLTAwODQzOWVlLTlhNmYtNDVjZS05MjZjLTEwZjBmNmMyYzIzYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxODM5MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNzUzZWQ2N2E0MmI0MzZmNzAyMzU1ZDhlMmEzNTI5YjRhY2FhMzdkNDNjMDFjOTJkNWRjZGUyZGYzNGVlZjVhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.GSrosG5UEUOzLRq2QI7bXGXkVv8mX5pGk-QsNwSMhJI)
Full Changelog: 1.10.6...1.11.0
1.10.6
1.10.5
1.10.4
1.10.3
What's Changed
- Update InjectionPoint by @NaokiTsuchiya in #105
- Support doctrine/annotation v2 and PHP 8.2 by @koriym in #106
Full Changelog: 1.10.2...1.10.3
1.10.2
1.10.1
1.10.0
What's Changed
- Add getOverrideInstance method by @NaokiTsuchiya in #102
Injectors can be used with partial bundling changes to make testing easier.
Thanks @NaokiTsuchiya !
Full Changelog: 1.9.2...1.10.0
1.9.2
What's Changed
- Fix .gitattribute by @NaokiTsuchiya in #97
- Update license copyright year(s) by @github-actions in #98
- Failed to compile context binding when context has type by @NaokiTsuchiya in #99
New Contributors
- @github-actions made their first contribution in #98
Full Changelog: 1.9.1...1.9.2
1.9.1
What's Changed
- Using ScriptInjectorInterface by @NaokiTsuchiya in #94
New Contributors
- @NaokiTsuchiya made their first contribution in #94
Full Changelog: 1.9.0...1.9.1