Skip to content

Publish LaraFly as one package without split mirrors - #5

Merged
ancongui merged 2 commits into
mainfrom
fix/one-package-like-laravel
Sep 27, 2026
Merged

ancongui merged 2 commits into
mainfrom
fix/one-package-like-laravel

Conversation

@ancongui

Copy link
Copy Markdown
Contributor

LaraFly's metapackage could not be published without 29 component mirror repositories. Publish the repository root as the firefly/firefly library instead: it contains all component code and replaces the 28 other names with self.version. Applications explicitly require firefly/firefly; compatible component requirements then resolve to that same installation.

The root now owns external runtime dependencies, production autoloading, Laravel provider discovery and the installer binary. Component test namespaces and Lumen sources stay in root autoload-dev; Lumen consumes the root through a copied path repository. Internal component manifests remain available for module checks, and composer mono-validate still validates their dependency versions. Testbench stays optional for consumers.

The installer now uses its bundled skeleton, removing the remaining scaffolding mirror dependency. This necessarily changes the installer source and its dependency boundary to read the kernel version. The PostgreSQL boot provider also changes: because every adapter now ships, it registers outbox migrations only when the PostgreSQL transport is selected. Regression tests cover both changes.

Replace the split release workflow with a read-only tagged-package validation gate. CI also installs an exported distribution without dev dependencies, boots and compiles a real app, runs the bundled installer, installs Lumen using copied root sources, and rejects an incompatible component version. The publishing guide distinguishes a green validation workflow from a version actually indexed and installable on Packagist.

Validation on PHP 8.5:

  • composer check: Pint and PHPStan pass; 3,806 tests passed, 6 skipped; Deptrac 0 violations / 0 skipped violations.
  • composer test:browser: 75 passed.
  • composer validate --strict, composer mono-validate, composer test:package, strict MkDocs build and pre-push guard pass.
  • Independent installed-consumer review verified greeting/dashboard/OpenAPI routes and Swagger assets, the default in-memory event publisher, and inactive PostgreSQL migrations.

The old mirror and metapackage assertions are replaced by the single-package and installed-consumer contracts. PHP 8.3/8.4/8.5 CI must be green before merge. This PR does not tag a release or change downstream pins.

Andres Contreras added 2 commits September 25, 2026 15:16
Generated mechanically from the 29 package composer.json files: 29 replace
entries, 28 psr-4 namespaces remapped to packages/*/src, 2 autoload files, and
every firefly/* dropped from require and require-dev because a package cannot
require what it replaces. composer validate and composer update both pass.

The suite does not: 1173 failed, 2635 passed. The failures cluster in
samples/lumen, which is a consumer application inside the repository with its own
composer.json requiring firefly/* through path repositories — exactly the
relationship the replace is meant to serve, and the one it breaks first. Package
level autoload-dev and test support namespaces are the other suspects.

So the approach is right and the edit is not sufficient: Laravel ships one package
that replaces illuminate/*, but its repository is laid out for that from the
start. Doing it here means deciding what samples/lumen consumes, what the package
level test autoloads become, and whether monorepo-builder still validates. That is
a piece of work, not a config change.

NOT PUSHED and NOT merged. main is untouched and still on v26.09.8.
Make the root firefly/firefly library own component replacements, runtime dependencies, provider discovery, test autoloads and the installer binary. Keep component manifests as internal contracts validated by monorepo-builder.

Use the bundled skeleton in the installer, declare its optional test harness explicitly, and gate PostgreSQL migrations on the selected transport. Exercise exported no-dev applications and copied Lumen consumers in CI, and replace the split release workflow with a tagged-package gate.
@ancongui
ancongui merged commit 002810e into main Sep 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant