generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
After updating to yiisoft/yii-http I get and error: Yiisoft\Di\BuildingException with message "Caught unhandled error "Cannot modify readonly property Yiisoft\Yii\Http\Application::$dispatcher" while building "Yiisoft\Yii\Http\Application"
In yiisoft/yii-http v1.1.0 \Yiisoft\Yii\Http\Application
public function __construct(
private readonly MiddlewareDispatcher $dispatcher, // was `private MiddlewareDispatcher $dispatcher`
private readonly EventDispatcherInterface|null $eventDispatcher = null,
private readonly RequestHandlerInterface $fallbackHandler = new UnhandledRequestHandler()
) {
}and $dispatcher is modified \Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper
$closure = Closure::bind(
static fn (Application $application) => $application->dispatcher = $middlewareDispatcher->withMiddlewares([
...$middlewareDefinitions,
['class' => MiddlewareDispatcherMiddleware::class, '$middlewareDispatcher' => $application->dispatcher],
]),
null,
$application
);
$closure($application);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels