Pomposer: A pnpm-Style Package Manager for PHP
Tired of reinstalling the same Composer dependencies across projects? Meet Pomposer – an experimental PHP package manager that borrows pnpm’s global caching magic to save disk space and installation time.
What It Does
Pomposer wraps Composer with a global package store (~/.pomposer-store), so identical dependencies across projects are cached and shared. Instead of duplicating vendor/ directories, it:
- 📦 Stores packages globally (one copy per version)
- ⚡ Links them project-to-project via an optimized autoloader
- 🤝 Maintains compatibility with Laravel’s auto-discovery and Composer scripts
Why It’s Cool
1. pnpm Philosophy, PHP Execution
Like pnpm for Node.js, Pomposer avoids redundant downloads. Install monolog/monolog in 10 projects? Only one copy exists on disk.
2. Works with Existing Workflows
It generates vendor/installed.json and runs post-install scripts (e.g., php artisan package:discover), so Laravel and other frameworks just work.
3. Lightweight vendor/ Directories
Your project’s vendor/ becomes mostly symbolic links, reducing disk usage.
How to Try It
composer global require hichemtab-tech/pomposer
pomposer install # Instead of `composer install`
Example: Test it with a Laravel app:
laravel new demo-app --breeze
cd demo-app
rm -rf vendor composer.lock
pomposer install # Watch the global cache in action
Current Limitations
Pomposer is early-stage beta. A few caveats:
- No symlinking (yet) – autoloader points directly to the global store
- Basic dependency resolver (works best with
composer.lock) - No
psr-0or Composer plugin support
Final Thoughts
This isn’t ready to replace Composer yet, but it’s a promising experiment. If you’re juggling multiple PHP projects with overlapping dependencies (looking at you, Laravel devs), Pomposer could save you gigs of disk space.
Worth watching? Absolutely. Want to help shape it? Contribute here. 🚀
Like this? Star the repo → HichemTab-tech/pomposer
Try it, test it, break it: