Expand description
Port of Symfony\Flex\PackageFilter (symfony/flex 2.11): Flex’s
PRE_POOL_CREATE listener (Flex::truncatePackages) that removes from
the pool, before it is created, the versions of the packages listed in
symfony/symfony that do not match extra.symfony.require
(SYMFONY_REQUIRE wins; a trailing .x becomes .x-dev). The data
comes from the Flex endpoints’ index.json, key versions
(splits: package → versions it ships in; next: the branch .x
resolves to), merged first endpoint wins. Fetching and caching are the
command layer’s business (vivacity::flex); this module is pure.
ignorePreleases (Composer < 2.9) is not ported: on 2.9+ Flex sets
COMPOSER_PREFER_DEV_OVER_PRERELEASE instead, which the session applies
to the policy.
Structs§
- Flex
Versions - The
versionsentry of the Flex index.
Functions§
- remove_
legacy_ packages PackageFilter::removeLegacyPackages.packagesare pool candidates (arena indices, aliases included);root_constraintsisgetRequires() + getDevRequires()(require wins on a name in both);lockedthe versions ofgetFixedOrLockedPackages()by name (an alias contributes the aliased version too);versionsthe index as fetched — pruned here (getVersions), so a package whose every split version matches the requirement, or none does, is not filtered. Returns the kept indices in order, and whether theRestricting packages…notice is due (once, when a package other thansymfony/symfonyloses a version to the constraint).- symfony_
require Flex::activate: the requirement,SYMFONY_REQUIREoverextra.symfony.require,.x→.x-dev.Nonewhen empty (no filter).