Skip to content

Commit

Permalink
Merge pull request #303 from utmsigep/symfony-6.3
Browse files Browse the repository at this point in the history
Upgrade to Symfony 6.3
  • Loading branch information
stephenyeargin committed Oct 7, 2023
2 parents b40cdd7 + d71d027 commit 9e31955
Show file tree
Hide file tree
Showing 111 changed files with 4,623 additions and 4,171 deletions.
9 changes: 4 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=9bf9377268a4b5af8a651a6c42e92e5d
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=15&charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/mailer ###
MAILER_DSN=smtp://localhost
MAILER_DSN=null://null
###< symfony/mailer ###

###> symfony/twilio-notifier ###
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga

- name: Create PR for CS fixups
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v5
id: create-pull-request
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ yarn-error.log
###< symfony/webpack-encore-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
.phpunit.result.cache
###< symfony/phpunit-bridge ###
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

return $config
->setRules([
'@DoctrineAnnotation' => true,
'@DoctrineAnnotation' => false,
'@PSR1' => true,
'@PSR12' => true,
'@PSR2' => true,
Expand Down
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 (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_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 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');
}

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);
};
20 changes: 13 additions & 7 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/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')) {
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';
}
85 changes: 43 additions & 42 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "project",
"license": "MIT",
"require": {
"php":">=8.1.0",
"php": ">=8.1.0",
"ext-ctype": "*",
"ext-iconv": "*",
"beberlei/doctrineextensions": "^1.2",
Expand All @@ -24,40 +24,40 @@
"scheb/2fa-totp": "^6.3",
"scheb/2fa-trusted-device": "^6.3",
"sebastian/version": "^3.0",
"sensio/framework-extra-bundle": "^6.2",
"stof/doctrine-extensions-bundle": "^1.7",
"symfony/apache-pack": "^1.0",
"symfony/asset": "^6.2",
"symfony/cache": "^6.2",
"symfony/console": "^6.2",
"symfony/dotenv": "^6.2",
"symfony/expression-language": "^6.2",
"symfony/flex": "^2.2",
"symfony/form": "^6.2",
"symfony/framework-bundle": "^6.2",
"symfony/http-client": "^6.2",
"symfony/intl": "^6.2",
"symfony/mailer": "^6.2",
"symfony/monolog-bundle": "^3.3",
"symfony/notifier": "^6.2",
"symfony/panther": "^2.0",
"symfony/proxy-manager-bridge": "^6.2",
"symfony/security-bundle": "^6.2",
"symfony/serializer": "^6.2",
"symfony/templating": "^6.2",
"symfony/translation": "^6.2",
"symfony/twig-bundle": "^6.2",
"symfony/twilio-notifier": "^6.2",
"symfony/validator": "^6.2",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "^6.2",
"symfonycasts/reset-password-bundle": "^1.15",
"twig/cssinliner-extra": "^3.3",
"twig/extra-bundle": "^3.0",
"twig/inky-extra": "^3.3",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.0",
"twig/string-extra": "^3.3",
"symfony/asset": "^6.3",
"symfony/cache": "^6.3",
"symfony/console": "^6.3",
"symfony/dotenv": "^6.3",
"symfony/expression-language": "^6.3",
"symfony/flex": "^2.3",
"symfony/form": "^6.3",
"symfony/framework-bundle": "^6.3",
"symfony/http-client": "^6.3",
"symfony/intl": "^6.3",
"symfony/mailer": "^6.3",
"symfony/monolog-bundle": "^3.8",
"symfony/notifier": "^6.3",
"symfony/panther": "^2.1",
"symfony/proxy-manager-bridge": "^6.3",
"symfony/runtime": "^6.3",
"symfony/security-bundle": "^6.3",
"symfony/serializer": "^6.3",
"symfony/templating": "^6.3",
"symfony/translation": "^6.3",
"symfony/twig-bundle": "^6.3",
"symfony/twilio-notifier": "^6.3",
"symfony/validator": "^6.3",
"symfony/webpack-encore-bundle": "^2.0",
"symfony/yaml": "^6.3",
"symfonycasts/reset-password-bundle": "^1.17",
"twig/cssinliner-extra": "^3.6",
"twig/extra-bundle": "^3.6",
"twig/inky-extra": "^3.6",
"twig/intl-extra": "^3.6",
"twig/markdown-extra": "^3.6",
"twig/string-extra": "^3.6",
"twilio/sdk": "^6.21"
},
"config": {
Expand All @@ -70,7 +70,8 @@
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true,
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"symfony/runtime": true
}
},
"autoload": {
Expand Down Expand Up @@ -109,7 +110,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "^6.2"
"require": "^6.3"
}
},
"require-dev": {
Expand All @@ -121,12 +122,12 @@
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.14.5",
"symfony/browser-kit": "^6.2",
"symfony/css-selector": "^6.2",
"symfony/maker-bundle": "^1.11",
"symfony/phpunit-bridge": "^6.0",
"symfony/stopwatch": "^6.2",
"symfony/var-dumper": "^6.2",
"symfony/web-profiler-bundle": "^6.2"
"symfony/browser-kit": "^6.3",
"symfony/css-selector": "^6.3",
"symfony/maker-bundle": "^1.49",
"symfony/phpunit-bridge": "^6.3",
"symfony/stopwatch": "^6.3",
"symfony/var-dumper": "^6.3",
"symfony/web-profiler-bundle": "^6.3"
}
}
Loading

0 comments on commit 9e31955

Please sign in to comment.