Updated some recipes.

This commit is contained in:
Jan Böhmer 2020-05-10 17:02:09 +02:00
parent 6a40f04243
commit 7c10b647a3
4 changed files with 15 additions and 15 deletions

View file

@ -6,8 +6,8 @@ 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 (!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;
}
set_time_limit(0);
@ -15,7 +15,7 @@ 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.');
throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}
$input = new ArgvInput();

View file

@ -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') && ($_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.');
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'])) {
(new Dotenv(false))->populate($env);
} else {
// load all the .env files
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');

View file

@ -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".

View file

@ -296,12 +296,12 @@
"version": "1.7.1"
},
"php-translation/symfony-bundle": {
"version": "0.4",
"version": "0.10",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "0.4",
"ref": "ee15ad002114fba7b694a7fe429419b518d43bc4"
"version": "0.10",
"ref": "7626dc2639039d9db29789b560171f2f2a9d8468"
},
"files": [
"./config/packages/dev/php_translation.yaml",
@ -446,7 +446,7 @@
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.0",
"ref": "410b9325a37ef86f1e47262c61738f6202202bca"
"ref": "71599f5b0fdeeeec0fb90e9b17c85e6f5e1350c1"
},
"files": [
"./public/.htaccess"
@ -473,7 +473,7 @@
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "fead3ab2e80622c61d13dac0d21a3430a45efae8"
"ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c"
},
"files": [
"./bin/console",