Skip to content

Commit fb40286

Browse files
committed
Add initial set of files
0 parents  commit fb40286

File tree

19 files changed

+2960
-0
lines changed

19 files changed

+2960
-0
lines changed

.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the latter taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
#
13+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
14+
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
15+
16+
###> symfony/framework-bundle ###
17+
APP_ENV=dev
18+
APP_SECRET=043eb7ca885575368be77ca1ac90f8ac
19+
###< symfony/framework-bundle ###

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
###> symfony/framework-bundle ###
3+
/.env.local
4+
/.env.local.php
5+
/.env.*.local
6+
/config/secrets/prod/prod.decrypt.private.php
7+
/public/bundles/
8+
/var/
9+
/vendor/
10+
###< symfony/framework-bundle ###

bin/console

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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\Dotenv\Dotenv;
8+
use Symfony\Component\ErrorHandler\Debug;
9+
10+
if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
11+
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
12+
}
13+
14+
set_time_limit(0);
15+
16+
require dirname(__DIR__).'/vendor/autoload.php';
17+
18+
if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
19+
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
20+
}
21+
22+
$input = new ArgvInput();
23+
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
24+
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
25+
}
26+
27+
if ($input->hasParameterOption('--no-debug', true)) {
28+
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
29+
}
30+
31+
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
32+
33+
if ($_SERVER['APP_DEBUG']) {
34+
umask(0000);
35+
36+
if (class_exists(Debug::class)) {
37+
Debug::enable();
38+
}
39+
}
40+
41+
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
42+
$application = new Application($kernel);
43+
$application->run($input);

composer.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"minimum-stability": "dev",
5+
"prefer-stable": true,
6+
"require": {
7+
"php": ">=7.2.5",
8+
"ext-ctype": "*",
9+
"ext-iconv": "*",
10+
"symfony/console": "5.2.*",
11+
"symfony/dotenv": "5.2.*",
12+
"symfony/flex": "^1.3.1",
13+
"symfony/framework-bundle": "5.2.*",
14+
"symfony/yaml": "5.2.*"
15+
},
16+
"require-dev": {
17+
},
18+
"config": {
19+
"optimize-autoloader": true,
20+
"preferred-install": {
21+
"*": "dist"
22+
},
23+
"sort-packages": true
24+
},
25+
"autoload": {
26+
"psr-4": {
27+
"App\\": "src/"
28+
}
29+
},
30+
"autoload-dev": {
31+
"psr-4": {
32+
"App\\Tests\\": "tests/"
33+
}
34+
},
35+
"replace": {
36+
"symfony/polyfill-ctype": "*",
37+
"symfony/polyfill-iconv": "*",
38+
"symfony/polyfill-php72": "*"
39+
},
40+
"scripts": {
41+
"auto-scripts": {
42+
"cache:clear": "symfony-cmd",
43+
"assets:install %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+
"require": "5.2.*"
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)