PHPackages                             tourze/symfony-aop-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. tourze/symfony-aop-bundle

ActiveLibrary[Framework](/categories/framework)

tourze/symfony-aop-bundle
=========================

AOP for Symfony Framework

1.0.2(5mo ago)327.5k114MITPHPCI passing

Since Jul 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/symfony-aop-bundle)[ Packagist](https://packagist.org/packages/tourze/symfony-aop-bundle)[ RSS](/packages/tourze-symfony-aop-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (19)Versions (9)Used By (14)

AopBundle
=========

[](#aopbundle)

[![Latest Version](https://camo.githubusercontent.com/e83ced195696355b71225d9628ae3b7e4a7b3af94d5560a18b689560065e8e06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f73796d666f6e792d616f702d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/symfony-aop-bundle)[![PHP Version](https://camo.githubusercontent.com/3f6e57cb87c19db37e67f6652fccdc74433c3cf94dcd66bbc281e1f8e68d7386/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f73796d666f6e792d616f702d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/symfony-aop-bundle)[![License](https://camo.githubusercontent.com/54fe85c0ae0339ff639fb03431a2e58e55584957d04e10e41d20d959bc0c3876/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f73796d666f6e792d616f702d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/symfony-aop-bundle)[![Build Status](https://camo.githubusercontent.com/0346e18af1343d739d0405776c07b83798d5bb0200e3efcfdf657e5e662f6403/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Coverage](https://camo.githubusercontent.com/6ce0146325478eb7cebae4cc6139b2af2c161735dd0e3c6ff6802f2c5a708179/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f3f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/php-monorepo)

[English](README.md) | [中文](README.zh-CN.md)

Table of Contents
-----------------

[](#table-of-contents)

- [Overview](#overview)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Features](#features)
- [Basic Usage](#basic-usage)
- [Advanced Usage](#advanced-usage)
- [Performance Monitoring](#performance-monitoring)
- [Best Practices](#best-practices)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [License](#license)

Overview
--------

[](#overview)

AopBundle is a Symfony bundle that implements Aspect-Oriented Programming (AOP) using PHP 8's Attribute features. It enables adding cross-cutting concerns (like logging, caching, transactions) to your code without modifying the core logic.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Symfony 7.3+

Installation
------------

[](#installation)

```
composer require tourze/symfony-aop-bundle
```

Quick Start
-----------

[](#quick-start)

### Step 1: Install the Bundle

[](#step-1-install-the-bundle)

```
composer require tourze/symfony-aop-bundle
```

### Step 2: Create a Simple Aspect

[](#step-2-create-a-simple-aspect)

Create a logging aspect in `src/Aspect/LoggingAspect.php`:

```
