我一直在爭取這一點,並不能弄明白,也許別人有或可能有一個更深層次的問題在這裏與苗條,PHP,Apache等工作後很好小時,我的苗條安裝將開始在所有路線給這個:間歇性的PHP抽象類錯誤
Fatal error: Class Slim\Collection contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (IteratorAggregate::getIterator) in F:\Projects\example\server\vendor\slim\slim\Slim\Collection.php on line 21
瘋狂地,如果我重新啓動Apache,這個問題消失。 (對於幾個小時呢。)
我發現這個地方有人在兩年前也有類似的問題,並幫助人吵着他們沒有實際幫助都:https://community.apachefriends.org/viewtopic.php?p=250966&sid=96ef58aaeb7fe142a7dcdfd506a8683f
我試着做一個乾淨的擦拭並安裝我的作曲家供應商目錄。這不能解決它。我可以清楚地看到getIterator
在錯誤消息中的文件中按預期方式實現。
PHP版本7.0.12,Windows 7中,86 PHP構建
它在幾個小時後再次發生,具有不同但類似的錯誤消息:
Fatal error: Class Pimple\Container contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ArrayAccess::sqlserver) in F:\Projects\example\server\vendor\pimple\pimple\src\Pimple\Container.php on line 34
這個問題有一個類似的問題, 「解決」它通過重新啓動PHP,但這顯然不是一個實際的解決方案,並且我沒有啓用opcache: PHP 7, Symfony 3: Fatal error 1 abstract method and must therefore be declared abstract or implement the remaining methods
任何猜測?請記住:這條消息是在我沒有寫入的文件中,並且在Apache重啓時消失。是否有PHP 7的緩存會導致這種情況?
編輯17年3月10日:
是的,我已經打開搭配修身票。我也看到它在一個非瘦身文件(疙瘩),所以我不認爲這是一個苗條的問題。 https://github.com/slimphp/Slim/issues/2160
正如我所說,我的opcache已關閉。我已經證實在php.ini文件和phpinfo()中都是如此。
我試過更新到PHP 7.1,並且每天都會觸發一次,迫使apache重新啓動。 –
這與我的問題類似:https://phabricator.wikimedia.org/T152502 –
我沒有苗條的經驗,所以這是問題文件? https://github.com/slimphp/Slim-Http/blob/master/src/Collection.php如果不是,那麼你可以發佈代碼嗎?你有沒有嘗試聯繫框架的維護者? – MonkeyZeus