Skip to content

Releases: ray-di/Ray.Compiler

1.13.1

04 Dec 08:41

Choose a tag to compare

Fixed

  • Fix typo in variable and directory name in DependencySaver (qualiferqualifier) #131

Thanks

1.13.0

18 Nov 05:50

Choose a tag to compare

Changed

  • Require PHP 8.2+ (drop PHP 7.x support) [#129]
  • Remove deprecated Doctrine annotations

Added

  • Add demo for Ray.Compiler usage [#130]

Removed

  • Remove unused exception classes

1.12.3

13 Nov 09:31

Choose a tag to compare

Fixed

  • Additional array type handling improvements (#128)

New Contributors

Full Changelog: 1.12.2...1.12.3

1.12.2

12 Nov 16:57

Choose a tag to compare

Fixed

  • Fix array handling in CompileVisitor to serialize arrays instead of using var_export() [#125]
  • Fix fatal error when arrays contain objects (e.g., [new Object(), 'method'])

Full Changelog: 1.12.1...1.12.2

1.12.1

27 Oct 05:08

Choose a tag to compare

Fixed

  • Remove incorrect @deprecated annotation from DiCompileModule

Links

1.12.0

25 Oct 18:31

Choose a tag to compare

Changed

  • Use override() in Compiler and remove BuiltinModule from CompilerModule
  • Use override() instead of install() 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

04 Feb 01:31
9d141a7

Choose a tag to compare

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

Full Changelog: 1.10.6...1.11.0

1.10.6

21 Oct 02:10
69ad4bf

Choose a tag to compare

What's Changed

  • Add dependencyIndex to the message of the Unbound exception by @jingu in #113

New Contributors

Full Changelog: 1.10.5...1.106

1.10.5

10 May 11:59
b4ad323

Choose a tag to compare

What's Changed

  • Add wakeup call in CompileInjector by @koriym in #111

Full Changelog: 1.10.4...1.10.5

1.10.4

05 Mar 04:17
af9e228

Choose a tag to compare

What's Changed

Full Changelog: 1.10.3...1.10.4