Use Hyperf\Collection\Arr instead of Hyperf\Utils\Arr. (#5594)

This commit is contained in:
李铭昕 2023-04-02 21:17:26 +08:00 committed by GitHub
parent fe0742eee8
commit 4e3662aef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
98 changed files with 105 additions and 93 deletions

View File

@ -37,7 +37,9 @@ jobs:
coverage: none
- name: Setup Swoole
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -f
sudo apt-get install libcurl4-openssl-dev libc-ares-dev libpq-dev
wget https://github.com/swoole/swoole-src/archive/${SW_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -f
sudo apt-get install libcurl4-openssl-dev
wget https://github.com/swoole/swoole-src/archive/${SW_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole

View File

@ -1,5 +1,10 @@
# v3.0.15 - TBD
## Optimized
- [#5593](https://github.com/hyperf/hyperf/pull/5593) Use `Hyperf\Collection\Collection` instead of `Hyperf\Utils\Collection`.
- [#5594](https://github.com/hyperf/hyperf/pull/5594) Use `Hyperf\Collection\Arr` instead of `Hyperf\Utils\Arr`.
# v3.0.14 - 2023-04-01
## Fixed

View File

@ -19,7 +19,7 @@ use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
@ -176,4 +176,4 @@ class DeleteCacheListener implements ListenerInterface
}
}
```
```

View File

@ -372,7 +372,7 @@ declare(strict_types=1);
namespace App\Caster;
use Hyperf\Contract\CastsAttributes;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
class UserInfoCaster implements CastsAttributes
{

View File

@ -349,7 +349,7 @@ You can use the [database event listener](en/db/event) to record the SQL queries
<?php
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use App\Model\Book;
// Enable SQL data logging function

View File

@ -68,7 +68,7 @@ use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Framework\Event\BeforeWorkerStart;
use Hyperf\Logger\LoggerFactory;
use Hyperf\ReactiveX\Observable;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;

View File

@ -30,7 +30,7 @@ use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

View File

@ -372,7 +372,7 @@ declare(strict_types=1);
namespace App\Caster;
use Hyperf\Contract\CastsAttributes;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
class UserInfoCaster implements CastsAttributes
{

View File

@ -351,7 +351,7 @@ try{
<?php
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use App\Model\Book;
// 启用 SQL 数据记录功能

View File

@ -68,7 +68,7 @@ use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Framework\Event\BeforeWorkerStart;
use Hyperf\Logger\LoggerFactory;
use Hyperf\ReactiveX\Observable;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;

View File

@ -30,7 +30,7 @@ use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

View File

@ -372,7 +372,7 @@ declare(strict_types=1);
namespace App\Caster;
use Hyperf\Contract\CastsAttributes;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
class UserInfoCaster implements CastsAttributes
{

View File

@ -351,7 +351,7 @@ try{
<?php
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use App\Model\Book;
// 啓用 SQL 數據記錄功能

View File

@ -68,7 +68,7 @@ use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Framework\Event\BeforeWorkerStart;
use Hyperf\Logger\LoggerFactory;
use Hyperf\ReactiveX\Observable;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;

View File

@ -30,7 +30,7 @@ use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

View File

@ -372,7 +372,7 @@ declare(strict_types=1);
namespace App\Caster;
use Hyperf\Contract\CastsAttributes;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
class UserInfoCaster implements CastsAttributes
{

View File

@ -351,7 +351,7 @@ try{
<?php
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use App\Model\Book;
// 啟用 SQL 資料記錄功能

View File

@ -68,7 +68,7 @@ use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Framework\Event\BeforeWorkerStart;
use Hyperf\Logger\LoggerFactory;
use Hyperf\ReactiveX\Observable;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;

View File

@ -14,9 +14,9 @@ namespace Hyperf\Amqp;
use Hyperf\Amqp\Exception\NotSupportedException;
use Hyperf\Amqp\IO\IOFactory;
use Hyperf\Amqp\IO\IOFactoryInterface;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Coroutine\Locker;
use InvalidArgumentException;
use PhpAmqpLib\Wire\IO\AbstractIO;

View File

@ -17,10 +17,10 @@ use Hyperf\AsyncQueue\Event\FailedHandle;
use Hyperf\AsyncQueue\Event\QueueLength;
use Hyperf\AsyncQueue\Event\RetryHandle;
use Hyperf\AsyncQueue\MessageInterface;
use Hyperf\Collection\Arr;
use Hyperf\Contract\PackerInterface;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Process\ProcessManager;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Coroutine\Concurrent;
use Hyperf\Utils\Packer\PhpSerializerPacker;
use Psr\Container\ContainerInterface;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\ConfigNacos;
use Hyperf\Collection\Arr;
use Hyperf\ConfigCenter\AbstractDriver;
use Hyperf\ConfigCenter\Contract\ClientInterface as ConfigClientInterface;
use Hyperf\Nacos\Protobuf\ListenHandler\ConfigChangeNotifyRequestHandler;
use Hyperf\Nacos\Protobuf\Response\ConfigQueryResponse;
use Hyperf\Utils\Arr;
use Psr\Container\ContainerInterface;
class NacosDriver extends AbstractDriver

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Config;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Utils\Arr;
class Config implements ConfigInterface
{

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace HyperfTest\Config;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use HyperfTest\Config\Stub\FooConfigProvider;
use HyperfTest\Config\Stub\ProviderConfig;
use PHPUnit\Framework\TestCase;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Consul;
use Hyperf\Collection\Arr;
use Hyperf\Consul\Exception\ServerException;
use Hyperf\Utils\Arr;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\Crontab\Mutex;
use Hyperf\Collection\Arr;
use Hyperf\Coordinator\Constants;
use Hyperf\Coordinator\CoordinatorManager;
use Hyperf\Crontab\Crontab;
use Hyperf\Redis\RedisFactory;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Coroutine;
class RedisServerMutex implements ServerMutex

View File

@ -11,9 +11,9 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\PgSQL\Query\Grammars;
use Hyperf\Collection\Arr;
use Hyperf\Database\Query\Builder;
use Hyperf\Database\Query\Grammars\Grammar;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use function Hyperf\Collection\collect;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Commands\Ast;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use InvalidArgumentException;
use PhpParser\Node;

View File

@ -16,6 +16,7 @@ use DateTimeInterface;
use Doctrine\DBAL\Connection as DoctrineConnection;
use Exception;
use Generator;
use Hyperf\Collection\Arr;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Database\Exception\InvalidArgumentException;
use Hyperf\Database\Exception\QueryException;
@ -26,7 +27,6 @@ use Hyperf\Database\Query\Grammars\Grammar as QueryGrammar;
use Hyperf\Database\Query\Processors\Processor;
use Hyperf\Database\Schema\Builder as SchemaBuilder;
use Hyperf\Database\Schema\Grammars\Grammar as SchemaGrammar;
use Hyperf\Utils\Arr;
use LogicException;
use PDO;
use PDOStatement;

View File

@ -12,10 +12,10 @@ declare(strict_types=1);
namespace Hyperf\Database\Connectors;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Database\Connection;
use Hyperf\Database\ConnectionInterface;
use Hyperf\Database\MySqlConnection;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
use PDO;
use PDOException;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Migrations;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Database\Connection;
use Hyperf\Database\ConnectionResolverInterface as Resolver;
use Hyperf\Database\Schema\Grammars\Grammar;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Filesystem\Filesystem;
use Hyperf\Utils\Str;
use Symfony\Component\Console\Output\OutputInterface;

View File

@ -14,13 +14,13 @@ namespace Hyperf\Database\Model;
use BadMethodCallException;
use Closure;
use Generator;
use Hyperf\Collection\Arr;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\LengthAwarePaginatorInterface;
use Hyperf\Database\Concerns\BuildsQueries;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Database\Query\Builder as QueryBuilder;
use Hyperf\Paginator\Paginator;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\Utils\Traits\ForwardsCalls;
use InvalidArgumentException;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Model;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection as BaseCollection;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\CompressInterface;
use Hyperf\Contract\UnCompressInterface;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use RuntimeException;

View File

@ -14,6 +14,7 @@ namespace Hyperf\Database\Model\Concerns;
use Carbon\Carbon;
use Carbon\CarbonInterface;
use DateTimeInterface;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection as BaseCollection;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\Castable;
@ -22,7 +23,6 @@ use Hyperf\Contract\CastsInboundAttributes;
use Hyperf\Contract\Synchronized;
use Hyperf\Database\Model\JsonEncodingException;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use LogicException;

View File

@ -12,9 +12,9 @@ declare(strict_types=1);
namespace Hyperf\Database\Model\Concerns;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Database\Model\GlobalScope;
use Hyperf\Database\Model\Scope;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
trait HasGlobalScopes

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Model\Concerns;
use Hyperf\Collection\Arr;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Collection;
use Hyperf\Database\Model\Model;
@ -25,7 +26,6 @@ use Hyperf\Database\Model\Relations\MorphOne;
use Hyperf\Database\Model\Relations\MorphTo;
use Hyperf\Database\Model\Relations\MorphToMany;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
trait HasRelationships

View File

@ -13,6 +13,7 @@ namespace Hyperf\Database\Model;
use ArrayAccess;
use Exception;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection as BaseCollection;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\CompressInterface;
@ -21,7 +22,6 @@ use Hyperf\Contract\UnCompressInterface;
use Hyperf\Database\ConnectionInterface;
use Hyperf\Database\Model\Relations\Pivot;
use Hyperf\Database\Query\Builder as QueryBuilder;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use JsonSerializable;
use Psr\EventDispatcher\EventDispatcherInterface;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Model;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use RuntimeException;
class ModelNotFoundException extends RuntimeException

View File

@ -11,9 +11,9 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Model\Relations;
use Hyperf\Collection\Arr;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Model;
use Hyperf\Utils\Arr;
use function Hyperf\Collection\collect;

View File

@ -12,12 +12,12 @@ declare(strict_types=1);
namespace Hyperf\Database\Model\Relations;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Collection;
use Hyperf\Database\Model\Model;
use Hyperf\Database\Query\Expression;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Traits\ForwardsCalls;
use function Hyperf\Collection\collect;

View File

@ -15,6 +15,7 @@ use BadMethodCallException;
use Closure;
use DateTimeInterface;
use Generator;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\LengthAwarePaginatorInterface;
@ -28,7 +29,6 @@ use Hyperf\Database\Query\Processors\Processor;
use Hyperf\Macroable\Macroable;
use Hyperf\Paginator\Paginator;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\Utils\Traits\ForwardsCalls;
use InvalidArgumentException;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Query\Grammars;
use Hyperf\Collection\Arr;
use Hyperf\Database\Grammar as BaseGrammar;
use Hyperf\Database\Query\Builder;
use Hyperf\Database\Query\Expression;
use Hyperf\Database\Query\JoinClause;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use RuntimeException;

View File

@ -11,9 +11,9 @@ declare(strict_types=1);
*/
namespace Hyperf\Database\Query\Grammars;
use Hyperf\Collection\Arr;
use Hyperf\Database\Query\Builder;
use Hyperf\Database\Query\JsonExpression;
use Hyperf\Utils\Arr;
use function Hyperf\Collection\collect;

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace HyperfTest\Database;
use Hyperf\Collection\Arr;
use Hyperf\Contract\Castable;
use Hyperf\Contract\CastsAttributes;
use Hyperf\Contract\CastsInboundAttributes;
use Hyperf\Database\Model\CastsValue;
use Hyperf\Database\Model\Model;
use Hyperf\Utils\Arr;
use Mockery;
use PHPUnit\Framework\TestCase;
use ReflectionClass;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace App\Listener;
use Hyperf\Collection\Arr;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace Hyperf\DbConnection\Pool;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\ConnectionInterface;
use Hyperf\DbConnection\Connection;
use Hyperf\DbConnection\Frequency;
use Hyperf\Pool\Pool;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;

View File

@ -11,10 +11,10 @@ declare(strict_types=1);
*/
namespace Hyperf\DB\Pool;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\DB\Frequency;
use Hyperf\Pool\Pool as HyperfPool;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;

View File

@ -11,9 +11,9 @@ declare(strict_types=1);
*/
namespace Hyperf\Devtool\Generator;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Arr;
use Hyperf\Utils\CodeGen\Project;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Devtool;
use Hyperf\Collection\Arr;
use Hyperf\Command\Annotation\Command;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Composer;
use Hyperf\Utils\Filesystem\Filesystem;
use Symfony\Component\Console\Command\Command as SymfonyCommand;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Di;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
abstract class MetadataCollector implements MetadataCollectorInterface
{

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace Hyperf\HttpServer;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context;
use Hyperf\HttpMessage\Upload\UploadedFile;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Router\Dispatched;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;

View File

@ -15,6 +15,7 @@ use FastRoute\DataGenerator\GroupCountBased as DataGenerator;
use FastRoute\Dispatcher;
use FastRoute\Dispatcher\GroupCountBased;
use FastRoute\RouteParser\Std;
use Hyperf\Collection\Arr;
use Hyperf\Di\Annotation\AnnotationCollector;
use Hyperf\Di\Annotation\MultipleAnnotationInterface;
use Hyperf\Di\Exception\ConflictAnnotationException;
@ -30,7 +31,6 @@ use Hyperf\HttpServer\Annotation\PatchMapping;
use Hyperf\HttpServer\Annotation\PostMapping;
use Hyperf\HttpServer\Annotation\PutMapping;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use ReflectionMethod;

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace HyperfTest\Kafka;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Di\Annotation\AnnotationCollector;
use Hyperf\Kafka\AbstractConsumer;
@ -18,7 +19,6 @@ use Hyperf\Kafka\Annotation\Consumer;
use Hyperf\Kafka\ConsumerManager;
use Hyperf\Process\AbstractProcess;
use Hyperf\Process\ProcessManager;
use Hyperf\Utils\Arr;
use HyperfTest\Kafka\Stub\ContainerStub;
use HyperfTest\Kafka\Stub\DemoConsumer;
use longlang\phpkafka\Client\SwooleClient;

View File

@ -11,9 +11,9 @@ declare(strict_types=1);
*/
namespace Hyperf\Logger;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Logger\Exception\InvalidConfigException;
use Hyperf\Utils\Arr;
use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\FormattableHandlerInterface;

View File

@ -12,10 +12,10 @@ declare(strict_types=1);
namespace Hyperf\ModelCache\EagerLoad;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Relations\Relation;
use Hyperf\ModelCache\CacheableInterface;
use Hyperf\Utils\Arr;
class EagerLoaderBuilder extends Builder
{

View File

@ -11,10 +11,10 @@ declare(strict_types=1);
*/
namespace Hyperf\Nacos\Protobuf\Response;
use Hyperf\Collection\Arr;
use Hyperf\Contract\JsonDeSerializable;
use Hyperf\Grpc\Parser;
use Hyperf\Nacos\Protobuf\Payload;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Codec\Json;
use Stringable;

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Nsq\Pool;
use Hyperf\Collection\Arr;
use Hyperf\Engine\Contract\Socket\SocketFactoryInterface;
use Hyperf\Engine\Socket;
use Hyperf\Nsq\MessageBuilder;
@ -18,7 +19,6 @@ use Hyperf\Nsq\Subscriber;
use Hyperf\Pool\Exception\ConnectionException;
use Hyperf\Pool\KeepaliveConnection;
use Hyperf\Pool\Pool;
use Hyperf\Utils\Arr;
use Psr\Container\ContainerInterface;
use Throwable;

View File

@ -11,10 +11,10 @@ declare(strict_types=1);
*/
namespace Hyperf\Nsq\Pool;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\ConnectionInterface;
use Hyperf\Pool\Pool;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;

View File

@ -14,9 +14,9 @@ namespace Hyperf\Paginator;
use ArrayAccess;
use ArrayIterator;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Contract\PaginatorInterface;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\Utils\Traits\ForwardsCalls;

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace Hyperf\ReactiveX\Example;
use Hyperf\Collection\Arr;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Framework\Event\AfterWorkerStart;
use Hyperf\Logger\LoggerFactory;
use Hyperf\ReactiveX\Observable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace Hyperf\Redis\Pool;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\ConnectionInterface;
use Hyperf\Pool\Pool;
use Hyperf\Redis\Frequency;
use Hyperf\Redis\RedisConnection;
use Hyperf\Utils\Arr;
use InvalidArgumentException;
use Psr\Container\ContainerInterface;

View File

@ -12,11 +12,11 @@ declare(strict_types=1);
namespace Hyperf\Resource\Concerns;
use Countable;
use Hyperf\Collection\Arr;
use Hyperf\Resource\Json\JsonResource;
use Hyperf\Resource\Value\MergeValue;
use Hyperf\Resource\Value\MissingValue;
use Hyperf\Resource\Value\PotentiallyMissing;
use Hyperf\Utils\Arr;
/**
* Trait ConditionallyLoadsAttributes.

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Resource\Response;
use Hyperf\Collection\Arr;
use Hyperf\HttpMessage\Stream\SwooleStream;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Codec\Json;
use Psr\Http\Message\ResponseInterface;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace HyperfTest\Resource;
use Hyperf\Collection\Arr;
use Hyperf\HttpMessage\Server\Response;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use PHPUnit\Framework\Assert as PHPUnit;
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Retry\Policy;
use Hyperf\Collection\Arr;
use Hyperf\Retry\RetryContext;
use Hyperf\Utils\Arr;
use Throwable;
class ClassifierRetryPolicy extends BaseRetryPolicy implements RetryPolicyInterface

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\RpcClient;
use Hyperf\Collection\Arr;
use Hyperf\Contract\IdGeneratorInterface;
use Hyperf\Contract\NormalizerInterface;
use Hyperf\Di\MethodDefinitionCollectorInterface;
use Hyperf\RpcClient\Exception\RequestException;
use Hyperf\Utils\Arr;
use Psr\Container\ContainerInterface;
use Throwable;

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
*/
namespace Hyperf\RpcMultiplex;
use Hyperf\Collection\Arr;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\LoadBalancer\LoadBalancerInterface;
use Hyperf\LoadBalancer\Node;
use Hyperf\RpcMultiplex\Exception\NoAvailableNodesException;
use Hyperf\Utils\Arr;
use Psr\Container\ContainerInterface;
class SocketFactory

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\RpcMultiplex;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\PackerInterface;
@ -25,7 +26,6 @@ use Hyperf\RpcMultiplex\Exception\Handler\DefaultExceptionHandler;
use Hyperf\RpcServer\RequestDispatcher;
use Hyperf\RpcServer\Server;
use Hyperf\Server\Exception\InvalidArgumentException;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Coroutine;
use Multiplex\Contract\HasHeartbeatInterface as Heartbeat;
use Multiplex\Contract\PackerInterface as PacketPacker;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Rpc;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context as ContextUtil;
use Hyperf\Utils\Arr;
class Context
{

View File

@ -12,9 +12,9 @@ declare(strict_types=1);
namespace Hyperf\Session\Handler;
use Carbon\Carbon;
use Hyperf\Collection\Arr;
use Hyperf\Database\Query\Builder;
use Hyperf\DbConnection\Db;
use Hyperf\Utils\Arr;
use Hyperf\Utils\InteractsWithTime;
use SessionHandlerInterface;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Session;
use Hyperf\Collection\Arr;
use Hyperf\Contract\SessionInterface;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use SessionHandlerInterface;

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\SocketIOServer\Room;
use Hyperf\Collection\Arr;
use Hyperf\Contract\StdoutLoggerInterface;
use Hyperf\Coordinator\Constants;
use Hyperf\Coordinator\CoordinatorManager;
@ -22,7 +23,6 @@ use Hyperf\Nsq\Result;
use Hyperf\Redis\RedisFactory;
use Hyperf\SocketIOServer\NamespaceInterface;
use Hyperf\SocketIOServer\SidProvider\SidProviderInterface;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Codec\Json;
use Hyperf\Utils\Coroutine;
use Hyperf\WebSocketServer\Sender;

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Testing;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context;
use Hyperf\Contract\ConfigInterface;
use Hyperf\Contract\PackerInterface;
@ -25,7 +26,6 @@ use Hyperf\HttpServer\ResponseEmitter;
use Hyperf\HttpServer\Router\Dispatched;
use Hyperf\HttpServer\Server;
use Hyperf\Testing\HttpMessage\Upload\UploadedFile;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Filesystem\Filesystem;
use Hyperf\Utils\Packer\JsonPacker;
use Psr\Container\ContainerInterface;

View File

@ -12,9 +12,9 @@ declare(strict_types=1);
namespace Hyperf\Testing;
use GuzzleHttp\Client;
use Hyperf\Collection\Arr;
use Hyperf\Contract\PackerInterface;
use Hyperf\Guzzle\CoroutineHandler;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Coroutine;
use Hyperf\Utils\Packer\JsonPacker;
use Psr\Container\ContainerInterface;

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
*/
namespace Hyperf\Tracer\Listener;
use Hyperf\Collection\Arr;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Tracer\SpanStarter;
use Hyperf\Tracer\SpanTagManager;
use Hyperf\Tracer\SwitchManager;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use OpenTracing\Tracer;

View File

@ -12,12 +12,12 @@ declare(strict_types=1);
namespace Hyperf\Translation;
use Countable;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Context\Context;
use Hyperf\Contract\TranslatorInterface;
use Hyperf\Contract\TranslatorLoaderInterface;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
class Translator implements TranslatorInterface

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Utils\CodeGen;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Exception\InvalidArgumentException;
use PhpParser\Node;
use PhpParser\Parser;

View File

@ -9,9 +9,9 @@ declare(strict_types=1);
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Backoff;
use Hyperf\Utils\Coroutine;
use Hyperf\Utils\HigherOrderTapProxy;

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Hyperf\Utils;
use Countable;
use Hyperf\Collection\Arr;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\Jsonable;
use Hyperf\Contract\MessageBag as MessageBagContract;

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Hyperf\Utils;
use ArrayAccess;
use Hyperf\Collection\Arr;
use Hyperf\Macroable\Macroable;
class Optional implements ArrayAccess

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Hyperf\Utils;
use DateTimeInterface;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Exception\InvalidArgumentException;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace HyperfTest\Utils;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use PHPUnit\Framework\TestCase;
use stdClass;

View File

@ -12,8 +12,8 @@ declare(strict_types=1);
namespace Hyperf\Validation\Concerns;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\HttpMessage\Upload\UploadedFile;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\Validation\Validator;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Validation\Concerns;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
trait ReplacesAttributes
{

View File

@ -19,8 +19,8 @@ use DateTimeZone;
use Egulias\EmailValidator\EmailValidator;
use Egulias\EmailValidator\Validation\RFCValidation;
use Exception;
use Hyperf\Collection\Arr;
use Hyperf\HttpMessage\Upload\UploadedFile;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\Validation\Rules\Exists;
use Hyperf\Validation\Rules\Unique;

View File

@ -11,10 +11,10 @@ declare(strict_types=1);
*/
namespace Hyperf\Validation\Request;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context;
use Hyperf\Contract\ValidatorInterface;
use Hyperf\HttpServer\Request;
use Hyperf\Utils\Arr;
use Hyperf\Validation\Contract\ValidatesWhenResolved;
use Hyperf\Validation\Contract\ValidatorFactoryInterface as ValidationFactory;
use Hyperf\Validation\UnauthorizedException;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
*/
namespace Hyperf\Validation;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
class ValidationData

View File

@ -11,10 +11,10 @@ declare(strict_types=1);
*/
namespace Hyperf\Validation;
use Hyperf\Collection\Arr;
use Hyperf\Contract\ValidatorInterface;
use Hyperf\Server\Exception\ServerException;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Arr;
use Hyperf\Validation\Contract\ValidatorFactoryInterface;
use Psr\Http\Message\ResponseInterface;

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Hyperf\Validation;
use Closure;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\Utils\Str;
use Hyperf\Validation\Contract\Rule as RuleContract;
use Hyperf\Validation\Rules\Exists;

View File

@ -13,11 +13,11 @@ namespace Hyperf\Validation;
use BadMethodCallException;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Contract\MessageBag as MessageBagContract;
use Hyperf\Contract\TranslatorInterface;
use Hyperf\Contract\ValidatorInterface as ValidatorContract;
use Hyperf\HttpMessage\Upload\UploadedFile;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Fluent;
use Hyperf\Utils\MessageBag;
use Hyperf\Utils\Str;

View File

@ -14,6 +14,7 @@ namespace HyperfTest\Validation\Cases;
use Carbon\Carbon;
use DateTime;
use DateTimeImmutable;
use Hyperf\Collection\Arr;
use Hyperf\Contract\TranslatorInterface as TranslatorContract;
use Hyperf\Di\Container;
use Hyperf\Di\Definition\DefinitionSourceInterface;
@ -21,7 +22,6 @@ use Hyperf\HttpMessage\Upload\UploadedFile;
use Hyperf\Translation\ArrayLoader;
use Hyperf\Translation\Translator;
use Hyperf\Utils\ApplicationContext;
use Hyperf\Utils\Arr;
use Hyperf\Validation\Contract\ImplicitRule;
use Hyperf\Validation\Contract\PresenceVerifierInterface;
use Hyperf\Validation\Contract\Rule;

View File

@ -11,8 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\ViewEngine\Compiler;
use Hyperf\Collection\Arr;
use Hyperf\Collection\Collection;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use InvalidArgumentException;
use PhpToken;

View File

@ -13,8 +13,8 @@ namespace Hyperf\ViewEngine\Component;
use ArrayAccess;
use ArrayIterator;
use Hyperf\Collection\Arr;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\ViewEngine\Contract\Htmlable;
use Hyperf\ViewEngine\HtmlString;

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Hyperf\ViewEngine\Concern;
use Closure;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use Hyperf\ViewEngine\Contract\Htmlable;
use Hyperf\ViewEngine\HtmlString;
use Hyperf\ViewEngine\View;

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Hyperf\ViewEngine\Concern;
use Countable;
use Hyperf\Utils\Arr;
use Hyperf\Collection\Arr;
use stdClass;
trait ManagesLoops

View File

@ -12,9 +12,9 @@ declare(strict_types=1);
namespace Hyperf\ViewEngine;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Contract\Arrayable;
use Hyperf\Macroable\Macroable;
use Hyperf\Utils\Arr;
use Hyperf\Utils\Str;
use Hyperf\ViewEngine\Contract\EngineInterface;
use Hyperf\ViewEngine\Contract\EngineResolverInterface;

View File

@ -12,8 +12,8 @@ declare(strict_types=1);
namespace Hyperf\ViewEngine;
use Countable;
use Hyperf\Collection\Arr;
use Hyperf\Contract\MessageBag;
use Hyperf\Utils\Arr;
use Stringable;
class ViewErrorBag implements Countable, Stringable

View File

@ -12,8 +12,8 @@ declare(strict_types=1);
namespace Hyperf\WebSocketServer;
use Closure;
use Hyperf\Collection\Arr;
use Hyperf\Context\Context as CoContext;
use Hyperf\Utils\Arr;
class Context
{