Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Illuminate/Foundation/AliasLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class AliasLoader
* Create a new AliasLoader instance.
*
* @param array $aliases
* @return void
*/
private function __construct($aliases)
{
Expand Down
15 changes: 7 additions & 8 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Application extends Container implements ApplicationContract, CachesConfig
*
* @var string
*/
const VERSION = '12.1.1';
const VERSION = '12.16.0';

/**
* The base path for the Laravel installation.
Expand Down Expand Up @@ -212,7 +212,6 @@ class Application extends Container implements ApplicationContract, CachesConfig
* Create a new Illuminate application instance.
*
* @param string|null $basePath
* @return void
*/
public function __construct($basePath = null)
{
Expand Down Expand Up @@ -424,14 +423,14 @@ protected function bindPathsInContainer()

$this->useBootstrapPath(value(function () {
return is_dir($directory = $this->basePath('.laravel'))
? $directory
: $this->basePath('bootstrap');
? $directory
: $this->basePath('bootstrap');
}));

$this->useLangPath(value(function () {
return is_dir($directory = $this->resourcePath('lang'))
? $directory
: $this->basePath('lang');
? $directory
: $this->basePath('lang');
}));
}

Expand Down Expand Up @@ -1369,8 +1368,8 @@ protected function normalizeCachePath($key, $default)
}

return Str::startsWith($env, $this->absoluteCachePathPrefixes)
? $env
: $this->basePath($env);
? $env
: $this->basePath($env);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function authorizeResource($model, $parameter = null, array $options = []
/**
* Get the map of resource methods to ability names.
*
* @return array
* @return array<string, string>
*/
protected function resourceAbilityMap()
{
Expand All @@ -126,7 +126,7 @@ protected function resourceAbilityMap()
/**
* Get the list of resource methods which do not have model parameters.
*
* @return array
* @return list<string>
*/
protected function resourceMethodsWithoutModels()
{
Expand Down
5 changes: 2 additions & 3 deletions src/Illuminate/Foundation/Bus/PendingChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class PendingChain
*
* @param mixed $job
* @param array $chain
* @return void
*/
public function __construct($job, $chain)
{
Expand Down Expand Up @@ -117,8 +116,8 @@ public function delay($delay)
public function catch($callback)
{
$this->catchCallbacks[] = $callback instanceof Closure
? new SerializableClosure($callback)
: $callback;
? new SerializableClosure($callback)
: $callback;

return $this;
}
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Foundation/Bus/PendingDispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class PendingDispatch
* Create a new pending job dispatch.
*
* @param mixed $job
* @return void
*/
public function __construct($job)
{
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Foundation/CacheBasedMaintenanceMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class CacheBasedMaintenanceMode implements MaintenanceMode
* @param \Illuminate\Contracts\Cache\Factory $cache
* @param string $store
* @param string $key
* @return void
*/
public function __construct(Factory $cache, string $store, string $key)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ public function withProviders(array $providers = [], bool $withBootstrapProvider
/**
* Register the core event service provider for the application.
*
* @param array|bool $discover
* @param iterable<int, string>|bool $discover
* @return $this
*/
public function withEvents(array|bool $discover = [])
public function withEvents(iterable|bool $discover = true)
{
if (is_array($discover) && count($discover) > 0) {
if (is_iterable($discover)) {
AppEventServiceProvider::setEventDiscoveryPaths($discover);
}

Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Foundation/Configuration/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Exceptions
* Create a new exception handling configuration instance.
*
* @param \Illuminate\Foundation\Exceptions\Handler $handler
* @return void
*/
public function __construct(public Handler $handler)
{
Expand Down
25 changes: 23 additions & 2 deletions src/Illuminate/Foundation/Console/AboutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class AboutCommand extends Command
* Create a new command instance.
*
* @param \Illuminate\Support\Composer $composer
* @return void
*/
public function __construct(Composer $composer)
{
Expand Down Expand Up @@ -165,6 +164,7 @@ protected function gatherApplicationInformation()

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

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

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

static::addToSection('Storage', fn () => [
...$this->determineStoragePathLinkStatus($formatStorageLinkedStatus),
]);

(new Collection(static::$customDataResolvers))->each->__invoke();
}

/**
* Determine storage symbolic links status.
*
* @param callable $formatStorageLinkedStatus
* @return array<string,mixed>
*/
protected function determineStoragePathLinkStatus(callable $formatStorageLinkedStatus): array
{
return (new Collection(config('filesystems.links', [])))
->mapWithKeys(function ($target, $link) use ($formatStorageLinkedStatus) {
$path = Str::replace(public_path(), '', $link);

return [public_path($path) => static::format(file_exists($link), console: $formatStorageLinkedStatus)];
})
->toArray();
}

/**
* Determine whether the given directory has PHP files.
*
Expand Down
11 changes: 5 additions & 6 deletions src/Illuminate/Foundation/Console/ApiInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ApiInstallCommand extends Command
/**
* Execute the console command.
*
* @return int
* @return void
*/
public function handle()
{
Expand Down Expand Up @@ -67,12 +67,11 @@ public function handle()
}

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

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

return;
}
Expand Down Expand Up @@ -150,7 +149,7 @@ protected function installSanctum()
protected function installPassport()
{
$this->requireComposerPackages($this->option('composer'), [
'laravel/passport:^12.0',
'laravel/passport:^13.0',
]);
}
}
Loading
Loading