Download the PHP package sofascore/purgatory-bundle without Composer
On this page you can find all versions of the php package sofascore/purgatory-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sofascore/purgatory-bundle
More information about sofascore/purgatory-bundle
Files in sofascore/purgatory-bundle
Package purgatory-bundle
Short Description A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.
License MIT
Informations about the package purgatory-bundle
SofascorePurgatoryBundle
A Symfony bundle designed to automatically generate and send cache purge requests to HTTP cache backends like Varnish. It leverages Doctrine events to track changes in entities and generates URLs that need to be purged based on configured routes.
Features
-
Doctrine Event Integration: Listens to Doctrine lifecycle events (
postUpdate
,postRemove
,postPersist
) to automatically detect when entities are modified, created, or deleted. -
Automatic URL Generation: Automatically generates purge requests for relevant URLs based on the affected entities and their associated routes.
-
Flexible Configuration:
- Primary configuration is through the PHP attribute,
#[PurgeOn]
, allowing you to directly annotate entity classes with cache purge rules. - Supports YAML configuration for flexibility depending on your project's requirements.
- Primary configuration is through the PHP attribute,
-
Built-in Purger Support: Comes with built-in support for Symfony HTTP Cache and a basic Varnish implementation. For advanced use cases, you can create custom purgers by implementing the
PurgerInterface
. - Asynchronous Processing: Includes built-in support for Symfony Messenger to process purge requests asynchronously for better scalability and efficiency.
Requirements
- PHP 8.1 or higher
- Symfony 5.4 or Symfony 6.4 or higher
Installation
Require the bundle using Composer:
If your project doesn't use Symfony Flex, continue with the following steps:
-
Create a configuration file under
config/packages/purgatory.yaml
. Here's a reference configuration: - Enable the bundle in
config/bundles.php
by adding it to the array:
Usage
For detailed instructions and examples, refer to the documentation.
Versioning
This project follows Semantic Versioning 2.0.0.
Reporting Issues
Use the issue tracker to report any issues you encounter.
License
See the LICENSE file for details (MIT).
All versions of purgatory-bundle with dependencies
doctrine/dbal Version ^3.8 || ^4.0
doctrine/doctrine-bundle Version ^2.12
doctrine/orm Version ^2.19 || ^3.1
symfony/config Version ^5.4 || ^6.4 || ^7.0
symfony/console Version ^5.4 || ^6.4 || ^7.0
symfony/dependency-injection Version ^5.4 || ^6.4 || ^7.0
symfony/finder Version ^5.4 || ^6.4 || ^7.0
symfony/framework-bundle Version ^5.4 || ^6.4 || ^7.0
symfony/http-kernel Version ^5.4 || ^6.4 || ^7.0
symfony/polyfill-php84 Version ^1.30
symfony/property-access Version ^5.4 || ^6.4 || ^7.0
symfony/property-info Version ^5.4 || ^6.4 || ^7.0
symfony/routing Version ^5.4 || ^6.4 || ^7.0