Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"require": {
"php": ">= 8.1",
"jms/metadata": "^2.6.1",
"symfony/expression-language": "^3.4|^4.0|^5.0|^6.0|^7.0",
"symfony/property-access": "^3.4|^4.0|^5.0|^6.0|^7.0"
"symfony/expression-language": "^6.4 || ^7.3 || ^8.0",
"symfony/property-access": "^6.4 || ^7.3 || ^8.0"
},

"require-dev": {
"doctrine/common": "^2.2",
"phpunit/phpunit": "^9.6",
"symfony/phpunit-bridge": ">5.0",
"symfony/routing": "^2.2|^3.0|^4.0",
"symfony/yaml": "^3.0|^4.0|^5.0",
"twig/twig": "^2.0|^3.0"
"doctrine/common": "^2.2 || ^3.0",
"phpunit/phpunit": "^10.5.58",
"symfony/error-handler": "^6.4 || ^7.3 || ^8.0",
"symfony/routing": "^6.4 || ^7.3 || ^8.0",
"symfony/yaml": "^6.4 || ^7.3 || ^8.0",
"twig/twig": "^2.0 || ^3.0"
},

"conflict": {
Expand Down
30 changes: 12 additions & 18 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
cacheDirectory=".phpunit.cache">
<source ignoreSuppressionOfDeprecations="true">
<include>
<directory>src</directory>
</include>
</source>
<testsuites>
<testsuite name="Object Routing Test Suite">
<directory>./tests/JMS/</directory>
<directory>tests/JMS</directory>
</testsuite>
</testsuites>

<groups>
<exclude>
<group>performance</group>
</exclude>
</groups>
</phpunit>
21 changes: 4 additions & 17 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<?php

if (!is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
echo 'Could not find "vendor/autoload.php". Did you forget to run "composer install --dev"?'.\PHP_EOL;
exit(1);
}
use Symfony\Component\ErrorHandler\ErrorHandler;

require_once $autoloadFile;
// Work around https://github.com/symfony/symfony/issues/53812 for the time being (Symfony (6.4-7.1)/PHPUnit 11 issue)
set_exception_handler([new ErrorHandler(), 'handleException']);

Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');

spl_autoload_register(function ($class) {
if (str_starts_with($class, 'JMS\Tests\\')) {
$path = __DIR__.'/../tests/'.strtr($class, '\\', '/').'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;

return true;
}
}
});
require_once __DIR__.'/../vendor/autoload.php';