Skip to main content

Module flex_filter

Module flex_filter 

Source
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§

FlexVersions
The versions entry of the Flex index.

Functions§

remove_legacy_packages
PackageFilter::removeLegacyPackages. packages are pool candidates (arena indices, aliases included); root_constraints is getRequires() + getDevRequires() (require wins on a name in both); locked the versions of getFixedOrLockedPackages() by name (an alias contributes the aliased version too); versions the 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 the Restricting packages… notice is due (once, when a package other than symfony/symfony loses a version to the constraint).
symfony_require
Flex::activate: the requirement, SYMFONY_REQUIRE over extra.symfony.require, .x → .x-dev. None when empty (no filter).