All contributions

composer/satis

Satis

A static Composer repository generator where PHP teams keep their private libraries and archives.

Language
PHP
GitHub stars
3,307
Merged changes
4

What we changed

A partial build with a packages filter now finds dependencies in the repositories the filter dropped, and homepage and archive.prefix-url in satis.json accept relative references such as /satis.

What this work shows

  • Composer dependency resolution
  • Config validation with JSON Schema
  • PHPUnit tests on throwaway repositories
What was broken

A partial build lost the dependencies

The command satis build satis.json web/ vendor/package narrowed the repository list to those matching the packages filter. The dependency pass reused that narrowed list, so with require-dependencies it could not find any dependency.

How we fixed it

Dropped repositories return for dependencies

PackageSelection keeps the repositories the packages filter dropped and adds them to the set used to look up dependencies, as the repository URL filter already did. A test builds two local repositories and checks that the dependency ends up in the result.

#1207

What was broken

The config rejected relative addresses

The satis.json schema required a full URI for homepage and archive.prefix-url. A value such as /satis failed the config check, which made running Satis locally harder.

How we fixed it

The uri-reference format in the schema

Both fields now use the uri-reference format, which the json-schema library already supports. /satis passes the check while text that is not an address is still rejected, and new BuildCommand tests cover it.

#1218

What was broken

Purge failed on a missing archive

The purge command failed with unlink(...): No such file or directory when another build or purge had already removed an unreferenced archive. The same race affected the removal of empty directories.

How we fixed it

A missing archive is skipped with a warning

Deletion now goes through Composer's Filesystem. If it fails and the file is already gone, purge prints Skipped missing archive and carries on, while a file that exists but cannot be deleted still throws. Empty directories are removed with @rmdir, and two new tests cover disappearing archives and an archive that cannot be deleted.

#1252

Merged changes 4

  1. #1280 Validate the repository name in the init command Merged 23 November 2026
  2. #1252 Skip unreferenced archives that are already gone when purging Merged 18 November 2026
  3. #1218 Allow relative URI references for homepage and archive prefix-url Merged 6 October 2026
  4. #1207 Resolve dependencies through the repositories the packages filter dropped Merged 14 September 2026

What it taught us

A filter that picks what to build must not decide where dependencies may come from. In a JSON schema we pick the format that fits real use: uri-reference lets /satis through and still rejects text that is not an address.

More about this technology: PHP

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.