diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 3b1aacac..eb4da81d 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Python 3.11 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.11' cache: 'pip' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0802c4f5..ee69349c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -34,7 +34,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 26f0d95e..ace06d4d 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -34,7 +34,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest @@ -58,7 +58,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest @@ -82,7 +82,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest diff --git a/.github/workflows/symfony-lint.yaml b/.github/workflows/symfony-lint.yaml index 72f9e373..cdbc6dc3 100644 --- a/.github/workflows/symfony-lint.yaml +++ b/.github/workflows/symfony-lint.yaml @@ -34,7 +34,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest @@ -58,7 +58,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest @@ -82,7 +82,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest @@ -106,7 +106,7 @@ jobs: tools: composer:v2 - name: Install Composer dependencies (highest) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: highest diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f3e817f..f8709768 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -83,7 +83,7 @@ jobs: run: composer require ${{ matrix.variant }} --no-update - name: Install Composer dependencies (${{ matrix.dependencies }}) - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 with: dependency-versions: ${{ matrix.dependencies }} @@ -91,6 +91,6 @@ jobs: run: make coverage - name: Send coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: build/logs/clover.xml diff --git a/src/DependencyInjection/Compiler/TweakCompilerPass.php b/src/DependencyInjection/Compiler/TweakCompilerPass.php index 787161bf..165895a0 100644 --- a/src/DependencyInjection/Compiler/TweakCompilerPass.php +++ b/src/DependencyInjection/Compiler/TweakCompilerPass.php @@ -130,14 +130,15 @@ private function createBlockSettings(array $tags = [], array $defaultContexts = * * @return string[] */ - private function getContextFromTags(array $tags) + private function getContextFromTags(array $tags): array { - return array_filter(array_map(static function (array $attribute): ?string { + $contexts = []; + foreach ($tags as $attribute) { if (\array_key_exists('context', $attribute) && \is_string($attribute['context'])) { - return $attribute['context']; + $contexts[] = $attribute['context']; } + } - return null; - }, $tags)); + return $contexts; } }