From c810f49633b42169dcffd76bfdcbbda60e278e2e Mon Sep 17 00:00:00 2001 From: Fuyao Zhao Date: Thu, 1 Jun 2017 17:43:03 +0800 Subject: [PATCH] skip large file by treat it as empty file --- src/PhpDocumentLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpDocumentLoader.php b/src/PhpDocumentLoader.php index e683180..9d7b642 100644 --- a/src/PhpDocumentLoader.php +++ b/src/PhpDocumentLoader.php @@ -110,7 +110,7 @@ class PhpDocumentLoader $content = yield $this->contentRetriever->retrieve($uri); $size = strlen($content); if ($size > $limit) { - throw new ContentTooLargeException($uri, $size, $limit); + return $this->create($uri, ""); } if (isset($this->documents[$uri])) {