Kernel Console for any Eureka Framework application.
Define global Application & Component kernel version
If you wish to install it in your project, require it via composer:
composer require eureka/kernel-console<?php
/*
* Copyright (c) Romain Cottard
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Eureka\Kernel\Console\Application\Application;
use Eureka\Kernel\Console\Kernel;
use Lcobucci\Clock\SystemClock;
use Psr\Container\NotFoundExceptionInterface;
//~ Define Loader & add main classes for config
require_once __DIR__ . '/vendor/autoload.php';
try {
$root = realpath(__DIR__ . '/..');
$env = 'dev';
$debug = true;
$kernel = new Kernel($root, $env, $debug);
$console = (new Application(SystemClock::fromUTC(), $argv, container: $kernel->getContainer()))
->setBaseNamespaces(['Application\Script', 'Eureka\Component'])
;
$console->before();
$console->run();
$console->after();
$console->terminate();
} catch (\Throwable $exception) {
echo 'Exception: ' . $exception->getMessage() . PHP_EOL;
exit(1);
}config/
|_ packages/
| |_ domains/
| - user.yaml
| - app.yaml
| - database.yaml
| - services.yaml
|_ dev/
| - app.yaml
|_ test/
| - app.yaml
|_ secrets/
| - database.yaml
|_ services.yaml
Config loading order and overrides:
packages/yaml files- Then
services.yamlyaml file - Then
{current_env}/yaml files - Finally
secrets/yaml files
See the CONTRIBUTING file.
You can install project with the following command:
make installAnd update with the following command:
make updateNB: For the components, the composer.lock file is not committed.
You can run unit tests (with coverage) on your side with following command:
make php/testsYou can run integration tests (without coverage) on your side with following command:
make php/integrationFor prettier output (but without coverage), you can use the following command:
make php/testdox # run tests without coverage reports but with prettified outputYou also can run code style check with following commands:
make php/checkYou also can run code style fixes with following commands:
make php/fixYou can check if any explicit dependency is missing with the following command:
make php/depsTo perform a static analyze of your code (with phpstan, lvl 9 at default), you can use the following command:
make php/analyseTo ensure you code still compatible with current supported version at Deezer and futures versions of php, you need to run the following commands (both are required for full support):
Minimal supported version:
make php/min-compatibilityMaximal supported version:
make php/max-compatibilityAnd the last "helper" commands, you can run before commit and push, is:
make ci This project is currently under The MIT License (MIT). See LICENCE file for more information.