Skip to content

Commit

Permalink
Samples : Allow to run without composer
Browse files Browse the repository at this point in the history
  • Loading branch information
pal-software authored and Progi1984 committed Dec 12, 2023
1 parent 3b1ab43 commit a5c3920
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changes/1.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- PowerPoint2007 & ODPresentation Writer : Use of the disk caching directory for temporary files - [@nhalle](https://github.com/nhalle) in [#781](https://github.com/PHPOffice/PHPPresentation/pull/781)
- PowerPoint2007 Reader : Fixed reading of RichText shape in Note - [@aelliott1485](https://github.com/aelliott1485) in [#782](https://github.com/PHPOffice/PHPPresentation/pull/782)
- PowerPoint2007 Writer : Fixed broken animation for first shape - [@shannan1989](https://github.com/shannan1989) in [#783](https://github.com/PHPOffice/PHPPresentation/pull/783)
- Samples : Allow to run without composer - [@pal-software](https://github.com/pal-software) in [#784](https://github.com/PHPOffice/PHPPresentation/pull/784)

## Miscellaneous

Expand Down
7 changes: 6 additions & 1 deletion samples/Sample_Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
if (is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__) . '/vendor/autoload.php';
} else {
throw new Exception('Can not find the vendor folder!');
if (is_file(__DIR__ . '/../../Common/src/Common/Autoloader.php')) {
include_once __DIR__ . '/../../Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();
} else {
throw new Exception('Can not find the vendor or the common folder!');
}
}
// do some checks to make sure the outputs are set correctly.
if (false === is_dir(__DIR__ . DIRECTORY_SEPARATOR . 'results')) {
Expand Down

0 comments on commit a5c3920

Please sign in to comment.