Skip to content

Commit 653a97a

Browse files
authored
Update test matrix and dependencies to use supported Symfony versions only (#38)
Co-authored-by: mpdude <[email protected]>
1 parent c261ca2 commit 653a97a

File tree

7 files changed

+33
-34
lines changed

7 files changed

+33
-34
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- { php-version: 7.2, symfony-locked-version: none, dependency-version: prefer-lowest }
21-
- { php-version: 7.4, symfony-locked-version: 5.3.*, dependency-version: prefer-stable }
22-
- { php-version: 8.1, symfony-locked-version: none, dependency-version: prefer-stable }
23-
- { php-version: 8.2, symfony-locked-version: none, dependency-version: prefer-stable }
20+
- { php-version: 8.1, symfony-locked-version: none, dependency-version: prefer-lowest }
21+
- { php-version: 8.1, symfony-locked-version: 5.4.*, dependency-version: prefer-stable }
22+
- { php-version: 8.2, symfony-locked-version: 6.4.*, dependency-version: prefer-stable }
2423
- { php-version: 8.3, symfony-locked-version: none, dependency-version: prefer-stable }
2524
name: PHPUnit (PHP ${{matrix.php-version}}, Symfony Version Lock ${{ matrix.symfony-locked-version }}, ${{ matrix.dependency-version }})
2625
steps:

composer.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,30 @@
44
"license": "MIT",
55

66
"require": {
7-
"php": ">=7.2",
7+
"php": ">=8.1",
88
"ext-json": "*",
99
"ext-mbstring": "*",
1010
"psr/log": "^1.0.2",
11-
"symfony/config": "^4.4|^5.0|^6.0|^7.0",
12-
"symfony/dependency-injection": "^4.4|^5.0|^6.0|^7.0",
11+
"symfony/config": "^5.4|^6.0|^7.0",
12+
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
1313
"symfony/deprecation-contracts": "^2.5|^3.0",
14-
"symfony/form": "^4.4|^5.0|^6.0|^7.0",
15-
"symfony/http-foundation": "^5.3|^6.0|^7.0",
16-
"symfony/http-kernel": "^4.4|^5.0|^6.0|^7.0",
14+
"symfony/form": "^5.4|^6.0|^7.0",
15+
"symfony/http-foundation": "^5.4|^6.0|^7.0",
16+
"symfony/http-kernel": "^5.4|^6.0|^7.0",
1717
"thunderer/shortcode": "^0.6.5|^0.7",
18-
"twig/twig": "^1.34|^2.0|^3.0"
18+
"twig/twig": "^2.0|^3.0"
1919
},
2020

2121
"require-dev": {
22-
"phpunit/phpunit": "^8.5|^9.5",
23-
"symfony/browser-kit": "^4.4|^5.4|^6.0|^7.0",
24-
"symfony/expression-language": "^4.4|^5.0|^6.0|^7.0",
25-
"symfony/framework-bundle": "^5.3|^6.0|^7.0",
22+
"phpunit/phpunit": "^10.5",
23+
"symfony/browser-kit": "^5.4|^6.0|^7.0",
24+
"symfony/error-handler": "^5.4|^6.0|^7.1",
25+
"symfony/expression-language": "^5.4|^6.0|^7.0",
26+
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
2627
"symfony/phpunit-bridge": ">= 6.0",
27-
"symfony/routing": "^4.4|^5.0|^6.0|^7.0",
28-
"symfony/twig-bundle": "^4.4|^5.0|^6.0|^7.0",
29-
"symfony/yaml": "^4.4|^5.0|^6.0|^7.0"
28+
"symfony/routing": "^5.4|^6.0|^7.0",
29+
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
30+
"symfony/yaml": "^5.4|^6.0|^7.0"
3031
},
3132

3233
"autoload": {

phpunit.xml.dist

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.7/phpunit.xsd"
5-
bootstrap="vendor/autoload.php">
6-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="tests/bootstrap.php" cacheDirectory=".phpunit.cache">
73
<php>
84
<env name="SHELL_VERBOSITY" value="-1" />
95
<server name="KERNEL_CLASS" value="\Webfactory\ShortcodeBundle\Tests\Fixtures\TestKernel" />
6+
<ini name="error_reporting" value="-1" />
7+
<server name="APP_ENV" value="test" force="true" />
8+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=9999" />
109
</php>
11-
1210
<testsuites>
1311
<testsuite name="Project Test Suite">
1412
<directory>tests</directory>
13+
<exclude>tests/Functional/ShortcodeTest.php</exclude>
1514
</testsuite>
1615
</testsuites>
17-
18-
<filter>
19-
<whitelist processUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">src</directory>
21-
</whitelist>
22-
</filter>
23-
2416
</phpunit>

src/DependencyInjection/Compiler/ShortcodeCompilerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
class ShortcodeCompilerPass implements CompilerPassInterface
1515
{
16-
public function process(ContainerBuilder $container)
16+
public function process(ContainerBuilder $container): void
1717
{
1818
$shortcodeServices = $container->findTaggedServiceIds('webfactory.shortcode');
1919

src/DependencyInjection/WebfactoryShortcodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
final class WebfactoryShortcodeExtension extends Extension
1515
{
16-
public function load(array $configs, ContainerBuilder $container)
16+
public function load(array $configs, ContainerBuilder $container): void
1717
{
1818
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
1919
$loader->load('shortcodes.xml');

tests/Fixtures/TestKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function registerBundles(): array
1919
];
2020
}
2121

22-
public function registerContainerConfiguration(LoaderInterface $loader)
22+
public function registerContainerConfiguration(LoaderInterface $loader): void
2323
{
2424
$loader->load(__DIR__.'/config/config.yml');
2525
$loader->load(__DIR__.'/config/test_shortcodes.xml');

tests/bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
use Symfony\Component\ErrorHandler\DebugClassLoader;
4+
5+
require_once __DIR__.'/../vendor/autoload.php';
6+
7+
DebugClassLoader::enable();

0 commit comments

Comments
 (0)