Download the PHP package phil/trash-bundle without Composer

On this page you can find all versions of the php package phil/trash-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package trash-bundle

phil/trash-bundle

A trash for deleted pages and other resources: restore them, or purge them after a set time.

phil/trash-bundle gives a Symfony application a trash. A resource goes in through a TrashHandler the application writes for its kind. The handler keeps what it needs to bring the resource back, as JSON, then removes it. The resource comes back through the same handler, under its parent, or under another one when its parent is gone. Once its retention is over, phil:trash:purge deletes it for good. The bundle does not guess how an entity is rebuilt: each kind says what to keep and how to restore it.

It is for an application where editors delete things and sometimes regret it. An administrator lists the trash, most recent first, restores an item or lets it expire. Each step dispatches an event, ResourceTrashed, ResourceRestored or TrashItemPurged, so an audit trail can record who did what. Retention is set in days, for all kinds or kind by kind, which fits a data retention policy.

The trash itself is a Doctrine table, and resources are named through phil/resource. The handler is the one port: a trash in a single table works for any entity, with its children and its files, because the code that knows them is the application's. The resource leaves its table and enters the trash in the same flush.

Status

Part State
TrashItem and the repository port; ResourceReference of phil/resource Implemented and tested
Trash: trash, restore, purge; TrashHandler, Captured Implemented and tested
Events: ResourceTrashed, ResourceRestored, TrashItemPurged Implemented and tested
DoctrineTrashItemRepository Implemented and tested
phil:trash:purge Implemented and tested

Documentation

Document What it covers
Installation Requirements, registering, configuration, the table.
Handlers Writing a TrashHandler, trashing and restoring, a parent that is gone.
Retention Retention by kind, the purge, the events.
Extension points What an application implements, configures, replaces or relies on.
Testing How the bundle is tested.
Reference Every type of the bundle.

Quick start

Requirements

PHP 8.5 or later with ext-mbstring; Doctrine ORM 3.7; PSR-20 and PSR-14; Symfony 8.2's dependency injection, config and UID; phil/resource 0.1 for resource references. Symfony Console is optional.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of trash-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
doctrine/orm Version ^3.7
phil/resource Version ^0.1@dev
psr/clock Version ^1.0
psr/event-dispatcher Version ^1.0
symfony/config Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/uid Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phil/trash-bundle contains the following files

Loading the files please wait ...