Skip to content

Commit

Permalink
Fix PHPunit version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom32i committed Feb 11, 2024
1 parent e85167c commit 3cdf6ff
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 66 deletions.
53 changes: 27 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,43 +33,44 @@
},
"prefer-stable": true,
"require": {
"php": ">=8.2",
"php": ">=7.4",
"ext-dom": "*",
"erusev/parsedown": "^1.7.4",
"symfony/asset": "^6.0|^7.0",
"symfony/config": "^6.0|^7.0",
"symfony/console": "^6.0|^7.0",
"symfony/css-selector": "^6.0|^7.0",
"symfony/dependency-injection": "^6.0|^7.0",
"symfony/dom-crawler": "^6.0|^7.0",
"symfony/event-dispatcher": "^6.0|^7.0",
"symfony/filesystem": "^6.0|^7.0",
"symfony/finder": "^6.0|^7.0",
"symfony/http-foundation": "^6.0|^7.0",
"symfony/http-kernel": "^6.0|^7.0",
"symfony/mime": "^6.0|^7.0",
"symfony/process": "^6.0|^7.0",
"symfony/property-access": "^6.0|^7.0",
"symfony/routing": "^6.0|^7.0",
"symfony/serializer": "^6.0|^7.0",
"symfony/stopwatch": "^6.0|^7.0",
"symfony/string": "^6.0|^7.0",
"symfony/yaml": "^6.0|^7.0",
"symfony/asset": "^5.4|^6.0|^7.0",
"symfony/config": "^5.4|^6.0|^7.0",
"symfony/console": "^5.4|^6.0|^7.0",
"symfony/css-selector": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/dom-crawler": "^5.4|^6.0|^7.0",
"symfony/event-dispatcher": "^5.4|^6.0|^7.0",
"symfony/filesystem": "^5.4|^6.0|^7.0",
"symfony/finder": "^5.4|^6.0|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0",
"symfony/http-kernel": "^5.4|^6.0|^7.0",
"symfony/mime": "^5.4|^6.0|^7.0",
"symfony/process": "^5.4|^6.0|^7.0",
"symfony/property-access": "^5.4|^6.0|^7.0",
"symfony/routing": "^5.4|^6.0|^7.0",
"symfony/serializer": "^5.4|^6.0|^7.0",
"symfony/stopwatch": "^5.4|^6.0|^7.0",
"symfony/string": "^5.4|^6.0|^7.0",
"symfony/yaml": "^5.4|^6.0|^7.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"doctrine/annotations": "^1.9|^2.0",
"ekino/phpstan-banned-code": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^1.6",
"phpunit/phpunit": "^9.6",
"psr/log": "^1|^2",
"symfony/browser-kit": "^6.0|^7.0",
"symfony/expression-language": "^6.0|^7.0",
"symfony/framework-bundle": "^6.0|^7.0",
"symfony/browser-kit": "^5.4|^6.0|^7.0",
"symfony/expression-language": "^5.4|^6.0|^7.0",
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
"symfony/monolog-bundle": "^3.7",
"symfony/phpunit-bridge": "^6.0|^7.0",
"symfony/twig-bridge": "^6.0|^7.0",
"symfony/twig-bundle": "^6.0|^7.0"
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
"symfony/twig-bridge": "^5.4|^6.0|^7.0",
"symfony/twig-bundle": "^5.4|^6.0|^7.0"
},
"extra": {
"branch-alias": {
Expand Down
72 changes: 36 additions & 36 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<?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="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<php>
<server name="KERNEL_CLASS" value="App\Kernel" />
<server name="SHELL_VERBOSITY" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&amp;max[self]=0&amp;max[total]=9999&amp;verbose=1" />
<env name="SYMFONY_PHPUNIT_VERSION" value="9.6"/>
<env name="SYMFONY_PHPUNIT_REMOVE" value="" />
</php>

<testsuites>
<testsuite name="Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src/</directory>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<coverage>
<include>
<directory>./src/</directory>
</include>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>
<php>
<server name="KERNEL_CLASS" value="App\Kernel"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&amp;max[self]=0&amp;max[total]=9999&amp;verbose=1"/>
<env name="SYMFONY_PHPUNIT_VERSION" value="9.6"/>
<env name="SYMFONY_PHPUNIT_REMOVE" value=""/>
</php>
<testsuites>
<testsuite name="Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
</phpunit>
6 changes: 4 additions & 2 deletions src/ExpressionLanguage/ExpressionLanguageProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(iterable $providers = [])
public function getFunctions(): array
{
// prepend the default functions to let users override these easily:
yield from [
$functions = [
new ExpressionFunction('date', function ($arg) {
return sprintf('(new \DateTimeImmutable(%s))->setTime(0, 0)', $arg);
}, function (array $variables, $value) {
Expand All @@ -48,7 +48,9 @@ public function getFunctions(): array
];

foreach ($this->providers as $provider) {
yield from $provider->getFunctions();
$functions = array_merge($functions, $provider->getFunctions());
}

return $functions;
}
}
2 changes: 1 addition & 1 deletion tests/Integration/BuildTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Stenope\Bundle\Tests\Integration;

use Psr\Log\Test\TestLogger;
use Stenope\Bundle\Tests\Unit\Log\TestLogger;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Console\Command\Command;
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/app/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stenope:
services:
Psr\Log\LoggerInterface: '@logger'
logger:
class: Psr\Log\Test\TestLogger
class: Stenope\Bundle\Tests\Unit\Log\TestLogger
tags:
- name: kernel.reset
method: reset

0 comments on commit 3cdf6ff

Please sign in to comment.