Skip to content

Commit b0dee33

Browse files
committed
api github init
1 parent 69d47d6 commit b0dee33

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6809
-0
lines changed

.env.dist

Lines changed: 24 additions & 0 deletions
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=d6779b96f7d9eb3b1627f8dfee6f404e
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:db_password@127.0.0.1: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

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

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: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"require": {
5+
"php": "^7.1.3",
6+
"ext-ctype": "*",
7+
"ext-iconv": "*",
8+
"easycorp/easyadmin-bundle": "^1.17",
9+
"friendsofsymfony/user-bundle": "~2.0",
10+
"jms/serializer-bundle": "^2.4",
11+
"sensio/framework-extra-bundle": "^5.2",
12+
"symfony/console": "*",
13+
"symfony/flex": "^1.1",
14+
"symfony/framework-bundle": "*",
15+
"symfony/orm-pack": "^1.0",
16+
"symfony/security-bundle": "*",
17+
"symfony/swiftmailer-bundle": "^3.2",
18+
"symfony/yaml": "*"
19+
},
20+
"require-dev": {
21+
"symfony/dotenv": "*",
22+
"symfony/maker-bundle": "^1.7",
23+
"symfony/profiler-pack": "^1.0",
24+
"symfony/var-dumper": "*",
25+
"symfony/web-server-bundle": "*"
26+
},
27+
"config": {
28+
"preferred-install": {
29+
"*": "dist"
30+
},
31+
"sort-packages": true
32+
},
33+
"autoload": {
34+
"psr-4": {
35+
"App\\": "src/"
36+
}
37+
},
38+
"autoload-dev": {
39+
"psr-4": {
40+
"App\\Tests\\": "tests/"
41+
}
42+
},
43+
"replace": {
44+
"paragonie/random_compat": "*",
45+
"symfony/polyfill-ctype": "*",
46+
"symfony/polyfill-iconv": "*",
47+
"symfony/polyfill-php71": "*",
48+
"symfony/polyfill-php70": "*",
49+
"symfony/polyfill-php56": "*"
50+
},
51+
"scripts": {
52+
"auto-scripts": {
53+
"cache:clear": "symfony-cmd",
54+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
55+
},
56+
"post-install-cmd": [
57+
"@auto-scripts"
58+
],
59+
"post-update-cmd": [
60+
"@auto-scripts"
61+
]
62+
},
63+
"conflict": {
64+
"symfony/symfony": "*"
65+
},
66+
"extra": {
67+
"symfony": {
68+
"allow-contrib": false,
69+
"require": "4.1.*"
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)