1 | <?php |
||
2 | |||
3 | /// WARNING! This configuration is optimized for local development and should NOT be used in any other environment |
||
4 | /// (for both security and performance)! |
||
5 | |||
6 | use sample\components\UserComponent; |
||
0 ignored issues
–
show
|
|||
7 | use sample\models\User as UserIdentity; |
||
0 ignored issues
–
show
The type
sample\models\User was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | use sample\modules\api\ApiModule; |
||
0 ignored issues
–
show
The type
sample\modules\api\ApiModule was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
9 | use yii\helpers\ArrayHelper; |
||
10 | |||
11 | // phpcs:disable Generic.Files.LineLength.TooLong -- Sample documentation |
||
12 | return ArrayHelper::merge(require('main.php'), [ |
||
13 | |||
14 | 'bootstrap' => [ |
||
15 | 'debug', |
||
16 | 'security.txt', |
||
17 | ], |
||
18 | |||
19 | 'controllerNamespace' => 'sample\\controllers\\web', |
||
20 | |||
21 | 'defaultRoute' => 'default/index', |
||
22 | |||
23 | 'modules' => [ |
||
24 | 'security.txt' => [ |
||
25 | 'class' => rhertogh\Yii2SecurityTxt\SecurityTxtModule::class, |
||
26 | |||
27 | // security.txt Fields. |
||
28 | 'contact' => [ // Required, https://www.rfc-editor.org/rfc/rfc9116.html#name-contact. |
||
29 | '[email protected]', |
||
30 | 'https://example.com/report', |
||
31 | ], |
||
32 | 'policy' => 'https://example.com/report-policy', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-policy. |
||
33 | 'preferredLanguages' => 'en', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-preferred-languages. |
||
34 | 'acknowledgments' => 'https://example.com/security-acknowledgments', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-acknowledgments. |
||
35 | 'canonical' => 'https://example.com/.well-known/security.txt', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-canonical. |
||
36 | 'encryption' => 'dns:5d2d37ab76d47d36._openpgpkey.example.com?type=OPENPGPKEY', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-encryption. |
||
37 | 'expires' => '+1 day midnight', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-expires. |
||
38 | 'hiring' => 'https://example.com/jobs', // Optional, https://www.rfc-editor.org/rfc/rfc9116.html#name-hiring. |
||
39 | |||
40 | // Optional comments |
||
0 ignored issues
–
show
|
|||
41 | 'headerComment' => <<<TXT |
||
42 | This is a header comment. |
||
43 | It's included at the beginning of the security.txt file. |
||
44 | TXT, |
||
45 | 'footerComment' => <<<TXT |
||
46 | This is a footer comment. |
||
47 | It's included at the end of the security.txt file. |
||
48 | TXT, |
||
49 | 'fieldComments' => [ // Specifies an optional comment per field (will be included before the field in the security.txt file.) |
||
0 ignored issues
–
show
|
|||
50 | 'acknowledgments' => 'Hall of Fame', |
||
51 | 'hiring' => 'Want to join our awesome team?', |
||
52 | ], |
||
53 | |||
54 | // Optional, ASCII-armored PGP private key. |
||
55 | // Note: Requires the Crypt_GPG package (https://packagist.org/packages/pear/crypt_gpg) |
||
56 | // or the "gnupg" extension (https://www.php.net/manual/en/book.gnupg.php) to be installed. |
||
57 | 'pgpPrivateKey' => getenv('YII2_SECURITY_TXT_PGP_PRIVATE_KEY'), |
||
58 | ], |
||
59 | 'debug' => [ |
||
60 | 'class' => yii\debug\Module::class, |
||
61 | 'allowedIPs' => ['*'], |
||
62 | ], |
||
63 | ], |
||
64 | |||
65 | 'components' => [ |
||
66 | 'urlManager' => [ |
||
67 | 'enablePrettyUrl' => true, |
||
68 | 'showScriptName' => false, |
||
69 | ], |
||
70 | 'request' => [ |
||
71 | 'cookieValidationKey' => 'secret', |
||
72 | ], |
||
73 | ], |
||
74 | ]); |
||
75 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths