Some checks failed
Build / build (ubuntu-latest, 7.4) (push) Has been cancelled
Build / build (ubuntu-latest, 8.0) (push) Has been cancelled
Build / build (ubuntu-latest, 8.1) (push) Has been cancelled
Build / build (ubuntu-latest, 8.2) (push) Has been cancelled
Build / build (ubuntu-latest, 8.3) (push) Has been cancelled
Build / build (ubuntu-latest, 8.4) (push) Has been cancelled
All PHP namespaces and related references have been updated from Da\User to pcrt\User throughout the codebase, including composer.json autoload settings and all source files. This change standardizes the project under the new pcrt\User namespace for improved clarity and maintainability.
65 lines
1.9 KiB
PHP
65 lines
1.9 KiB
PHP
<?php
|
|
|
|
use pcrt\User\Filter\TwoFactorAuthenticationEnforceFilter;
|
|
|
|
return [
|
|
'id' => 'yii2-user-tests',
|
|
'basePath' => dirname(__DIR__),
|
|
'language' => 'en-US',
|
|
'aliases' => [
|
|
'@pcrt/User' => dirname(dirname(dirname(__DIR__))) . '/src/User',
|
|
'@tests' => dirname(dirname(__DIR__)),
|
|
'@vendor' => VENDOR_DIR,
|
|
'@bower' => '@vendor/bower-asset',
|
|
'@npm' => '@vendor/npm-asset',
|
|
],
|
|
'bootstrap' => ['pcrt\User\Bootstrap'],
|
|
'modules' => [
|
|
'user' => [
|
|
'class' => 'pcrt\User\Module',
|
|
'administrators' => ['user'],
|
|
],
|
|
],
|
|
'components' => [
|
|
'assetManager' => [
|
|
'basePath' => __DIR__ . '/../assets',
|
|
],
|
|
'db' => require __DIR__ . '/db.php',
|
|
'mailer' => [
|
|
'messageClass' => \yii\symfonymailer\Message::class,
|
|
[
|
|
'class' => \yii\symfonymailer\Mailer::class,
|
|
],
|
|
'useFileTransport' => false
|
|
],
|
|
'urlManager' => [
|
|
'showScriptName' => true,
|
|
],
|
|
'request' => [
|
|
'cookieValidationKey' => 'test',
|
|
'enableCsrfValidation' => false,
|
|
],
|
|
'i18n' => [
|
|
'translations' => [
|
|
'usuario*' => [
|
|
'class' => 'yii\i18n\PhpMessageSource',
|
|
'basePath' => __DIR__ . '/../../../src/User/resources/i18n',
|
|
'sourceLanguage' => 'en-US',
|
|
'fileMap' => [
|
|
'usuario' => 'usuario.php',
|
|
],
|
|
],
|
|
],
|
|
],
|
|
],
|
|
'params' => [],
|
|
'on beforeAction' => function() {
|
|
Yii::$app->controller->attachBehavior(
|
|
'enforceTwoFactorAuthentication',[
|
|
'class' => TwoFactorAuthenticationEnforceFilter::class,
|
|
'except' => ['login', 'logout','account','two-factor', 'two-factor-enable'],
|
|
]
|
|
);
|
|
},
|
|
];
|