Browse Source

Update Composer and recipes

pull/2/head
Franck J 1 year ago
parent
commit
d0e2eaa8a4
  1. 2
      .env
  2. 2
      .gitignore
  3. 2
      composer.json
  4. 1274
      composer.lock
  5. 10
      config/bootstrap.php
  6. 8
      config/packages/doctrine_migrations.yaml
  7. 1
      config/packages/framework.yaml
  8. 8
      config/packages/prod/deprecations.yaml
  9. 8
      config/packages/prod/monolog.yaml
  10. 12
      config/services.yaml
  11. 0
      migrations/.gitignore
  12. 0
      migrations/Version20200404184835.php
  13. 7
      phpunit.xml.dist
  14. 2
      public/.htaccess
  15. 4
      public/index.php
  16. 0
      src/Controller/.gitignore
  17. 2
      src/Repository/FactureRepository.php
  18. 15
      symfony.lock

2
.env

@ -15,7 +15,7 @@
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=634024f1ef72439e5adbdca9872f901a
APP_SECRET=7d0b48c45661885c1b4557476348e13a
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
###< symfony/framework-bundle ###

2
.gitignore

@ -41,7 +41,7 @@
/.env.local
/.env.local.php
/.env.*.local
/.env.test
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/

2
composer.json

@ -83,7 +83,7 @@
},
"extra": {
"symfony": {
"allow-contrib": false,
"allow-contrib": true,
"require": "5.0.*"
}
}

1274
composer.lock

File diff suppressed because it is too large

10
config/bootstrap.php

@ -4,14 +4,14 @@ 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'])) {
foreach ($env as $k => $v) {
$_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
}
} elseif (!class_exists(Dotenv::class)) {
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
(new Dotenv(false))->populate($env);
} else {
// load all the .env files
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');

8
config/packages/doctrine_migrations.yaml

@ -1,5 +1,5 @@
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
namespace: DoctrineMigrations
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'

1
config/packages/framework.yaml

@ -1,3 +1,4 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true

8
config/packages/prod/deprecations.yaml

@ -0,0 +1,8 @@
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
#monolog:
# channels: [deprecation]
# handlers:
# deprecation:
# type: stream
# channels: [deprecation]
# path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"

8
config/packages/prod/monolog.yaml

@ -14,11 +14,3 @@ monolog:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]

12
config/services.yaml

@ -16,13 +16,17 @@ services:
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
- '../src/Tests/'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
resource: '../src/Controller/'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
@ -31,4 +35,4 @@ services:
# service pour la generation et l enregistrement du PDF
App\Service\Facture\FactureService:
arguments:
$pdfDirectory: '%factures_directory%'
$pdfDirectory: '%factures_directory%'

0
migrations/.gitignore

0
src/Migrations/Version20200404184835.php → migrations/Version20200404184835.php

7
phpunit.xml.dist

@ -13,6 +13,13 @@
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="7.5" />
<!-- ###+ symfony/framework-bundle ### -->
<env name="APP_ENV" value="dev"/>
<env name="APP_SECRET" value="a9460de5c700f03325317df2dec621a5"/>
<!-- 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>
<testsuites>

2
public/.htaccess

@ -9,7 +9,7 @@ DirectoryIndex index.php
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options FollowSymlinks
# Options +FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
# to the front controller "/index.php" but be rewritten to "/index.php/index".

4
public/index.php

@ -12,11 +12,11 @@ if ($_SERVER['APP_DEBUG']) {
Debug::enable();
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts([$trustedHosts]);
}

0
src/Controller/.gitignore

2
src/Repository/FactureRepository.php

@ -3,8 +3,8 @@
namespace App\Repository;
use App\Entity\Facture;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;
/**
* @method Facture|null find($id, $lockMode = null, $lockVersion = null)

15
symfony.lock

@ -39,16 +39,16 @@
]
},
"doctrine/doctrine-migrations-bundle": {
"version": "1.2",
"version": "2.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.2",
"ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1"
"version": "2.2",
"ref": "baaa439e3e3179e69e3da84b671f0a3e4a2f56ad"
},
"files": [
"./config/packages/doctrine_migrations.yaml",
"./src/Migrations/.gitignore"
"./migrations/.gitignore"
]
},
"doctrine/event-manager": {
@ -159,7 +159,7 @@
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.0",
"ref": "410b9325a37ef86f1e47262c61738f6202202bca"
"ref": "71599f5b0fdeeeec0fb90e9b17c85e6f5e1350c1"
},
"files": [
"./public/.htaccess"
@ -262,7 +262,7 @@
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "23ecaccc551fe2f74baf613811ae529eb07762fa"
"ref": "af2e2efad553bc959a0c61d9185e33ca9eec5c99"
},
"files": [
"./config/bootstrap.php",
@ -327,10 +327,11 @@
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "877bdb4223245783d00ed1f7429aa7ebc606d914"
"ref": "d7249f7d560f6736115eee1851d02a65826f0a56"
},
"files": [
"./config/packages/dev/monolog.yaml",
"./config/packages/prod/deprecations.yaml",
"./config/packages/prod/monolog.yaml",
"./config/packages/test/monolog.yaml"
]

Loading…
Cancel
Save