Skip to content

Commit 820a1fa

Browse files
authored
Fix deprecations of Symfony 6.3 (#343)
1 parent cdee505 commit 820a1fa

File tree

10 files changed

+22
-10
lines changed

10 files changed

+22
-10
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ env:
1515
jobs:
1616
test:
1717
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}
18-
runs-on: 'ubuntu-latest'
18+
# TODO find a different setup for the JS testsuite as phantomjs is abandoned and is not available on newer runner images
19+
runs-on: 'ubuntu-20.04'
1920
continue-on-error: ${{ matrix.allowed-to-fail }}
2021

2122
strategy:

BazingaJsTranslationBundle.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
*/
1313
class BazingaJsTranslationBundle extends Bundle
1414
{
15+
/**
16+
* @return void
17+
*/
1518
public function build(ContainerBuilder $container)
1619
{
1720
parent::build($container);

Command/DumpCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class DumpCommand extends Command
3232

3333
/**
3434
* @param TranslationDumper $dumper
35-
* @param $kernelRootDir
35+
* @param string $kernelRootDir
3636
*/
3737
public function __construct(TranslationDumper $dumper, $projectDir)
3838
{
@@ -43,7 +43,7 @@ public function __construct(TranslationDumper $dumper, $projectDir)
4343
}
4444

4545
/**
46-
* {@inheritDoc}
46+
* @return void
4747
*/
4848
protected function configure()
4949
{
@@ -80,7 +80,7 @@ protected function configure()
8080
}
8181

8282
/**
83-
* {@inheritDoc}
83+
* @return void
8484
*/
8585
protected function initialize(InputInterface $input, OutputInterface $output)
8686
{
@@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
112112
));
113113

114114
$this->dumper->dump($this->targetPath, $input->getOption('pattern'), $formats, $merge);
115-
115+
116116
return 0;
117117
}
118118
}

DependencyInjection/BazingaJsTranslationExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class BazingaJsTranslationExtension extends Extension
1616
{
1717
/**
1818
* Load configuration.
19+
*
20+
* @return void
1921
*/
2022
public function load(array $configs, ContainerBuilder $container)
2123
{

DependencyInjection/Compiler/AddLoadersPass.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
class AddLoadersPass implements CompilerPassInterface
1313
{
14+
/**
15+
* @return void
16+
*/
1417
public function process(ContainerBuilder $container)
1518
{
1619
if (!$container->hasDefinition('bazinga.jstranslation.controller')) {

DependencyInjection/Compiler/TranslationResourceFilesPass.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*/
1212
class TranslationResourceFilesPass implements CompilerPassInterface
1313
{
14+
/**
15+
* @return void
16+
*/
1417
public function process(ContainerBuilder $container)
1518
{
1619
if (!$container->has('translator.default')) {

Tests/Fixtures/app/AppKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public function getLogDir(): string
6464
return sys_get_temp_dir().'/'.Kernel::VERSION.'/bazinga-js-translation/logs';
6565
}
6666

67-
public function registerContainerConfiguration(LoaderInterface $loader)
67+
public function registerContainerConfiguration(LoaderInterface $loader): void
6868
{
6969
$loader->load(__DIR__.'/config/'.$this->environment.'.yml');
7070
$loader->load(__DIR__.'/config/base_config.yml');
7171
$loader->load(__DIR__.'/config/disable_annotations.yml');
72-
72+
7373
if (self::VERSION_ID < 40200 && file_exists(__DIR__.'/Resources/translations') === false) {
7474
self::recurseCopy(__DIR__.'/../translations', __DIR__.'/Resources/translations');
7575
}

Tests/Fixtures/app/TestingPurposesBundle/DependencyInjection/Compiler/GetTranslationWithMethodCallsFromDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class GetTranslationWithMethodCallsFromDefinition implements CompilerPassInterface
1313
{
14-
public function process(ContainerBuilder $container)
14+
public function process(ContainerBuilder $container): void
1515
{
1616
$translationFile = __DIR__ .'/../../Resources/translations/bar.en.yml';
1717
$translator = $container->findDefinition('translator.default');

Tests/Fixtures/app/TestingPurposesBundle/TestingPurposesBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class TestingPurposesBundle extends Bundle
99
{
10-
public function build(ContainerBuilder $container)
10+
public function build(ContainerBuilder $container): void
1111
{
1212
parent::build($container);
1313

Tests/Fixtures/app/TestingPurposesBundle/TestingPurposesExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class TestingPurposesExtension extends Extension
1010
{
11-
public function load(array $config, ContainerBuilder $container)
11+
public function load(array $config, ContainerBuilder $container): void
1212
{
1313
}
1414
}

0 commit comments

Comments
 (0)