Show HN: Fusion – A PHP Package Manager

2 retlim 4 5/15/2025, 12:47:34 AM gitlab.com ↗
Hi there, I've been working on Fusion, a PHP package manager for PHP-based projects that automates repetitive tasks such as managing dependencies, migrating package states, extending packages, and registering loadable code.

Key features:

- Everything is a modular package

- Scoped metadata and snapshot files

- Lifecycle callbacks

- Auto-generated code registries

- Flexible package references

- Directory type indicators

- Interface-based customization

Repo: https://gitlab.com/valvoid/fusion/php/code

Would love any feedback.

Comments (4)

duskwuff · 7h ago
The vast majority of new PHP projects use the Composer package manager (https://packagist.org/) - it's been the dominant tool in this space for over a decade. How does Fusion differ from Composer, and why would one choose it?
retlim · 5h ago
Thanks for the question. Since HN doesn’t support markdown, I kept the key features list minimal to give a quick overview and point readers to the repo for more details like:

Everything is a modular package

To keep things simple and easy to use, Fusion handles everything, including your project, its dependencies, and even the package manager itself, as a modular package that can be standalone, a nested dependency of another, or both at the same time. This is possible since each package has its own custom directory structure, which you can define in the metadata file as you like.

For example, you can install a release of your project as a standalone, self-updatable package out of the box.

duskwuff · 5h ago
As far as I understand it, most of the things you're saying are true of Composer as well. Composer packages (which can be top-level projects, libraries, or Composer plugins) can have dependencies which are resolved recursively, with version constraints, and are updateable. There's some flexibility in how the contents of those packages are structured, so long as they slot into predictable namespaces, and Composer automatically generates an autoloader script which allows contents from any of those packages to be loaded as needed. Most Composer packages are installed through Packagist, but can also be loaded directly from Git repositories or from the local filesystem (e.g. for local development).

In short: it sounds like you may not be familiar with Composer. I'd strongly recommend that you take a close look at it; you may be reinventing the wheel here.

retlim · 3h ago
I'm referring specifically to the root package.

https://getcomposer.org/doc/03-cli.md#create-project

Composer can install a project initially using "composer create-project", but that's a one-time setup. After that, the root package becomes just a static local project, not something Composer tracks, updates, or upgrades as a package.

https://valvoid.com/registry/packages/1/fusion-php-package-m...

Fusion handles everything as a modular package, including the root project. If the root package's metadata file includes the root package itself as a recursive dependency, "fusion build" can update and upgrade it just like any other package. Fusion builds the entire existing project, not just its dependencies.