Small corrections
This commit is contained in:
parent
c6193ede07
commit
fb823d6033
|
@ -24,7 +24,7 @@
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/opencultureconsulting/oai-pmh2/issues",
|
"issues": "https://github.com/opencultureconsulting/oai-pmh2/issues",
|
||||||
"source": "https://github.com/opencultureconsulting/oai-pmh2",
|
"source": "https://github.com/opencultureconsulting/oai-pmh2",
|
||||||
"docs": "https://github.com/opencultureconsulting/oai-pmh2/blob/main/README.md"
|
"docs": "https://opencultureconsulting.github.io/oai-pmh2/"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.1",
|
"php": "^8.1",
|
||||||
|
@ -61,8 +61,8 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pre-install-cmd": [
|
"pre-install-cmd": [
|
||||||
"@php -r \"!is_dir('./data') && mkdir('./data', 0775);\"",
|
"@php -r \"if (!is_dir('./data')) { mkdir('./data', 0775); }\"",
|
||||||
"@php -r \"!file_exists('./config/config.yml') && copy('./config/config.dist.yml', './config/config.yml');\""
|
"@php -r \"if (!file_exists('./config/config.yml')) { copy('./config/config.dist.yml', './config/config.yml'); }\""
|
||||||
],
|
],
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
"@doctrine:clear-cache --quiet",
|
"@doctrine:clear-cache --quiet",
|
||||||
|
|
|
@ -24,5 +24,4 @@ namespace OCC\OaiPmh2;
|
||||||
|
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
$app = new App();
|
(new App())->run();
|
||||||
$app->run();
|
|
||||||
|
|
|
@ -77,4 +77,11 @@ abstract class Middleware extends AbstractMiddleware
|
||||||
}
|
}
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final public function __construct()
|
||||||
|
{
|
||||||
|
// Make constructor final to avoid issues in dispatcher.
|
||||||
|
// @see https://psalm.dev/229
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,10 +88,11 @@ class Dispatcher extends AbstractMiddleware
|
||||||
if (!ErrorHandler::getInstance()->hasErrors()) {
|
if (!ErrorHandler::getInstance()->hasErrors()) {
|
||||||
/** @var string */
|
/** @var string */
|
||||||
$verb = $request->getAttribute('verb');
|
$verb = $request->getAttribute('verb');
|
||||||
/** @var Middleware $middleware */
|
|
||||||
$middleware = __NAMESPACE__ . '\\' . $verb;
|
$middleware = __NAMESPACE__ . '\\' . $verb;
|
||||||
|
if (is_a($middleware, Middleware::class, true)) {
|
||||||
$this->requestHandler->queue->enqueue(new $middleware());
|
$this->requestHandler->queue->enqueue(new $middleware());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->requestHandler->queue->enqueue(ErrorHandler::getInstance());
|
$this->requestHandler->queue->enqueue(ErrorHandler::getInstance());
|
||||||
return $request;
|
return $request;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue