Skip to content

Commit 38c3270

Browse files
committed
Merge branch 'review-application'
2 parents f1dfd10 + 24ba056 commit 38c3270

File tree

14 files changed

+493
-331
lines changed

14 files changed

+493
-331
lines changed

docs/Console.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ target, e.g. by calling [registerTarget()][registerTarget], before any other
4343
> `STDOUT` and `STDERR` targets and prevents creation of the default output log.
4444
> To create a log file that persists between reboots (in your project's
4545
> `var/log` directory by default), call the app container's
46-
> [logConsoleMessages()][logConsoleMessages] method.
46+
> [logOutput()][logOutput] method.
4747
4848
### Output methods
4949

@@ -81,7 +81,7 @@ The following Markdown-like syntax is supported in [Console][Console] messages:
8181
[CliApplication]: https://lkrms.github.io/php-util/Lkrms.Cli.CliApplication.html
8282
[Console]: https://lkrms.github.io/php-util/Lkrms.Facade.Console.html
8383
[ConsoleWriter]: https://lkrms.github.io/php-util/Lkrms.Console.ConsoleWriter.html
84-
[logConsoleMessages]: https://lkrms.github.io/php-util/Lkrms.Container.Application.html#_logConsoleMessages
84+
[logOutput]: https://lkrms.github.io/php-util/Lkrms.Container.Application.html#_logOutput
8585
[registerStdioTargets]: https://lkrms.github.io/php-util/Lkrms.Console.ConsoleWriter.html#_registerStdioTargets
8686
[registerTarget]: https://lkrms.github.io/php-util/Lkrms.Console.ConsoleWriter.html#_registerTarget
8787

lib/lk-util/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
$loader->addPsr4('Lkrms\\LkUtil\\', __DIR__);
1515

1616
(new CliApplication())
17-
->loadCacheIfExists()
18-
->logConsoleMessages()
17+
->resumeCache()
18+
->logOutput()
1919
->command(['generate', 'builder'], GenerateBuilder::class)
2020
->command(['generate', 'facade'], GenerateFacade::class)
2121
->command(['generate', 'sync', 'entity'], GenerateSyncEntity::class)

phpstan-baseline.neon

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,31 @@ parameters:
5555
count: 1
5656
path: src/Concept/Facade.php
5757

58+
-
59+
message: "#^Property Lkrms\\\\Container\\\\Application\\:\\:\\$CachePath is never written, only read\\.$#"
60+
count: 1
61+
path: src/Container/Application.php
62+
63+
-
64+
message: "#^Property Lkrms\\\\Container\\\\Application\\:\\:\\$ConfigPath is never written, only read\\.$#"
65+
count: 1
66+
path: src/Container/Application.php
67+
68+
-
69+
message: "#^Property Lkrms\\\\Container\\\\Application\\:\\:\\$DataPath is never written, only read\\.$#"
70+
count: 1
71+
path: src/Container/Application.php
72+
73+
-
74+
message: "#^Property Lkrms\\\\Container\\\\Application\\:\\:\\$LogPath is never written, only read\\.$#"
75+
count: 1
76+
path: src/Container/Application.php
77+
78+
-
79+
message: "#^Property Lkrms\\\\Container\\\\Application\\:\\:\\$TempPath is never written, only read\\.$#"
80+
count: 1
81+
path: src/Container/Application.php
82+
5883
-
5984
message: "#^Method Lkrms\\\\Contract\\\\IPipe\\:\\:handle\\(\\) has parameter \\$pipeline with generic interface Lkrms\\\\Contract\\\\IPipeline but does not specify its types\\: TInput, TOutput, TArgument$#"
6085
count: 1

scripts/generate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
$args = [
7878
'--force',
7979
'--no-meta',
80-
...array_slice($argv, 1),
80+
...array_slice($_SERVER['argv'], 1),
8181
];
8282

8383
$status = 0;

src/Cli/CliApplication.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ class CliApplication extends Application implements ICliApplication
4646
*/
4747
private $HelpStyle;
4848

49-
public function __construct(string $basePath = null, int $envFlags = EnvFlag::ALL)
50-
{
51-
parent::__construct($basePath, $envFlags);
49+
public function __construct(
50+
?string $basePath = null,
51+
?string $appName = null,
52+
int $envFlags = EnvFlag::ALL
53+
) {
54+
parent::__construct($basePath, $appName, $envFlags);
5255

5356
Assert::sapiIsCli();
5457
Assert::argvIsRegistered();

0 commit comments

Comments
 (0)