Skip to content

Commit 2cf4d73

Browse files
Allow symfony 6 packages (#29)
1 parent 5f47216 commit 2cf4d73

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
include:
2020
- { php-version: 7.2, symfony-locked-version: none, dependency-version: prefer-lowest }
21-
- { php-version: 7.4, symfony-locked-version: 4.4.*, dependency-version: prefer-stable }
21+
- { php-version: 7.4, symfony-locked-version: 5.3.*, dependency-version: prefer-stable }
2222
- { php-version: 8.1, symfony-locked-version: none, dependency-version: prefer-stable }
2323
name: PHPUnit (PHP ${{matrix.php-version}}, Symfony Version Lock ${{ matrix.symfony-locked-version }}, ${{ matrix.dependency-version }})
2424
steps:

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
"ext-json": "*",
99
"ext-mbstring": "*",
1010
"psr/log": "^1.0.2",
11-
"symfony/config": "^4.4|^5.0",
12-
"symfony/dependency-injection": "^4.4|^5.0",
11+
"symfony/config": "^4.4|^5.0|^6.0",
12+
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
1313
"symfony/deprecation-contracts": "^2.5|^3.0",
14-
"symfony/http-foundation": "^4.4|^5.0",
15-
"symfony/http-kernel": "^4.4|^5.0",
14+
"symfony/http-foundation": "^5.3|^6.0",
15+
"symfony/http-kernel": "^4.4|^5.0|^6.0",
1616
"thunderer/shortcode": "^0.6.5|^0.7",
1717
"twig/twig": "^1.34|^2.0|^3.0"
1818
},
1919

2020
"require-dev": {
2121
"phpunit/phpunit": "^8.5|^9.5",
2222
"symfony/browser-kit": "^4.4|^5.4",
23-
"symfony/expression-language": "^4.4|^5.0",
24-
"symfony/framework-bundle": "^4.4|^5.0",
23+
"symfony/expression-language": "^4.4|^5.0|^6.0",
24+
"symfony/framework-bundle": "^5.3|^6.0",
2525
"symfony/phpunit-bridge": ">= 6.0",
26-
"symfony/routing": "^4.4|^5.0",
27-
"symfony/twig-bundle": "^4.4|^5.0",
28-
"symfony/yaml": "^4.4|^5.0"
26+
"symfony/routing": "^4.4|^5.0|^6.0",
27+
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
28+
"symfony/yaml": "^4.4|^5.0|^6.0"
2929
},
3030

3131
"autoload": {

src/Handler/EmbeddedShortcodeHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __invoke(ShortcodeInterface $shortcode)
6464
'parameters' => json_encode($shortcode->getParameters()),
6565
'renderer' => $this->renderer,
6666
'shortcode' => $shortcode->getName(),
67-
'url' => $this->requestStack->getMasterRequest() ? $this->requestStack->getMasterRequest()->getRequestUri() : '-',
67+
'url' => $this->requestStack->getMainRequest() ? $this->requestStack->getMainRequest()->getRequestUri() : '-',
6868
]
6969
);
7070

src/Resources/config/guide-routing.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
http://symfony.com/schema/routing/routing-1.0.xsd">
66

77
<route id="webfactory.shortcode.guide-list" path="/">
8-
<default key="_controller">Webfactory\ShortcodeBundle\Controller\GuideController:listAction</default>
8+
<default key="_controller">Webfactory\ShortcodeBundle\Controller\GuideController::listAction</default>
99
</route>
1010

1111
<route id="webfactory.shortcode.guide-detail" path="/{shortcode}/">
12-
<default key="_controller">Webfactory\ShortcodeBundle\Controller\GuideController:detailAction</default>
12+
<default key="_controller">Webfactory\ShortcodeBundle\Controller\GuideController::detailAction</default>
1313
</route>
1414

1515
</routes>

tests/Functional/EmbeddedShortcodeHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ private function processShortcodes(string $content, Request $request = null): st
6969
self::bootKernel();
7070

7171
if ($request) {
72-
static::$container->get(RequestStack::class)->push($request);
72+
static::getContainer()->get(RequestStack::class)->push($request);
7373
}
7474

75-
return EndToEndTestHelper::createFromContainer(static::$container)->processShortcode($content);
75+
return EndToEndTestHelper::createFromContainer(static::getContainer())->processShortcode($content);
7676
}
7777
}

tests/Functional/EndToEndTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function provideEsiShortcodes(): Generator
7575
private function renderTwig(string $templateCode, array $context = [], Request $request = null): string
7676
{
7777
self::bootKernel();
78-
$container = static::$container;
78+
$container = static::getContainer();
7979

8080
$requestStack = $container->get(RequestStack::class);
8181
$requestStack->push($request ?? new Request());

tests/Functional/ShortcodeDefinitionTestHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ShortcodeDefinitionTestHelperTest extends KernelTestCase
1919
protected function setUp(): void
2020
{
2121
self::bootKernel();
22-
$this->helper = static::$container->get(ShortcodeDefinitionTestHelper::class);
22+
$this->helper = static::getContainer()->get(ShortcodeDefinitionTestHelper::class);
2323
}
2424

2525
/**

tests/Functional/ShortcodeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function filter_returns_safe_html(): void
2828
private function renderTemplate(string $template): string
2929
{
3030
self::bootKernel();
31-
$container = static::$container;
31+
$container = static::getContainer();
3232

3333
$twig = $container->get('twig');
3434

tests/Functional/ShortcodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private function getUrlWithRenderedExample(/* array */ $customParameters = null)
9090
$urlParameters['customParameters'] = $customParametersAsString;
9191
}
9292

93-
return static::$container->get('router')->generate('webfactory.shortcode.guide-detail', $urlParameters);
93+
return static::getContainer()->get('router')->generate('webfactory.shortcode.guide-detail', $urlParameters);
9494
}
9595

9696
private function getCustomParametersAsString($customParametersAsMixed): ?string

0 commit comments

Comments
 (0)