Skip to content

Commit 6cb7750

Browse files
committed
Merge branch '10.x' into 11.x
# Conflicts: # .github/workflows/tests.yml
2 parents 428f86d + a70b776 commit 6cb7750

File tree

6 files changed

+93
-30
lines changed

6 files changed

+93
-30
lines changed

.github/workflows/databases.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929
steps:
3030
- name: Checkout code
3131
uses: actions/checkout@v4
32-
with:
33-
fetch-depth: 0
3432

3533
- name: Setup PHP
3634
uses: shivammathur/setup-php@v2
@@ -40,6 +38,9 @@ jobs:
4038
tools: composer:v2
4139
coverage: none
4240

41+
- name: Set Framework version
42+
run: composer config version "11.x-dev"
43+
4344
- name: Install dependencies
4445
uses: nick-fields/retry@v3
4546
with:
@@ -74,8 +75,6 @@ jobs:
7475
steps:
7576
- name: Checkout code
7677
uses: actions/checkout@v4
77-
with:
78-
fetch-depth: 0
7978

8079
- name: Setup PHP
8180
uses: shivammathur/setup-php@v2
@@ -85,6 +84,9 @@ jobs:
8584
tools: composer:v2
8685
coverage: none
8786

87+
- name: Set Framework version
88+
run: composer config version "11.x-dev"
89+
8890
- name: Install dependencies
8991
uses: nick-fields/retry@v3
9092
with:
@@ -118,8 +120,6 @@ jobs:
118120
steps:
119121
- name: Checkout code
120122
uses: actions/checkout@v4
121-
with:
122-
fetch-depth: 0
123123

124124
- name: Setup PHP
125125
uses: shivammathur/setup-php@v2
@@ -129,6 +129,9 @@ jobs:
129129
tools: composer:v2
130130
coverage: none
131131

132+
- name: Set Framework version
133+
run: composer config version "11.x-dev"
134+
132135
- name: Install dependencies
133136
uses: nick-fields/retry@v3
134137
with:
@@ -163,8 +166,6 @@ jobs:
163166
steps:
164167
- name: Checkout code
165168
uses: actions/checkout@v4
166-
with:
167-
fetch-depth: 0
168169

169170
- name: Setup PHP
170171
uses: shivammathur/setup-php@v2
@@ -174,6 +175,9 @@ jobs:
174175
tools: composer:v2
175176
coverage: none
176177

178+
- name: Set Framework version
179+
run: composer config version "11.x-dev"
180+
177181
- name: Install dependencies
178182
uses: nick-fields/retry@v3
179183
with:
@@ -208,8 +212,6 @@ jobs:
208212
steps:
209213
- name: Checkout code
210214
uses: actions/checkout@v4
211-
with:
212-
fetch-depth: 0
213215

214216
- name: Setup PHP
215217
uses: shivammathur/setup-php@v2
@@ -219,6 +221,9 @@ jobs:
219221
tools: composer:v2
220222
coverage: none
221223

224+
- name: Set Framework version
225+
run: composer config version "11.x-dev"
226+
222227
- name: Install dependencies
223228
uses: nick-fields/retry@v3
224229
with:

.github/workflows/facades.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
2422

2523
- name: Setup PHP
2624
uses: shivammathur/setup-php@v2

.github/workflows/queues.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
2422

2523
- name: Setup PHP
2624
uses: shivammathur/setup-php@v2
@@ -30,6 +28,9 @@ jobs:
3028
tools: composer:v2
3129
coverage: none
3230

31+
- name: Set Framework version
32+
run: composer config version "11.x-dev"
33+
3334
- name: Install dependencies
3435
uses: nick-fields/retry@v3
3536
with:
@@ -53,8 +54,6 @@ jobs:
5354
steps:
5455
- name: Checkout code
5556
uses: actions/checkout@v4
56-
with:
57-
fetch-depth: 0
5857

5958
- name: Setup PHP
6059
uses: shivammathur/setup-php@v2
@@ -64,6 +63,9 @@ jobs:
6463
tools: composer:v2
6564
coverage: none
6665

66+
- name: Set Framework version
67+
run: composer config version "11.x-dev"
68+
6769
- name: Install dependencies
6870
uses: nick-fields/retry@v3
6971
with:
@@ -95,8 +97,6 @@ jobs:
9597
steps:
9698
- name: Checkout code
9799
uses: actions/checkout@v4
98-
with:
99-
fetch-depth: 0
100100

101101
- name: Setup PHP
102102
uses: shivammathur/setup-php@v2
@@ -106,6 +106,9 @@ jobs:
106106
tools: composer:v2
107107
coverage: none
108108

109+
- name: Set Framework version
110+
run: composer config version "11.x-dev"
111+
109112
- name: Install dependencies
110113
uses: nick-fields/retry@v3
111114
with:
@@ -126,12 +129,10 @@ jobs:
126129
steps:
127130
- name: Checkout code
128131
uses: actions/checkout@v4
129-
with:
130-
fetch-depth: 0
131-
132+
132133
- name: Download & Extract beanstalkd
133134
run: curl -L https://github.com/beanstalkd/beanstalkd/archive/refs/tags/v1.13.tar.gz | tar xz
134-
135+
135136
- name: Make beanstalkd
136137
run: make
137138
working-directory: beanstalkd-1.13
@@ -144,6 +145,9 @@ jobs:
144145
tools: composer:v2
145146
coverage: none
146147

148+
- name: Set Framework version
149+
run: composer config version "11.x-dev"
150+
147151
- name: Install dependencies
148152
uses: nick-fields/retry@v3
149153
with:

.github/workflows/static-analysis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
24-
with:
25-
fetch-depth: 0
2624

2725
- name: Setup PHP
2826
uses: shivammathur/setup-php@v2
@@ -31,6 +29,9 @@ jobs:
3129
tools: composer:v2
3230
coverage: none
3331

32+
- name: Set Framework version
33+
run: composer config version "11.x-dev"
34+
3435
- name: Install dependencies
3536
uses: nick-fields/retry@v3
3637
with:

.github/workflows/tests.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ jobs:
4848
steps:
4949
- name: Checkout code
5050
uses: actions/checkout@v4
51-
with:
52-
fetch-depth: 0
5351

5452
- name: Setup PHP
5553
uses: shivammathur/setup-php@v2
@@ -63,6 +61,9 @@ jobs:
6361
REDIS_CONFIGURE_OPTS: --enable-redis --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lzf --with-liblzf --enable-redis-zstd --with-libzstd --enable-redis-lz4 --with-liblz4
6462
REDIS_LIBS: liblz4-dev, liblzf-dev, libzstd-dev
6563

64+
- name: Set Framework version
65+
run: composer config version "11.x-dev"
66+
6667
- name: Set minimum PHP 8.2 versions
6768
uses: nick-fields/retry@v3
6869
with:
@@ -122,8 +123,6 @@ jobs:
122123
123124
- name: Checkout code
124125
uses: actions/checkout@v4
125-
with:
126-
fetch-depth: 0
127126

128127
- name: Setup PHP
129128
uses: shivammathur/setup-php@v2
@@ -133,6 +132,19 @@ jobs:
133132
tools: composer:v2
134133
coverage: none
135134

135+
<<<<<<< HEAD
136+
=======
137+
- name: Set Framework version
138+
run: composer config version "11.x-dev"
139+
140+
- name: Set Minimum PHP 8.1 Versions
141+
uses: nick-fields/retry@v3
142+
with:
143+
timeout_minutes: 5
144+
max_attempts: 5
145+
command: composer require symfony/css-selector:~6.0 --no-interaction --no-update
146+
147+
>>>>>>> 10.x
136148
- name: Set Minimum PHP 8.2 Versions
137149
uses: nick-fields/retry@v3
138150
with:

tests/Integration/Console/ConsoleApplicationTest.php

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22

33
namespace Illuminate\Tests\Integration\Console;
44

5+
use Illuminate\Console\Application as Artisan;
56
use Illuminate\Console\Command;
67
use Illuminate\Console\Scheduling\Schedule;
78
use Illuminate\Contracts\Console\Kernel;
89
use Illuminate\Foundation\Console\QueuedCommand;
910
use Illuminate\Support\Facades\Queue;
1011
use Orchestra\Testbench\TestCase;
12+
use Symfony\Component\Console\Attribute\AsCommand;
1113

1214
class ConsoleApplicationTest extends TestCase
1315
{
1416
protected function setUp(): void
1517
{
16-
parent::setUp();
18+
Artisan::starting(function ($artisan) {
19+
$artisan->resolveCommands([
20+
FooCommandStub::class,
21+
ZondaCommandStub::class,
22+
]);
23+
});
1724

18-
$this->app[Kernel::class]->registerCommand(new FooCommandStub);
25+
parent::setUp();
1926
}
2027

2128
public function testArtisanCallUsingCommandName()
@@ -25,13 +32,34 @@ public function testArtisanCallUsingCommandName()
2532
])->assertExitCode(0);
2633
}
2734

35+
public function testArtisanCallUsingCommandNameAliases()
36+
{
37+
$this->artisan('app:foobar', [
38+
'id' => 1,
39+
])->assertExitCode(0);
40+
}
41+
2842
public function testArtisanCallUsingCommandClass()
2943
{
3044
$this->artisan(FooCommandStub::class, [
3145
'id' => 1,
3246
])->assertExitCode(0);
3347
}
3448

49+
public function testArtisanCallUsingCommandNameUsingAsCommandAttribute()
50+
{
51+
$this->artisan('zonda', [
52+
'id' => 1,
53+
])->assertExitCode(0);
54+
}
55+
56+
public function testArtisanCallUsingCommandNameAliasesUsingAsCommandAttribute()
57+
{
58+
$this->artisan('app:zonda', [
59+
'id' => 1,
60+
])->assertExitCode(0);
61+
}
62+
3563
public function testArtisanCallNow()
3664
{
3765
$exitCode = $this->artisan('foo:bar', [
@@ -86,6 +114,21 @@ class FooCommandStub extends Command
86114
{
87115
protected $signature = 'foo:bar {id}';
88116

117+
protected $aliases = ['app:foobar'];
118+
119+
public function handle()
120+
{
121+
//
122+
}
123+
}
124+
125+
#[AsCommand(name: 'zonda', aliases: ['app:zonda'])]
126+
class ZondaCommandStub extends Command
127+
{
128+
protected $signature = 'zonda {id}';
129+
130+
protected $aliases = ['app:zonda'];
131+
89132
public function handle()
90133
{
91134
//

0 commit comments

Comments
 (0)