File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
9
9
Place announcement text here.
10
10
11
11
### Changes
12
+ - Improved error message for the case when `` autoload.php `` is not found. - @RomanSyroeshko #371
12
13
- Changed visibility of all private properties and methods of `` TemplateProcessor `` to `` protected `` . - RomanSyroeshko #498
13
14
- Improved performance of `` TemplateProcessor::setValue() `` . - @RomanSyroeshko #513
14
15
- Renamed `` align `` option of `` Paragraph `` style into `` alignment `` . Note: accessor and mutator methods are renamed too. - @RomanSyroeshko
Original file line number Diff line number Diff line change 22
22
define ('PHPWORD_TESTS_BASE_DIR ' , realpath (__DIR__ ));
23
23
}
24
24
25
- $ vendor = realpath (__DIR__ . '/../vendor ' );
26
- if (file_exists ($ vendor . '/autoload.php ' )) {
27
- require $ vendor . '/autoload.php ' ;
25
+ $ vendorDirPath = realpath (__DIR__ . '/../vendor ' );
26
+ if (file_exists ($ vendorDirPath . '/autoload.php ' )) {
27
+ require $ vendorDirPath . '/autoload.php ' ;
28
28
} else {
29
- throw new Exception ('Unable to load dependencies ' );
29
+ throw new Exception (
30
+ sprintf (
31
+ 'Could not find file \'%s \'. It is generated by Composer. Use \'install \' or \'update \' Composer commands to move forward. ' ,
32
+ $ vendorDirPath . '/autoload.php '
33
+ )
34
+ );
30
35
}
31
36
32
37
spl_autoload_register (function ($ class ) {
You can’t perform that action at this time.
0 commit comments