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 1
1
<?php
2
2
3
- require __DIR__ . '/system/Test/bootstrap .php ' ;
3
+ require __DIR__ . '/system/util_bootstrap .php ' ;
4
4
5
5
if (! defined ('OCI_COMMIT_ON_SUCCESS ' )) {
6
6
define ('OCI_COMMIT_ON_SUCCESS ' , 32 );
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- require __DIR__ . '/system/Test/bootstrap .php ' ;
5
+ require __DIR__ . '/system/util_bootstrap .php ' ;
6
6
7
7
$ helperDirs = [
8
8
'system/Helpers ' ,
Original file line number Diff line number Diff line change 71
71
])
72
72
// do you need to include constants, class aliases or custom autoloader? files listed will be executed
73
73
->withBootstrapFiles ([
74
- __DIR__ . '/system/Test/bootstrap .php ' ,
74
+ __DIR__ . '/system/util_bootstrap .php ' ,
75
75
])
76
76
->withPHPStanConfigs ([
77
77
__DIR__ . '/phpstan.neon.dist ' ,
Original file line number Diff line number Diff line change 61
61
defined ('CIPATH ' ) || define ('CIPATH ' , realpath ($ paths ->systemDirectory . '/../ ' ) . DIRECTORY_SEPARATOR );
62
62
defined ('FCPATH ' ) || define ('FCPATH ' , PUBLICPATH );
63
63
64
+ if (is_dir ($ paths ->testsDirectory . '/_support/ ' ) && ! defined ('SUPPORTPATH ' )) {
65
+ define ('SUPPORTPATH ' , realpath ($ paths ->testsDirectory . '/_support/ ' ) . DIRECTORY_SEPARATOR );
66
+ }
67
+
64
68
if (is_dir (HOMEPATH . 'vendor/ ' )) {
65
69
define ('VENDORPATH ' , realpath (HOMEPATH . 'vendor/ ' ) . DIRECTORY_SEPARATOR );
66
70
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>`.
501
501
Bootstrapping the App
502
502
*********************
503
503
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
505
505
application. This is particularly useful for unit testing your project, but may also be
506
506
handy 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.
508
513
509
514
Most of the paths to your project are defined during the bootstrap process. You may use
510
515
pre-defined constants to override these, but when using the defaults be sure that your
Original file line number Diff line number Diff line change 13
13
14
14
namespace Utils ;
15
15
16
- require __DIR__ . '/../system/Test/bootstrap .php ' ;
16
+ require __DIR__ . '/../system/util_bootstrap .php ' ;
17
17
18
18
use CodeIgniter \CLI \CLI ;
19
19
You can’t perform that action at this time.
0 commit comments