Skip to content

Commit

Permalink
Sync with middleware (#586)
Browse files Browse the repository at this point in the history
* Sync with middleware

* Disallow http discovery
  • Loading branch information
arogachev committed May 25, 2023
1 parent d1ec633 commit a5d1bd2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion blog-api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"yiisoft/yii-debug": "^3.0@dev",
"yiisoft/yii-event": "^2.0",
"yiisoft/yii-http": "^1.0",
"yiisoft/yii-middleware": "dev-master",
"yiisoft/yii-middleware": "^1.0",
"yiisoft/yii-queue": "3.0.x-dev",
"yiisoft/yii-runner-console": "^2.0",
"yiisoft/yii-runner-http": "^2.0",
Expand Down
4 changes: 2 additions & 2 deletions blog-api/config/common/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Yiisoft\Yii\Cycle\Schema\Provider\PhpFileSchemaProvider;
use Yiisoft\Yii\Cycle\Schema\SchemaProviderInterface;
use Yiisoft\Yii\Middleware\Locale;
use Yiisoft\Yii\Middleware\SubFolder;
use Yiisoft\Yii\Middleware\Subfolder;
use Yiisoft\Yii\Queue\Adapter\SynchronousAdapter;

return [
Expand All @@ -26,7 +26,7 @@
'supportEmail' => '[email protected]',
'middlewares' => [
ErrorCatcher::class,
SubFolder::class,
Subfolder::class,
Locale::class,
Router::class,
],
Expand Down
2 changes: 1 addition & 1 deletion blog-api/config/web/di/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'ignoredRequestUrlPatterns' => $params['locale']['ignoredRequests'],
],
],
\Yiisoft\Yii\Middleware\SubFolder::class => [
\Yiisoft\Yii\Middleware\Subfolder::class => [
'__construct()' => [
'prefix' => !empty(trim($_ENV['BASE_URL'] ?? '', '/')) ? $_ENV['BASE_URL'] : null,
],
Expand Down
7 changes: 4 additions & 3 deletions blog/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
"yiisoft/mailer": "^5.0",
"yiisoft/mailer-symfony": "^3.0",
"yiisoft/rate-limiter": "dev-master",
"yiisoft/request-model": "dev-master",
"yiisoft/rbac": "^1.0",
"yiisoft/rbac-php": "^1.0",
"yiisoft/rbac-rules-container": "^2.0",
"yiisoft/request-model": "dev-master",
"yiisoft/router": "^3.0",
"yiisoft/router-fastroute": "^3.0",
"yiisoft/security": "^1.0",
Expand All @@ -82,7 +82,7 @@
"yiisoft/yii-debug-api": "^3.0@dev",
"yiisoft/yii-event": "^2.0",
"yiisoft/yii-http": "^1.0",
"yiisoft/yii-middleware": "dev-master",
"yiisoft/yii-middleware": "^1.0",
"yiisoft/yii-runner-console": "^2.0",
"yiisoft/yii-runner-http": "^2.0",
"yiisoft/yii-sentry": "dev-master",
Expand Down Expand Up @@ -152,7 +152,8 @@
"composer/installers": true,
"composer/package-versions-deprecated": true,
"infection/extension-installer": true,
"yiisoft/config": true
"yiisoft/config": true,
"php-http/discovery": false
}
},
"repositories": [
Expand Down
4 changes: 2 additions & 2 deletions blog/config/web/di/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Yiisoft\Definitions\Reference;
use Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher;
use Yiisoft\Yii\Middleware\Locale;
use Yiisoft\Yii\Middleware\SubFolder;
use Yiisoft\Yii\Middleware\Subfolder;

/** @var array $params */

Expand All @@ -27,7 +27,7 @@
'ignoredRequestUrlPatterns' => $params['locale']['ignoredRequests'],
],
],
SubFolder::class => [
Subfolder::class => [
'__construct()' => [
'prefix' => !empty(trim($_ENV['BASE_URL'] ?? '', '/')) ? $_ENV['BASE_URL'] : null,
],
Expand Down
4 changes: 2 additions & 2 deletions blog/config/web/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Yiisoft\Session\SessionMiddleware;
use Yiisoft\User\Login\Cookie\CookieLoginMiddleware;
use Yiisoft\Yii\Middleware\Locale;
use Yiisoft\Yii\Middleware\SubFolder;
use Yiisoft\Yii\Middleware\Subfolder;
use Yiisoft\Yii\Sentry\SentryMiddleware;

return [
Expand All @@ -18,7 +18,7 @@
SessionMiddleware::class,
CookieMiddleware::class,
CookieLoginMiddleware::class,
SubFolder::class,
Subfolder::class,
Locale::class,
Router::class,
],
Expand Down

0 comments on commit a5d1bd2

Please sign in to comment.