diff --git a/blog-api/composer.json b/blog-api/composer.json index fdfebab5..9f933538 100644 --- a/blog-api/composer.json +++ b/blog-api/composer.json @@ -41,7 +41,8 @@ "yiisoft/cache": "^3.0", "yiisoft/cache-file": "^3.0", "yiisoft/config": "^1.0", - "yiisoft/data": "^1.0", + "yiisoft/data": "dev-master", + "yiisoft/data-cycle": "dev-master", "yiisoft/data-response": "^2.0", "yiisoft/definitions": "^3.0", "yiisoft/di": "^1.0", @@ -49,9 +50,9 @@ "yiisoft/factory": "^1.0", "yiisoft/files": "^2.0", "yiisoft/http": "^1.2", - "yiisoft/hydrator-validator": "^1.0", + "yiisoft/hydrator-validator": "^2.0", "yiisoft/injector": "^1.0", - "yiisoft/input-http": "dev-master", + "yiisoft/input-http": "^1.0", "yiisoft/log": "^2.0", "yiisoft/log-target-file": "^3.0", "yiisoft/middleware-dispatcher": "^5.1", @@ -64,7 +65,7 @@ "yiisoft/user": "^2.0", "yiisoft/validator": "^1.0", "yiisoft/yii-console": "^2.0", - "yiisoft/yii-cycle": "dev-master", + "yiisoft/yii-cycle": "^1.0", "yiisoft/yii-debug": "^3.0@dev", "yiisoft/yii-event": "^2.0", "yiisoft/yii-http": "^1.0", diff --git a/blog-api/config/common/params.php b/blog-api/config/common/params.php index 9b9da652..98e8d888 100644 --- a/blog-api/config/common/params.php +++ b/blog-api/config/common/params.php @@ -7,6 +7,7 @@ use Cycle\Database\Config\SQLiteDriverConfig; use Cycle\Schema\Provider\PhpFileSchemaProvider; use Yiisoft\ErrorHandler\Middleware\ErrorCatcher; +use Yiisoft\RequestProvider\RequestCatcherMiddleware; use Yiisoft\Router\Middleware\Router; use Yiisoft\Yii\Cycle\Schema\Conveyor\AttributedSchemaConveyor; use Yiisoft\Yii\Cycle\Schema\Provider\FromConveyorSchemaProvider; @@ -25,6 +26,7 @@ ], 'supportEmail' => 'support@example.com', 'middlewares' => [ + RequestCatcherMiddleware::class, ErrorCatcher::class, Subfolder::class, Locale::class, diff --git a/blog-api/config/web/di/middleware-dispatcher.php b/blog-api/config/web/di/middleware-dispatcher.php index c9e2a159..d60af7bc 100644 --- a/blog-api/config/web/di/middleware-dispatcher.php +++ b/blog-api/config/web/di/middleware-dispatcher.php @@ -8,7 +8,6 @@ use Yiisoft\Definitions\Reference; use Yiisoft\Input\Http\HydratorAttributeParametersResolver; -use Yiisoft\Input\Http\Request\Catcher\RequestCatcherParametersResolver; use Yiisoft\Input\Http\RequestInputParametersResolver; use Yiisoft\Middleware\Dispatcher\CompositeParametersResolver; use Yiisoft\Middleware\Dispatcher\ParametersResolverInterface; @@ -17,7 +16,6 @@ ParametersResolverInterface::class => [ 'class' => CompositeParametersResolver::class, '__construct()' => [ - Reference::to(RequestCatcherParametersResolver::class), Reference::to(HydratorAttributeParametersResolver::class), Reference::to(RequestInputParametersResolver::class), ], diff --git a/blog-api/src/Blog/PostRepository.php b/blog-api/src/Blog/PostRepository.php index fec64bbf..c27838be 100644 --- a/blog-api/src/Blog/PostRepository.php +++ b/blog-api/src/Blog/PostRepository.php @@ -7,7 +7,7 @@ use Cycle\ORM\ORMInterface; use Cycle\ORM\Select; use Cycle\ORM\Transaction; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; +use Yiisoft\Data\Cycle\Reader\EntityReader; final class PostRepository extends Select\Repository { diff --git a/blog-api/src/User/UserRepository.php b/blog-api/src/User/UserRepository.php index 590b8665..acd5d750 100644 --- a/blog-api/src/User/UserRepository.php +++ b/blog-api/src/User/UserRepository.php @@ -10,8 +10,8 @@ use Yiisoft\Auth\IdentityInterface; use Yiisoft\Auth\IdentityRepositoryInterface; use Yiisoft\Auth\IdentityWithTokenRepositoryInterface; +use Yiisoft\Data\Cycle\Reader\EntityReader; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; final class UserRepository extends Select\Repository implements IdentityWithTokenRepositoryInterface, IdentityRepositoryInterface { diff --git a/blog/composer.json b/blog/composer.json index d2b093c2..b8de8306 100644 --- a/blog/composer.json +++ b/blog/composer.json @@ -44,7 +44,8 @@ "yiisoft/config": "^1.3.1", "yiisoft/cookies": "^1.2", "yiisoft/csrf": "^2.0", - "yiisoft/data": "dev-master as 1.0", + "yiisoft/data": "dev-master", + "yiisoft/data-cycle": "dev-master", "yiisoft/data-response": "^2.0", "yiisoft/definitions": "^3.0", "yiisoft/di": "^1.2", @@ -55,13 +56,14 @@ "yiisoft/html": "^3.0", "yiisoft/http": "^1.2", "yiisoft/injector": "^1.0", - "yiisoft/input-http": "dev-master", + "yiisoft/input-http": "^1.0", "yiisoft/log": "^2.0", "yiisoft/log-target-file": "^3.0", "yiisoft/mailer": "^5.0", "yiisoft/mailer-symfony": "^3.0", "yiisoft/middleware-dispatcher": "^5.2", "yiisoft/rate-limiter": "dev-master", + "yiisoft/request-provider": "^1.0", "yiisoft/rbac": "^1.0", "yiisoft/rbac-php": "^1.0", "yiisoft/rbac-rules-container": "^2.0", @@ -78,7 +80,7 @@ "yiisoft/widget": "^2.1", "yiisoft/yii-bootstrap5": "^3.0@dev", "yiisoft/yii-console": "^2.0", - "yiisoft/yii-cycle": "dev-master", + "yiisoft/yii-cycle": "^1.0", "yiisoft/yii-dataview": "^3.0@dev", "yiisoft/yii-debug": "^3.0@dev", "yiisoft/yii-debug-api": "^3.0@dev", diff --git a/blog/config/web/di/middleware-dispatcher.php b/blog/config/web/di/middleware-dispatcher.php index 7c06f71f..65962fbe 100644 --- a/blog/config/web/di/middleware-dispatcher.php +++ b/blog/config/web/di/middleware-dispatcher.php @@ -4,7 +4,6 @@ use Yiisoft\Definitions\Reference; use Yiisoft\Input\Http\HydratorAttributeParametersResolver; -use Yiisoft\Input\Http\Request\Catcher\RequestCatcherParametersResolver; use Yiisoft\Input\Http\RequestInputParametersResolver; use Yiisoft\Middleware\Dispatcher\CompositeParametersResolver; use Yiisoft\Middleware\Dispatcher\ParametersResolverInterface; @@ -17,7 +16,6 @@ ParametersResolverInterface::class => [ 'class' => CompositeParametersResolver::class, '__construct()' => [ - Reference::to(RequestCatcherParametersResolver::class), Reference::to(HydratorAttributeParametersResolver::class), Reference::to(RequestInputParametersResolver::class), ], diff --git a/blog/config/web/params.php b/blog/config/web/params.php index 1cf1bf19..1d07ac92 100644 --- a/blog/config/web/params.php +++ b/blog/config/web/params.php @@ -4,6 +4,7 @@ use Yiisoft\Cookies\CookieMiddleware; use Yiisoft\ErrorHandler\Middleware\ErrorCatcher; +use Yiisoft\RequestProvider\RequestCatcherMiddleware; use Yiisoft\Router\Middleware\Router; use Yiisoft\Session\SessionMiddleware; use Yiisoft\User\Login\Cookie\CookieLoginMiddleware; @@ -13,6 +14,7 @@ return [ 'middlewares' => [ + RequestCatcherMiddleware::class, ErrorCatcher::class, SentryMiddleware::class, SessionMiddleware::class, diff --git a/blog/src/Auth/IdentityRepository.php b/blog/src/Auth/IdentityRepository.php index 559280c3..69c9cbcb 100644 --- a/blog/src/Auth/IdentityRepository.php +++ b/blog/src/Auth/IdentityRepository.php @@ -7,7 +7,7 @@ use Cycle\ORM\Select; use Throwable; use Yiisoft\Auth\IdentityRepositoryInterface; -use Yiisoft\Yii\Cycle\Data\Writer\EntityWriter; +use Yiisoft\Data\Cycle\Writer\EntityWriter; final class IdentityRepository extends Select\Repository implements IdentityRepositoryInterface { diff --git a/blog/src/Blog/Archive/ArchiveRepository.php b/blog/src/Blog/Archive/ArchiveRepository.php index 56269316..9d34829c 100644 --- a/blog/src/Blog/Archive/ArchiveRepository.php +++ b/blog/src/Blog/Archive/ArchiveRepository.php @@ -15,9 +15,9 @@ use Cycle\ORM\ORMInterface; use Cycle\ORM\Select; use DateTimeImmutable; +use Yiisoft\Data\Cycle\Reader\EntityReader; use Yiisoft\Data\Reader\DataReaderInterface; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; /** * This repository is not associated with Post entity. diff --git a/blog/src/Blog/Comment/CommentRepository.php b/blog/src/Blog/Comment/CommentRepository.php index a0c9bb79..0a3ccdec 100644 --- a/blog/src/Blog/Comment/CommentRepository.php +++ b/blog/src/Blog/Comment/CommentRepository.php @@ -8,7 +8,7 @@ use Cycle\ORM\Select; use Yiisoft\Data\Reader\DataReaderInterface; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; +use Yiisoft\Data\Cycle\Reader\EntityReader; final class CommentRepository extends Select\Repository { diff --git a/blog/src/Blog/Post/PostRepository.php b/blog/src/Blog/Post/PostRepository.php index f0d00214..0207d7a3 100644 --- a/blog/src/Blog/Post/PostRepository.php +++ b/blog/src/Blog/Post/PostRepository.php @@ -9,10 +9,10 @@ use DateTimeImmutable; use DateTimeInterface; use Throwable; +use Yiisoft\Data\Cycle\Reader\EntityReader; +use Yiisoft\Data\Cycle\Writer\EntityWriter; use Yiisoft\Data\Reader\DataReaderInterface; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; -use Yiisoft\Yii\Cycle\Data\Writer\EntityWriter; final class PostRepository extends Select\Repository { diff --git a/blog/src/Blog/Tag/TagRepository.php b/blog/src/Blog/Tag/TagRepository.php index 10b5227e..6963efbd 100644 --- a/blog/src/Blog/Tag/TagRepository.php +++ b/blog/src/Blog/Tag/TagRepository.php @@ -11,9 +11,9 @@ use Cycle\ORM\ORMInterface; use Cycle\ORM\Select; use Cycle\ORM\Select\Repository; +use Yiisoft\Data\Cycle\Reader\EntityReader; use Yiisoft\Data\Reader\DataReaderInterface; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; final class TagRepository extends Repository { diff --git a/blog/src/Command/Fixture/AddCommand.php b/blog/src/Command/Fixture/AddCommand.php index cad64e14..940f380f 100644 --- a/blog/src/Command/Fixture/AddCommand.php +++ b/blog/src/Command/Fixture/AddCommand.php @@ -21,9 +21,9 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Throwable; +use Yiisoft\Data\Cycle\Writer\EntityWriter; use Yiisoft\Yii\Console\ExitCode; use Yiisoft\Yii\Cycle\Command\CycleDependencyProxy; -use Yiisoft\Yii\Cycle\Data\Writer\EntityWriter; final class AddCommand extends Command { diff --git a/blog/src/User/UserRepository.php b/blog/src/User/UserRepository.php index 9237fb04..00d7a7b2 100644 --- a/blog/src/User/UserRepository.php +++ b/blog/src/User/UserRepository.php @@ -6,10 +6,10 @@ use Cycle\ORM\Select; use Throwable; +use Yiisoft\Data\Cycle\Reader\EntityReader; +use Yiisoft\Data\Cycle\Writer\EntityWriter; use Yiisoft\Data\Reader\DataReaderInterface; use Yiisoft\Data\Reader\Sort; -use Yiisoft\Yii\Cycle\Data\Reader\EntityReader; -use Yiisoft\Yii\Cycle\Data\Writer\EntityWriter; final class UserRepository extends Select\Repository {