Skip to content

Commit 0232147

Browse files
committed
BaseConfig Symfony FosUserBundle and EasyAdmin
0 parents  commit 0232147

40 files changed

+5162
-0
lines changed

.env.dist

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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=ef269844df961f750ad7152fe8851d4f
8+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
9+
#TRUSTED_HOSTS=localhost,example.com
10+
###< symfony/framework-bundle ###
11+
12+
###> doctrine/doctrine-bundle ###
13+
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
14+
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
15+
# Configure your db driver and server_version in config/packages/doctrine.yaml
16+
DATABASE_URL=mysql://db_user:[email protected]:3306/db_name
17+
###< doctrine/doctrine-bundle ###
18+
19+
###> symfony/swiftmailer-bundle ###
20+
# For Gmail as a transport, use: "gmail://username:password@localhost"
21+
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
22+
# Delivery is disabled by default via "null://localhost"
23+
MAILER_URL=null://localhost
24+
###< symfony/swiftmailer-bundle ###

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
###> symfony/framework-bundle ###
3+
.env
4+
/public/bundles/
5+
/var/
6+
/vendor/
7+
###< symfony/framework-bundle ###

bin/console

+39
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');
27+
$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption(['--no-debug', '']);
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

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

0 commit comments

Comments
 (0)