diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 4cdddb5e..8a19d2bf 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -21,7 +21,7 @@ class Annotation extends Component private Loader $_loader; - #[Aspect(InjectProperty::class)] public function init(): void + public function init(): void { $this->_loader = new Loader(); } diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 8a61be3a..866c8599 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -140,7 +140,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess * @throws ReflectionException * @throws Exception */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { if (!Context::hasContext(Relation::class)) { $relation = Snowflake::createObject(Relation::class); diff --git a/Database/Connection.php b/Database/Connection.php index 719df537..8adc5c7a 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -67,7 +67,7 @@ class Connection extends Component /** * @throws Exception */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $event = Snowflake::app()->getEvent(); $event->on(Event::SYSTEM_RESOURCE_CLEAN, [$this, 'disconnect']); diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 8196d210..76a8a844 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -38,7 +38,7 @@ class OnRequest extends Callback /** * @throws Exception */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $this->event = Snowflake::app()->getEvent(); $this->logger = Snowflake::app()->getLogger(); diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index df9e7b37..46a901ac 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -59,7 +59,7 @@ class Router extends HttpService implements RouterInterface * @throws ConfigException * 初始化函数路径 */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $this->dir = Config::get('http.namespace', false, $this->dir); } diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index e5bba0c7..cf01d194 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -32,7 +32,7 @@ class Shutdown extends Component /** * @throws Exception */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $this->taskDirectory = storage(null, 'pid/task'); $this->workerDirectory = storage(null, 'pid/worker'); diff --git a/System/Application.php b/System/Application.php index cb3016e3..3c2a5e09 100644 --- a/System/Application.php +++ b/System/Application.php @@ -48,7 +48,7 @@ class Application extends BaseApplication /** * @throws NotFindClassException */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $this->import(ConsoleProviders::class); $this->import(DatabasesProviders::class); diff --git a/System/Cache/Redis.php b/System/Cache/Redis.php index 27423aed..16490970 100644 --- a/System/Cache/Redis.php +++ b/System/Cache/Redis.php @@ -38,7 +38,7 @@ class Redis extends Component /** * @throws Exception */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { $event = Snowflake::app()->getEvent(); $event->on(Event::SYSTEM_RESOURCE_CLEAN, [$this, 'destroy']); diff --git a/System/Jwt/Jwt.php b/System/Jwt/Jwt.php index 8709efb1..ebc7c3e8 100644 --- a/System/Jwt/Jwt.php +++ b/System/Jwt/Jwt.php @@ -81,7 +81,7 @@ mlAZUEjsoaT9vjvjGTxl3uCm0TX5KTgtSJIt2kA1tYVjQef+/iZTHxY= /** * @throws ConfigException */ - #[Aspect(InjectProperty::class)] public function init() + public function init() { if (!Config::has('ssl.public') || !Config::has('ssl.private')) { return;