Skip to content

Commit

Permalink
Fix Symfony 6.1 deprecation (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas authored Jun 7, 2022
1 parent 22eb70f commit ecd355f
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 15 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ jobs:
symfony-version: 5.4.*
- php-version: 8.1
symfony-version: 5.4.*
- php-version: 8.0
symfony-version: 6.0.*
- php-version: 8.1
symfony-version: 6.0.*
symfony-version: 6.1.*

steps:
- name: "Checkout"
Expand All @@ -45,7 +43,7 @@ jobs:
symfony/http-kernel:${{ matrix.symfony-version }} \
symfony/routing:${{ matrix.symfony-version }} \
symfony/messenger:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
composer update --no-interaction --no-progress
- name: "Run tests with phpunit/phpunit"
run: vendor/bin/phpunit
Expand All @@ -58,7 +56,7 @@ jobs:
matrix:
include:
- php-version: 8.1
symfony-version: 6.0.*
symfony-version: 6.1.*

steps:
- name: "Checkout"
Expand All @@ -78,7 +76,7 @@ jobs:
symfony/http-kernel:${{ matrix.symfony-version }} \
symfony/routing:${{ matrix.symfony-version }} \
symfony/messenger:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
composer update --no-interaction --no-progress
- name: "Run tests with phpunit/phpunit"
env:
Expand All @@ -97,7 +95,7 @@ jobs:
matrix:
include:
- php-version: 8.1
symfony-version: 6.0.*
symfony-version: 6.1.*

steps:
- name: "Checkout"
Expand All @@ -117,20 +115,20 @@ jobs:
symfony/http-kernel:${{ matrix.symfony-version }} \
symfony/routing:${{ matrix.symfony-version }} \
symfony/messenger:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
composer update --no-interaction --no-progress
- name: "Run static analysis with phpstan/phpstan"
run: vendor/bin/phpstan analyze

checkstyke:
checkstyle:
name: "Checkstyle"
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php-version: 8.1
symfony-version: 6.0.*
symfony-version: 6.1.*

steps:
- name: "Checkout"
Expand All @@ -150,7 +148,7 @@ jobs:
symfony/http-kernel:${{ matrix.symfony-version }} \
symfony/routing:${{ matrix.symfony-version }} \
symfony/messenger:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
composer update --no-interaction --no-progress
- name: "Run checkstyle with squizlabs/php_codesniffer"
run: vendor/bin/phpcs
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"doctrine/annotations": "^1.0",
"phpstan/phpstan": "^0.12.82",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^7.5|^8.0",
"sensio/framework-extra-bundle": "^5.5|^6.1",
"squizlabs/php_codesniffer": "^3.5",
Expand Down
9 changes: 6 additions & 3 deletions src/Command/DumpSitemapsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
*/
class DumpSitemapsCommand extends Command
{
protected static $defaultName = 'presta:sitemaps:dump';

/**
* @var RouterInterface
*/
Expand All @@ -48,7 +46,12 @@ public function __construct(RouterInterface $router, DumperInterface $dumper, st
$this->dumper = $dumper;
$this->defaultTarget = $defaultTarget;

parent::__construct(null);
parent::__construct();
}

public static function getDefaultName(): ?string
{
return 'presta:sitemaps:dump';
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/Integration/config/5.4/messenger.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
framework:
messenger:
reset_on_message: true
transports:
async: 'in-memory://'
routing:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ecd355f

Please sign in to comment.