Download the PHP package mikamatto/file-cleanup-bundle without Composer
On this page you can find all versions of the php package mikamatto/file-cleanup-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mikamatto/file-cleanup-bundle
More information about mikamatto/file-cleanup-bundle
Files in mikamatto/file-cleanup-bundle
Download mikamatto/file-cleanup-bundle
More information about mikamatto/file-cleanup-bundle
Files in mikamatto/file-cleanup-bundle
Vendor mikamatto
Package file-cleanup-bundle
Short Description Automatically cleans up files when their associated Doctrine entities are deleted
License
Package file-cleanup-bundle
Short Description Automatically cleans up files when their associated Doctrine entities are deleted
License
Please rate this library. Is it a good library?
Informations about the package file-cleanup-bundle
MikamattoFileCleanupBundle
Provides an infrastructure to streamline automatic file cleanup when Doctrine entities are deleted. The bundle abstracts the file management logic through a registry pattern, allowing applications to implement type-specific file managers while maintaining a clean separation of concerns.
Installation
Usage
1. Implement FileBoundInterface on your entity
2. Create a FileManager service
How it works
- When an entity implementing
FileBoundInterfaceis deleted:- The bundle's event subscriber is triggered
- It gets the file types from
getHandledFileTypes() - For each type, it finds the appropriate manager via
getHandledType() - Gets the files to delete via
getBoundFilesByType() - Passes the files to the manager's
deleteFiles()method
The format of the files array returned by getBoundFilesByType() should match what your FileManager implementation expects. The bundle itself doesn't impose any specific structure. For example:
Requirements
- PHP 8.2 or higher
- Symfony 6.4 or higher
License
MIT
All versions of file-cleanup-bundle with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.2
symfony/framework-bundle Version 7.*
doctrine/orm Version ^3.2
doctrine/doctrine-bundle Version ^2.11
symfony/dependency-injection Version 7.*
symfony/framework-bundle Version 7.*
doctrine/orm Version ^3.2
doctrine/doctrine-bundle Version ^2.11
symfony/dependency-injection Version 7.*
The package mikamatto/file-cleanup-bundle contains the following files
Loading the files please wait ...