- Fixes made mostly for PHP 8.5

This commit is contained in:
mcndave committed 2026-07-14 15:45:38 +00:00
1 parent 0471c0ab83
commit 6d8763a22c
7 files changed
+16 -22

No files matched your search

+2 -2
View File
@@ -19,9 +19,9 @@ use Lean\Console\{Lib, };
#[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
, 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: ['-q', '--quiet'], description: "Do not output any message")]
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
+2 -2
View File
@@ -20,9 +20,9 @@ use Lean\Console\{Lib, };
#[color:gray, bg: black]║ STORAGE ║[#]
#[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
, 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: ['-q', '--quiet'], description: "Do not output any message")]
#[Option(switch: ['-n', '--no-interaction'], description: "Run script without user interaction")]
+5 -6
View File
@@ -2,12 +2,11 @@
namespace Lean\Console\Controller;
use League\Route\Router;
use Picea\{FileFetcher, Picea, Caching\Opcache, Extension\UrlExtension, Ui\Method\FormHandler};
use Picea\{Ui\Method\FormHandler};
use Lean\File;
use Psr\Http\Message\{ ResponseInterface, ServerRequestInterface };
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 {
use Lib\ConsoleControllerTrait;
@@ -17,7 +16,7 @@ class Debugging extends Console {
{
$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');
@@ -25,9 +24,9 @@ class Debugging extends Console {
$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());
}
+1 -8
View File
@@ -24,18 +24,11 @@ trait ConsoleControllerTrait
#[Inject]
protected ContainerInterface $container;
#[Ignore]
public function __construct(? Picea\Picea $picea, Session $session, ContainerInterface $container) {
$this->picea = $picea;
$this->session = $session;
$this->container = $container;
}
#[Ignore]
public function version() : string
{
$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);