mirror of
https://github.com/tchapi/davis.git
synced 2025-01-17 04:48:16 +01:00
Update phpunit and dependencies
This commit is contained in:
parent
3f8d68e1a5
commit
a305988fea
16
bin/phpunit
16
bin/phpunit
@ -1,13 +1,19 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
|
if (!ini_get('date.timezone')) {
|
||||||
|
ini_set('date.timezone', 'UTC');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
|
||||||
|
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
|
||||||
|
require PHPUNIT_COMPOSER_INSTALL;
|
||||||
|
PHPUnit\TextUI\Command::main();
|
||||||
|
} else {
|
||||||
|
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
|
||||||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
|
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
|
|
||||||
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
|
|
||||||
}
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
|
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
|
||||||
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Symfony\Component\Dotenv\Dotenv;
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/vendor/autoload.php';
|
|
||||||
|
|
||||||
if (!class_exists(Dotenv::class)) {
|
|
||||||
throw new LogicException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load cached env vars if the .env.local.php file exists
|
|
||||||
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
|
|
||||||
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
|
|
||||||
(new Dotenv(false))->populate($env);
|
|
||||||
} else {
|
|
||||||
// load all the .env files
|
|
||||||
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SERVER += $_ENV;
|
|
||||||
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
|
|
||||||
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
|
|
||||||
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
|
|
@ -1,29 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" processIsolation="true" colors="true" bootstrap="config/bootstrap.php">
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<coverage>
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
<include>
|
backupGlobals="false"
|
||||||
<directory>src</directory>
|
colors="true"
|
||||||
</include>
|
bootstrap="tests/bootstrap.php"
|
||||||
</coverage>
|
processIsolation="true"
|
||||||
|
convertDeprecationsToExceptions="false"
|
||||||
|
>
|
||||||
<php>
|
<php>
|
||||||
|
<ini name="display_errors" value="1" />
|
||||||
<ini name="error_reporting" value="-1" />
|
<ini name="error_reporting" value="-1" />
|
||||||
<server name="APP_ENV" value="test" force="true" />
|
<server name="APP_ENV" value="test" force="true" />
|
||||||
<server name="SHELL_VERBOSITY" value="-1" />
|
<server name="SHELL_VERBOSITY" value="-1" />
|
||||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||||
<server name="SYMFONY_PHPUNIT_VERSION" value="7.5"/>
|
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||||
<!-- ###+ symfony/framework-bundle ### -->
|
|
||||||
<env name="APP_ENV" value="dev"/>
|
|
||||||
<env name="APP_SECRET" value="48bfdfefe5bea124be17563bbf82859d"/>
|
|
||||||
<!-- env name="TRUSTED_PROXIES" value="127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" -->
|
|
||||||
<!-- env name="TRUSTED_HOSTS" value="'^(localhost|example\.com)$'" -->
|
|
||||||
<!-- ###- symfony/framework-bundle ### -->
|
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Project Test Suite">
|
<testsuite name="Project Test Suite">
|
||||||
<directory>tests</directory>
|
<directory>tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">src</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
|
||||||
<listeners>
|
<listeners>
|
||||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||||
</listeners>
|
</listeners>
|
||||||
|
@ -457,12 +457,12 @@
|
|||||||
"version": "v5.3.2"
|
"version": "v5.3.2"
|
||||||
},
|
},
|
||||||
"symfony/phpunit-bridge": {
|
"symfony/phpunit-bridge": {
|
||||||
"version": "4.3",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "4.3",
|
"version": "5.3",
|
||||||
"ref": "6d0e35f749d5f4bfe1f011762875275cd3f9874f"
|
"ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
".env.test",
|
".env.test",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user