Add Attribute and property (build 453, release 2.7.3)

This commit is contained in:
crazywhalecc
2022-03-25 19:15:58 +08:00
parent 56d2a52706
commit d3f4ade215
4 changed files with 10 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace ZM\Annotation\Swoole; namespace ZM\Annotation\Swoole;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Annotations\Annotation\Required; use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target; use Doctrine\Common\Annotations\Annotation\Target;
@@ -16,6 +17,7 @@ use ZM\Annotation\AnnotationBase;
* @Target("METHOD") * @Target("METHOD")
* @since 1.2 * @since 1.2
*/ */
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
class OnTick extends AnnotationBase class OnTick extends AnnotationBase
{ {
/** /**

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace ZM\Annotation\Swoole; namespace ZM\Annotation\Swoole;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Annotations\Annotation\Required; use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target; use Doctrine\Common\Annotations\Annotation\Target;
@@ -15,6 +16,7 @@ use ZM\Annotation\AnnotationBase;
* @NamedArgumentConstructor() * @NamedArgumentConstructor()
* @Target("ALL") * @Target("ALL")
*/ */
#[Attribute(Attribute::TARGET_ALL)]
class SwooleHandler extends AnnotationBase class SwooleHandler extends AnnotationBase
{ {
/** /**

View File

@@ -28,7 +28,7 @@ use ZM\Exception\InitException;
class ConsoleApplication extends Application class ConsoleApplication extends Application
{ {
public const VERSION_ID = 452; public const VERSION_ID = 453;
public const VERSION = '2.7.3'; public const VERSION = '2.7.3';

View File

@@ -4,6 +4,11 @@ declare(strict_types=1);
namespace ZM\Http; namespace ZM\Http;
use ZM\Annotation\Http\Middleware;
/**
* @property Middleware $middleware
*/
interface MiddlewareInterface interface MiddlewareInterface
{ {
} }