Merge branch '4.0'

* 4.0:
  [travis] fix php-ext/ location
  throw exception if docblock factory does not exist
This commit is contained in:
Nicolas Grekas 2018-02-22 13:30:19 +01:00
commit a8e9337c20
3 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -168,12 +168,12 @@ DependencyInjection
Rename (or alias) your services to their FQCN id to make them autowirable. Rename (or alias) your services to their FQCN id to make them autowirable.
In 3.4, you can activate this behavior instead of having deprecation messages In 3.4, you can activate this behavior instead of having deprecation messages
by setting the following parameter: by setting the following parameter:
```yml ```yml
parameters: parameters:
container.autowiring.strict_mode: true container.autowiring.strict_mode: true
``` ```
From 4.0, you can remove it as it's the default behavior and the parameter is not handled anymore. From 4.0, you can remove it as it's the default behavior and the parameter is not handled anymore.
* `_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names. * `_defaults` and `_instanceof` are now reserved service names in Yaml configurations. Please rename any services with that names.
@ -712,7 +712,7 @@ Process
* Extending `Process::run()`, `Process::mustRun()` and `Process::restart()` is * Extending `Process::run()`, `Process::mustRun()` and `Process::restart()` is
not supported anymore. not supported anymore.
* The `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class have been removed. * The `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class have been removed.
Profiler Profiler

View File

@ -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();