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 2026Releases
latest 60 of 91-
2.20.107 Aug 2026Release notes
Open source →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::GENERATIONbump. (#264)
Release notes
Open source →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 anAopCode::GENERATIONbump, so stale cached proxies regenerate once after upgrade. (#264)
- 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
-
2.20.014 Jul 2026Release notes
Open source →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 viaAopCode::GENERATION— existing script dirs regenerate once after upgrade (stale files are ignored, not loaded). (#260) - Faster weave/
newInstancepath: cache weaved class names, instantiate withnew $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_replacebackreference bug inAopCode::insert()). (#260) - Bind/match no longer instantiates method attributes via
getAnnotations()/getAnnotation(), so a broken attribute constructor on an unrelated method cannot fatalbind(). (#259) Weaverserialization 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_STATEMENTpublic const,_intercept(),_isAspect;AopCode::resolveInterceptTrait()is now private. (#260)
Release notes
Open source →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 viaAopCode::GENERATION— existing script dirs regenerate once after upgrade (stale files are ignored, not loaded). (#260) - Faster weave/
newInstancepath: cache weaved class names, instantiate withnew $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_replacebackreference bug inAopCode::insert()). (#260) - Bind/match no longer instantiates method attributes via
getAnnotations()/getAnnotation(), so a broken attribute constructor on an unrelated method cannot fatalbind(). (#259) Weaverserialization 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_STATEMENTpublic const,_intercept(),_isAspect;AopCode::resolveInterceptTrait()is now private. (#260)
- Proxy dispatch is now a direct
-
2.19.124 Jan 2026Release notes
Open source →Fixed
getAnnotation()now matches child classes by default usingReflectionAttribute::IS_INSTANCEOF(#254, #255)
This restores the instanceof matching behavior that was broken in 2.18.0.
Release notes
Open source →Fixed
getAnnotation()now matches child classes by default usingReflectionAttribute::IS_INSTANCEOF(#254, #255)
-
2.19.017 Nov 2025Release notes
Open source →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
- Migration: Use proxy-based AOP with
Improvements
- PHP 8.2 Optimization: Replace
@readonlyannotations with nativereadonlykeyword (#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
AspectPeclorPeclDispatcherwill receive a clearLogicExceptionwith migration instructions instead of "Class not found" errors.Full Changelog: 2.18.0...2.19.0
Release notes
Open source →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/
- Migration: Use proxy-based AOP with
- Replace
@readonlyannotations with nativereadonlykeyword (#249)
- Removed PECL extension support (#248, refs #242)
-
2.18.022 Feb 2025Release notes
Open source →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
Release notes
Open source →Added
- Support for AOP targeting PHP 8.2 readonly classes (#238)
- Template annotation into ReflectionClass (#239)
-
2.17.308 Feb 2025Release notes
Open source →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.
Release notes
Open source →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
-
2.17.214 Feb 2025Release notes
Open source →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 #236New Contributors
Full Changelog: 2.17.1...2.17.2
Release notes
Open source →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
-
2.17.108 Feb 2025Release notes
Open source →What's Changed
- remove extra <?php by @hanahiroAze in #228
- Add centralized type definitions in Types.php by @koriym in #229
- Update license copyright year(s) by @github-actions in #230
- Fix windows test by @NaokiTsuchiya in #234
- Fix return type of getConstructor by @NaokiTsuchiya in #233
New Contributors
- @hanahiroAze made their first contribution in #228
Full Changelog: 2.17.0...2.17.1
Release notes
Open source →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
-
2.17.015 Nov 2024Release notes
Open source →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
Release notes
Open source →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)
-
2.16.203 Sep 2024Release notes
Open source →Fixed
- Bug with annotated with matcher (#219)
Changed
- Update Aspect.php (#218)
Contributors
- @denise-kao made their first contribution in #218
-
2.16.127 Aug 2024Release notes
Open source →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)
-
2.16.007 Jul 2024Release notes
Open source →Added
- New
Aspectclass - Simplifies API and improves PECL extension integration - PECL extension support with
weave()method - PHP class diagram (#213)
Changed
- BREAKING: API simplified - use
Aspectclass instead ofPointcut,Bind, andWeaver newInstancemethod is now part ofAspectclass, notWeaver
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); - New
-
2.15.220 May 2024 -
2.15.113 May 2024 -
2.15.021 Apr 2024Release notes
Open source →Added
- PHP 8.3 compatibility (#204)
- Create own codegen (#205)
- Validate tmp directory (#209)
Changed
- Update license copyright year(s) (#207)
-
2.14.011 Sep 2023Release notes
Open source →Changed
- Soothe Psalm (#200)
- Ignore anonymous class compilation (#202)
Removed
- Doctrine annotation reader (#203)
-
2.13.113 Jan 2023Release notes
Open source →Changed
- Update license copyright year(s) (#198)
- Bump php-parser to ^4.13.2 (#199)
-
2.13.012 Dec 2022Release notes
Open source →Added
- PHP 8.2 compatibility (#196)
- Create attribute_reader.php for performance boost (#197)
-
2.12.428 Sep 2022 -
2.12.322 Jun 2022 -
2.12.209 Mar 2022 -
2.12.121 Feb 2022 -
2.12.028 Jan 2022Release notes
Open source →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
-
2.11.031 Oct 2021Release notes
Open source →Added
- PHP 8.1 support (#177)
- Template annotation into ReflectionMethod::getAnnotation (#179)
Contributors
- @sasezaki made their first contribution in #179
-
2.10.617 Jul 2021Nothing published for this version
-
2.10.519 Apr 2021Nothing published for this version
-
2.10.418 Feb 2021Nothing published for this version
-
2.10.324 Jan 2021Nothing published for this version
-
2.10.222 Jan 2021Nothing published for this version
-
2.10.118 Jan 2021Nothing published for this version
-
2.10.013 Jan 2021Release notes
Open source →Added
- PHP 8 attributes support
- Add Service Locator for annotation/attribute reader
Changed
- CI: Migrate from Travis CI to GitHub Actions
- Add phpmd check
-
2.9.928 Sep 2020Nothing published for this version
-
2.9.804 Jun 2020Nothing published for this version
-
2.9.730 May 2020Nothing published for this version
-
2.9.624 May 2020Nothing published for this version
-
2.9.522 May 2020Nothing published for this version
-
2.9.415 May 2020Nothing published for this version
-
2.9.303 May 2020Nothing published for this version
-
2.9.220 Apr 2020Nothing published for this version
-
2.9.117 Apr 2020Nothing published for this version
-
2.9.003 Dec 2019Nothing published for this version
-
2.8.825 Oct 2019Nothing published for this version
-
2.8.728 Aug 2019Nothing published for this version
-
2.8.628 Aug 2019Nothing published for this version
-
2.8.527 Jul 2019Nothing published for this version
-
2.8.402 Jun 2019Nothing published for this version
-
2.8.320 May 2019Nothing published for this version
-
2.8.015 Jan 2019Nothing published for this version
-
2.7.721 Nov 2018Nothing published for this version
-
2.7.615 Jul 2018Nothing published for this version
-
2.7.516 Jun 2018Nothing published for this version
-
2.7.416 Jun 2018Nothing published for this version
-
2.7.325 May 2018Nothing published for this version
-
2.7.208 May 2018Nothing published for this version
-
2.7.127 Apr 2018Nothing published for this version
-
2.7.025 Apr 2018Nothing published for this version
-
2.6.002 Mar 2018Nothing published for this version
-
2.5.202 Mar 2018Nothing published for this version
-
2.5.020 Aug 2017Nothing published for this version
-
2.4.212 Jul 2017Nothing published for this version