Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Foundation\Console;
4
 
5
use Illuminate\Console\Command;
6
use Illuminate\Foundation\PackageManifest;
7
use Symfony\Component\Console\Attribute\AsCommand;
8
 
9
#[AsCommand(name: 'package:discover')]
10
class PackageDiscoverCommand extends Command
11
{
12
    /**
13
     * The console command signature.
14
     *
15
     * @var string
16
     */
17
    protected $signature = 'package:discover';
18
 
19
    /**
20
     * The name of the console command.
21
     *
22
     * This name is used to identify the command during lazy loading.
23
     *
24
     * @var string|null
25
     *
26
     * @deprecated
27
     */
28
    protected static $defaultName = 'package:discover';
29
 
30
    /**
31
     * The console command description.
32
     *
33
     * @var string
34
     */
35
    protected $description = 'Rebuild the cached package manifest';
36
 
37
    /**
38
     * Execute the console command.
39
     *
40
     * @param  \Illuminate\Foundation\PackageManifest  $manifest
41
     * @return void
42
     */
43
    public function handle(PackageManifest $manifest)
44
    {
45
        $this->components->info('Discovering packages');
46
 
47
        $manifest->build();
48
 
49
        collect($manifest->manifest)
50
            ->keys()
51
            ->each(fn ($description) => $this->components->task($description))
52
            ->whenNotEmpty(fn () => $this->newLine());
53
    }
54
}