From 7a0e222d45ba4a8bc54b9f673c70c29400fbcc5b Mon Sep 17 00:00:00 2001 From: Rustam Date: Sun, 15 Oct 2023 06:45:33 +0500 Subject: [PATCH] Allow attributes to use in classes --- src/Attribute/Delete.php | 2 +- src/Attribute/Get.php | 2 +- src/Attribute/Head.php | 2 +- src/Attribute/Options.php | 2 +- src/Attribute/Patch.php | 2 +- src/Attribute/Post.php | 2 +- src/Attribute/Put.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Attribute/Delete.php b/src/Attribute/Delete.php index 6ed574c..cb46448 100644 --- a/src/Attribute/Delete.php +++ b/src/Attribute/Delete.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Delete extends Route { /** diff --git a/src/Attribute/Get.php b/src/Attribute/Get.php index 007a656..0a3c555 100644 --- a/src/Attribute/Get.php +++ b/src/Attribute/Get.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Get extends Route { /** diff --git a/src/Attribute/Head.php b/src/Attribute/Head.php index fb5f615..eb5f44c 100644 --- a/src/Attribute/Head.php +++ b/src/Attribute/Head.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Head extends Route { /** diff --git a/src/Attribute/Options.php b/src/Attribute/Options.php index 9b35213..206f2f3 100644 --- a/src/Attribute/Options.php +++ b/src/Attribute/Options.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Options extends Route { /** diff --git a/src/Attribute/Patch.php b/src/Attribute/Patch.php index c16cbee..dbd6c66 100644 --- a/src/Attribute/Patch.php +++ b/src/Attribute/Patch.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Patch extends Route { /** diff --git a/src/Attribute/Post.php b/src/Attribute/Post.php index 6c3dfe8..7cbb177 100644 --- a/src/Attribute/Post.php +++ b/src/Attribute/Post.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Post extends Route { /** diff --git a/src/Attribute/Put.php b/src/Attribute/Put.php index 1f4bde5..87d15cf 100644 --- a/src/Attribute/Put.php +++ b/src/Attribute/Put.php @@ -8,7 +8,7 @@ use Yiisoft\Http\Method; use Yiisoft\Router\Route; -#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] +#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] final class Put extends Route { /**