diff --git a/.roave-backward-compatibility-check.xml b/.roave-backward-compatibility-check.xml index 40073f8..4d0de5c 100644 --- a/.roave-backward-compatibility-check.xml +++ b/.roave-backward-compatibility-check.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/roave/backward-compatibility-check/resources/schema.xsd"> - #\[BC\] SKIPPED: An enum expression Dot\Maker\\VisibilityEnum\:\:Public is not supported in class Dot\\Maker\\Component\\Method in file /src/Component/Method.php# - #\[BC\] SKIPPED: An enum expression Dot\Maker\\VisibilityEnum\:\:Protected is not supported in class Dot\\Maker\\Component\\Property in file /src/Component/Property.php# + #\[BC\] SKIPPED: An enum expression Dot\\Maker\\VisibilityEnum::Public is not supported in class Dot\\Maker\\Component\\Method in file \/src\/Component\/Method\.php \(line 20\)# + #\[BC\] SKIPPED: An enum expression Dot\\Maker\\VisibilityEnum::Protected is not supported in class Dot\\Maker\\Component\\Property in file \/src\/Component\/Property\.php \(line 15\)# diff --git a/src/Message.php b/src/Message.php index 9a29fa4..a53e602 100644 --- a/src/Message.php +++ b/src/Message.php @@ -77,7 +77,7 @@ public static function addConfigProviderToConfig(string $fqcn): self ) ->append(':') ->appendLine( - ColorEnum::colorize(sprintf(' %s,', $fqcn), ColorEnum::ForegroundBrightYellow) + ColorEnum::colorize(sprintf(' %s::class,', $fqcn), ColorEnum::ForegroundBrightYellow) ); } @@ -146,7 +146,7 @@ public static function addMiddlewareToPipeline(string $fqcn): self ) ->append(':') ->appendLine( - ColorEnum::colorize(sprintf(' $app->pipe(%s);', $fqcn), ColorEnum::ForegroundBrightYellow) + ColorEnum::colorize(sprintf(' $app->pipe(%s::class);', $fqcn), ColorEnum::ForegroundBrightYellow) ); } diff --git a/test/MessageTest.php b/test/MessageTest.php index 924eb9a..a79508e 100644 --- a/test/MessageTest.php +++ b/test/MessageTest.php @@ -60,7 +60,7 @@ public function testWillParseAddConfigProviderToConfigMessage(): void $expected = <<assertSame($expected, (string) $message); @@ -73,7 +73,7 @@ public function testWillParseAddCoreConfigProviderToConfigMessage(): void $expected = <<assertSame($expected, (string) $message); @@ -112,7 +112,7 @@ public function testWillParseAddMiddlewareToPipelineMessage(): void $expected = <<pipe(App\\Module\\Middleware\\TestMiddleware);\033[0m +\033[93m \$app->pipe(App\\Module\\Middleware\\TestMiddleware::class);\033[0m EXP; $this->assertSame($expected, (string) $message); diff --git a/test/Type/ModuleTest.php b/test/Type/ModuleTest.php index 03495ca..a8fdbe4 100644 --- a/test/Type/ModuleTest.php +++ b/test/Type/ModuleTest.php @@ -1060,13 +1060,13 @@ private function dataProviderWhenProjectTypeIsApiAndUsesCore(): string \033[93mNext steps:\033[0m \033[93m===========\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Api\BookStore\ConfigProvider,\033[0m +\033[93m Api\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Core\BookStore\ConfigProvider,\033[0m +\033[93m Core\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/autoload/cli.global.php\033[0m under \033[97mdot_cli\033[0m.\033[97mcommands\033[0m: \033[93m Api\BookStore\Command\BookStoreCommand::getDefaultName() => Api\BookStore\Command\BookStoreCommand::class,\033[0m - add to \033[97mconfig/pipeline.php\033[0m: -\033[93m \$app->pipe(Api\BookStore\Middleware\BookStoreMiddleware);\033[0m +\033[93m \$app->pipe(Api\BookStore\Middleware\BookStoreMiddleware::class);\033[0m - add to \033[97mconfig/autoload/authorization.global.php\033[0m the routes registered in \033[97mvfs://root/src/BookStore/src/RoutesDelegator.php\033[0m - add to \033[97mcomposer.json\033[0m under \033[97mautoload\033[0m.\033[97mpsr-4\033[0m: @@ -1125,11 +1125,11 @@ private function dataProviderWhenProjectTypeIsApiAndDoesNotUseCore(): string \033[93mNext steps:\033[0m \033[93m===========\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Api\BookStore\ConfigProvider,\033[0m +\033[93m Api\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/autoload/cli.global.php\033[0m under \033[97mdot_cli\033[0m.\033[97mcommands\033[0m: \033[93m Api\BookStore\Command\BookStoreCommand::getDefaultName() => Api\BookStore\Command\BookStoreCommand::class,\033[0m - add to \033[97mconfig/pipeline.php\033[0m: -\033[93m \$app->pipe(Api\BookStore\Middleware\BookStoreMiddleware);\033[0m +\033[93m \$app->pipe(Api\BookStore\Middleware\BookStoreMiddleware::class);\033[0m - add to \033[97mconfig/autoload/authorization.global.php\033[0m the routes registered in \033[97mvfs://root/src/BookStore/src/RoutesDelegator.php\033[0m - add to \033[97mcomposer.json\033[0m under \033[97mautoload\033[0m.\033[97mpsr-4\033[0m: @@ -1195,13 +1195,13 @@ private function dataProviderWhenProjectTypeIsNotApiAndUsesCore(): string \033[93mNext steps:\033[0m \033[93m===========\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Admin\BookStore\ConfigProvider,\033[0m +\033[93m Admin\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Core\BookStore\ConfigProvider,\033[0m +\033[93m Core\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/autoload/cli.global.php\033[0m under \033[97mdot_cli\033[0m.\033[97mcommands\033[0m: \033[93m Admin\BookStore\Command\BookStoreCommand::getDefaultName() => Admin\BookStore\Command\BookStoreCommand::class,\033[0m - add to \033[97mconfig/pipeline.php\033[0m: -\033[93m \$app->pipe(Admin\BookStore\Middleware\BookStoreMiddleware);\033[0m +\033[93m \$app->pipe(Admin\BookStore\Middleware\BookStoreMiddleware::class);\033[0m - add to \033[97mconfig/autoload/authorization-guards.global.php\033[0m the routes registered in \033[97mvfs://root/src/BookStore/src/RoutesDelegator.php\033[0m - add to \033[97mcomposer.json\033[0m under \033[97mautoload\033[0m.\033[97mpsr-4\033[0m: @@ -1268,11 +1268,11 @@ private function dataProviderWhenProjectTypeIsNotApiAndDoesNotUseCore(): string \033[93mNext steps:\033[0m \033[93m===========\033[0m - add to \033[97mconfig/config.php\033[0m: -\033[93m Admin\BookStore\ConfigProvider,\033[0m +\033[93m Admin\BookStore\ConfigProvider::class,\033[0m - add to \033[97mconfig/autoload/cli.global.php\033[0m under \033[97mdot_cli\033[0m.\033[97mcommands\033[0m: \033[93m Admin\BookStore\Command\BookStoreCommand::getDefaultName() => Admin\BookStore\Command\BookStoreCommand::class,\033[0m - add to \033[97mconfig/pipeline.php\033[0m: -\033[93m \$app->pipe(Admin\BookStore\Middleware\BookStoreMiddleware);\033[0m +\033[93m \$app->pipe(Admin\BookStore\Middleware\BookStoreMiddleware::class);\033[0m - add to \033[97mconfig/autoload/authorization-guards.global.php\033[0m the routes registered in \033[97mvfs://root/src/BookStore/src/RoutesDelegator.php\033[0m - add to \033[97mcomposer.json\033[0m under \033[97mautoload\033[0m.\033[97mpsr-4\033[0m: