Skip to content

Commit 29e9898

Browse files
author
mdrewes
committed
skeleton
0 parents  commit 29e9898

24 files changed

+4536
-0
lines changed

.env

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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=e818f23a02df7426fca3626398a6148a
19+
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
20+
#TRUSTED_HOSTS='^(localhost|example\.com)$'
21+
###< symfony/framework-bundle ###
22+
23+
###> doctrine/mongodb-odm-bundle ###
24+
MONGODB_URL=mongodb://localhost:27017
25+
MONGODB_DB=symfony
26+
###< doctrine/mongodb-odm-bundle ###

.gitignore

+10
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 ###

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

bin/console

+43
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

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"require": {
5+
"php": "^7.2.5",
6+
"ext-ctype": "*",
7+
"ext-iconv": "*",
8+
"doctrine/mongodb-odm-bundle": "^4.2",
9+
"symfony/console": "5.1.*",
10+
"symfony/dotenv": "5.1.*",
11+
"symfony/flex": "^1.3.1",
12+
"symfony/framework-bundle": "5.1.*",
13+
"symfony/yaml": "5.1.*"
14+
},
15+
"require-dev": {
16+
},
17+
"config": {
18+
"optimize-autoloader": true,
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+
"paragonie/random_compat": "2.*",
36+
"symfony/polyfill-ctype": "*",
37+
"symfony/polyfill-iconv": "*",
38+
"symfony/polyfill-php72": "*",
39+
"symfony/polyfill-php71": "*",
40+
"symfony/polyfill-php70": "*",
41+
"symfony/polyfill-php56": "*"
42+
},
43+
"scripts": {
44+
"auto-scripts": {
45+
"cache:clear": "symfony-cmd",
46+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
47+
},
48+
"post-install-cmd": [
49+
"@auto-scripts"
50+
],
51+
"post-update-cmd": [
52+
"@auto-scripts"
53+
]
54+
},
55+
"conflict": {
56+
"symfony/symfony": "*"
57+
},
58+
"extra": {
59+
"symfony": {
60+
"allow-contrib": false,
61+
"require": "5.1.*"
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)