Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

License Laravel Package

ergebnis/license

ergebnis/license is a Composer package that abstracts open-source licenses for PHP projects. It helps automate writing LICENSE files and file-level headers, with integration for friendsofphp/php-cs-fixer and license types such as MIT.

View on GitHub
Deep Wiki
Context7

💼 Provides a composer package with an abstraction of an open-source license.

Frequently asked questions about License
How do I install ergebnis/license in a Laravel project?
Install it as a development dependency with composer require --dev ergebnis/license. Commit the updated composer.json and composer.lock so the rest of your team uses the same version. Because it is a dev tool, it does not need to be deployed to production. Then configure it in your .php-cs-fixer.php file or use it to generate LICENSE content.
Does ergebnis/license support Laravel 10, 11, or 12?
ergebnis/license is not a Laravel framework package; it is a Composer abstraction for open-source licenses that can be used in Laravel projects. Laravel version compatibility therefore depends mainly on the PHP version supported by your Laravel release and the package's own Composer constraints. Check the newly published supported PHP versions list from release 2.8.0 and your composer.json platform requirements before adopting it. It integrates as a require-dev dependency rather than a runtime Laravel service.
What PHP versions does ergebnis/license support?
Release 2.8.0 adds a new list of supported PHP versions, and that list should be treated as the authoritative source during evaluation. The context does not specify the exact versions, so verify the published list and composer.json constraints before rollout. This reduces prior compatibility ambiguity compared with earlier assessments. Use the documented list rather than assuming support from Laravel's own PHP requirements.
How do I configure ergebnis/license with friendsofphp/php-cs-fixer?
Add ergebnis/license to require-dev and reference a license type such as License\Type\MIT in your .php-cs-fixer.php configuration. Use the license object to save LICENSE or LICENSE.md and configure the header_comment fixer to replace file-level headers in PHP files. The README shows this pattern with a copyright block and a path to the LICENSE.md file. Validate the fixer locally before committing so CI does not fail on formatting.
Can ergebnis/license update license years automatically in GitHub Actions?
The package provides integration examples for GitHub Actions, including a renew workflow pattern for automatic year updates. Automatic updates depend on a correctly configured GitHub token and workflow permissions; misconfiguration can block the renewal. Teams copying example workflows should pin action versions deliberately instead of assuming the docs reference the latest major versions. Test the scheduled workflow in a branch before relying on it for maintained projects.
Which license types does ergebnis/license support?
The evaluation context names MIT, None, and BSD3Clause as license types, with coverage beyond those possibly limited. The README example focuses on the MIT license type. If your project uses a different license, verify whether the type is available or whether you need to supply custom license text. Do not assume full SPDX coverage without checking the source and tests.
Is ergebnis/license safe to use in production Laravel applications?
It is intended as a development dependency for license file and header automation, so it should not affect Laravel runtime behavior in production. The package has zero dependents, so production readiness is not proven by widespread adoption, though the risk is moderate-low for this narrow dev-tool use case. Keep it in require-dev and avoid shipping it as part of your deployed application. Have a contingency plan such as a simple PHP-CS-Fixer header configuration if maintenance stalls.
How do I test ergebnis/license integration in CI?
Run PHP-CS-Fixer in dry-run mode during CI to confirm that LICENSE files and headers match the expected output. Validate the workflow locally first, then add a CI job that uses explicitly pinned GitHub Actions versions. If you use the automatic year-renewal workflow, test token permissions and scheduled execution separately from the main build. Keep the check non-critical or easy to patch so formatting failures do not block unrelated releases.
What are alternatives to ergebnis/license for license headers?
You can configure friendsofphp/php-cs-fixer's header_comment fixer directly with your own copyright and license text. A custom Composer script or small PHP script can also write LICENSE files and update years. ergebnis/license is attractive when you want a small abstraction around license types and reusable PHP-CS-Fixer configuration. Evaluate alternatives if you need broader license coverage or do not already use PHP-CS-Fixer.
How do I handle corporate copyright holders and multi-year licenses with ergebnis/license?
The README example uses a copyright line with a person's name and a year range, and the package is designed to automate writing that header text. For corporate holders, supply the company name in the copyright line through your PHP-CS-Fixer configuration rather than relying on the example verbatim. Multi-year ranges can be represented in the header string, but automatic year updates should be tested to ensure they preserve the intended range and holder format. The context does not document special corporate-holder handling, so verify custom templates before rollout.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager