- Fixes made mostly for PHP 8.5
This commit is contained in:
parent
0471c0ab83
commit
6d8763a22c
@ -26,7 +26,7 @@ return [
|
|||||||
|
|
||||||
'ulmus' => [
|
'ulmus' => [
|
||||||
'entities' => [
|
'entities' => [
|
||||||
'Lean\\Console\\Entity\\Firewall' => implode(DIRECTORY_SEPARATOR, [ $path , "src", "Entity", "Firewall" ]),
|
Lean\Console\Entity\Firewall::class => implode(DIRECTORY_SEPARATOR, [ $path , "src", "Entity", "Firewall" ]),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'routes' => ! getenv('DEBUG') ? [] : [
|
'routes' => ! getenv('DEBUG') ? [] : [
|
||||||
'Lean\\Console\\Controller' => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]),
|
Lean\Console\Controller::class => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
"title" : "Debugging -- LEAN",
|
"title" : "Debugging -- LEAN",
|
||||||
"page-title": "Déboguage",
|
"page-title": "Déboguage",
|
||||||
"logs": {
|
"logs": {
|
||||||
"breadcrumb": "Journaux d'événements"
|
"breadcrumb": "Journaux d'événements",
|
||||||
|
"line": "Lines number: "
|
||||||
},
|
},
|
||||||
"phpinfo": {
|
"phpinfo": {
|
||||||
"breadcrumb": "phpinfo()"
|
"breadcrumb": "phpinfo()"
|
||||||
|
|||||||
@ -19,9 +19,9 @@ use Lean\Console\{Lib, };
|
|||||||
#[color:gray, bg: black]║ ║[#]
|
#[color:gray, bg: black]║ ║[#]
|
||||||
#[color:gray, bg: black]╚═════════════════════════╝[#]
|
#[color:gray, bg: black]╚═════════════════════════╝[#]
|
||||||
|
|
||||||
Try #[color:gray, bg: black]'lean console --help'[#] for more information.
|
Try #[color:gray, bg: black]'cli lean-console --help'[#] for more information.
|
||||||
CLI
|
CLI
|
||||||
, command: 'console')]
|
, command: 'lean-console')]
|
||||||
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||||
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
||||||
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||||
|
|||||||
@ -20,9 +20,9 @@ use Lean\Console\{Lib, };
|
|||||||
#[color:gray, bg: black]║ STORAGE ║[#]
|
#[color:gray, bg: black]║ STORAGE ║[#]
|
||||||
#[color:gray, bg: black]╚═════════════════════════╝[#]
|
#[color:gray, bg: black]╚═════════════════════════╝[#]
|
||||||
|
|
||||||
Try #[color:gray, bg: black]'lean console storage --help'[#] for more information.
|
Try #[color:gray, bg: black]'cli lean-console storage --help'[#] for more information.
|
||||||
CLI
|
CLI
|
||||||
, command: 'console storage')]
|
, command: 'lean-console storage')]
|
||||||
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
#[Option(switch: ['-h', '--help'], description: "Display help for the given command. When no command is given display help for the list command")]
|
||||||
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
#[Option(switch: ['-q', '--quiet'], description: "Do not output any message")]
|
||||||
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
|
||||||
|
|||||||
@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
namespace Lean\Console\Controller;
|
namespace Lean\Console\Controller;
|
||||||
|
|
||||||
use League\Route\Router;
|
use Picea\{Ui\Method\FormHandler};
|
||||||
use Picea\{FileFetcher, Picea, Caching\Opcache, Extension\UrlExtension, Ui\Method\FormHandler};
|
|
||||||
use Lean\File;
|
use Lean\File;
|
||||||
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
|
||||||
use Lean\Console\{ Form, Lib };
|
use Lean\Console\{ Form, Lib };
|
||||||
use Notes\Tell\Attribute\Language, Notes\Route\Attribute\Method\Route;
|
use Notes\Route\Attribute\Method\Route;
|
||||||
|
|
||||||
class Debugging extends Console {
|
class Debugging extends Console {
|
||||||
use Lib\ConsoleControllerTrait;
|
use Lib\ConsoleControllerTrait;
|
||||||
@ -17,7 +16,7 @@ class Debugging extends Console {
|
|||||||
{
|
{
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
new FormHandler($request, new Form\Debugging\Logs(), $this->pushContext(new Lib\FormContext($request, "debugging.logs")));
|
# new FormHandler($request, new Form\Debugging\Logs(), $this->pushContext(new Lib\FormContext($request, "debugging.logs")));
|
||||||
|
|
||||||
$path = getenv('LOGS_PATH');
|
$path = getenv('LOGS_PATH');
|
||||||
|
|
||||||
@ -25,9 +24,9 @@ class Debugging extends Console {
|
|||||||
|
|
||||||
$default = basename(ini_get('error_log'));
|
$default = basename(ini_get('error_log'));
|
||||||
|
|
||||||
$open = end($files);
|
$open = File::sanitizeFilePath($request->getQueryParams()['logfile'] ?? end($files));
|
||||||
|
|
||||||
$content = File::tail($path . DIRECTORY_SEPARATOR . $open, 100);
|
$content = File::tail($path . DIRECTORY_SEPARATOR . $open, $request->getQueryParams()['line'] ?? 100);
|
||||||
|
|
||||||
return $this->renderView("lean-console/page/debugging/logs", get_defined_vars());
|
return $this->renderView("lean-console/page/debugging/logs", get_defined_vars());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,18 +24,11 @@ trait ConsoleControllerTrait
|
|||||||
#[Inject]
|
#[Inject]
|
||||||
protected ContainerInterface $container;
|
protected ContainerInterface $container;
|
||||||
|
|
||||||
#[Ignore]
|
|
||||||
public function __construct(? Picea\Picea $picea, Session $session, ContainerInterface $container) {
|
|
||||||
$this->picea = $picea;
|
|
||||||
$this->session = $session;
|
|
||||||
$this->container = $container;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Ignore]
|
#[Ignore]
|
||||||
public function version() : string
|
public function version() : string
|
||||||
{
|
{
|
||||||
$version = iterator_to_array(
|
$version = iterator_to_array(
|
||||||
(new Form\Update\Git(getenv('PROJECT_PATH')))->run("/usr/bin/git describe --tags")
|
new Form\Update\Git(getenv('PROJECT_PATH'))->run("/usr/bin/git describe --tags")
|
||||||
);
|
);
|
||||||
|
|
||||||
# dump($version);
|
# dump($version);
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
<h2>{{ $path }}</h2>
|
<h2>{{ $path }}</h2>
|
||||||
|
|
||||||
{% ui:form.get current_url() %}
|
{% ui:form.get current_url() %}
|
||||||
{% ui:select 'logfile', array_combine($files, $files), get('file') ?? $open %}
|
<small>{% _ 'logs.line' %} {% ui:text 'line', get('line') ?? 100, [ 'onchange' => "this.closest('form').submit()" ] %}</small>
|
||||||
|
{% ui:select 'logfile', array_combine($files, $files), get('file') ?? $open, [ 'onchange' => "this.closest('form').submit()" ] %}
|
||||||
{% ui:endform %}
|
{% ui:endform %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user