Skip to content

Commit

Permalink
bump: recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart committed Mar 30, 2024
1 parent c222bc9 commit c3f67e7
Show file tree
Hide file tree
Showing 59 changed files with 3,045 additions and 2,536 deletions.
12 changes: 5 additions & 7 deletions .env
Expand Up @@ -38,15 +38,14 @@ MESSENGER_TRANSPORT_DSN=redis://redis:6379/messages
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=31cdbe196ba4b896a8ad8ac3fafe71cf
#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 ###

###> doctrine/doctrine-bundle ###
Expand All @@ -64,14 +63,13 @@ MAILER_DSN=smtp://mail:1025?encryption=null&auth_mode=null
ADMIN_PREFIX=/admin

###> 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 ###

###> symfony/mercure-bundle ###
MERCURE_PUBLISH_URL=http://mercure/.well-known/mercure
MERCURE_SUBSCRIBE_URL=http://grafikart.localhost:8001/.well-known/mercure
MERCURE_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdfX0.igEPFS-VblsI_at_-WbC7s1nQETOZspaNuwVl3gCQ5M
MERCURE_SUBSCRIBER_KEY=mercure_subscribermercure_subscribermercure_subscribermercure_subscriber
MERCURE_URL=http://mercure/.well-known/mercure
MERCURE_PUBLIC_URL=http://grafikart.localhost:8001/.well-known/mercure
MERCURE_JWT_SECRET=mercure_subscribermercure_subscribermercure_subscribermercure_subscriber
###< symfony/mercure-bundle ###

###> symfony/messenger ###
Expand Down
1 change: 1 addition & 0 deletions .env.test
Expand Up @@ -7,3 +7,4 @@ DATABASE_URL=postgresql://test:test@dbtest:5432/test?serverVersion=12&charset=ut
MAILER_DSN=null://null
MESSENGER_TRANSPORT_DSN=sync://
MESSENGER_TRANSPORT_FAILED_DSN=sync://
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
4 changes: 1 addition & 3 deletions .gitignore
Expand Up @@ -30,7 +30,6 @@ Migration.md
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
Expand All @@ -43,8 +42,7 @@ Migration.md
.idea

###> friendsofphp/php-cs-fixer ###
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

Expand Down
8 changes: 3 additions & 5 deletions .php-cs-fixer.dist.php
@@ -1,13 +1,11 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
;

$config = new PhpCsFixer\Config();
return $config
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
Expand Down
40 changes: 9 additions & 31 deletions bin/console
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);
};
24 changes: 17 additions & 7 deletions bin/phpunit
@@ -1,13 +1,23 @@
#!/usr/bin/env php
<?php

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
if (PHP_VERSION_ID >= 80000) {
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
} else {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -61,6 +61,7 @@
"symfony/property-info": "6.4.*",
"symfony/proxy-manager-bridge": "6.4.*",
"symfony/redis-messenger": "6.4.*",
"symfony/runtime": "6.4.*",
"symfony/security-bundle": "6.4.*",
"symfony/sendinblue-mailer": "6.4.*",
"symfony/serializer": "6.4.*",
Expand Down Expand Up @@ -109,7 +110,8 @@
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true
"symfony/flex": true,
"symfony/runtime": true
}
},
"autoload": {
Expand Down

0 comments on commit c3f67e7

Please sign in to comment.