diff --git a/bin/generate-document b/bin/generate-document index 10ac8118..d44ec624 100755 --- a/bin/generate-document +++ b/bin/generate-document @@ -4,7 +4,7 @@ use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\DocumentGenerator; -require_once __DIR__ . '/../src/Bootstrap.php'; +require_once 'vendor/autoload.php'; try { $phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class))->getProperty('phpSpreadsheetFunctions'); @@ -19,6 +19,6 @@ try { DocumentGenerator::generateFunctionListByName($phpSpreadsheetFunctions) ); } catch (ReflectionException $e) { - fwrite(STDERR, (string)$e); + fwrite(STDERR, (string) $e); exit(1); } diff --git a/samples/Basic/01_Simple_download_ods.php b/samples/Basic/01_Simple_download_ods.php index 0c38a004..98b5ca19 100644 --- a/samples/Basic/01_Simple_download_ods.php +++ b/samples/Basic/01_Simple_download_ods.php @@ -4,7 +4,7 @@ use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; -require_once __DIR__ . '/../../src/Bootstrap.php'; +require_once __DIR__ . '/../Bootstrap.php'; $helper = new Sample(); if ($helper->isCli()) { diff --git a/samples/Basic/01_Simple_download_pdf.php b/samples/Basic/01_Simple_download_pdf.php index 5f3e71d7..ddd99d29 100644 --- a/samples/Basic/01_Simple_download_pdf.php +++ b/samples/Basic/01_Simple_download_pdf.php @@ -4,7 +4,7 @@ use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; -require_once __DIR__ . '/../../src/Bootstrap.php'; +require_once __DIR__ . '/../Bootstrap.php'; $helper = new Sample(); if ($helper->isCli()) { diff --git a/samples/Basic/01_Simple_download_xls.php b/samples/Basic/01_Simple_download_xls.php index 46d12022..a7df25c4 100644 --- a/samples/Basic/01_Simple_download_xls.php +++ b/samples/Basic/01_Simple_download_xls.php @@ -4,7 +4,7 @@ use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; -require_once __DIR__ . '/../../src/Bootstrap.php'; +require_once __DIR__ . '/../Bootstrap.php'; $helper = new Sample(); if ($helper->isCli()) { diff --git a/samples/Basic/01_Simple_download_xlsx.php b/samples/Basic/01_Simple_download_xlsx.php index 93efe73d..c67a17d0 100644 --- a/samples/Basic/01_Simple_download_xlsx.php +++ b/samples/Basic/01_Simple_download_xlsx.php @@ -4,7 +4,7 @@ use PhpOffice\PhpSpreadsheet\Helper\Sample; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Spreadsheet; -require_once __DIR__ . '/../../src/Bootstrap.php'; +require_once __DIR__ . '/../Bootstrap.php'; $helper = new Sample(); if ($helper->isCli()) { diff --git a/src/Bootstrap.php b/samples/Bootstrap.php similarity index 100% rename from src/Bootstrap.php rename to samples/Bootstrap.php diff --git a/samples/Header.php b/samples/Header.php index fb8bd986..6e0f3b4e 100644 --- a/samples/Header.php +++ b/samples/Header.php @@ -6,7 +6,7 @@ use PhpOffice\PhpSpreadsheet\Helper\Sample; error_reporting(E_ALL); -require_once __DIR__ . '/../src/Bootstrap.php'; +require_once __DIR__ . '/Bootstrap.php'; $helper = new Sample(); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c37c304a..77cd5228 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,5 +4,3 @@ setlocale(LC_ALL, 'en_US.utf8'); // PHP 5.3 Compat date_default_timezone_set('Europe/London'); - -require_once __DIR__ . '/../src/Bootstrap.php';