From 5cfceed460ab2cf1cf61dd18d614a6bb8eac308b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 22 Feb 2018 10:17:12 +0100 Subject: [PATCH 1/2] throw exception if docblock factory does not exist --- .../Component/PropertyInfo/Extractor/PhpDocExtractor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php index 9494333a2e..8343f03419 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpDocExtractor.php @@ -53,6 +53,10 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property */ public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) { + if (!class_exists(DocBlockFactory::class)) { + throw new \RuntimeException(sprintf('Unable to use the "%s" class as the "phpdocumentor/reflection-docblock" package is not installed.', __CLASS__)); + } + $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance(); $this->contextFactory = new ContextFactory(); $this->phpDocTypeHelper = new PhpDocTypeHelper(); From ef8222c1e58c6bb9f3737f0ee54ea5c064d24525 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 22 Feb 2018 13:22:21 +0100 Subject: [PATCH 2/2] [travis] fix php-ext/ location --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7f13d5b60c..f07e7de568 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ before_install: local ext_name=$1 local ext_so=$2 local ext_dir=$(php -r "echo ini_get('extension_dir');") - local ext_cache=~/php-ext/$(basename $ext_dir)/$ext_name + local ext_cache=php-ext/$(basename $ext_dir)/$ext_name if [[ -e $ext_cache/$ext_so ]]; then echo extension = $ext_cache/$ext_so >> $INI