Skip to content

Commit d23871b

Browse files
authored
⬆️ Update Foundation to v12.16.0 (#469)
1 parent 47310d4 commit d23871b

File tree

78 files changed

+611
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+611
-184
lines changed

src/Illuminate/Foundation/AliasLoader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class AliasLoader
3636
* Create a new AliasLoader instance.
3737
*
3838
* @param array $aliases
39-
* @return void
4039
*/
4140
private function __construct($aliases)
4241
{

src/Illuminate/Foundation/Application.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Application extends Container implements ApplicationContract, CachesConfig
4545
*
4646
* @var string
4747
*/
48-
const VERSION = '12.1.1';
48+
const VERSION = '12.16.0';
4949

5050
/**
5151
* The base path for the Laravel installation.
@@ -212,7 +212,6 @@ class Application extends Container implements ApplicationContract, CachesConfig
212212
* Create a new Illuminate application instance.
213213
*
214214
* @param string|null $basePath
215-
* @return void
216215
*/
217216
public function __construct($basePath = null)
218217
{
@@ -424,14 +423,14 @@ protected function bindPathsInContainer()
424423

425424
$this->useBootstrapPath(value(function () {
426425
return is_dir($directory = $this->basePath('.laravel'))
427-
? $directory
428-
: $this->basePath('bootstrap');
426+
? $directory
427+
: $this->basePath('bootstrap');
429428
}));
430429

431430
$this->useLangPath(value(function () {
432431
return is_dir($directory = $this->resourcePath('lang'))
433-
? $directory
434-
: $this->basePath('lang');
432+
? $directory
433+
: $this->basePath('lang');
435434
}));
436435
}
437436

@@ -1369,8 +1368,8 @@ protected function normalizeCachePath($key, $default)
13691368
}
13701369

13711370
return Str::startsWith($env, $this->absoluteCachePathPrefixes)
1372-
? $env
1373-
: $this->basePath($env);
1371+
? $env
1372+
: $this->basePath($env);
13741373
}
13751374

13761375
/**

src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function authorizeResource($model, $parameter = null, array $options = []
108108
/**
109109
* Get the map of resource methods to ability names.
110110
*
111-
* @return array
111+
* @return array<string, string>
112112
*/
113113
protected function resourceAbilityMap()
114114
{
@@ -126,7 +126,7 @@ protected function resourceAbilityMap()
126126
/**
127127
* Get the list of resource methods which do not have model parameters.
128128
*
129-
* @return array
129+
* @return list<string>
130130
*/
131131
protected function resourceMethodsWithoutModels()
132132
{

src/Illuminate/Foundation/Bus/PendingChain.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class PendingChain
6161
*
6262
* @param mixed $job
6363
* @param array $chain
64-
* @return void
6564
*/
6665
public function __construct($job, $chain)
6766
{
@@ -117,8 +116,8 @@ public function delay($delay)
117116
public function catch($callback)
118117
{
119118
$this->catchCallbacks[] = $callback instanceof Closure
120-
? new SerializableClosure($callback)
121-
: $callback;
119+
? new SerializableClosure($callback)
120+
: $callback;
122121

123122
return $this;
124123
}

src/Illuminate/Foundation/Bus/PendingDispatch.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class PendingDispatch
3131
* Create a new pending job dispatch.
3232
*
3333
* @param mixed $job
34-
* @return void
3534
*/
3635
public function __construct($job)
3736
{

src/Illuminate/Foundation/CacheBasedMaintenanceMode.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class CacheBasedMaintenanceMode implements MaintenanceMode
3535
* @param \Illuminate\Contracts\Cache\Factory $cache
3636
* @param string $store
3737
* @param string $key
38-
* @return void
3938
*/
4039
public function __construct(Factory $cache, string $store, string $key)
4140
{

src/Illuminate/Foundation/Configuration/ApplicationBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public function withProviders(array $providers = [], bool $withBootstrapProvider
9292
/**
9393
* Register the core event service provider for the application.
9494
*
95-
* @param array|bool $discover
95+
* @param iterable<int, string>|bool $discover
9696
* @return $this
9797
*/
98-
public function withEvents(array|bool $discover = [])
98+
public function withEvents(iterable|bool $discover = true)
9999
{
100-
if (is_array($discover) && count($discover) > 0) {
100+
if (is_iterable($discover)) {
101101
AppEventServiceProvider::setEventDiscoveryPaths($discover);
102102
}
103103

src/Illuminate/Foundation/Configuration/Exceptions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Exceptions
1313
* Create a new exception handling configuration instance.
1414
*
1515
* @param \Illuminate\Foundation\Exceptions\Handler $handler
16-
* @return void
1716
*/
1817
public function __construct(public Handler $handler)
1918
{

src/Illuminate/Foundation/Console/AboutCommand.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class AboutCommand extends Command
5353
* Create a new command instance.
5454
*
5555
* @param \Illuminate\Support\Composer $composer
56-
* @return void
5756
*/
5857
public function __construct(Composer $composer)
5958
{
@@ -165,6 +164,7 @@ protected function gatherApplicationInformation()
165164

166165
$formatEnabledStatus = fn ($value) => $value ? '<fg=yellow;options=bold>ENABLED</>' : 'OFF';
167166
$formatCachedStatus = fn ($value) => $value ? '<fg=green;options=bold>CACHED</>' : '<fg=yellow;options=bold>NOT CACHED</>';
167+
$formatStorageLinkedStatus = fn ($value) => $value ? '<fg=green;options=bold>LINKED</>' : '<fg=yellow;options=bold>NOT LINKED</>';
168168

169169
static::addToSection('Environment', fn () => [
170170
'Application Name' => config('app.name'),
@@ -183,7 +183,7 @@ protected function gatherApplicationInformation()
183183
'Config' => static::format($this->laravel->configurationIsCached(), console: $formatCachedStatus),
184184
'Events' => static::format($this->laravel->eventsAreCached(), console: $formatCachedStatus),
185185
'Routes' => static::format($this->laravel->routesAreCached(), console: $formatCachedStatus),
186-
'Views' => static::format($this->hasPhpFiles($this->laravel->storagePath('framework/views')), console: $formatCachedStatus),
186+
'Views' => static::format($this->hasPhpFiles(config('view.compiled')), console: $formatCachedStatus),
187187
]);
188188

189189
static::addToSection('Drivers', fn () => array_filter([
@@ -214,9 +214,30 @@ protected function gatherApplicationInformation()
214214
'Session' => config('session.driver'),
215215
]));
216216

217+
static::addToSection('Storage', fn () => [
218+
...$this->determineStoragePathLinkStatus($formatStorageLinkedStatus),
219+
]);
220+
217221
(new Collection(static::$customDataResolvers))->each->__invoke();
218222
}
219223

224+
/**
225+
* Determine storage symbolic links status.
226+
*
227+
* @param callable $formatStorageLinkedStatus
228+
* @return array<string,mixed>
229+
*/
230+
protected function determineStoragePathLinkStatus(callable $formatStorageLinkedStatus): array
231+
{
232+
return (new Collection(config('filesystems.links', [])))
233+
->mapWithKeys(function ($target, $link) use ($formatStorageLinkedStatus) {
234+
$path = Str::replace(public_path(), '', $link);
235+
236+
return [public_path($path) => static::format(file_exists($link), console: $formatStorageLinkedStatus)];
237+
})
238+
->toArray();
239+
}
240+
220241
/**
221242
* Determine whether the given directory has PHP files.
222243
*

src/Illuminate/Foundation/Console/ApiInstallCommand.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ApiInstallCommand extends Command
3737
/**
3838
* Execute the console command.
3939
*
40-
* @return int
40+
* @return void
4141
*/
4242
public function handle()
4343
{
@@ -67,12 +67,11 @@ public function handle()
6767
}
6868

6969
if ($this->option('passport')) {
70-
Process::run(array_filter([
70+
Process::run([
7171
php_binary(),
7272
artisan_binary(),
7373
'passport:install',
74-
$this->confirm('Would you like to use UUIDs for all client IDs?') ? '--uuids' : null,
75-
]));
74+
]);
7675

7776
$this->components->info('API scaffolding installed. Please add the [Laravel\Passport\HasApiTokens] trait to your User model.');
7877
} else {
@@ -110,7 +109,7 @@ protected function uncommentApiRoutesFile()
110109
$appBootstrapPath,
111110
);
112111
} else {
113-
$this->components->warn('Unable to automatically add API route definition to bootstrap file. API route file should be registered manually.');
112+
$this->components->warn("Unable to automatically add API route definition to [{$appBootstrapPath}]. API route file should be registered manually.");
114113

115114
return;
116115
}
@@ -150,7 +149,7 @@ protected function installSanctum()
150149
protected function installPassport()
151150
{
152151
$this->requireComposerPackages($this->option('composer'), [
153-
'laravel/passport:^12.0',
152+
'laravel/passport:^13.0',
154153
]);
155154
}
156155
}

0 commit comments

Comments
 (0)