Merge branch '4.0'
* 4.0: [travis] fix php-ext/ location throw exception if docblock factory does not exist
This commit is contained in:
commit
a8e9337c20
@ -103,7 +103,7 @@ before_install:
|
|||||||
local ext_name=$1
|
local ext_name=$1
|
||||||
local ext_so=$2
|
local ext_so=$2
|
||||||
local ext_dir=$(php -r "echo ini_get('extension_dir');")
|
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
|
if [[ -e $ext_cache/$ext_so ]]; then
|
||||||
echo extension = $ext_cache/$ext_so >> $INI
|
echo extension = $ext_cache/$ext_so >> $INI
|
||||||
@ -134,7 +134,7 @@ before_install:
|
|||||||
# Install extra PHP extensions
|
# Install extra PHP extensions
|
||||||
if [[ ! $skip ]]; then
|
if [[ ! $skip ]]; then
|
||||||
# install libsodium
|
# install libsodium
|
||||||
if [[ ! -e ~/php-ext/$(php -r "echo basename(ini_get('extension_dir'));")/libsodium/sodium.so ]]; then
|
if [[ ! -e php-ext/$(php -r "echo basename(ini_get('extension_dir'));")/libsodium/sodium.so ]]; then
|
||||||
sudo add-apt-repository ppa:ondrej/php -y
|
sudo add-apt-repository ppa:ondrej/php -y
|
||||||
sudo apt-get update -q
|
sudo apt-get update -q
|
||||||
sudo apt-get install libsodium-dev -y
|
sudo apt-get install libsodium-dev -y
|
||||||
|
@ -53,6 +53,10 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|||||||
*/
|
*/
|
||||||
public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null)
|
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->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance();
|
||||||
$this->contextFactory = new ContextFactory();
|
$this->contextFactory = new ContextFactory();
|
||||||
$this->phpDocTypeHelper = new PhpDocTypeHelper();
|
$this->phpDocTypeHelper = new PhpDocTypeHelper();
|
||||||
|
Reference in New Issue
Block a user