]> Raphaël G. Git Repositories - blog/commitdiff
Initial import
authorRaphaël Gertz <git@rapsys.eu>
Tue, 1 Aug 2023 07:22:46 +0000 (09:22 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 1 Aug 2023 07:22:46 +0000 (09:22 +0200)
bin/console [new file with mode: 0755]
bin/phpunit [new file with mode: 0755]

diff --git a/bin/console b/bin/console
new file mode 100755 (executable)
index 0000000..c933dc5
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env php
+<?php
+
+use App\Kernel;
+use Symfony\Bundle\FrameworkBundle\Console\Application;
+
+if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
+    throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
+}
+
+require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
+
+return function (array $context) {
+    $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
+
+    return new Application($kernel);
+};
diff --git a/bin/phpunit b/bin/phpunit
new file mode 100755 (executable)
index 0000000..f26f2c7
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/env php
+<?php
+
+if (!ini_get('date.timezone')) {
+    ini_set('date.timezone', 'UTC');
+}
+
+if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
+    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';
+}