Skip to content

Commit

Permalink
DevKit updates for 5.x branch (#1211)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Langlet <[email protected]>
  • Loading branch information
SonataCI and VincentLanglet authored Jun 19, 2024
1 parent 3eb81d3 commit c022875
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/symfony-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ 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 }}

- name: Run Tests with coverage
run: make coverage

- name: Send coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: build/logs/clover.xml
11 changes: 6 additions & 5 deletions src/DependencyInjection/Compiler/TweakCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit c022875

Please sign in to comment.