PHPackages                             radebatz/preload-collector - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. radebatz/preload-collector

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

radebatz/preload-collector
==========================

Collects list of used classes to be used for PHP 7.4 preloading and provides preload script.

v1.0.0(6y ago)05MITPHPPHP &gt;=7.4

Since May 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/DerManoMann/preload-collector)[ Packagist](https://packagist.org/packages/radebatz/preload-collector)[ Docs](http://radebatz.net/mano/)[ RSS](/packages/radebatz-preload-collector/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Helper library to collect a list of used classes for PHP 7.4 preloading
=======================================================================

[](#helper-library-to-collect-a-list-of-used-classes-for-php-74-preloading)

This library consists of two parts:

- **The collector**

    Typically a middleware that, over time, builds a list of all used classes and, by default, saves this list into the file `preload.json` in the project root.

    Since the generated list of classes is static, it is recommended to do a fresh collection cycle after big code changes that involve a lot of new classes.
- **The preloader**

    A small script which can be used as PHP 7.4 preloading script. The default filename is `preload.php`, also in the project root. Creation of this script is a separate step and the specific command depends on the framework used.

Supported frameworks
--------------------

[](#supported-frameworks)

- Laravel

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

[](#requirements)

- [PHP 7.4 or higher](http://www.php.net/)

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

[](#installation)

You can use **Composer** or simply **Download the Release**

### Composer

[](#composer)

The preferred method is via [composer](https://getcomposer.org). Follow the [installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

```
composer require radebatz/preload-collector
```

Framework integration
---------------------

[](#framework-integration)

### Laravel

[](#laravel)

#### Collecting

[](#collecting)

Once installed via `composer` the included service provider will register a middleware to build the class list. This is an automated step and no manual configuration is required for this.

#### Preloading

[](#preloading)

Once the collection phase is over (the list doesn't change substantially any more), the preload script can be generated using `artisan`

```
php artisan vendor:publish "--provider=Radebatz\PreloadCollector\Laravel\ServiceProvider" --tag=preload
```

After this, both 'preload.php' and the generated 'preload.json' should be added to your projects repository.

#### Configuration

[](#configuration)

The only configuration option available is to enable/disable the collector mdidleware.

This can either be done by publishing the library config via

```
php artisan vendor:publish "--provider=Radebatz\PreloadCollector\Laravel\ServiceProvider" --tag=config
```

and editing the config in your projects `config` folder.

Alternatively, this may be controller via `env` variable like so:

```
export PRELOAD_COLLECTOR_ENABLED=true
```

Testing
-------

[](#testing)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2251d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47783?v=4)[Martin Rademacher](/maintainers/DerManoMann)[@DerManoMann](https://github.com/DerManoMann)

---

Top Contributors

[![DerManoMann](https://avatars.githubusercontent.com/u/47783?v=4)](https://github.com/DerManoMann "DerManoMann (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/radebatz-preload-collector/health.svg)

```
[![Health](https://phpackages.com/badges/radebatz-preload-collector/health.svg)](https://phpackages.com/packages/radebatz-preload-collector)
```

###  Alternatives

[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M86](/packages/mcp-sdk)[moodle/moodle

Moodle - the world's open source learning platform

7.2k88.5k80](/packages/moodle-moodle)[psr7-sessions/storageless

Storageless PSR-7 Session support

652405.7k8](/packages/psr7-sessions-storageless)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

74149.4k30](/packages/jaxon-php-jaxon-core)[tomasnorre/crawler

Crawler extension for TYPO3

57428.7k1](/packages/tomasnorre-crawler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
