Skip to content

Commit

Permalink
Fix deprecations of Symfony 6.3 (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
stof authored Jul 3, 2023
1 parent cdee505 commit 820a1fa
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ env:
jobs:
test:
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}
runs-on: 'ubuntu-latest'
# TODO find a different setup for the JS testsuite as phantomjs is abandoned and is not available on newer runner images
runs-on: 'ubuntu-20.04'
continue-on-error: ${{ matrix.allowed-to-fail }}

strategy:
Expand Down
3 changes: 3 additions & 0 deletions BazingaJsTranslationBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*/
class BazingaJsTranslationBundle extends Bundle
{
/**
* @return void
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
Expand Down
8 changes: 4 additions & 4 deletions Command/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DumpCommand extends Command

/**
* @param TranslationDumper $dumper
* @param $kernelRootDir
* @param string $kernelRootDir
*/
public function __construct(TranslationDumper $dumper, $projectDir)
{
Expand All @@ -43,7 +43,7 @@ public function __construct(TranslationDumper $dumper, $projectDir)
}

/**
* {@inheritDoc}
* @return void
*/
protected function configure()
{
Expand Down Expand Up @@ -80,7 +80,7 @@ protected function configure()
}

/**
* {@inheritDoc}
* @return void
*/
protected function initialize(InputInterface $input, OutputInterface $output)
{
Expand Down Expand Up @@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
));

$this->dumper->dump($this->targetPath, $input->getOption('pattern'), $formats, $merge);

return 0;
}
}
2 changes: 2 additions & 0 deletions DependencyInjection/BazingaJsTranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class BazingaJsTranslationExtension extends Extension
{
/**
* Load configuration.
*
* @return void
*/
public function load(array $configs, ContainerBuilder $container)
{
Expand Down
3 changes: 3 additions & 0 deletions DependencyInjection/Compiler/AddLoadersPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
class AddLoadersPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('bazinga.jstranslation.controller')) {
Expand Down
3 changes: 3 additions & 0 deletions DependencyInjection/Compiler/TranslationResourceFilesPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
*/
class TranslationResourceFilesPass implements CompilerPassInterface
{
/**
* @return void
*/
public function process(ContainerBuilder $container)
{
if (!$container->has('translator.default')) {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public function getLogDir(): string
return sys_get_temp_dir().'/'.Kernel::VERSION.'/bazinga-js-translation/logs';
}

public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__.'/config/'.$this->environment.'.yml');
$loader->load(__DIR__.'/config/base_config.yml');
$loader->load(__DIR__.'/config/disable_annotations.yml');

if (self::VERSION_ID < 40200 && file_exists(__DIR__.'/Resources/translations') === false) {
self::recurseCopy(__DIR__.'/../translations', __DIR__.'/Resources/translations');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class GetTranslationWithMethodCallsFromDefinition implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$translationFile = __DIR__ .'/../../Resources/translations/bar.en.yml';
$translator = $container->findDefinition('translator.default');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestingPurposesBundle extends Bundle
{
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
parent::build($container);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TestingPurposesExtension extends Extension
{
public function load(array $config, ContainerBuilder $container)
public function load(array $config, ContainerBuilder $container): void
{
}
}

0 comments on commit 820a1fa

Please sign in to comment.