File tree Expand file tree Collapse file tree 6 files changed +15
-6
lines changed
user_guide_src/source/installation Expand file tree Collapse file tree 6 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11<?php
22
3- require __DIR__ . '/system/Test/bootstrap .php ' ;
3+ require __DIR__ . '/system/util_bootstrap .php ' ;
44
55if (! defined ('OCI_COMMIT_ON_SUCCESS ' )) {
66 define ('OCI_COMMIT_ON_SUCCESS ' , 32 );
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- require __DIR__ . '/system/Test/bootstrap .php ' ;
5+ require __DIR__ . '/system/util_bootstrap .php ' ;
66
77$ helperDirs = [
88 'system/Helpers ' ,
Original file line number Diff line number Diff line change 7171 ])
7272 // do you need to include constants, class aliases or custom autoloader? files listed will be executed
7373 ->withBootstrapFiles ([
74- __DIR__ . '/system/Test/bootstrap .php ' ,
74+ __DIR__ . '/system/util_bootstrap .php ' ,
7575 ])
7676 ->withPHPStanConfigs ([
7777 __DIR__ . '/phpstan.neon.dist ' ,
Original file line number Diff line number Diff line change 6161defined ('CIPATH ' ) || define ('CIPATH ' , realpath ($ paths ->systemDirectory . '/../ ' ) . DIRECTORY_SEPARATOR );
6262defined ('FCPATH ' ) || define ('FCPATH ' , PUBLICPATH );
6363
64+ if (is_dir ($ paths ->testsDirectory . '/_support/ ' ) && ! defined ('SUPPORTPATH ' )) {
65+ define ('SUPPORTPATH ' , realpath ($ paths ->testsDirectory . '/_support/ ' ) . DIRECTORY_SEPARATOR );
66+ }
67+
6468if (is_dir (HOMEPATH . 'vendor/ ' )) {
6569 define ('VENDORPATH ' , realpath (HOMEPATH . 'vendor/ ' ) . DIRECTORY_SEPARATOR );
6670 define ('COMPOSER_PATH ' , (string ) realpath (HOMEPATH . 'vendor/autoload.php ' ));
Original file line number Diff line number Diff line change @@ -501,10 +501,15 @@ See :ref:`Deployment <deployment-to-shared-hosting-services>`.
501501Bootstrapping the App
502502*********************
503503
504- In some scenarios you will want to load the framework without actually running the whole
504+ In some scenarios, you will want to load the framework without actually running the whole
505505application. This is particularly useful for unit testing your project, but may also be
506506handy for using third-party tools to analyze and modify your code. The framework comes
507- with a separate bootstrap script specifically for this scenario: **system/Test/bootstrap.php **.
507+ with two separate bootstrap scripts specifically for these scenarios:
508+
509+ - **system/Test/bootstrap.php **: This script is used primarily for unit testing.
510+ - **system/util_bootstrap.php **: This script is used for other scripts that need access to the
511+ framework. It is recommended for use in scripts that are not part for testing as this will NOT
512+ fail gracefully if an exception is thrown.
508513
509514Most of the paths to your project are defined during the bootstrap process. You may use
510515pre-defined constants to override these, but when using the defaults be sure that your
Original file line number Diff line number Diff line change 1313
1414namespace Utils ;
1515
16- require __DIR__ . '/../system/Test/bootstrap .php ' ;
16+ require __DIR__ . '/../system/util_bootstrap .php ' ;
1717
1818use CodeIgniter \CLI \CLI ;
1919
You can’t perform that action at this time.
0 commit comments