Skip to content

Commit 8c91829

Browse files
committed
Default Symfony 4.1-BETA2 installation
0 parents  commit 8c91829

File tree

16 files changed

+1793
-0
lines changed

16 files changed

+1793
-0
lines changed

.env.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is a "template" of which env vars need to be defined for your application
2+
# Copy this file to .env file for development, create environment variables when deploying to production
3+
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
4+
5+
###> symfony/framework-bundle ###
6+
APP_ENV=dev
7+
APP_SECRET=d541f5e8a0e110cb270cedcb8fc2c769
8+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
9+
#TRUSTED_HOSTS=localhost,example.com
10+
###< symfony/framework-bundle ###

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.idea/
2+
3+
###> symfony/framework-bundle ###
4+
/.env
5+
/public/bundles/
6+
/var/
7+
/vendor/
8+
###< symfony/framework-bundle ###

bin/console

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use App\Kernel;
5+
use Symfony\Bundle\FrameworkBundle\Console\Application;
6+
use Symfony\Component\Console\Input\ArgvInput;
7+
use Symfony\Component\Debug\Debug;
8+
use Symfony\Component\Dotenv\Dotenv;
9+
10+
set_time_limit(0);
11+
12+
require __DIR__.'/../vendor/autoload.php';
13+
14+
if (!class_exists(Application::class)) {
15+
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
16+
}
17+
18+
if (!isset($_SERVER['APP_ENV'])) {
19+
if (!class_exists(Dotenv::class)) {
20+
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
21+
}
22+
(new Dotenv())->load(__DIR__.'/../.env');
23+
}
24+
25+
$input = new ArgvInput();
26+
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27+
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
28+
29+
if ($debug) {
30+
umask(0000);
31+
32+
if (class_exists(Debug::class)) {
33+
Debug::enable();
34+
}
35+
}
36+
37+
$kernel = new Kernel($env, $debug);
38+
$application = new Application($kernel);
39+
$application->run($input);

composer.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "phpbenchmarks/symfony",
3+
"license": "proprietary",
4+
"type": "project",
5+
"require": {
6+
"php": "^7.1.3",
7+
"ext-iconv": "*",
8+
"symfony/console": "4.1.0-BETA2",
9+
"symfony/flex": "^1.0",
10+
"symfony/framework-bundle": "4.1.0-BETA2",
11+
"symfony/lts": "^4@dev",
12+
"symfony/yaml": "4.1.0-BETA2"
13+
},
14+
"minimum-stability": "beta",
15+
"require-dev": {
16+
"symfony/dotenv": "^4.0"
17+
},
18+
"config": {
19+
"preferred-install": {
20+
"*": "dist"
21+
},
22+
"sort-packages": true
23+
},
24+
"autoload": {
25+
"psr-4": {
26+
"App\\": "src/"
27+
}
28+
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"App\\Tests\\": "tests/"
32+
}
33+
},
34+
"replace": {
35+
"symfony/polyfill-iconv": "*",
36+
"symfony/polyfill-php71": "*",
37+
"symfony/polyfill-php70": "*",
38+
"symfony/polyfill-php56": "*"
39+
},
40+
"scripts": {
41+
"auto-scripts": {
42+
"cache:clear": "symfony-cmd",
43+
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
44+
},
45+
"post-install-cmd": [
46+
"@auto-scripts"
47+
],
48+
"post-update-cmd": [
49+
"@auto-scripts"
50+
]
51+
},
52+
"conflict": {
53+
"symfony/symfony": "*"
54+
},
55+
"extra": {
56+
"symfony": {
57+
"allow-contrib": false
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)