【发布时间】:2018-03-14 15:18:49
【问题描述】:
启用 xdebug 后,我可以重现错误:
composer create-project laravel/laravel
cd laravel
composer require proengsoft/laravel-jsvalidation
php artisan vendor:publish --provider="Proengsoft\JsValidation\JsValidationServiceProvider" --tag=public
错误:
PHP Warning: Uncaught League\Flysystem\Plugin\PluginNotFoundException: Plugin not found for method: read in /tmp/laravel/vendor/league/flysystem/src/Plugin/PluggableTrait.php:49
堆栈跟踪:
但如果没有启用 xdebug,一切运行正常。
在将其报告给 xdebug 之前,我想知道这是否仅发生在我身上或其他人身上。
php -v
PHP 7.1.15-1+ubuntu16.04.1+deb.sury.org+2
Package: php-xdebug
Version: 2.6.0+2.5.5-1+ubuntu16.04.1+deb.sury.org+1
Composer.lock 供参考
https://gist.github.com/amenk/9d63975cf4aabf86288b79fb95e8156c
我在 Flysystem 中追踪到了以下函数:
public function invokePluginOnFilesystem($method, $arguments, $prefix)
{
$filesystem = $this->getFilesystem($prefix);
try {
return $this->invokePlugin($method, $arguments, $filesystem);
} catch (PluginNotFoundException $e) {
// Let it pass, it's ok, don't panic.
}
$callback = [$filesystem, $method];
return call_user_func_array($callback, $arguments);
}
异常在 invokePlugin() 中被抛出,但在战后被捕获(如果 xdebug 关闭)。 Xdebug 开启了,它不再工作了。
我为 PHP-CLI 设置了 1G 内存限制。
【问题讨论】: