Download the PHP package geonative/garbage-collector without Composer

On this page you can find all versions of the php package geonative/garbage-collector. 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 garbage-collector

Doctrine Garbage Collector

This package is a Symfony Bundle providing a "garbage collector" command to prune Doctrine entities that you consider stale.

Installation

PHP 8.1 or above is required.

Configuration

  1. Add the bundle into your config/bundles.php (likely to be done automatically with Symfony Flex).

  2. Update your configuration:

  3. Update your database schema:

  4. Implement GeoNative\GarbageCollector\PrunableRepositoryInterface on your repositories:
    1. getGarbageCollectorCheckInterval() should return the minimum interval between checks, to avoid ruining your DB performances
    2. pruneStaleEntities() should actually perform removals and return the number of entities which have been removed.

If your entities should be pruned against a DateTime column, you can use GeoNative\GarbageCollector\PruneStaleEntitiesTrait to get started faster.

Usage

Oneshot

You can store this in a crontab to periodically cleanup your entities.

Daemonize

This command can also run in a loop and be daemonized with supervisord or systemctl.

The react/event-loop package is required.

The Garbage Collector will pass every 5 seconds.

Lock

If your application runs on multiple hosts, you may want to prevent several instances of the Garbage Collector from running simultaneously. To do so, just add a --lock option:

Tests

License

MIT.


All versions of garbage-collector with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
symfony/http-kernel Version ^6.4|^7.0
symfony/console Version ^6.4|^7.0
doctrine/doctrine-bundle Version ^2.5
doctrine/orm Version ^2.10
symfony/uid Version ^6.4|^7.0
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 geonative/garbage-collector contains the following files

Loading the files please wait ....