Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ APP_IMGPROXY_SALT='666f72636573'
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=3c0e1589d36f2c28609e4ec5af60f545
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
###< symfony/framework-bundle ###

###> symfony/mailer ###
Expand All @@ -42,12 +40,10 @@ APP_SECRET=3c0e1589d36f2c28609e4ec5af60f545

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
DATABASE_URL=mysql://root@mysql:3306/af_website?serverVersion=5.7
###< doctrine/doctrine-bundle ###

###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

APP_SECURITY_OAUTH_DISCORD_SERVER_ID=1

Expand Down
3 changes: 3 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ return PhpCsFixer\Config::create()
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'@PHP74Migration:risky' => true,
'@PHP74Migration' => true,

'php_unit_test_annotation' => [
'style' => 'annotation',
],
'php_unit_method_casing' => false,
'phpdoc_to_comment' => false,
'ordered_traits' => false,
'ordered_class_elements' => [
'order' => [
'use_trait', // traits
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ifeq ($(ci),true)
endif

cs:
docker run --rm -v $(CURDIR):/project -w /project jakzal/phpqa:1.42-php7.4-alpine php-cs-fixer fix ${dryrun}
docker run --rm -v $(CURDIR):/project -w /project jakzal/phpqa:1.42-php7.4-alpine phpstan analyse
docker run --rm -v $(CURDIR):/project -w /project jakzal/phpqa:1.50.1-php7.4-alpine php-cs-fixer fix ${dryrun}
docker run --rm -v $(CURDIR):/project -w /project jakzal/phpqa:1.50.1-php7.4-alpine phpstan analyse

docker-compose exec -T php php bin/console lint:twig templates/
docker-compose exec -T php php bin/console lint:yaml --parse-tags config/
Expand Down
7 changes: 4 additions & 3 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
Expand All @@ -14,8 +15,8 @@ set_time_limit(0);

require dirname(__DIR__).'/vendor/autoload.php';

if (!class_exists(Application::class)) {
throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
}

$input = new ArgvInput();
Expand All @@ -27,7 +28,7 @@ if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

require dirname(__DIR__).'/config/bootstrap.php';
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');

if ($_SERVER['APP_DEBUG']) {
umask(0000);
Expand Down
100 changes: 42 additions & 58 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
{
"type": "project",
"license": "proprietary",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3",
"php": ">=7.4",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.2",
"composer/package-versions-deprecated": "^1.10",
"composer/package-versions-deprecated": "1.11.99.1",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"doctrine/doctrine-migrations-bundle": "^2.0",
"doctrine/orm": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.8",
"elao/enum": "^1.7",
"erusev/parsedown": "^1.7",
"friendsofsymfony/jsrouting-bundle": "^2.5",
"knpuniversity/oauth2-client-bundle": "^1.31",
"knpuniversity/oauth2-client-bundle": "^2.7",
"league/csv": "^9.6",
"phpdocumentor/reflection-docblock": "^5.2",
"ramsey/uuid-doctrine": "^1.6",
"restcord/restcord": "^0.3.2",
"restcord/restcord": "^0.5.0",
"sensio/framework-extra-bundle": "^5.1",
"spatie/calendar-links": "^1.2",
"symfony/asset": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/expression-language": "4.4.*",
"symfony/finder": "4.4.*",
"symfony/asset": "5.2.*",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/expression-language": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/http-client": "4.4.*",
"symfony/intl": "4.4.*",
"symfony/mailer": "4.4.*",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/intl": "5.2.*",
"symfony/mailer": "5.2.*",
"symfony/mime": "5.2.*",
"symfony/monolog-bundle": "^3.1",
"symfony/process": "4.4.*",
"symfony/property-access": "4.4.*",
"symfony/property-info": "4.4.*",
"symfony/security-bundle": "4.4.*",
"symfony/serializer": "4.4.*",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/web-link": "4.4.*",
"symfony/notifier": "5.2.*",
"symfony/process": "5.2.*",
"symfony/property-access": "5.2.*",
"symfony/property-info": "5.2.*",
"symfony/proxy-manager-bridge": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/serializer": "5.2.*",
"symfony/string": "5.2.*",
"symfony/translation": "5.2.*",
"symfony/twig-bundle": "^5.2",
"symfony/validator": "5.2.*",
"symfony/web-link": "5.2.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"symfony/yaml": "5.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.0",
Expand All @@ -55,18 +60,17 @@
"require-dev": {
"dama/doctrine-test-bundle": "^6.5",
"roave/security-advisories": "dev-master",
"symfony/browser-kit": "^4.4",
"symfony/css-selector": "^4.4",
"symfony/debug-bundle": "^4.4",
"symfony/browser-kit": "^5.2",
"symfony/css-selector": "^5.2",
"symfony/debug-bundle": "^5.2",
"symfony/maker-bundle": "^1.0",
"symfony/monolog-bundle": "^3.0",
"symfony/phpunit-bridge": "^5.1",
"symfony/stopwatch": "^4.4",
"symfony/twig-bundle": "^4.4",
"symfony/var-dumper": "^4.4",
"symfony/web-profiler-bundle": "^4.4"
"symfony/phpunit-bridge": "^5.2",
"symfony/stopwatch": "^5.2",
"symfony/var-dumper": "^5.2",
"symfony/web-profiler-bundle": "^5.2"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
Expand All @@ -85,12 +89,9 @@
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
"symfony/polyfill-php72": "*"
},
"scripts": {
"auto-scripts": {
Expand All @@ -103,23 +104,6 @@
],
"post-update-cmd": [
"@auto-scripts"
],
"cs": [
"php vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix"
],
"stan": [
"php vendor/phpstan/phpstan/phpstan analyse --level=6 src --memory-limit=128M"
],
"lint": [
"php bin/console lint:twig templates/",
"php bin/console lint:yaml --parse-tags config/",
"php bin/console doctrine:schema:validate",
"php bin/console doctrine:mapping:info",
"php bin/console debug:translation --domain=messages pl --only-unused",
"php bin/console debug:translation --domain=messages pl --only-missing"
],
"tests": [
"php bin/phpunit --testdox"
]
},
"conflict": {
Expand All @@ -128,7 +112,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.4.*"
"require": "5.2.*"
}
}
}
Loading