Skip to content

Commit 758257d

Browse files
whiklojacoburn
authored andcommitted
Symfony 4.4 upgrade
1 parent 6198d90 commit 758257d

40 files changed

+1286
-772
lines changed

.env.test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
TRELLIS_CONFIG_DIR='./test/resources/config'
1+
TRELLIS_CONFIG_DIR='./tests/resources/config'

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
vendor/
22
config/settings.yml
3-
settings.yml
3+
/settings.yml
44
composer.lock
55
.buildpath
66
.project

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_install:
1111
- composer install
1212

1313
env:
14-
TRELLIS_CONFIG_DIR=test/resources/config/
14+
TRELLIS_CONFIG_DIR=tests/resources/config/
1515

1616
script:
1717
- composer test

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ init:
88
- SET COMPOSER_NO_INTERACTION=1
99

1010
environment:
11-
TRELLIS_CONFIG_DIR: test/resources/config/
11+
TRELLIS_CONFIG_DIR: tests/resources/config/
1212
SYMFONY_DEPRECATIONS_HELPER: weak
1313

1414
install:

bin/console

+9-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
use App\Kernel;
55
use Symfony\Bundle\FrameworkBundle\Console\Application;
66
use Symfony\Component\Console\Input\ArgvInput;
7-
use Symfony\Component\Debug\Debug;
7+
use Symfony\Component\ErrorHandler\Debug;
8+
9+
if (false === in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
10+
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
11+
}
812

913
set_time_limit(0);
1014

@@ -15,17 +19,15 @@ if (!class_exists(Application::class)) {
1519
}
1620

1721
$input = new ArgvInput();
18-
if (null !== $_ENV['APP_ENV'] = $input->getParameterOption(['--env', '-e'], null, true)) {
19-
putenv('APP_ENV='.$_ENV['APP_ENV']);
20-
// force loading .env files when --env is defined
21-
$_SERVER['APP_ENV'] = null;
22+
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
23+
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
2224
}
2325

2426
if ($input->hasParameterOption('--no-debug', true)) {
2527
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
2628
}
2729

28-
require dirname(__DIR__).'/src/.bootstrap.php';
30+
require dirname(__DIR__).'/config/bootstrap.php';
2931

3032
if ($_SERVER['APP_DEBUG']) {
3133
umask(0000);
@@ -35,6 +37,6 @@ if ($_SERVER['APP_DEBUG']) {
3537
}
3638
}
3739

38-
$kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);
40+
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
3941
$application = new Application($kernel);
4042
$application->run($input);

bin/phpunit

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
#!/usr/bin/env php
22
<?php
33

4-
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
5-
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
4+
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
5+
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
66
exit(1);
77
}
88

9-
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
10-
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
11-
}
12-
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
13-
putenv('SYMFONY_PHPUNIT_REMOVE=');
14-
}
159
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
1610
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
1711
}
1812

19-
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
13+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';

composer.json

+11-12
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@
99
"php": ">=7.1.0",
1010
"ext-ctype": "*",
1111
"ext-iconv": "*",
12-
"symfony/console": "4.2.*",
13-
"symfony/flex": "^1.1",
14-
"symfony/framework-bundle": "4.2.*",
15-
"symfony/yaml": "4.2.*",
1612
"easyrdf/easyrdf": "^0.9.1",
1713
"ml/json-ld": "^1.1",
18-
"symfony/twig-bundle": "4.2.*"
14+
"symfony/console": "4.4.*",
15+
"symfony/flex": "^1.3.1",
16+
"symfony/framework-bundle": "4.4.*",
17+
"symfony/twig-bundle": "4.4.*",
18+
"symfony/yaml": "4.4.*"
1919
},
2020
"require-dev": {
21-
"symfony/dotenv": "4.2.*",
22-
"symfony/web-server-bundle": "4.2.*",
21+
"symfony/dotenv": "4.4.*",
2322
"squizlabs/php_codesniffer": "^3.2",
24-
"symfony/browser-kit": "4.2.*",
25-
"symfony/phpunit-bridge": "4.2.*"
23+
"symfony/phpunit-bridge": "4.4.*",
24+
"symfony/browser-kit": "4.4.*"
2625
},
2726
"config": {
2827
"preferred-install": {
@@ -37,7 +36,7 @@
3736
},
3837
"autoload-dev": {
3938
"psr-4": {
40-
"App\\Tests\\": "test/"
39+
"App\\Tests\\": "tests/"
4140
}
4241
},
4342
"replace": {
@@ -59,7 +58,7 @@
5958
"post-update-cmd": [
6059
"@auto-scripts"
6160
],
62-
"check": "phpcs --standard=PSR2 src test",
61+
"check": "php ./vendor/bin/phpcs --standard=PSR2 src tests",
6362
"test": [
6463
"@check",
6564
"php ./bin/phpunit"
@@ -71,7 +70,7 @@
7170
"extra": {
7271
"symfony": {
7372
"allow-contrib": false,
74-
"require": "4.2.*"
73+
"require": "4.4.*"
7574
}
7675
}
7776
}

0 commit comments

Comments
 (0)