Skip to content

Commit 9f0a0ce

Browse files
author
letitbe133
committed
initial commit
0 parents  commit 9f0a0ce

33 files changed

+5283
-0
lines changed

.env

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the later 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/configuration.html#infrastructure-related-configuration
15+
16+
###> symfony/framework-bundle ###
17+
APP_ENV=dev
18+
APP_SECRET=7d1e5704ae7e8a2174e5ca48b104abf1
19+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
20+
#TRUSTED_HOSTS='^localhost|example\.com$'
21+
###< symfony/framework-bundle ###
22+
23+
###> doctrine/doctrine-bundle ###
24+
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
25+
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
26+
# Configure your db driver and server_version in config/packages/doctrine.yaml
27+
DATABASE_URL=mysql://letitbe133:Tinjiful@127.0.0.1:3306/symfony_api
28+
###< doctrine/doctrine-bundle ###

.gitignore

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

bin/console

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

composer.json

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

0 commit comments

Comments
 (0)