国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

由于官方的 think-validate驗(yàn)證器 不兼容 PHP8.0。所以這里重復(fù)造輪子

Tinywan

項(xiàng)目地址

https://github.com/Tinywan/webman-validate

錯(cuò)誤信息

#14 {main} in .../vendor/topthink/think-container/src/Container.php on line 32

Worker[17762] process terminated with ERROR: E_ERROR "During inheritance of ArrayAccess: Uncaught ErrorException: Return type of think\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .../vendor/topthink/think-container/src/Container.php:567
3759 6 0
6個(gè)評(píng)論

yzh52521

其實(shí)這個(gè)庫就沒有用到 think-container 這個(gè)擴(kuò)展

  • Tinywan 2021-12-28

    在Github看是沒用到,但是你使用composer安裝的話,會(huì)自動(dòng)安裝依賴 think-container 這個(gè)擴(kuò)展。think-container 這個(gè)擴(kuò)展官方已經(jīng)不維護(hù)了

Tinywan

安裝

截圖

可以看出,上面是自動(dòng)安裝 think-container 這個(gè)擴(kuò)展的

查看依賴

截圖

  • yzh52521 2021-12-28

    刪除依賴就好了

  • Tinywan 2021-12-28

    這個(gè)是composer自動(dòng)安裝的,不可以刪除的

owenzhang

最后問題解決了嗎?

  • 暫無評(píng)論
ichynul

think-cache,think-validate,這些。有跡象表明,會(huì)被官方逐漸放棄。
think-framework里面已經(jīng)有的,又獨(dú)立出來的組件,更新都不積極了。
除非像think-orm這種真的獨(dú)立出來的,才會(huì)積極維護(hù)。

  • 暫無評(píng)論
深藍(lán)

假設(shè)我有請(qǐng)求A,有兩個(gè)方法function1和function2。

在function1中我需要驗(yàn)證type, $validate = Validate::rule('type', 'require|number')。

在function2中我需要驗(yàn)證page這個(gè)參數(shù),$validate = Validate::rule('page', 'number|max:4')。

當(dāng)我驗(yàn)證function2中的時(shí)候,他卻報(bào)出了type必須填寫,他這個(gè)$validate由于是靜態(tài)方法,規(guī)則會(huì)一直存在,我現(xiàn)在使用->only方法似乎可以解決問題,但是感覺不夠優(yōu)雅,一般像這種情況該如何優(yōu)雅的解決問題。

  • 暫無評(píng)論
年代過于久遠(yuǎn),無法發(fā)表評(píng)論

Tinywan

13760
積分
0
獲贊數(shù)
0
粉絲數(shù)
2020-01-14 加入
??