Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New structure of configs #570

Merged
merged 9 commits into from
Feb 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
vjik committed Feb 19, 2023
commit aefd29b2e0f622407bcfd56dfcbc5b2392114aac
19 changes: 4 additions & 15 deletions blog/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,20 @@
'$params',
'console/params.php',
],
'di' => [
'$common',
'common/di/*.php',
],
'di' => 'common/di/*.php',
'di-web' => [
'$di',
'$web',
'web/di/*.php',
],
'di-console' => [
'$di',
'$console',
],
'di-providers' => [
'$providers',
],
'di-console' => '$di',
'di-providers' => [],
'di-providers-web' => [
'$di-providers',
],
'di-providers-console' => [
'$di-providers',
],
'di-delegates' => [
'$delegates',
],
'di-delegates' => [],
'di-delegates-web' => [
'$di-delegates',
],
Expand Down
6 changes: 3 additions & 3 deletions blog/src/Auth/Form/SignupForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Yiisoft\Translator\TranslatorInterface;
use Yiisoft\Validator\Result;
use Yiisoft\Validator\Rule\Equal;
use Yiisoft\Validator\Rule\HasLength;
use Yiisoft\Validator\Rule\Length;
use Yiisoft\Validator\Rule\Required;
use Yiisoft\Validator\ValidatorInterface;

Expand Down Expand Up @@ -69,7 +69,7 @@ public function getRules(): array
return [
'login' => [
new Required(),
new HasLength(min: 1, max: 48, skipOnError: true),
new Length(min: 1, max: 48, skipOnError: true),
function ($value): Result {
$result = new Result();
if ($this->userRepository->findByLogin($value) !== null) {
Expand All @@ -81,7 +81,7 @@ function ($value): Result {
],
'password' => [
new Required(),
new HasLength(min: 8),
new Length(min: 8),
],
'passwordVerify' => [
new Required(),
Expand Down