PHPackages                             goedemiddag/laravel-autodiscovery-lock - 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. goedemiddag/laravel-autodiscovery-lock

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

goedemiddag/laravel-autodiscovery-lock
======================================

Creates a lock file containing all the packages which are auto-discovered by Laravel.

3.0.0(2mo ago)72.8k↓33.3%4[4 issues](https://github.com/goedemiddag/laravel-autodiscovery-lock/issues)MITPHPPHP ^8.2

Since Nov 25Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/goedemiddag/laravel-autodiscovery-lock)[ Packagist](https://packagist.org/packages/goedemiddag/laravel-autodiscovery-lock)[ RSS](/packages/goedemiddag-laravel-autodiscovery-lock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (16)Used By (0)

Laravel autodiscovery lock
==========================

[](#laravel-autodiscovery-lock)

This package allows you to monitor the [autodiscovery of your Laravel application](https://github.com/goedemiddag/laravel-autodiscovery-lock). By running the supplied command in the post-autoload-dump event, you can generate a file that contains all the autodiscovered packages. This file can then be used to check for unacknowledged autodiscoveries.

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

[](#installation)

First use composer to install the package using the following command

```
composer require goedemiddag/laravel-autodiscovery-lock
```

This will register a command in your application. To use this command, you need to add it to the post-autoload-dump event in your composer.json file right under the `package:discover` function laravel has already registered there. It should look something like this:

```
{
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi",
            "@php artisan autodiscovery:generate-lock"
        ]
    }
}
```

Usage
-----

[](#usage)

The package has two main usages. Generating a lock file to keep track of the autodiscoveries and checking for unacknowledged autodiscoveries,
and Verifying that your lock file and autodiscovered packages are in sync.

### Generating the lock file

[](#generating-the-lock-file)

To generate the first autodiscovery lock file, run the following command:

```
php artisan autodiscovery:generate-lock
```

This will generate a file called `autodiscovery.lock` in the root of your project. This file contains all the autodiscovered packages and which providers / aliases they provide. After generating and committing this file, and registering the above command in the composer.json scripts you should be set for automatic updates each time composer installs or updates a package, or dumps the autoload in general.

### Verifying the lock file

[](#verifying-the-lock-file)

Validating the lock file allows you to make sure installed packages did not change their autodiscoveries without you knowing. To validate the lock file, run the following command:

```
php artisan autodiscovery:verify-lock
```

If there is a difference between the lock and the autodiscovered packages, the command will exit with a non-zero exit code. This allows you to use this command in your CI/CD pipeline with ease. Just run the command in the pipeline for your Pull Requests, and/or run the command in your build pipeline.

Pipeline examples
-----------------

[](#pipeline-examples)

TBD

Contributing
------------

[](#contributing)

Found a bug or want to add a new feature? Great! There are also many other ways to make meaningful contributions such as reviewing outstanding pull requests and writing documentation. Even opening an issue for a bug you found is appreciated.

If you would like to contribute code, please see our [contributing guide](CONTRIBUTING.md)

Credits
-------

[](#credits)

- [Bonroyage](https://github.com/bonroyage) - For helping out with the initial implementation.
- [NiekKeijzer](https://github.com/NiekKeijzer) - For reviewing the code for the initial implementation.
- [All Contributors](https://github.com/goedemiddag/laravel-autodiscovery-lock/graphs/contributors)

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance76

Regular maintenance activity

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 60.3% 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

Every ~134 days

Recently: every ~240 days

Total

10

Last Release

62d ago

Major Versions

0.1.0 → 1.0.02022-11-25

1.0.0 → 2.0.x-dev2022-12-06

1.x-dev → 2.0.02022-12-06

2.2.0 → 3.0.02026-03-18

PHP version history (3 changes)0.1.0PHP ^7.4 || ^8.0

2.0.x-devPHP ^8.1

3.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11698012?v=4)[Goedemiddag!](/maintainers/Goedemiddag)[@goedemiddag](https://github.com/goedemiddag)

![](https://www.gravatar.com/avatar/de3977085d3fed790aa08881dcb6cb16a6ca162714a95a01ba4d99abad28f387?d=identicon)[silvano-a](/maintainers/silvano-a)

---

Top Contributors

[![silvano-a](https://avatars.githubusercontent.com/u/8051801?v=4)](https://github.com/silvano-a "silvano-a (38 commits)")[![dvdheiden](https://avatars.githubusercontent.com/u/90568118?v=4)](https://github.com/dvdheiden "dvdheiden (12 commits)")[![NiekKeijzer](https://avatars.githubusercontent.com/u/8819508?v=4)](https://github.com/NiekKeijzer "NiekKeijzer (6 commits)")[![joost-v](https://avatars.githubusercontent.com/u/108678050?v=4)](https://github.com/joost-v "joost-v (5 commits)")[![Benno6194](https://avatars.githubusercontent.com/u/11322320?v=4)](https://github.com/Benno6194 "Benno6194 (2 commits)")

---

Tags

autodiscoverycomposerlaravellaravelservice provideraliaslockautodiscovery

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/goedemiddag-laravel-autodiscovery-lock/health.svg)

```
[![Health](https://phpackages.com/badges/goedemiddag-laravel-autodiscovery-lock/health.svg)](https://phpackages.com/packages/goedemiddag-laravel-autodiscovery-lock)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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