This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require_once __DIR__.'/vendor/autoload.php'; | |
const ITERATIONS = 10_000; | |
$stopwatch = new \Symfony\Component\Stopwatch\Stopwatch(); | |
$event = $stopwatch->start('db'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
final class Interpolator | |
{ | |
public function __construct( | |
private string $format = '%s', | |
) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace HappyInc\Infrastructure\Migrations; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework: | |
php_errors: | |
log: | |
!php/const E_ERROR: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_WARNING: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_PARSE: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_NOTICE: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_CORE_ERROR: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_CORE_WARNING: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_COMPILE_ERROR: !php/const Psr\Log\LogLevel::CRITICAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @psalm-pure | |
* @template T | |
* @template TArray of array<T> | |
* @param TArray $values | |
* @return (TArray is non-empty-array<T> ? T : ?T) | |
*/ | |
function array_value_first(array $values): mixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
/** | |
* @throws JsonException | |
*/ | |
function jsonEncode(mixed $data, int $flags = 0): string | |
{ | |
return json_encode($data, $flags | JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace HappyInc\Infrastructure; | |
/** | |
* @psalm-pure | |
*/ | |
function mb_ucfirst(string $string): string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use HappyInc\Tool\Rector\ReadOnlyPublicPropertyRector; | |
use HappyInc\Tool\Rector\UuidTRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Core\Configuration\Option; | |
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; | |
use Rector\Php71\Rector\FuncCall\CountOnNullRector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @psalm-immutable | |
* @template TResult | |
*/ | |
interface Message | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vendor: composer.json composer.lock | |
composer install | |
touch vendor | |
db: vendor | |
php bin/console wait $(DB_HOST):$(DB_PORT) | |
php bin/console doctrine:database:create --if-not-exists | |
php bin/console doctrine:migrations:migrate --no-interaction | |
.PHONY: db |