Skip to content

Commit

Permalink
Merge 3.x into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed May 23, 2022
2 parents 7a869e8 + e76f4f5 commit da97793
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 4.x
pull_request:

permissions:
contents: read

jobs:
build:
name: Sphinx build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 4.x
pull_request:

permissions:
contents: read

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 4.x
pull_request:

permissions:
contents: read

jobs:
phpstan:
name: PHPStan
Expand All @@ -39,6 +42,7 @@ jobs:

- name: PHPStan
run: vendor/bin/phpstan --no-progress --memory-limit=1G analyse --error-format=github

psalm:
name: Psalm

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/symfony-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 4.x
pull_request:

permissions:
contents: read

jobs:
container:
name: Symfony container
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 4.x
pull_request:

permissions:
contents: read

jobs:
test:
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"homepage": "https://docs.sonata-project.org/projects/SonataTranslationBundle",
"require": {
"php": "^7.4 || ^8.0",
"sonata-project/admin-bundle": "^4.0",
"sonata-project/block-bundle": "^4.0",
"sonata-project/admin-bundle": "^4.8",
"sonata-project/block-bundle": "^4.11",
"symfony/config": "^4.4 || ^5.3 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
"symfony/form": "^4.4 || ^5.3 || ^6.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Block/LocaleSwitcherBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function execute(BlockContextInterface $blockContext, ?Response $response

\assert(\is_string($template));

return $this->renderPrivateResponse($template, [
return $this->renderResponse($template, [
'block_context' => $blockContext,
'block' => $blockContext->getBlock(),
], $response);
Expand Down
1 change: 1 addition & 0 deletions tests/App/config/config_v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ parameters:
locale: 'en'

sonata_block:
http_cache: false
blocks:
sonata_translation.block.locale_switcher: ~
1 change: 1 addition & 0 deletions tests/App/config/config_v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ parameters:
locale: 'en'

sonata_block:
http_cache: false
blocks:
sonata_translation.block.locale_switcher: ~
12 changes: 2 additions & 10 deletions tests/App/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,16 @@
->set(GedmoCategoryAdmin::class)
->tag('sonata.admin', [
'manager_type' => 'orm',
'model_class' => GedmoCategory::class,
'label' => 'Gedmo Category',
])
->args([
'',
GedmoCategory::class,
null,
])

->set(KnpCategoryAdmin::class)
->tag('sonata.admin', [
'manager_type' => 'orm',
'model_class' => KnpCategory::class,
'label' => 'Knp Category',
])
->args([
'',
KnpCategory::class,
null,
])

->set('app.gedmo.translation_listener', TranslatableListener::class)
->call('setAnnotationReader', [new Reference('annotation_reader')])
Expand Down

0 comments on commit da97793

Please sign in to comment.