Skip to content

Commit 99344f5

Browse files
committed
New implementation using Symfony framework
0 parents  commit 99344f5

Some content is hidden

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

54 files changed

+7568
-0
lines changed

.env.dist

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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=48433d48140552ab535b16cba005eb4e
8+
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
9+
#TRUSTED_HOSTS=localhost,example.com
10+
###< symfony/framework-bundle ###

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
###> symfony/framework-bundle ###
3+
/.env
4+
/public/bundles/
5+
/var/
6+
/vendor/
7+
###< symfony/framework-bundle ###
8+
9+
###> symfony/phpunit-bridge ###
10+
.phpunit
11+
/phpunit.xml
12+
###< symfony/phpunit-bridge ###
13+
14+
###> symfony/web-server-bundle ###
15+
/.web-server-pid
16+
###< symfony/web-server-bundle ###
17+
18+
/config/parameters.yaml
19+
20+
*.iml
21+
*.ics

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', 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);

bin/phpunit

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
5+
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
6+
exit(1);
7+
}
8+
if (false === getenv('SYMFONY_DEPRECATIONS_HELPER')) {
9+
// see https://symfony.com/doc/current/components/phpunit_bridge.html#making-tests-fail
10+
putenv('SYMFONY_DEPRECATIONS_HELPER=999999');
11+
}
12+
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
13+
putenv('SYMFONY_PHPUNIT_REMOVE=');
14+
}
15+
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
16+
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
17+
}
18+
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
19+
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
20+
}
21+
22+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';

composer.json

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

0 commit comments

Comments
 (0)