mirror of
https://github.com/symfony/ai.git
synced 2026-03-23 23:42:18 +01:00
minor: Simplify bump script by merging require loops
This commit is contained in:
20
bump
20
bump
@@ -165,19 +165,13 @@ use Symfony\Component\Finder\Finder;
|
||||
$modified = false;
|
||||
$fileUpdates = 0;
|
||||
|
||||
foreach ($data['require'] ?? [] as $package => $constraint) {
|
||||
if (str_starts_with($package, 'symfony/ai-') || 'symfony/mcp-bundle' === $package) {
|
||||
$data['require'][$package] = $composerConstraint;
|
||||
$modified = true;
|
||||
++$fileUpdates;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($data['require-dev'] ?? [] as $package => $constraint) {
|
||||
if (str_starts_with($package, 'symfony/ai-') || 'symfony/mcp-bundle' === $package) {
|
||||
$data['require-dev'][$package] = $composerConstraint;
|
||||
$modified = true;
|
||||
++$fileUpdates;
|
||||
foreach (['require', 'require-dev'] as $section) {
|
||||
foreach ($data[$section] ?? [] as $package => $constraint) {
|
||||
if (str_starts_with($package, 'symfony/ai-') || 'symfony/mcp-bundle' === $package) {
|
||||
$data[$section][$package] = $composerConstraint;
|
||||
$modified = true;
|
||||
++$fileUpdates;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user