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
4 changes: 2 additions & 2 deletions .castor/qa.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ function update(): void
#[AsTask(description: 'Runs PHPUnit', aliases: ['phpunit'])]
function phpunit(#[AsRawTokens] array $rawTokens = []): int
{
if (!is_file(variable('root_dir') . '/bin/phpunit')) {
if (!is_file(variable('root_dir') . '/vendor/bin/phpunit')) {
return 0;
}

io()->section('Running PHPUnit...');

return docker_exit_code('bin/phpunit ' . implode(' ', $rawTokens));
return docker_exit_code('vendor/bin/phpunit ' . implode(' ', $rawTokens));
}

#[AsTask(description: 'Runs PHPStan', aliases: ['phpstan'])]
Expand Down
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{compose.yaml,compose.*.yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
16 changes: 12 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,26 @@

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=870686bf53a35819535f3c8158327e28
APP_SECRET=
APP_SHARE_DIR=var/share
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
DATABASE_URL="postgresql://app:app@postgres:5432/app?serverVersion=14&charset=utf8"
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
DATABASE_URL="postgresql://app:app@postgres:5432/app?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/routing ###
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
DEFAULT_URI=http://localhost
###< symfony/routing ###

TIMEZONE=Europe/Paris

SLACK_CHANNEL=FIXME
Expand Down
4 changes: 4 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

###> symfony/framework-bundle ###
APP_SECRET=18491e180aaaa3d37c87ac8bb089d260
###< symfony/framework-bundle ###
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
/vendor/
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
###> phpunit/phpunit ###
/phpunit.xml
###< symfony/phpunit-bridge ###
/.phpunit.cache/
###< phpunit/phpunit ###

###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.cache
Expand All @@ -27,3 +26,4 @@
###< infrastructure ###

.twig-cs-fixer.cache

40 changes: 9 additions & 31 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,19 @@

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)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

set_time_limit(0);

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

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();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
return new Application($kernel);
};
13 changes: 0 additions & 13 deletions bin/phpunit

This file was deleted.

56 changes: 30 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,57 @@
"license": "MIT",
"prefer-stable": true,
"require": {
"php": ">=8.3",
"php": ">=8.5",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.18.2",
"doctrine/doctrine-migrations-bundle": "^3.7.0",
"doctrine/doctrine-bundle": "^3",
"doctrine/doctrine-migrations-bundle": "^4",
"doctrine/orm": "^3.6.7",
"symfony/console": "^7.4.13",
"symfony/dotenv": "^7.4.11",
"symfony/console": "^8.1",
"symfony/dotenv": "^8.1",
"symfony/flex": "^2.10.0",
"symfony/framework-bundle": "^7.4.13",
"symfony/http-client": "^7.4.13",
"symfony/framework-bundle": "^8.1",
"symfony/http-client": "^8.1",
"symfony/monolog-bundle": "^4.0.2",
"symfony/runtime": "^7.4.13",
"symfony/security-bundle": "^7.4.13",
"symfony/twig-bundle": "^7.4.8",
"symfony/yaml": "^7.4.13"
"symfony/runtime": "^8.1",
"symfony/security-bundle": "^8.1",
"symfony/twig-bundle": "^8.1",
"symfony/yaml": "^8.1"
},
"require-dev": {
"symfony/browser-kit": "^7.4.8",
"symfony/css-selector": "^7.4.9",
"symfony/debug-bundle": "^7.4.8",
"phpunit/phpunit": "^13.1",
"symfony/browser-kit": "^8.1",
"symfony/css-selector": "^8.1",
"symfony/debug-bundle": "^8.1",
"symfony/maker-bundle": "^1.67",
"symfony/phpunit-bridge": "^8.0.8",
"symfony/stopwatch": "^7.4.8",
"symfony/web-profiler-bundle": "^7.4.13"
"symfony/stopwatch": "^8.1",
"symfony/web-profiler-bundle": "^8.1"
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php82": "*",
"symfony/polyfill-php81": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php56": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*",
"symfony/polyfill-php83": "*",
"symfony/polyfill-php84": "*",
"symfony/polyfill-php85": "*"
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "^7.4"
"require": "^8.1",
"docker": false
}
},
"autoload": {
Expand Down
Loading
Loading