Skip to content

Commit 4a8679a

Browse files
authored
Merge pull request #543 from wayofdev/ci/updates
2 parents 62d76b7 + de9c22f commit 4a8679a

File tree

8 files changed

+83
-3
lines changed

8 files changed

+83
-3
lines changed

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
uses: shivammathur/[email protected]
102102
with:
103103
php-version: ${{ matrix.php-version }}
104-
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, fileinfo, xmlwriter, opcache, pcntl, posix
104+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, fileinfo, xmlwriter, opcache, pcntl, posix, pdo
105105
ini-values: error_reporting=E_ALL
106106
coverage: xdebug
107107

composer-require-checker.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"symbol-whitelist": [
33
"Illuminate\\Support\\ServiceProvider",
4+
"Illuminate\\Console\\Command",
45
"config_path"
56
]
67
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"require": {
2727
"php": "^8.2",
28+
"illuminate/console": "^10.48 || ^11.0",
2829
"illuminate/contracts": "^10.48 || ^11.0",
2930
"illuminate/support": "^10.48 || ^11.0"
3031
},

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psalm-baseline.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
3+
<file src="src/Bridge/Laravel/Console/Commands/PackageCommand.php">
4+
<PossiblyUnusedMethod>
5+
<code><![CDATA[handle]]></code>
6+
</PossiblyUnusedMethod>
7+
</file>
38
<file src="src/Bridge/Laravel/Providers/PackageServiceProvider.php">
49
<PossiblyUnusedMethod>
510
<code><![CDATA[boot]]></code>
@@ -8,6 +13,14 @@
813
<code><![CDATA[configurationIsCached]]></code>
914
</UndefinedInterfaceMethod>
1015
</file>
16+
<file src="tests/src/Functional/Bridge/Laravel/Console/Commands/PackageCommandTest.php">
17+
<PossiblyInvalidMethodCall>
18+
<code><![CDATA[expectsOutput]]></code>
19+
</PossiblyInvalidMethodCall>
20+
<PossiblyUnusedMethod>
21+
<code><![CDATA[it_executes_the_package_command_successfully]]></code>
22+
</PossiblyUnusedMethod>
23+
</file>
1124
<file src="tests/src/Functional/Bridge/Laravel/Providers/PackageServiceProviderTest.php">
1225
<PossiblyInvalidMethodCall>
1326
<code><![CDATA[assertExitCode]]></code>
@@ -21,4 +34,26 @@
2134
<code><![CDATA[faker]]></code>
2235
</PossiblyUnusedMethod>
2336
</file>
37+
<file src="vendor/laravel/framework/src/Illuminate/Console/Command.php">
38+
<MixedArgument>
39+
<code><![CDATA[$arguments]]></code>
40+
<code><![CDATA[$options]]></code>
41+
<code><![CDATA[$this->name = $name]]></code>
42+
</MixedArgument>
43+
<MixedArgumentTypeCoercion>
44+
<code><![CDATA[(array) $this->aliases]]></code>
45+
</MixedArgumentTypeCoercion>
46+
<MixedAssignment>
47+
<code><![CDATA[$this->name]]></code>
48+
</MixedAssignment>
49+
<RedundantCast>
50+
<code><![CDATA[(string) $this->help]]></code>
51+
</RedundantCast>
52+
<RedundantCastGivenDocblockType>
53+
<code><![CDATA[(array) $this->aliases]]></code>
54+
</RedundantCastGivenDocblockType>
55+
<UninitializedProperty>
56+
<code><![CDATA[$this->name]]></code>
57+
</UninitializedProperty>
58+
</file>
2459
</files>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace WayOfDev\Package\Bridge\Laravel\Console\Commands;
6+
7+
use Illuminate\Console\Command;
8+
9+
class PackageCommand extends Command
10+
{
11+
protected $signature = 'package:command';
12+
13+
protected $description = 'Package command description';
14+
15+
public function handle(): int
16+
{
17+
$this->info('Package command executed');
18+
19+
return self::SUCCESS;
20+
}
21+
}

src/Bridge/Laravel/Providers/PackageServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace WayOfDev\Package\Bridge\Laravel\Providers;
66

77
use Illuminate\Support\ServiceProvider;
8+
use WayOfDev\Package\Bridge\Laravel\Console\Commands\PackageCommand;
89
use WayOfDev\Package\Config;
910

1011
final class PackageServiceProvider extends ServiceProvider
@@ -33,6 +34,8 @@ public function register(): void
3334

3435
private function registerConsoleCommands(): void
3536
{
36-
$this->commands([]);
37+
$this->commands([
38+
PackageCommand::class,
39+
]);
3740
}
3841
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace WayOfDev\Tests\Functional\Bridge\Laravel\Console\Commands;
6+
7+
use PHPUnit\Framework\Attributes\Test;
8+
use WayOfDev\Tests\Functional\TestCase;
9+
10+
class PackageCommandTest extends TestCase
11+
{
12+
#[Test]
13+
public function it_executes_the_package_command_successfully(): void
14+
{
15+
$this->artisan('package:command')
16+
->expectsOutput('Package command executed')
17+
->assertExitCode(0);
18+
}
19+
}

0 commit comments

Comments
 (0)