Skip to content

Commit bfe444c

Browse files
CRUD API
0 parents  commit bfe444c

Some content is hidden

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

59 files changed

+8936
-0
lines changed

.env

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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=50373636bdd097439dc76657d212924c
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+
###> symfony/mailer ###
24+
# MAILER_DSN=smtp://localhost
25+
###< symfony/mailer ###
26+
27+
###> doctrine/doctrine-bundle ###
28+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
29+
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
30+
# For a PostgreSQL database, use: "postgresql://db_user:[email protected]:5432/db_name?serverVersion=11&charset=utf8"
31+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
32+
DATABASE_URL='postgres://sf_user:nopassword@postgres/test'
33+
###< doctrine/doctrine-bundle ###

.env.test

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# define your env variables for the test env here
2+
KERNEL_CLASS='App\Kernel'
3+
APP_SECRET='$ecretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999
5+
PANTHER_APP_ENV=panther

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/public/bundles/
2+
/public/assets/
3+
/var/
4+
/vendor/
5+
.idea
6+
docker

bin/console

+42
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\ErrorHandler\Debug;
8+
9+
if (!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 LogicException('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);

bin/phpunit

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
5+
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
6+
exit(1);
7+
}
8+
9+
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
10+
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
11+
}
12+
13+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';

composer.json

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"type": "project",
3+
"license": "proprietary",
4+
"require": {
5+
"php": "^7.4",
6+
"ext-ctype": "*",
7+
"ext-iconv": "*",
8+
"sensio/framework-extra-bundle": "^5.1",
9+
"symfony/asset": "5.0.*",
10+
"symfony/console": "5.0.*",
11+
"symfony/dotenv": "5.0.*",
12+
"symfony/expression-language": "5.0.*",
13+
"symfony/flex": "^1.3.1",
14+
"symfony/form": "5.0.*",
15+
"symfony/framework-bundle": "5.0.*",
16+
"symfony/http-client": "5.0.*",
17+
"symfony/intl": "5.0.*",
18+
"symfony/mailer": "5.0.*",
19+
"symfony/monolog-bundle": "^3.1",
20+
"symfony/notifier": "5.0.*",
21+
"symfony/orm-pack": "*",
22+
"symfony/process": "5.0.*",
23+
"symfony/security-bundle": "5.0.*",
24+
"symfony/serializer-pack": "*",
25+
"symfony/string": "5.0.*",
26+
"symfony/translation": "5.0.*",
27+
"symfony/twig-pack": "*",
28+
"symfony/validator": "5.0.*",
29+
"symfony/web-link": "5.0.*",
30+
"symfony/yaml": "5.0.*"
31+
},
32+
"require-dev": {
33+
"symfony/debug-pack": "*",
34+
"symfony/maker-bundle": "^1.0",
35+
"symfony/profiler-pack": "*",
36+
"symfony/test-pack": "*"
37+
},
38+
"config": {
39+
"preferred-install": {
40+
"*": "dist"
41+
},
42+
"sort-packages": true
43+
},
44+
"autoload": {
45+
"psr-4": {
46+
"App\\": "src/"
47+
}
48+
},
49+
"autoload-dev": {
50+
"psr-4": {
51+
"App\\Tests\\": "tests/"
52+
}
53+
},
54+
"replace": {
55+
"paragonie/random_compat": "2.*",
56+
"symfony/polyfill-ctype": "*",
57+
"symfony/polyfill-iconv": "*",
58+
"symfony/polyfill-php72": "*",
59+
"symfony/polyfill-php71": "*",
60+
"symfony/polyfill-php70": "*",
61+
"symfony/polyfill-php56": "*"
62+
},
63+
"scripts": {
64+
"auto-scripts": {
65+
"cache:clear": "symfony-cmd",
66+
"assets:install %PUBLIC_DIR%": "symfony-cmd"
67+
},
68+
"post-install-cmd": [
69+
"@auto-scripts"
70+
],
71+
"post-update-cmd": [
72+
"@auto-scripts"
73+
]
74+
},
75+
"conflict": {
76+
"symfony/symfony": "*"
77+
},
78+
"extra": {
79+
"symfony": {
80+
"allow-contrib": false,
81+
"require": "5.0.*"
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)