Skip to content

Commit

Permalink
Replace broken packagist:get-data with packagist:get-package
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioheleno committed Oct 31, 2023
1 parent 8c74047 commit 352cb71
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 432 deletions.
5 changes: 3 additions & 2 deletions app/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
declare(strict_types = 1);

use DI\ContainerBuilder;
use PackageHealth\PHP\Application\Console\Packagist\GetDataCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetListCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetPackageCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetUpdatesCommand;
use PackageHealth\PHP\Application\Console\Packagist\MassImportCommand;
use PackageHealth\PHP\Application\Console\Queue\ConsumeCommand;
use PackageHealth\PHP\Application\Console\Queue\ListCommand;
use PackageHealth\PHP\Application\Console\Queue\SendCommandCommand;
use PackageHealth\PHP\Application\Console\Queue\SendEventCommand;

use function DI\autowire;

return static function (ContainerBuilder $containerBuilder): void {
$containerBuilder->addDefinitions(
[
GetDataCommand::class => autowire(GetDataCommand::class),
GetPackageCommand::class => autowire(GetPackageCommand::class),
GetListCommand::class => autowire(GetListCommand::class),
GetUpdatesCommand::class => autowire(GetUpdatesCommand::class),
MassImportCommand::class => autowire(MassImportCommand::class),
Expand Down
8 changes: 4 additions & 4 deletions bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

use Composer\InstalledVersions;
use DI\ContainerBuilder;
use PackageHealth\PHP\Application\Console\Packagist\GetDataCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetListCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetPackageCommand;
use PackageHealth\PHP\Application\Console\Packagist\GetUpdatesCommand;
use PackageHealth\PHP\Application\Console\Packagist\MassImportCommand;
use PackageHealth\PHP\Application\Console\Queue\ConsumeCommand;
Expand Down Expand Up @@ -84,12 +84,12 @@
$app->setCommandLoader(
new FactoryCommandLoader(
[
GetDataCommand::getDefaultName() => static function () use ($container): GetDataCommand {
return $container->get(GetDataCommand::class);
},
GetListCommand::getDefaultName() => static function () use ($container): GetListCommand {
return $container->get(GetListCommand::class);
},
GetPackageCommand::getDefaultName() => static function () use ($container): GetPackageCommand {
return $container->get(GetPackageCommand::class);
},
GetUpdatesCommand::getDefaultName() => static function () use ($container): GetUpdatesCommand {
return $container->get(GetUpdatesCommand::class);
},
Expand Down
Loading

0 comments on commit 352cb71

Please sign in to comment.