getServiceManager()->register( MiddlewareRequestHandler::SERVICE_ID, new MiddlewareRequestHandler([MiddlewareRequestHandler::OPTION_MAP => []]) ); $this->getServiceManager()->register( OpenAPISchemaValidateRequestMiddleware::SERVICE_ID, new OpenAPISchemaValidateRequestMiddleware( [OpenAPISchemaValidateRequestMiddleware::OPTION_SCHEMA_MAP, []] ) ); } public function down(Schema $schema): void { $this->getServiceManager()->unregister(MiddlewareRequestHandler::SERVICE_ID); $this->getServiceManager()->unregister(OpenAPISchemaValidateRequestMiddleware::SERVICE_ID); } }