将Gooaop/Framework模块从v2.3.5升级到v3.0.0时出错

发布于 2025-01-21 23:54:31 字数 1818 浏览 2 评论 0原文

最近,我将goaop/Framework Composer模块从v2.3.5更新为v3.0.0,同时注意了其ChangElog的破坏变化,我开始遇到一个错误,似乎与提到的任何破坏更改无关。 这是出现的确切错误:

php消息:PHP致命错误:未接收错误:键入属性go \ aop \ framework \ Abstract Interpoctor :: $ shifterdord在/www/www/www/html/app/initialition之前不得访问建议订单。供应商/gooaop/framework/src/aop/framework/AbstractInterceptor.php:119 stack Trace:#0/var/www/html/app/app/vendor/goaop/goaop/framework/src/aop/aop/aop/framework/framework/frame/abstrack/abstract.phppoint.phppoint.php (95): GO \ aop \ framework \ AbstractInterpector-> getAdviceOrder()#1 [内部函数]:GO \ aop \ framework \ Abstract Joinpoint :: Go \ aop \ aop \ aop \ fracework \ {closure}()#2/var/var/var/var/www/www/html/html/html/app/ /vendor/goaop/framework/src/aop/framework/abstractjoinpoint.php(100):uasort()#3/var/www/www/html/html/app/goaop/goaop/framework/framework/src/src/src/aop/aop/framework/framework/abstrackjoinpoint.php( 116):GO \ aop \ framework \ AbstractJoinPoint :: sortAdvices()#4/var/www/html/app/app/vendor/goaop/goaop/framework/framework/src/src/instrument/transformer/weavingvingtransformer/weavingtransformer.php,142) \ Abstract Joinpoint :: FlatandSortadVices()#5/var/www/html/app/vendor/goaop/frameworp/framework/src/instrument/transformer/weavingtransformer.php (106

)在他们的ChangElog上,并整理了他们已记录的破坏更改 httpps:https:// github。 com/gooaop/framework/blob/3.0.0/changelog.md

打破变化:

  • [bc break]切换到php7.2 and the php7.2 and tople,严格的类型,返回类型提示和新的提示语法
  • [BC Break]删除了Joinpoint-> getThis()方法,而不是全部 JOINPOINTS属于类(例如函数求职)
  • [BC Break]删除了Joinpoint-> getstaticpart()方法,因为它可以返回任何内容,最好使用明确的方法

可能会有另一个尚未考虑的破坏更改,如果是这样。可以解决吗?

Recently I updated my goaop/framework composer module from v2.3.5 to v3.0.0, while taking note of the breaking changes on their ChangeLog, I came to experience an error that doesn't seem to relate to any of the breaking changes mentioned.
Here's the exact error which comes up:

PHP message: PHP Fatal error: Uncaught Error: Typed property Go\Aop\Framework\AbstractInterceptor::$adviceOrder must not be accessed before initialization in /var/www/html/app/vendor/goaop/framework/src/Aop/Framework/AbstractInterceptor.php:119 Stack trace: #0 /var/www/html/app/vendor/goaop/framework/src/Aop/Framework/AbstractJoinpoint.php(95): Go\Aop\Framework\AbstractInterceptor->getAdviceOrder() #1 [internal function]: Go\Aop\Framework\AbstractJoinpoint::Go\Aop\Framework\{closure}() #2 /var/www/html/app/vendor/goaop/framework/src/Aop/Framework/AbstractJoinpoint.php(100): uasort() #3 /var/www/html/app/vendor/goaop/framework/src/Aop/Framework/AbstractJoinpoint.php(116): Go\Aop\Framework\AbstractJoinpoint::sortAdvices() #4 /var/www/html/app/vendor/goaop/framework/src/Instrument/Transformer/WeavingTransformer.php(142): Go\Aop\Framework\AbstractJoinpoint::flatAndSortAdvices() #5 /var/www/html/app/vendor/goaop/framework/src/Instrument/Transformer/WeavingTransformer.php(106): Go\Instrument\Transforme

I took a look at their ChangeLog and sorted out their documented breaking changes https://github.com/goaop/framework/blob/3.0.0/CHANGELOG.md

Breaking Changes:

  • [BC BREAK] Switched to the PHP7.2 and upper, strict types, return type hints and new syntax
  • [BC BREAK] Removed the Joinpoint->getThis() method, as not all
    joinpoints belongs to classes (eg. FunctionInvocation)
  • [BC BREAK] Removed the Joinpoint->getStaticPart() method as it can return anything, better to use explicit methods

Could there be another breaking change that isn't yet accounted for, if so can this be resolved?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文