Skip to content

Commit a5647fe

Browse files
committed
Initial commit
0 parents  commit a5647fe

File tree

21 files changed

+1806
-0
lines changed

21 files changed

+1806
-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=9027518988048735a11aaf77e160cffe
8+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
9+
#TRUSTED_HOSTS=localhost,example.com
10+
###< symfony/framework-bundle ###

.gitignore

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

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

0 commit comments

Comments
 (0)