Skip to content

Commit

Permalink
Deprecate "flex-require" sections
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 3, 2022
1 parent c8d046a commit c36d11d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ public function update(Event $event, $operations = [])
if (!isset($json['flex-'.$type])) {
continue;
}

$this->io->writeError(sprintf('<warning>Using section "flex-%s" in composer.json is deprecated, use "%1$s" instead.</>', $type));

foreach ($json['flex-'.$type] as $package => $constraint) {
if ($symfonyVersion && '*' === $constraint && isset($versions['splits'][$package])) {
// replace unbounded constraints for symfony/* packages by extra.symfony.require
Expand Down

0 comments on commit c36d11d

Please sign in to comment.