presta/composer-public-bundle
Presta Composer Public Bundle exposes a public Composer repository from your Symfony application, letting you serve package metadata and downloads to clients. Useful for hosting private or internal packages publicly with minimal setup, while keeping control over what gets published and how dependenc...
Read this first: this is a Symfony 2 bundle, not a Laravel package. It has no service provider, no facade, no config/*.php, and it was last released in February 2014 and is archived. There is nothing to composer require into a modern Laravel app, and the Composer plugin API it was built against (Composer 1.x era) will not load cleanly under current Composer versions. Treat this assessment as "should I copy the idea?" rather than "should I install it?"
If you are inheriting a legacy Symfony 2.3–2.8 codebase that already uses it, the minimal path is:
composer.json extra block — that manifest is the source of truth for which public libraries (jQuery, Bootstrap, TinyMCE, icon sets, etc.) get pulled in.app/AppKernel.php and that web/ is writable by the deploy user.presta:composer-public:* command) and watch what lands in web/.composer update plus a re-run of the command.Where to look in the repo, in order: README.md → Resources/config/ (service wiring and the manifest schema) → the Command/ directory (what actually moves files onto disk) → composer.json (which Composer APIs it binds to).
The mental model is "Composer as a front-end dependency manager." You declare a library and a target path, and the bundle copies the published files into your public web root. That maps onto four patterns you will actually meet:
extra config, pinned to a tag or commit. Nobody downloads a .zip into web/js by hand. If you adopt the idea in Laravel, the direct translation is package.json + npm ci, not this bundle.post-install-cmd / post-update-cmd so a fresh clone becomes runnable after composer install. This is the one genuinely good idea in the package and it survives translation to any ecosystem — in Laravel you get the same behaviour from npm ci && npm run build in a Composer script or your deploy pipeline.web/<vendor-libs>/ entry in .gitignore so a locally generated tree never gets committed by accident.For a Laravel codebase, the honest translation of each pattern is: manifest → package.json; install-on-event → composer.json scripts calling npm ci; materialisation → npm run build (Vite/Mix) into public/build; environment pinning → package-lock.json per branch. Vendor-published assets (php artisan vendor:publish) cover the PHP-package-ships-static-files case that this bundle was invented for.
composer require to fail on dependency resolution long before you hit a runtime error. Do not fight this.web/ directory. In a Laravel app the equivalent is public/, but there is no configuration hook to tell it that, so any reuse means forking.-v and check the exit code — file-copy failures in this era of Symfony often logged instead of throwing. Verify web/ ownership and that umask on the deploy user is not producing unreadable files served as 403s.post-install-cmd runs the asset install before the bundle's dependencies are autoloaded, you get a class-not-found with no useful trace. Chain the commands explicitly rather than relying on declaration order.npm/yarn with Vite or Mix in Laravel, and if you are stuck maintaining a Symfony 2 app that depends on this, plan the migration off it as part of the framework upgrade — the asset pipeline (Assetic → Webpack Encore) changes at the same time anyway.How can I help you explore Laravel packages today?