PackageTrack
Sign in Get early access

ray/aop

An aspect oriented framework

2.20.1 2.7M downloads/mo #2384 most downloaded on Packagist ray-di/Ray.Aop

What this package is like to depend on

Last release 16 days ago

07 Aug 2026

Release timing varies

gaps range from 2 weeks to 9 months

Some releases are documented

notes for 25 of 85 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

91 releases · first in 2013

4 releases in the last 12 months

see the full history below

Release timeline

91 releases · Mar 2013 to Aug 2026
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 60 of 91
  1. 2.20.1 07 Aug 2026
    Release notes

    Fixed

    • Proxy codegen: the implements-list regex no longer swallows a same-line class body brace, and multi-line implements lists no longer lose every interface after the first — both previously generated proxies that failed to parse. Existing cached proxies are invalidated automatically via the AopCode::GENERATION bump. (#264)
    Open source →
    Release notes

    Fixed

    • Codegen no longer produces unparsable proxies (CompilationFailedException) for class declarations that put the body brace on the same line as the implements list, or split the implements list over multiple lines (which dropped every interface after the first). Generated proxies are invalidated via an AopCode::GENERATION bump, so stale cached proxies regenerate once after upgrade. (#264)
    Open source →
  2. 2.20.0 14 Jul 2026
    Release notes

    Changed

    • Proxy dispatch is now a direct parent::method(...) first-class callable (no double dispatch through the proxy); intercepted-call overhead roughly halved. Generated proxies are invalidated via AopCode::GENERATION — existing script dirs regenerate once after upgrade (stale files are ignored, not loaded). (#260)
    • Faster weave/newInstance path: cache weaved class names, instantiate with new $class(...$args) instead of reflection, and match attributes without instantiating them during bind. (#259)
    • Annotation-order (onion) binding now respects attribute inheritance (is_a, aligned with #255). Methods annotated with a subclass attribute may get a different interceptor order than before (they were previously bound only in the default phase). (#259)
    • Weaved methods include an always-on // comment listing bound interceptor short class names (self-documenting generated code; no runtime cost). (#262)

    Fixed

    • Compiler::compile() now (re)emits the weaved class file even when the class is already declared in the process but the file is missing, so a compile pipeline that cleans and recompiles produces complete output for runtime loaders that resolve weaved classes by name. (#261)
    • Infinite recursion when an interceptor invoked another intercepted method on the same instance via getThis(). Such nested calls are now intercepted normally (previously interception state was corrupted). (#260)
    • Codegen no longer corrupts generated method code containing $1-style sequences (preg_replace backreference bug in AopCode::insert()). (#260)
    • Bind/match no longer instantiates method attributes via getAnnotations()/getAnnotation(), so a broken attribute constructor on an unrelated method cannot fatal bind(). (#259)
    • Weaver serialization excludes the in-process weaved-class cache so a restored Weaver in another process reloads class files instead of assuming FQNs are already defined. (#259)

    Removed

    • Internal API: AopCode::INTERCEPT_STATEMENT public const, _intercept(), _isAspect; AopCode::resolveInterceptTrait() is now private. (#260)
    Open source →
    Release notes

    Changed

    • Proxy dispatch is now a direct parent::method(...) first-class callable (no double dispatch through the proxy); intercepted-call overhead roughly halved. Generated proxies are invalidated via AopCode::GENERATION — existing script dirs regenerate once after upgrade (stale files are ignored, not loaded). (#260)
    • Faster weave/newInstance path: cache weaved class names, instantiate with new $class(...$args) instead of reflection, and match attributes without instantiating them during bind. (#259)
    • Annotation-order (onion) binding now respects attribute inheritance (is_a, aligned with #255). Methods annotated with a subclass attribute may get a different interceptor order than before (they were previously bound only in the default phase). (#259)
    • Weaved methods include an always-on // comment listing bound interceptor short class names (self-documenting generated code; no runtime cost). (#262)

    Fixed

    • Compiler::compile() now (re)emits the weaved class file even when the class is already declared in the process but the file is missing, so a compile pipeline that cleans and recompiles produces complete output for runtime loaders that resolve weaved classes by name. (#261)
    • Infinite recursion when an interceptor invoked another intercepted method on the same instance via getThis(). Such nested calls are now intercepted normally (previously interception state was corrupted). (#260)
    • Codegen no longer corrupts generated method code containing $1-style sequences (preg_replace backreference bug in AopCode::insert()). (#260)
    • Bind/match no longer instantiates method attributes via getAnnotations()/getAnnotation(), so a broken attribute constructor on an unrelated method cannot fatal bind(). (#259)
    • Weaver serialization excludes the in-process weaved-class cache so a restored Weaver in another process reloads class files instead of assuming FQNs are already defined. (#259)

    Removed

    • Internal API: AopCode::INTERCEPT_STATEMENT public const, _intercept(), _isAspect; AopCode::resolveInterceptTrait() is now private. (#260)
    Open source →
  3. 2.19.1 24 Jan 2026
    Release notes

    Fixed

    • getAnnotation() now matches child classes by default using ReflectionAttribute::IS_INSTANCEOF (#254, #255)

    This restores the instanceof matching behavior that was broken in 2.18.0.

    Open source →
    Release notes

    Fixed

    • getAnnotation() now matches child classes by default using ReflectionAttribute::IS_INSTANCEOF (#254, #255)
    Open source →
  4. 2.19.0 17 Nov 2025
    Release notes

    What's Changed

    Breaking Changes

    • Removed PECL extension support (#248, refs #242)
      • Migration: Use proxy-based AOP with $aspect->bind() + newInstance() instead
      • Backward-compatible deprecation stubs provided in src-deprecated/
      • See #242 for migration guide

    Improvements

    • PHP 8.2 Optimization: Replace @readonly annotations with native readonly keyword (#249)
      • Removed 37 lines of redundant PHPDoc annotations
      • Improved type safety with constructor property promotion
      • Files optimized: AopPostfixClassName, Compiler, AnnotatedMatcher, ReflectiveMethodInvocation, InterceptTraitState

    Documentation

    • Add comprehensive CHANGELOG.md following Keep a Changelog format
    • Document all releases from 2.10.0 onwards

    Deprecation Notice

    Existing code using AspectPecl or PeclDispatcher will receive a clear LogicException with migration instructions instead of "Class not found" errors.

    Full Changelog: 2.18.0...2.19.0

    Open source →
    Release notes

    Changed

    • BREAKING: Removed PECL extension support (#248, refs #242)
      • Migration: Use proxy-based AOP with $aspect->bind() + newInstance() instead
      • Backward-compatible deprecation stubs provided in src-deprecated/
    • Replace @readonly annotations with native readonly keyword (#249)
    Open source →
  5. 2.18.0 22 Feb 2025
    Release notes

    What's Changed

    • Supports AOP targeting PHP 8.2 readonly classes by @koriym in #238
    • template annotation into ReflectionClass by @sasezaki in #239

    Full Changelog: 2.17.2...2.18.0

    Open source →
    Release notes

    Added

    • Support for AOP targeting PHP 8.2 readonly classes (#238)
    • Template annotation into ReflectionClass (#239)
    Open source →
  6. 2.17.3 08 Feb 2025
    Release notes

    Fixes

    • Rolled back to the state of v2.17.1 to address a breaking change introduced in v2.17.2.

    Impact

    • If you are using v2.17.2, you may encounter issues. Please update to v2.17.3 as soon as possible.
    Open source →
    Release notes

    Fixed

    • Rolled back to the state of v2.17.1 to address a breaking change introduced in v2.17.2

    Impact

    • If you are using v2.17.2, please update to v2.17.3 as soon as possible
    Open source →
  7. 2.17.2 14 Feb 2025
    Release notes

    This release is deprecated for breaking BC. Reverted in 2.17.3.

    ## What's Changed
    * Add support for readonly class in PHP 8.2 by @ngmy in #236

    New Contributors

    • @ngmy made their first contribution in #236

    Full Changelog: 2.17.1...2.17.2

    Open source →
    Release notes

    This release is deprecated for breaking BC. Reverted in 2.17.3.

    Changed

    • Add support for readonly class in PHP 8.2 (#236)

    Contributors

    • @ngmy made their first contribution in #236
    Open source →
  8. 2.17.1 08 Feb 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.17.0...2.17.1

    Open source →
    Release notes

    Fixed

    • Remove extra <?php (#228)
    • Fix Windows test (#234)
    • Fix return type of getConstructor (#233)

    Added

    • Add centralized type definitions in Types.php (#229)

    Changed

    • Update license copyright year(s) (#230)

    Contributors

    • @hanahiroAze made their first contribution in #228
    Open source →
  9. 2.17.0 15 Nov 2024
    Release notes

    What's Changed

    • Enable PHP 8.4 compat by @koriym in #220
    • Add phpdoc type annotations for psalm by @koriym in #221
    • Update Demo using Aspect class by @koriym in #222
    • Organizing comments and unnecessary files, etc by @koriym in #224
    • Extract PECL code from Aspect to PeclAspect by @koriym in #223
    • Binding multiple interceptors with multiple bindings in PECL AOP by @koriym in #225
    • Add stability section to README files by @koriym in #226
    • Supports method parameter attributes by @koriym in #227

    Full Changelog: 2.16.2...2.16.3

    Open source →
    Release notes

    Added

    • PHP 8.4 compatibility (#220)
    • PHPDoc type annotations for Psalm (#221)
    • Method parameter attributes support (#227)
    • Stability section to README files (#226)

    Changed

    • Update Demo using Aspect class (#222)
    • Extract PECL code from Aspect to PeclAspect (#223)
    • Binding multiple interceptors with multiple bindings in PECL AOP (#225)
    • Organizing comments and unnecessary files (#224)
    Open source →
  10. 2.16.2 03 Sep 2024
    Release notes

    Fixed

    • Bug with annotated with matcher (#219)

    Changed

    • Update Aspect.php (#218)

    Contributors

    • @denise-kao made their first contribution in #218
    Open source →
  11. 2.16.1 27 Aug 2024
    Release notes

    Fixed

    • Fix an issue where the same class would not compile in multiple contexts (#217)

    Added

    • Add PHP class diagram HTML page (#216)

    Changed

    • Update Technical Information (#215)
    Open source →
  12. 2.16.0 07 Jul 2024
    Release notes

    Added

    • New Aspect class - Simplifies API and improves PECL extension integration
    • PECL extension support with weave() method
    • PHP class diagram (#213)

    Changed

    • BREAKING: API simplified - use Aspect class instead of Pointcut, Bind, and Weaver
    • newInstance method is now part of Aspect class, not Weaver

    Migration Guide

    Before (2.0.0 to 2.15.x):

    $pointcut = new Pointcut(
        (new Matcher())->any(),
        (new Matcher())->annotatedWith(NotOnWeekends::class),
        [new WeekendBlocker()]
    );
    $bind = (new Bind)->bind(RealBillingService::class, [$pointcut]);
    $billing = (new Weaver($bind, $tmpDir))->newInstance(RealBillingService::class, []);
    

    After (2.16.0+):

    $aspect = new Aspect();
    $aspect->bind(
        (new Matcher())->any(),
        (new Matcher())->annotatedWith(NotOnWeekends::class),
        [new WeekendBlocker()]
    );
    $billing = $aspect->newInstance(RealBillingService::class);
    
    Open source →
  13. 2.15.2 20 May 2024
    Release notes

    Added

    • Support enum in attribute arguments (#212)
    Open source →
  14. 2.15.1 13 May 2024
    Release notes

    Fixed

    • Fixed to not make mixed nullable (#211)
    Open source →
  15. 2.15.0 21 Apr 2024
    Release notes

    Added

    • PHP 8.3 compatibility (#204)
    • Create own codegen (#205)
    • Validate tmp directory (#209)

    Changed

    • Update license copyright year(s) (#207)
    Open source →
  16. 2.14.0 11 Sep 2023
    Release notes

    Changed

    • Soothe Psalm (#200)
    • Ignore anonymous class compilation (#202)

    Removed

    • Doctrine annotation reader (#203)
    Open source →
  17. 2.13.1 13 Jan 2023
    Release notes

    Changed

    • Update license copyright year(s) (#198)
    • Bump php-parser to ^4.13.2 (#199)
    Open source →
  18. 2.13.0 12 Dec 2022
    Release notes

    Added

    • PHP 8.2 compatibility (#196)
    • Create attribute_reader.php for performance boost (#197)
    Open source →
  19. 2.12.4 28 Sep 2022
    Release notes

    Changed

    • Improve compile performance (#192, #195)
    Open source →
  20. 2.12.3 22 Jun 2022
    Release notes

    Added

    • PHP 8.2-alpha support (#190)
    Open source →
  21. 2.12.2 09 Mar 2022
    Release notes

    Added

    • Support PHP 7.2 (#189)
    Open source →
  22. 2.12.1 21 Feb 2022
    Release notes

    Fixed

    • Fix wrong compiled method of parent (#188)
    Open source →
  23. 2.12.0 28 Jan 2022
    Release notes

    Added

    • Parent method intercept (#181)
    • Add update license year action (#184)

    Changed

    • Bump PHPStan (#186)

    Contributors

    • @NaokiTsuchiya made their first contribution in #181
    • @github-actions made their first contribution in #185
    Open source →
  24. 2.11.0 31 Oct 2021
    Release notes

    Added

    • PHP 8.1 support (#177)
    • Template annotation into ReflectionMethod::getAnnotation (#179)

    Contributors

    • @sasezaki made their first contribution in #179
    Open source →
  25. 2.10.6 17 Jul 2021

    Nothing published for this version

  26. 2.10.5 19 Apr 2021

    Nothing published for this version

  27. 2.10.4 18 Feb 2021

    Nothing published for this version

  28. 2.10.3 24 Jan 2021

    Nothing published for this version

  29. 2.10.2 22 Jan 2021

    Nothing published for this version

  30. 2.10.1 18 Jan 2021

    Nothing published for this version

  31. 2.10.0 13 Jan 2021
    Release notes

    Added

    • PHP 8 attributes support
    • Add Service Locator for annotation/attribute reader

    Changed

    • CI: Migrate from Travis CI to GitHub Actions
    • Add phpmd check
    Open source →
  32. 2.9.9 28 Sep 2020

    Nothing published for this version

  33. 2.9.8 04 Jun 2020

    Nothing published for this version

  34. 2.9.7 30 May 2020

    Nothing published for this version

  35. 2.9.6 24 May 2020

    Nothing published for this version

  36. 2.9.5 22 May 2020

    Nothing published for this version

  37. 2.9.4 15 May 2020

    Nothing published for this version

  38. 2.9.3 03 May 2020

    Nothing published for this version

  39. 2.9.2 20 Apr 2020

    Nothing published for this version

  40. 2.9.1 17 Apr 2020

    Nothing published for this version

  41. 2.9.0 03 Dec 2019

    Nothing published for this version

  42. 2.8.8 25 Oct 2019

    Nothing published for this version

  43. 2.8.7 28 Aug 2019

    Nothing published for this version

  44. 2.8.6 28 Aug 2019

    Nothing published for this version

  45. 2.8.5 27 Jul 2019

    Nothing published for this version

  46. 2.8.4 02 Jun 2019

    Nothing published for this version

  47. 2.8.3 20 May 2019

    Nothing published for this version

  48. 2.8.0 15 Jan 2019

    Nothing published for this version

  49. 2.7.7 21 Nov 2018

    Nothing published for this version

  50. 2.7.6 15 Jul 2018

    Nothing published for this version

  51. 2.7.5 16 Jun 2018

    Nothing published for this version

  52. 2.7.4 16 Jun 2018

    Nothing published for this version

  53. 2.7.3 25 May 2018

    Nothing published for this version

  54. 2.7.2 08 May 2018

    Nothing published for this version

  55. 2.7.1 27 Apr 2018

    Nothing published for this version

  56. 2.7.0 25 Apr 2018

    Nothing published for this version

  57. 2.6.0 02 Mar 2018

    Nothing published for this version

  58. 2.5.2 02 Mar 2018

    Nothing published for this version

  59. 2.5.0 20 Aug 2017

    Nothing published for this version

  60. 2.4.2 12 Jul 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive