Skip to content
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

Feature/upgrade symfony 6.x #80

Open
wants to merge 32 commits into
base: preprod
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
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
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
pull_request:

jobs:
build:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull images
run: docker compose pull
- name: Start services
run: docker compose -f docker-compose.preprod.yml up --build -d
- name: Wait for services
run: |
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker compose ps -q php)")"; do
case $status in
starting) sleep 1;;
healthy) exit 0;;
unhealthy) exit 1;;
esac
done
exit 1
- name: Check HTTP reachability
run: curl http://localhost
- name: Check HTTPS reachability
run: curl -k https://localhost
39 changes: 7 additions & 32 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,15 @@

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\ErrorHandler\Debug;

if (!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_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

set_time_limit(0);
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

require dirname(__DIR__).'/vendor/autoload.php';
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

if (!class_exists(Application::class)) {
throw new LogicException('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');
}

require dirname(__DIR__).'/config/bootstrap.php';

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
return new Application($kernel);
};
54 changes: 33 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,59 @@
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-json": "*",
"composer/package-versions-deprecated": "1.10.99.1",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^2.2",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.7",
"jms/serializer-bundle": "^3.5",
"jms/serializer-bundle": "^4.0",
"lukascivil/treewalker": "dev-master",
"nelmio/api-doc-bundle": "^4.0",
"nelmio/cors-bundle": "^2.1",
"sensio/framework-extra-bundle": "^5.5",
"nelmio/cors-bundle": "^2.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.7",
"sensio/framework-extra-bundle": "^6.2",
"sentry/sentry-symfony": "^4.2",
"symfony/asset": "5.2.*",
"symfony/asset": "6.1.*",
"symfony/cache-contracts": "^2.4",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/console": "6.1.*",
"symfony/dotenv": "6.1.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/rate-limiter": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/twig-bundle": "^5.2",
"symfony/validator": "5.2.*",
"symfony/yaml": "5.2.*"
"symfony/form": "6.1.*",
"symfony/framework-bundle": "6.1.*",
"symfony/property-access": "6.1.*",
"symfony/property-info": "6.1.*",
"symfony/rate-limiter": "6.1.*",
"symfony/runtime": "6.1.*",
"symfony/security-bundle": "6.1.*",
"symfony/serializer": "6.1.*",
"symfony/twig-bundle": "^6.1",
"symfony/validator": "6.1.*",
"symfony/yaml": "6.1.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"phpstan/phpstan": "^0.12.96",
"symfony/maker-bundle": "^1.21",
"symfony/stopwatch": "^5.2",
"symfony/web-profiler-bundle": "^5.2"
"symfony/stopwatch": "^6.1",
"symfony/web-profiler-bundle": "^6.1"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true,
"symfony/runtime": true,
"composer/package-versions-deprecated": true
}
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -77,7 +89,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.2.*"
"require": "6.1.*"
}
}
}
Loading