Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Goaop Symfony Bundle Laravel Package

goaop/goaop-symfony-bundle

Go! AOP Symfony Bundle brings aspect-oriented programming to Symfony apps, letting you define aspects and advice to intercept service methods. It adds bundle configuration, AOP cache warming, and console tooling for weaving aspects into your code.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Low for a Laravel codebase. This package is a Symfony bundle — its entire surface area is Symfony-specific: a Bundle subclass, a compiler pass that collects services tagged as aspects, kernel boot hooks, and a cache warmer wired into Symfony's cache:warmup. None of that resolves in Laravel's container, and the package cannot be installed into a Laravel app as-is because its Composer constraints are pinned to the Symfony 3.4/4.x era (last release February 2018). The only transferable asset is the pattern: an AspectContainer implementation that pulls aspect instances out of the host DI container, plus a build-time weaving cache warmer. That pattern is roughly 200–400 lines to reimplement against Laravel's ServiceProvider and an Artisan command.

The underlying engine (goaop/framework) is the part with actual capability, and it is framework-agnostic. It performs load-time source transformation by registering a stream wrapper that rewrites classes as they are autoloaded, generating proxied code into an aspect cache directory. That mechanism is what matters; the bundle is a thin, dated adapter.

Integration feasibility. Feasible but non-trivial, and only as a build-it-yourself effort:

  • Laravel's autoloader and --classmap-authoritative / --optimize-autoloader modes interact badly with the stream-wrapper interception path; classes resolved from a static classmap can bypass weaving. You must verify weaving empirically per autoload strategy.
  • opcache.preload and JIT bypass the wrapper entirely — transformed code must be pre-woven into the cache directory and the cache made the authoritative source at deploy time, not at request time.
  • Long-running workers (Octane, queue workers) hold aspects as container singletons; Go! AOP's AspectContainer is a process-global singleton, so any per-request state inside an aspect leaks across requests.
  • Final classes, internal classes, closures, and code executed before the provider registers are not woven — silently.

Technical risk. High. The package is explicitly labeled outdated, has zero dependents, no maintainer-backed CVE process, and no releases in roughly seven years. It is unmaintained supply-chain surface. The engine underneath is fragile by design: correctness depends on PHP parser compatibility with your exact runtime version, on cache invalidation being perfect across deploys, and on developers understanding that stack traces and dd() output point at generated proxies rather than their source. Upgrading PHP minors becomes a re-validation event, not a routine bump.

Key questions.

  1. Which cross-cutting concerns actually require AOP, and can they be met with middleware, events/listeners, model observers, pipeline decorators, or the decorator pattern? AOP is usually chosen for logging/tracing, caching, transactions, and authorization — all of which Laravel already addresses with first-party primitives.
  2. If AOP is genuinely required, is ray/aop or a narrower attribute-driven proxy/interceptor library acceptable instead?
  3. Who owns a forked adapter in perpetuity, and what is the trigger to abandon it?
  4. Do we need weaving at all, or would explicit decorators at container-binding time deliver 90% of the value at 10% of the risk?
  5. What is the PHP version upgrade policy, and can we afford a per-upgrade re-qualification of parser-level behavior?

Integration Approach

Stack fit. Treat this repository as a reference implementation, not a dependency. Do not add it to composer.json. If AOP is approved, depend on goaop/framework directly (after verifying its PHP version support against your runtime) and write a first-party Laravel bridge: a ServiceProvider that registers the aspect kernel, a Laravel-backed AspectContainer adapter resolving aspects via app(), a config file mapping include/exclude path patterns to app/ rather than src/, and an Artisan aop:weave command invoked in the deploy pipeline.

Migration path. There is no migration from this bundle — there is only a greenfield bridge. Sequence it as:

  1. Spike (1 week). Install goaop/framework in a throwaway Laravel app, weave one app/ class, confirm behavior under default autoload, -o, --classmap-authoritative, with and without opcache. Output: a go/no-go on weaving reliability. This is the cheapest possible kill switch — run it before any design work.
  2. Decision gate. Compare against middleware/decorator alternatives on a single concrete concern. Require a written justification if AOP wins.
  3. Bridge build (2–4 weeks). Provider, aspect container, config, weaving command, cache directory outside storage/framework versioning, deploy-step documentation.
  4. Pilot (2–3 weeks). One bounded aspect (e.g., timing/metrics) in one module, with an explicit non-goal of touching domain logic.
  5. Broaden or retire. Retire the pilot if the concern can be expressed as middleware after all — that outcome is a success, not a failure.

Compatibility. Pin the engine to an exact patch version and record the PHP versions validated. Add an automated smoke test that boots the app, resolves a woven class, and asserts interception — this is the regression that catches upstream breakage on every upgrade. Exclude vendor/ and framework internals from weaving to bound cache size and risk. Document that Octane deployments must reset aspect state per request or forbid stateful aspects outright.

Sequencing note. Do not run the weaving step and the application on the same filesystem without a versioned cache directory; concurrent deploys will interleave partially-woven classes.

Operational Impact

Maintenance. Effectively unmaintained upstream for the bundle; the engine has more activity but is a small-team project with a correspondingly small bus factor. If adopted, you own the adapter and inherit an implicit obligation to fork the engine on any PHP upgrade that breaks the parser. Budget this as a standing line item, not a one-off integration cost.

Support. No vendor, no support contract, no guaranteed security response. Any CVE in the parser or stream-wrapper path is yours to patch. This is the single strongest argument against adoption in a regulated or long-lived codebase.

Scaling. Weaving cost is paid at build/deploy time, which is the right place — but the aspect cache directory grows with the woven class count and must be shipped to every node. Deploy time increases modestly; cold-start behavior under preload/JIT needs explicit validation. Runtime overhead per intercepted call is small but non-zero and applies to every woven class, so scope inclusion tightly. Octane compatibility requires deliberate work: process-global aspect container plus singleton aspects equals cross-request state leakage, and debugging that class of bug is expensive.

Failure modes. Ranked by cost of discovery:

  • Silent non-weaving — a class isn't matched by include patterns, or loads via classmap, or is final; behavior is simply the un-aspect version with no error. Highest risk; mitigate with a startup assertion.
  • Stale cache after deploy — nodes serving proxies from a previous release; symptoms are inconsistent and environment-specific.
  • Parser incompatibility on PHP upgrade — hard failure at boot, which is at least loud.
  • Aspect state leakage under long-running workers — subtle, data-dependent, and the hardest to reproduce.
  • Debugging friction — stack traces referencing generated proxies; developer velocity cost that never shows up in an estimate.

Ramp-up. Steep for the team, not for the tooling. AOP is a concept most Laravel developers have never worked with, and the failure modes above are all "invisible until you know to look." Expect 2–3 sprints before the team is productive, plus permanent onboarding cost for every new engineer. Given a 54-star, seven-year-stale bundle with zero dependents, that education investment is buying access to a mechanism that Laravel's middleware, events, observers, and container decoration already cover for the majority of real use cases. Recommend the one-week spike as the only committed spend, with a strong default posture of not adopting.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin