-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8 & Symfony 6 #1153
base: master
Are you sure you want to change the base?
PHP 8 & Symfony 6 #1153
Changes from all commits
e920453
a83f39d
d58dcee
7e1c732
c986ae7
f345474
7bb3ad5
063e5aa
f9dbae2
4332422
a60f371
24f90ba
5b914e7
50c39ba
2bdab24
b779648
feccf13
5e92270
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,6 @@ package-lock.json | |
###< phpunit/phpunit ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. klopt dit wel? |
||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
http: | ||
document_root: htdocs/ | ||
passthru: index.php |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,22 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use CsrDelft\common\ContainerFacade; | ||
use CsrDelft\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\ErrorHandler\Debug; | ||
|
||
if (false === in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { | ||
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL; | ||
if (!is_dir(dirname(__DIR__).'/vendor')) { | ||
throw new LogicException('Dependencies are missing. Try running "composer install".'); | ||
} | ||
|
||
set_time_limit(0); | ||
|
||
require dirname(__DIR__).'/vendor/autoload.php'; | ||
|
||
if (!class_exists(Application::class)) { | ||
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); | ||
} | ||
|
||
$input = new ArgvInput(); | ||
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { | ||
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); | ||
} | ||
|
||
if ($input->hasParameterOption('--no-debug', true)) { | ||
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); | ||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { | ||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); | ||
} | ||
|
||
require __DIR__ . '/../config/bootstrap.php'; | ||
|
||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); | ||
$kernel->boot(); | ||
$container = $kernel->getContainer(); | ||
|
||
ContainerFacade::init($container); | ||
require_once dirname(__DIR__).'/lib/defines.include.php'; | ||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; | ||
|
||
if ($_SERVER['APP_DEBUG']) { | ||
umask(0000); | ||
|
||
if (class_exists(Debug::class)) { | ||
Debug::enable(); | ||
} | ||
} | ||
return function (array $context) { | ||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | ||
|
||
$application = new Application($kernel); | ||
$application->run($input); | ||
return new Application($kernel); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!file_exists(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"; | ||
exit(1); | ||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
if (false === getenv('SYMFONY_PHPUNIT_DIR')) { | ||
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit'); | ||
} | ||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | ||
if (PHP_VERSION_ID >= 80000) { | ||
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; | ||
} else { | ||
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"; | ||
exit(1); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dependencies moeten naar 6.4 voor upgraden naar Symfony 7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,44 +42,46 @@ | |
"nelmio/cors-bundle": "^2.1", | ||
"parsecsv/php-parsecsv": "^1.2", | ||
"phpdocumentor/reflection-docblock": "^5.2", | ||
"sensio/framework-extra-bundle": "^6.2", | ||
"sentry/sentry-symfony": "^4.5", | ||
"symfony/cache": "5.4.*", | ||
"symfony/config": "5.4.*", | ||
"symfony/dotenv": "5.4.*", | ||
"sentry/sentry-symfony": "^4.14", | ||
"symfony/cache": "^6.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 6.4? |
||
"symfony/config": "^6.0", | ||
"symfony/dotenv": "^6.0", | ||
"symfony/flex": "^1.4", | ||
"symfony/form": "5.4.*", | ||
"symfony/framework-bundle": "5.4.*", | ||
"symfony/http-foundation": "5.4.*", | ||
"symfony/mime": "5.4.*", | ||
"symfony/form": "^6.0", | ||
"symfony/framework-bundle": "^6.0", | ||
"symfony/http-foundation": "^6.0", | ||
"symfony/mime": "^6.0", | ||
"symfony/monolog-bundle": "^3.5", | ||
"symfony/property-access": "5.4.*", | ||
"symfony/property-info": "5.4.*", | ||
"symfony/proxy-manager-bridge": "5.4.*", | ||
"symfony/routing": "5.4.*", | ||
"symfony/security-bundle": "5.4.*", | ||
"symfony/security-csrf": "5.4.*", | ||
"symfony/serializer": "5.4.*", | ||
"symfony/templating": "5.4.*", | ||
"symfony/translation": "5.4.*", | ||
"symfony/twig-bundle": "5.4.*", | ||
"symfony/uid": "5.4.*", | ||
"symfony/var-dumper": "5.4.*", | ||
"symfony/yaml": "5.4.*", | ||
"symfony/property-access": "^6.0", | ||
"symfony/property-info": "^6.0", | ||
"symfony/proxy-manager-bridge": "^6.0", | ||
"symfony/routing": "^6.0", | ||
"symfony/security-bundle": "^6.0", | ||
"symfony/security-csrf": "^6.0", | ||
"symfony/serializer": "^6.0", | ||
"symfony/templating": "^6.0", | ||
"symfony/translation": "^6.0", | ||
"symfony/twig-bundle": "^6.0", | ||
"symfony/uid": "^6.0", | ||
"symfony/var-dumper": "^6.0", | ||
"symfony/yaml": "^6.0", | ||
"tecnickcom/tcpdf": "^6.4", | ||
"twig/cssinliner-extra": "^3.3", | ||
"twig/extra-bundle": "^3.2", | ||
"twig/intl-extra": "^3.2", | ||
"twig/string-extra": "^3.5", | ||
"zumba/json-serializer": "^3.0" | ||
"zumba/json-serializer": "^3.0", | ||
"symfony/runtime": "^6.0", | ||
"symfony/console": "^6.0" | ||
}, | ||
"config": { | ||
"platform": { | ||
"php": "8.2" | ||
}, | ||
"allow-plugins": { | ||
"symfony/flex": true, | ||
"php-http/discovery": true | ||
"php-http/discovery": true, | ||
"symfony/runtime": true | ||
} | ||
}, | ||
"autoload": { | ||
|
@@ -91,21 +93,22 @@ | |
"include-path": ["lib/"], | ||
"require-dev": { | ||
"doctrine/doctrine-fixtures-bundle": "^3.3", | ||
"symfony/maker-bundle": "^1.19", | ||
"fakerphp/faker": "^1.23", | ||
"symfony/phpunit-bridge": "^7.1", | ||
"phpunit/phpunit": ">9", | ||
"spatie/phpunit-snapshot-assertions": "^4.0", | ||
"symfony/browser-kit": "^5.0", | ||
"symfony/css-selector": "^5.0", | ||
"symfony/maker-bundle": "^1.19", | ||
"symfony/phpunit-bridge": "^5.1", | ||
"phpunit/phpunit": "^10.0", | ||
"spatie/phpunit-snapshot-assertions": "^5.0", | ||
"symfony/browser-kit": "^6.0", | ||
"symfony/css-selector": "^6.0", | ||
"symfony/panther": "^2.0", | ||
"vimeo/psalm": "^4.7", | ||
"weirdan/doctrine-psalm-plugin": "^1.0", | ||
"psalm/plugin-symfony": "^2.2", | ||
"vimeo/psalm": "^5.0", | ||
"weirdan/doctrine-psalm-plugin": "^2.0", | ||
"psalm/plugin-symfony": "^5.0", | ||
"symfony/stopwatch": "^5.4", | ||
"symfony/web-profiler-bundle": "^5.4", | ||
"rector/rector": "^1.2", | ||
"dbrekelmans/bdi": "^1.3" | ||
"dbrekelmans/bdi": "^1.3", | ||
"psalm/plugin-phpunit": "^0.19.0" | ||
}, | ||
"scripts": { | ||
"serve": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waarom werkt dit niet...