Skip to content

Commit f795046

Browse files
Instead of classes and functions of Hyperf\Utils (#5674)
Co-authored-by: 李铭昕 <715557344@qq.com>
1 parent 54c52dd commit f795046

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"hyperf/macroable": "~3.0.0",
3030
"hyperf/tappable": "~3.0.0",
3131
"hyperf/translation": "~3.0.0",
32+
"hyperf/support": "~3.0.0",
3233
"hyperf/utils": "~3.0.0",
3334
"nesbot/carbon": "^2.21",
3435
"psr/container": "^1.0|^2.0",

src/Concerns/FormatsMessages.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use Hyperf\Stringable\Str;
1818
use Hyperf\Validation\Validator;
1919

20+
use function Hyperf\Support\make;
21+
2022
trait FormatsMessages
2123
{
2224
use ReplacesAttributes;

src/DatabasePresenceVerifierFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Hyperf\Database\ConnectionResolverInterface;
1515
use Psr\Container\ContainerInterface;
1616

17+
use function Hyperf\Support\make;
18+
1719
class DatabasePresenceVerifierFactory
1820
{
1921
public function __invoke(ContainerInterface $container)

src/Validator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
use Hyperf\Contract\ValidatorInterface as ValidatorContract;
2020
use Hyperf\HttpMessage\Upload\UploadedFile;
2121
use Hyperf\Stringable\Str;
22-
use Hyperf\Utils\Fluent;
23-
use Hyperf\Utils\MessageBag;
22+
use Hyperf\Support\Fluent;
23+
use Hyperf\Support\MessageBag;
2424
use Hyperf\Validation\Contract\ImplicitRule;
2525
use Hyperf\Validation\Contract\PresenceVerifierInterface;
2626
use Hyperf\Validation\Contract\Rule as RuleContract;
@@ -30,6 +30,7 @@
3030

3131
use function Hyperf\Collection\collect;
3232
use function Hyperf\Collection\data_get;
33+
use function Hyperf\Support\make;
3334
use function Hyperf\Tappable\tap;
3435

3536
class Validator implements ValidatorContract

src/ValidatorFactoryFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
use Psr\Container\ContainerInterface;
1919
use Psr\EventDispatcher\EventDispatcherInterface;
2020

21+
use function Hyperf\Support\make;
22+
2123
class ValidatorFactoryFactory
2224
{
2325
public function __invoke(ContainerInterface $container)

tests/Cases/ValidationExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Hyperf\Contract\TranslatorInterface;
1616
use Hyperf\Contract\ValidatorInterface;
1717
use Hyperf\HttpMessage\Base\Response;
18-
use Hyperf\Utils\MessageBag;
18+
use Hyperf\Support\MessageBag;
1919
use Hyperf\Validation\Contract\ValidatorFactoryInterface;
2020
use Hyperf\Validation\ValidationException;
2121
use Hyperf\Validation\ValidationExceptionHandler;

0 commit comments

Comments
 (0)