Weave Code
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

Lean Package Validator Laravel Package

stolt/lean-package-validator

CLI tool to validate a project or micro-package for “leanness” by ensuring common repo artifacts are excluded from release archives. Also creates, updates, and reformats .gitattributes export-ignore entries for lean distribution packages.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Lean Package Strategy: Enables adoption of a "lean" package philosophy by excluding non-essential files (e.g., tests, dev tools) from release artifacts, reducing package size and improving performance.
  • CI/CD Integration: Facilitates automated validation of .gitattributes in pipelines, ensuring compliance with lean package standards before releases.
  • Build vs. Buy: Justifies buying this package over custom scripts for .gitattributes management, given its presets, extensibility, and integration with Composer/GitHub Actions.
  • Developer Experience: Improves DX by standardizing .gitattributes formatting (e.g., sorting, alignment) and providing CLI tools for creation/updates.
  • Multi-Language Support: Expands use cases beyond PHP (e.g., Python, JavaScript) via custom glob patterns, aligning with roadmap goals for cross-language tooling.
  • Security/Compliance: Mitigates risks of accidentally bundling sensitive files (e.g., .env, composer.lock) in releases by enforcing strict validation.

When to Consider This Package

  • Adopt if:

    • Your team prioritizes small, optimized package distributions (e.g., micro-services, libraries).
    • You need automated validation of .gitattributes in CI/CD (e.g., GitHub Actions, GitLab CI).
    • Your project uses Composer and follows PHP/Packagist standards (or supports other languages via custom presets).
    • You want to standardize .gitattributes across repositories (e.g., monorepos, open-source projects).
    • You’re releasing PHARs, Docker images, or npm packages where bloat impacts performance.
  • Look elsewhere if:

    • Your project doesn’t use Git or .gitattributes (e.g., SVN, Mercurial).
    • You need fine-grained file-level permissions (use git update-index or custom scripts).
    • Your team lacks Composer/PHP ecosystem familiarity (though presets support other languages).
    • You require real-time validation (e.g., IDE plugins) instead of CLI/GitHub Actions.
    • Your packages are already minimal (e.g., single-file scripts) and don’t need .gitattributes.

How to Pitch It (Stakeholders)

For Executives: "This package automates the enforcement of ‘lean’ package standards—reducing release artifact sizes by excluding dev files (tests, configs) from distributions. It integrates seamlessly with Composer and CI/CD, cutting release times and storage costs. For example, a PHP library could shrink its release size by 30% overnight, improving deployment speed and reducing cloud storage bills. It’s a low-code solution to a high-impact problem, with minimal maintenance overhead."

For Engineers: *"The Lean Package Validator (LPV) is a CLI tool that:

  1. Validates .gitattributes to ensure only essential files (e.g., src/, composer.json) are included in releases.
  2. Auto-generates or reformats .gitattributes with presets for PHP, Python, JS, etc.
  3. Integrates with Composer scripts (e.g., composer validate-gitattributes) and GitHub Actions for zero-effort compliance.
  4. Supports custom glob patterns for non-PHP projects. Use case: Add it to your composer.json scripts to block bloated releases. Example:*
composer require --dev stolt/lean-package-validator
# Then run:
composer validate-gitattributes

It’s like prettier for .gitattributes—consistent, enforceable, and dev-friendly."

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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata