From 4fb0dd2c34a2d96ccb1385a5e2e2ee2cad5ce19b Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 19 Feb 2026 11:57:06 +0100 Subject: [PATCH] minor: Simplify bump script by merging require loops --- bump | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/bump b/bump index 92749658..cff8a824 100755 --- a/bump +++ b/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; + } } }