Implementation for #371.
This commit is contained in:
parent
b7387be3fd
commit
fef4a367fe
|
|
@ -9,6 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
|
||||||
Place announcement text here.
|
Place announcement text here.
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
- Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371
|
||||||
- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498
|
- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498
|
||||||
- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513
|
- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513
|
||||||
- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko
|
- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,16 @@ if (!defined('PHPWORD_TESTS_BASE_DIR')) {
|
||||||
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__));
|
define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__));
|
||||||
}
|
}
|
||||||
|
|
||||||
$vendor = realpath(__DIR__ . '/../vendor');
|
$vendorDirPath = realpath(__DIR__ . '/../vendor');
|
||||||
if (file_exists($vendor . '/autoload.php')) {
|
if (file_exists($vendorDirPath . '/autoload.php')) {
|
||||||
require $vendor . '/autoload.php';
|
require $vendorDirPath . '/autoload.php';
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('Unable to load dependencies');
|
throw new Exception(
|
||||||
|
sprintf(
|
||||||
|
'Could not find file \'%s\'. It is generated by Composer. Use \'install\' or \'update\' Composer commands to move forward.',
|
||||||
|
$vendorDirPath . '/autoload.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue