diff --git a/CHANGELOG.md b/CHANGELOG.md index 1afafbd1..0e48a3cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Anything marked with [**BC**] is known to affect backward compatibility with pre ### Changed - [**BC**] LIDO: XML handling changed to VuFindXml. +- [**BC**] Laminas Module Manager has been replaced with a simple custom module manager. The Module class of any custom module must now implement the \RecordManager\Base\ModuleManager\ModuleInterface interface. The initialize method can be left empty, but it must exist. The bootstrapping code has been moved from config/application.php to config/container.php. ## 3.0.0 - 2026-06-09 diff --git a/composer.json b/composer.json index 11c4ed5d..0d12acd8 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,6 @@ "php": ">=8.2.27", "cash/lrucache": "1.0.0", "guzzlehttp/guzzle": "7.15.2", - "laminas/laminas-mvc": "3.8.0", - "laminas/laminas-router": "3.18.0", "laminas/laminas-servicemanager": "3.23.0", "laminas/laminas-xml": "1.8.0", "league/mime-type-detection": "1.16.0", diff --git a/composer.lock b/composer.lock index 6fdd3884..690c3a41 100644 --- a/composer.lock +++ b/composer.lock @@ -4,57 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4739f3f6c2f92bab50d36d739fa78433", + "content-hash": "9c9274228f170dbad0661e97fce13197", "packages": [ - { - "name": "brick/varexporter", - "version": "0.6.0", - "source": { - "type": "git", - "url": "https://github.com/brick/varexporter.git", - "reference": "af98bfc2b702a312abbcaff37656dbe419cec5bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brick/varexporter/zipball/af98bfc2b702a312abbcaff37656dbe419cec5bc", - "reference": "af98bfc2b702a312abbcaff37656dbe419cec5bc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^5.0", - "php": "^8.1" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^10.5", - "vimeo/psalm": "6.8.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\VarExporter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()", - "keywords": [ - "var_export" - ], - "support": { - "issues": "https://github.com/brick/varexporter/issues", - "source": "https://github.com/brick/varexporter/tree/0.6.0" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2025-02-20T17:42:39+00:00" - }, { "name": "cash/lrucache", "version": "1.0.0", @@ -230,16 +181,16 @@ }, { "name": "guzzlehttp/promises", - "version": "2.5.2", + "version": "2.5.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "2823687acff28b2dbe67b2508a6b300e2c3fa4ce" + "reference": "cde49999552d185d64715fe9c1f77a2aadd2f9f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/2823687acff28b2dbe67b2508a6b300e2c3fa4ce", - "reference": "2823687acff28b2dbe67b2508a6b300e2c3fa4ce", + "url": "https://api.github.com/repos/guzzle/promises/zipball/cde49999552d185d64715fe9c1f77a2aadd2f9f1", + "reference": "cde49999552d185d64715fe9c1f77a2aadd2f9f1", "shasum": "" }, "require": { @@ -294,7 +245,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.5.2" + "source": "https://github.com/guzzle/promises/tree/2.5.3" }, "funding": [ { @@ -310,20 +261,20 @@ "type": "tidelift" } ], - "time": "2026-08-05T19:30:54+00:00" + "time": "2026-08-24T09:11:28+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.13.0", + "version": "2.13.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "dad89620b7a6edb60c15858442eb2e408b45d8f4" + "reference": "95e7828100de18b4e269fb1703be530082d5166d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dad89620b7a6edb60c15858442eb2e408b45d8f4", - "reference": "dad89620b7a6edb60c15858442eb2e408b45d8f4", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/95e7828100de18b4e269fb1703be530082d5166d", + "reference": "95e7828100de18b4e269fb1703be530082d5166d", "shasum": "" }, "require": { @@ -403,928 +354,115 @@ "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.13.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2026-07-16T22:23:49+00:00" - }, - { - "name": "laminas/laminas-config", - "version": "3.11.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-config.git", - "reference": "b816433bd36ddc4ba93e190eaac18497b0b6948c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-config/zipball/b816433bd36ddc4ba93e190eaac18497b0b6948c", - "reference": "b816433bd36ddc4ba93e190eaac18497b0b6948c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "laminas/laminas-stdlib": "^3.6", - "php": "^8.1.0", - "psr/container": "^1.0" - }, - "conflict": { - "container-interop/container-interop": "<1.2.0", - "zendframework/zend-config": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "^3.0.1", - "laminas/laminas-filter": "^2.39.0", - "laminas/laminas-i18n": "^2.29.0", - "laminas/laminas-servicemanager": "^3.23.0", - "phpunit/phpunit": "^10.5.38" - }, - "suggest": { - "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", - "laminas/laminas-i18n": "^2.7.4; install if you want to use the Translator processor", - "laminas/laminas-servicemanager": "^2.7.8 || ^3.3; if you need an extensible plugin manager for use with the Config Factory" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Config\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://laminas.dev", - "keywords": [ - "config", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-config/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-config/issues", - "rss": "https://github.com/laminas/laminas-config/releases.atom", - "source": "https://github.com/laminas/laminas-config" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "abandoned": true, - "time": "2026-01-29T12:14:07+00:00" - }, - { - "name": "laminas/laminas-escaper", - "version": "2.18.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "06f211dfffff18d91844c1f55250d5d13c007e18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/06f211dfffff18d91844c1f55250d5d13c007e18", - "reference": "06f211dfffff18d91844c1f55250d5d13c007e18", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-mbstring": "*", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" - }, - "conflict": { - "zendframework/zend-escaper": "*" - }, - "require-dev": { - "infection/infection": "^0.31.0", - "laminas/laminas-coding-standard": "~3.1.0", - "phpunit/phpunit": "^11.5.42", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Escaper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", - "homepage": "https://laminas.dev", - "keywords": [ - "escaper", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-escaper/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-escaper/issues", - "rss": "https://github.com/laminas/laminas-escaper/releases.atom", - "source": "https://github.com/laminas/laminas-escaper" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-14T18:31:13+00:00" - }, - { - "name": "laminas/laminas-eventmanager", - "version": "3.15.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "90b4bd33264629af8e39caf5aa83473ac03aa04c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/90b4bd33264629af8e39caf5aa83473ac03aa04c", - "reference": "90b4bd33264629af8e39caf5aa83473ac03aa04c", - "shasum": "" - }, - "require": { - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" - }, - "conflict": { - "container-interop/container-interop": "<1.2", - "zendframework/zend-eventmanager": "*" - }, - "require-dev": { - "amphp/dns": "^2.2", - "amphp/socket": "^2.3.1", - "laminas/laminas-coding-standard": "~3.1.0", - "laminas/laminas-stdlib": "^3.20", - "phpbench/phpbench": "^1.3.1", - "phpunit/phpunit": "^10.5.58", - "psalm/plugin-phpunit": "^0.19.0", - "psr/container": "^1.1.2 || ^2.0.2", - "sebastian/recursion-context": "^5.0.1", - "vimeo/psalm": "^6.13" - }, - "suggest": { - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", - "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-eventmanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-eventmanager/issues", - "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", - "source": "https://github.com/laminas/laminas-eventmanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-31T10:29:01+00:00" - }, - { - "name": "laminas/laminas-http", - "version": "2.23.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-http.git", - "reference": "9462fc84330d25b23383823831380abb33907fdd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-http/zipball/9462fc84330d25b23383823831380abb33907fdd", - "reference": "9462fc84330d25b23383823831380abb33907fdd", - "shasum": "" - }, - "require": { - "laminas/laminas-loader": "^2.10", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-uri": "^2.14", - "laminas/laminas-validator": "^2.15 || ^3.0", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" - }, - "conflict": { - "zendframework/zend-http": "*" - }, - "require-dev": { - "ext-curl": "*", - "laminas/laminas-coding-standard": "^3.0.1", - "phpunit/phpunit": "^10.5.38" - }, - "suggest": { - "paragonie/certainty": "For automated management of cacert.pem" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Http\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "http client", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-http/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-http/issues", - "rss": "https://github.com/laminas/laminas-http/releases.atom", - "source": "https://github.com/laminas/laminas-http" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-12-05T11:02:08+00:00" - }, - { - "name": "laminas/laminas-json", - "version": "3.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-json.git", - "reference": "5448d357c4520d79f5caf4d46a1fe03ec8b8e4b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-json/zipball/5448d357c4520d79f5caf4d46a1fe03ec8b8e4b0", - "reference": "5448d357c4520d79f5caf4d46a1fe03ec8b8e4b0", - "shasum": "" - }, - "require": { - "php": "^8.1.0" - }, - "conflict": { - "zendframework/zend-json": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-stdlib": "^2.7.7 || ^3.19", - "phpunit/phpunit": "^9.5.25" - }, - "suggest": { - "laminas/laminas-json-server": "For implementing JSON-RPC servers", - "laminas/laminas-xml2json": "For converting XML documents to JSON" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://laminas.dev", - "keywords": [ - "json", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-json/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-json/issues", - "rss": "https://github.com/laminas/laminas-json/releases.atom", - "source": "https://github.com/laminas/laminas-json" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "abandoned": true, - "time": "2026-01-23T11:10:11+00:00" - }, - { - "name": "laminas/laminas-loader", - "version": "2.12.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-loader.git", - "reference": "ec8cee33fb254ee4d9c8e8908c870e5c797e1272" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/ec8cee33fb254ee4d9c8e8908c870e5c797e1272", - "reference": "ec8cee33fb254ee4d9c8e8908c870e5c797e1272", - "shasum": "" - }, - "require": { - "php": "^8.0.0" - }, - "conflict": { - "zendframework/zend-loader": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "phpunit/phpunit": "~9.5.25" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Loader\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Autoloading and plugin loading strategies", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "loader" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-loader/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-loader/issues", - "rss": "https://github.com/laminas/laminas-loader/releases.atom", - "source": "https://github.com/laminas/laminas-loader" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "abandoned": true, - "time": "2025-12-30T11:30:39+00:00" - }, - { - "name": "laminas/laminas-modulemanager", - "version": "2.19.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-modulemanager.git", - "reference": "ca2438b20ffc0ec3352bd0a583a31f24403320ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-modulemanager/zipball/ca2438b20ffc0ec3352bd0a583a31f24403320ad", - "reference": "ca2438b20ffc0ec3352bd0a583a31f24403320ad", - "shasum": "" - }, - "require": { - "brick/varexporter": "^0.6", - "laminas/laminas-config": "^3.10.1", - "laminas/laminas-eventmanager": "^3.14.0", - "laminas/laminas-stdlib": "^3.21.0", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "webimpress/safe-writer": "^2.2.0" - }, - "conflict": { - "amphp/amp": "<2.6.4", - "zendframework/zend-modulemanager": "*" - }, - "require-dev": { - "amphp/dns": "^1.24 || ^2.1.2", - "amphp/socket": "^1.2.1 || ^2.3.1", - "laminas/laminas-coding-standard": "~3.1.0", - "laminas/laminas-loader": "^2.11", - "laminas/laminas-mvc": "^3.8.0", - "laminas/laminas-servicemanager": "^3.23.0", - "phpunit/phpunit": "^11.5.42", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.13.1" - }, - "suggest": { - "laminas/laminas-console": "Laminas\\Console component", - "laminas/laminas-loader": "Laminas\\Loader component if you are not using Composer autoloading for your modules", - "laminas/laminas-mvc": "Laminas\\Mvc component", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\ModuleManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Modular application system for laminas-mvc applications", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "modulemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-modulemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-modulemanager/issues", - "rss": "https://github.com/laminas/laminas-modulemanager/releases.atom", - "source": "https://github.com/laminas/laminas-modulemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-17T22:17:10+00:00" - }, - { - "name": "laminas/laminas-mvc", - "version": "3.8.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "53ba28b7222d3a3b49747a26babef43d1b17fb6f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/53ba28b7222d3a3b49747a26babef43d1b17fb6f", - "reference": "53ba28b7222d3a3b49747a26babef43d1b17fb6f", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "^1.2", - "laminas/laminas-eventmanager": "^3.4", - "laminas/laminas-http": "^2.15", - "laminas/laminas-modulemanager": "^2.16", - "laminas/laminas-router": "^3.11.1", - "laminas/laminas-servicemanager": "^3.20.0", - "laminas/laminas-stdlib": "^3.19", - "laminas/laminas-view": "^2.18.0", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" - }, - "conflict": { - "zendframework/zend-mvc": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "^2.5.0", - "laminas/laminas-json": "^3.6", - "phpunit/phpunit": "^10.5.38", - "webmozart/assert": "^1.11" - }, - "suggest": { - "laminas/laminas-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", - "laminas/laminas-log": "^2.9.1 To provide log functionality via LogFilterManager, LogFormatterManager, and LogProcessorManager", - "laminas/laminas-mvc-console": "laminas-mvc-console provides the ability to expose laminas-mvc as a console application", - "laminas/laminas-mvc-i18n": "laminas-mvc-i18n provides integration with laminas-i18n, including a translation bridge and translatable route segments", - "laminas/laminas-mvc-middleware": "To dispatch middleware in your laminas-mvc application", - "laminas/laminas-mvc-plugin-fileprg": "To provide Post/Redirect/Get functionality around forms that container file uploads", - "laminas/laminas-mvc-plugin-flashmessenger": "To provide flash messaging capabilities between requests", - "laminas/laminas-mvc-plugin-identity": "To access the authenticated identity (per laminas-authentication) in controllers", - "laminas/laminas-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", - "laminas/laminas-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", - "laminas/laminas-servicemanager-di": "laminas-servicemanager-di provides utilities for integrating laminas-di and laminas-servicemanager in your laminas-mvc application" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Mvc\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "mvc" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-mvc/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-mvc/issues", - "rss": "https://github.com/laminas/laminas-mvc/releases.atom", - "source": "https://github.com/laminas/laminas-mvc" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2024-11-18T00:14:29+00:00" - }, - { - "name": "laminas/laminas-router", - "version": "3.18.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-router.git", - "reference": "e9a3dcf704cfc2ea47da6c2275409c2187034f8f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-router/zipball/e9a3dcf704cfc2ea47da6c2275409c2187034f8f", - "reference": "e9a3dcf704cfc2ea47da6c2275409c2187034f8f", - "shasum": "" - }, - "require": { - "laminas/laminas-servicemanager": "^3.14.0", - "laminas/laminas-stdlib": "^3.10.1", - "laminas/laminas-uri": "^2.14", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "psr/container": "^1 || ^2.0.2" - }, - "conflict": { - "zendframework/zend-router": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~3.1.0", - "laminas/laminas-http": "^2.22", - "laminas/laminas-i18n": "^2.31.0", - "phpunit/phpunit": "^11.5.43", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.13.1" - }, - "suggest": { - "laminas/laminas-i18n": "^2.15.0 if defining translatable HTTP path segments" - }, - "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Router", - "config-provider": "Laminas\\Router\\ConfigProvider" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Router\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Flexible routing system for HTTP and console applications", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "routing" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-router/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-router/issues", - "rss": "https://github.com/laminas/laminas-router/releases.atom", - "source": "https://github.com/laminas/laminas-router" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2026-03-02T14:54:55+00:00" - }, - { - "name": "laminas/laminas-servicemanager", - "version": "3.23.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "a8640182b892b99767d54404d19c5c3b3699f79b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/a8640182b892b99767d54404d19c5c3b3699f79b", - "reference": "a8640182b892b99767d54404d19c5c3b3699f79b", - "shasum": "" - }, - "require": { - "laminas/laminas-stdlib": "^3.19", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", - "psr/container": "^1.0" - }, - "conflict": { - "ext-psr": "*", - "laminas/laminas-code": "<4.10.0", - "zendframework/zend-code": "<3.3.1", - "zendframework/zend-servicemanager": "*" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "container-interop/container-interop": "^1.2.0" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11.99.5", - "friendsofphp/proxy-manager-lts": "^1.0.18", - "laminas/laminas-code": "^4.14.0", - "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-container-config-test": "^0.8", - "mikey179/vfsstream": "^1.6.12", - "phpbench/phpbench": "^1.3.1", - "phpunit/phpunit": "^10.5.36", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.26.1" - }, - "suggest": { - "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" - }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], - "type": "library", - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Factory-Driven Dependency Injection Container", - "homepage": "https://laminas.dev", - "keywords": [ - "PSR-11", - "dependency-injection", - "di", - "dic", - "laminas", - "service-manager", - "servicemanager" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2024-10-28T21:32:16+00:00" - }, - { - "name": "laminas/laminas-stdlib", - "version": "3.21.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "b1c81514cfe158aadf724c42b34d3d0a8164c096" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/b1c81514cfe158aadf724c42b34d3d0a8164c096", - "reference": "b1c81514cfe158aadf724c42b34d3d0a8164c096", - "shasum": "" - }, - "require": { - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" - }, - "conflict": { - "zendframework/zend-stdlib": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "^3.1.0", - "phpbench/phpbench": "^1.4.1", - "phpunit/phpunit": "^11.5.42", - "psalm/plugin-phpunit": "^0.19.5", - "vimeo/psalm": "^6.13.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2025-10-11T18:13:12+00:00" - }, - { - "name": "laminas/laminas-uri", - "version": "2.14.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-uri.git", - "reference": "e804288f4540988903dc0ede386ce5eec87198df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-uri/zipball/e804288f4540988903dc0ede386ce5eec87198df", - "reference": "e804288f4540988903dc0ede386ce5eec87198df", - "shasum": "" - }, - "require": { - "laminas/laminas-escaper": "^2.9", - "laminas/laminas-validator": "^2.39 || ^3.0", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" - }, - "conflict": { - "zendframework/zend-uri": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Uri\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "A component that aids in manipulating and validating ยป Uniform Resource Identifiers (URIs)", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "uri" + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" ], "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-uri/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-uri/issues", - "rss": "https://github.com/laminas/laminas-uri/releases.atom", - "source": "https://github.com/laminas/laminas-uri" + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.13.1" }, "funding": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" } ], - "time": "2025-12-05T10:02:11+00:00" + "time": "2026-08-24T09:13:11+00:00" }, { - "name": "laminas/laminas-validator", - "version": "2.65.0", + "name": "laminas/laminas-servicemanager", + "version": "3.23.0", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-validator.git", - "reference": "f0767ca83e0dd91a6f8ccdd4f0887eb132c0ea49" + "url": "https://github.com/laminas/laminas-servicemanager.git", + "reference": "a8640182b892b99767d54404d19c5c3b3699f79b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-validator/zipball/f0767ca83e0dd91a6f8ccdd4f0887eb132c0ea49", - "reference": "f0767ca83e0dd91a6f8ccdd4f0887eb132c0ea49", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/a8640182b892b99767d54404d19c5c3b3699f79b", + "reference": "a8640182b892b99767d54404d19c5c3b3699f79b", "shasum": "" }, "require": { - "laminas/laminas-servicemanager": "^3.21.0", "laminas/laminas-stdlib": "^3.19", - "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "psr/http-message": "^1.0.1 || ^2.0.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "psr/container": "^1.0" }, "conflict": { - "zendframework/zend-validator": "*" + "ext-psr": "*", + "laminas/laminas-code": "<4.10.0", + "zendframework/zend-code": "<3.3.1", + "zendframework/zend-servicemanager": "*" + }, + "provide": { + "psr/container-implementation": "^1.0" + }, + "replace": { + "container-interop/container-interop": "^1.2.0" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.5", - "laminas/laminas-db": "^2.20", - "laminas/laminas-filter": "^2.41.0", - "laminas/laminas-i18n": "^2.30.0", - "laminas/laminas-session": "^2.25.1", - "laminas/laminas-uri": "^2.13.0", - "phpunit/phpunit": "^10.5.58", - "psalm/plugin-phpunit": "^0.19.0", - "psr/http-client": "^1.0.3", - "psr/http-factory": "^1.1.0", + "composer/package-versions-deprecated": "^1.11.99.5", + "friendsofphp/proxy-manager-lts": "^1.0.18", + "laminas/laminas-code": "^4.14.0", + "laminas/laminas-coding-standard": "~2.5.0", + "laminas/laminas-container-config-test": "^0.8", + "mikey179/vfsstream": "^1.6.12", + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^10.5.36", + "psalm/plugin-phpunit": "^0.18.4", "vimeo/psalm": "^5.26.1" }, "suggest": { - "laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator", - "laminas/laminas-filter": "Laminas\\Filter component, required by the Digits validator", - "laminas/laminas-i18n": "Laminas\\I18n component to allow translation of validation error messages", - "laminas/laminas-i18n-resources": "Translations of validator messages", - "laminas/laminas-servicemanager": "Laminas\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "laminas/laminas-session": "Laminas\\Session component, ^2.8; required by the Csrf validator", - "laminas/laminas-uri": "Laminas\\Uri component, required by the Uri and Sitemap\\Loc validators", - "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators" + "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" }, + "bin": [ + "bin/generate-deps-for-config-factory", + "bin/generate-factory-for-class" + ], "type": "library", - "extra": { - "laminas": { - "component": "Laminas\\Validator", - "config-provider": "Laminas\\Validator\\ConfigProvider" - } - }, "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { - "Laminas\\Validator\\": "src/" + "Laminas\\ServiceManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria", + "description": "Factory-Driven Dependency Injection Container", "homepage": "https://laminas.dev", "keywords": [ + "PSR-11", + "dependency-injection", + "di", + "dic", "laminas", - "validator" + "service-manager", + "servicemanager" ], "support": { "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-validator/", + "docs": "https://docs.laminas.dev/laminas-servicemanager/", "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-validator/issues", - "rss": "https://github.com/laminas/laminas-validator/releases.atom", - "source": "https://github.com/laminas/laminas-validator" + "issues": "https://github.com/laminas/laminas-servicemanager/issues", + "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", + "source": "https://github.com/laminas/laminas-servicemanager" }, "funding": [ { @@ -1332,101 +470,58 @@ "type": "community_bridge" } ], - "time": "2025-10-13T14:40:30+00:00" + "time": "2024-10-28T21:32:16+00:00" }, { - "name": "laminas/laminas-view", - "version": "2.44.0", + "name": "laminas/laminas-stdlib", + "version": "3.21.0", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-view.git", - "reference": "93f5c8b52af2603f1aa494f1c98ce2013baff18e" + "url": "https://github.com/laminas/laminas-stdlib.git", + "reference": "b1c81514cfe158aadf724c42b34d3d0a8164c096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/93f5c8b52af2603f1aa494f1c98ce2013baff18e", - "reference": "93f5c8b52af2603f1aa494f1c98ce2013baff18e", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/b1c81514cfe158aadf724c42b34d3d0a8164c096", + "reference": "b1c81514cfe158aadf724c42b34d3d0a8164c096", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-filter": "*", - "ext-json": "*", - "laminas/laminas-escaper": "^2.5", - "laminas/laminas-eventmanager": "^3.4", - "laminas/laminas-json": "^3.3", - "laminas/laminas-servicemanager": "^3.21.0", - "laminas/laminas-stdlib": "^3.10.1", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0", - "psr/container": "^1 || ^2" + "php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" }, "conflict": { - "amphp/dns": "<2.1.2", - "amphp/socket": "<2.3.1", - "container-interop/container-interop": "<1.2", - "laminas/laminas-router": "<3.0.1", - "laminas/laminas-session": "<2.12", - "zendframework/zend-view": "*" + "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-authentication": "^2.18", - "laminas/laminas-coding-standard": "~3.1.0", - "laminas/laminas-feed": "^2.25.0", - "laminas/laminas-filter": "^2.41", - "laminas/laminas-http": "^2.22", - "laminas/laminas-i18n": "^2.30.0", - "laminas/laminas-modulemanager": "^2.18", - "laminas/laminas-mvc": "^3.8.0", - "laminas/laminas-mvc-i18n": "^1.9", - "laminas/laminas-mvc-plugin-flashmessenger": "^1.11.0", - "laminas/laminas-navigation": "^2.21.0", - "laminas/laminas-paginator": "^2.20.0", - "laminas/laminas-permissions-acl": "^2.17", - "laminas/laminas-router": "^3.14.0", - "laminas/laminas-uri": "^2.13", - "phpunit/phpunit": "^10.5.58", + "laminas/laminas-coding-standard": "^3.1.0", + "phpbench/phpbench": "^1.4.1", + "phpunit/phpunit": "^11.5.42", "psalm/plugin-phpunit": "^0.19.5", "vimeo/psalm": "^6.13.1" }, - "suggest": { - "laminas/laminas-authentication": "Laminas\\Authentication component", - "laminas/laminas-feed": "Laminas\\Feed component", - "laminas/laminas-filter": "Laminas\\Filter component", - "laminas/laminas-http": "Laminas\\Http component", - "laminas/laminas-i18n": "Laminas\\I18n component", - "laminas/laminas-mvc": "Laminas\\Mvc component", - "laminas/laminas-mvc-plugin-flashmessenger": "laminas-mvc-plugin-flashmessenger component, if you want to use the FlashMessenger view helper with laminas-mvc versions 3 and up", - "laminas/laminas-navigation": "Laminas\\Navigation component", - "laminas/laminas-paginator": "Laminas\\Paginator component", - "laminas/laminas-permissions-acl": "Laminas\\Permissions\\Acl component", - "laminas/laminas-uri": "Laminas\\Uri component" - }, - "bin": [ - "bin/templatemap_generator.php" - ], "type": "library", "autoload": { "psr-4": { - "Laminas\\View\\": "src/" + "Laminas\\Stdlib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Flexible view layer supporting and providing multiple view layers, helpers, and more", + "description": "SPL extensions, array utilities, error handlers, and more", "homepage": "https://laminas.dev", "keywords": [ "laminas", - "view" + "stdlib" ], "support": { "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-view/", + "docs": "https://docs.laminas.dev/laminas-stdlib/", "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-view/issues", - "rss": "https://github.com/laminas/laminas-view/releases.atom", - "source": "https://github.com/laminas/laminas-view" + "issues": "https://github.com/laminas/laminas-stdlib/issues", + "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", + "source": "https://github.com/laminas/laminas-stdlib" }, "funding": [ { @@ -1434,7 +529,7 @@ "type": "community_bridge" } ], - "time": "2025-11-17T01:59:08+00:00" + "time": "2025-10-11T18:13:12+00:00" }, { "name": "laminas/laminas-xml", @@ -1625,63 +720,6 @@ ], "time": "2026-08-27T14:43:15+00:00" }, - { - "name": "nikic/php-parser", - "version": "v5.8.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" - }, - "time": "2026-07-04T14:30:18+00:00" - }, { "name": "opis/json-schema", "version": "2.6.0", @@ -2923,16 +1961,16 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.38.0", + "version": "v1.42.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" + "reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", - "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/aa20edea75bd9c48cfecc8360922e5a6e5c44502", + "reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502", "shasum": "" }, "require": { @@ -2984,7 +2022,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.42.0" }, "funding": [ { @@ -3004,7 +2042,7 @@ "type": "tidelift" } ], - "time": "2026-05-25T13:48:31+00:00" + "time": "2026-08-07T06:33:24+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -3257,16 +2295,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.7.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", "shasum": "" }, "require": { @@ -3320,7 +2358,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.3" }, "funding": [ { @@ -3340,7 +2378,7 @@ "type": "tidelift" } ], - "time": "2026-06-16T09:55:08+00:00" + "time": "2026-07-27T15:39:01+00:00" }, { "name": "symfony/string", @@ -3598,65 +2636,6 @@ }, "time": "2019-11-07T14:29:07+00:00" }, - { - "name": "webimpress/safe-writer", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/webimpress/safe-writer.git", - "reference": "9d37cc8bee20f7cb2f58f6e23e05097eab5072e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webimpress/safe-writer/zipball/9d37cc8bee20f7cb2f58f6e23e05097eab5072e6", - "reference": "9d37cc8bee20f7cb2f58f6e23e05097eab5072e6", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.4", - "vimeo/psalm": "^4.7", - "webimpress/coding-standard": "^1.2.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev", - "dev-develop": "2.3.x-dev", - "dev-release-1.0": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Webimpress\\SafeWriter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "Tool to write files safely, to avoid race conditions", - "keywords": [ - "concurrent write", - "file writer", - "race condition", - "safe writer", - "webimpress" - ], - "support": { - "issues": "https://github.com/webimpress/safe-writer/issues", - "source": "https://github.com/webimpress/safe-writer/tree/2.2.0" - }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2021-04-19T16:34:45+00:00" - }, { "name": "wikimedia/composer-merge-plugin", "version": "v2.1.0", @@ -3938,16 +2917,16 @@ }, { "name": "amphp/dns", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/amphp/dns.git", - "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71" + "reference": "ec5948bfafac808f410406e18bc7b52a2d4629b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/dns/zipball/78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", - "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", + "url": "https://api.github.com/repos/amphp/dns/zipball/ec5948bfafac808f410406e18bc7b52a2d4629b7", + "reference": "ec5948bfafac808f410406e18bc7b52a2d4629b7", "shasum": "" }, "require": { @@ -3966,7 +2945,7 @@ "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "phpunit/phpunit": "^9", - "psalm/phar": "5.20" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -4015,7 +2994,7 @@ ], "support": { "issues": "https://github.com/amphp/dns/issues", - "source": "https://github.com/amphp/dns/tree/v2.4.0" + "source": "https://github.com/amphp/dns/tree/v2.4.1" }, "funding": [ { @@ -4023,7 +3002,7 @@ "type": "github" } ], - "time": "2025-01-19T15:43:40+00:00" + "time": "2026-07-26T17:53:54+00:00" }, { "name": "amphp/parallel", @@ -4375,16 +3354,16 @@ }, { "name": "amphp/socket", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "dadb63c5d3179fd83803e29dfeac27350e619314" + "reference": "b347be5aff6b2cc025208bb4d896607eb470c018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/dadb63c5d3179fd83803e29dfeac27350e619314", - "reference": "dadb63c5d3179fd83803e29dfeac27350e619314", + "url": "https://api.github.com/repos/amphp/socket/zipball/b347be5aff6b2cc025208bb4d896607eb470c018", + "reference": "b347be5aff6b2cc025208bb4d896607eb470c018", "shasum": "" }, "require": { @@ -4447,7 +3426,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.4.0" + "source": "https://github.com/amphp/socket/tree/v2.4.1" }, "funding": [ { @@ -4455,7 +3434,7 @@ "type": "github" } ], - "time": "2026-04-19T15:09:56+00:00" + "time": "2026-08-22T18:13:20+00:00" }, { "name": "amphp/sync", @@ -5685,6 +4664,63 @@ }, "time": "2026-02-22T16:28:03+00:00" }, + { + "name": "nikic/php-parser", + "version": "v5.8.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + }, + "time": "2026-07-04T14:30:18+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.4", @@ -6266,16 +5302,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.3", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3" + "reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", - "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/148cefffaf0233e4c08cc13db8a195a56dd6dfe9", + "reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9", "shasum": "" }, "require": { @@ -6307,9 +5343,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.5" }, - "time": "2026-07-08T07:01:06+00:00" + "time": "2026-08-31T16:05:28+00:00" }, { "name": "phpstan/phpstan", @@ -8732,16 +7768,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.4.15", + "version": "v7.4.17", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "336e7f3b9e95aba04f93ea9143920c2186abfbb9" + "reference": "d269974ee93c61d03620ffee358355bfdb471d66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/336e7f3b9e95aba04f93ea9143920c2186abfbb9", - "reference": "336e7f3b9e95aba04f93ea9143920c2186abfbb9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d269974ee93c61d03620ffee358355bfdb471d66", + "reference": "d269974ee93c61d03620ffee358355bfdb471d66", "shasum": "" }, "require": { @@ -8793,7 +7829,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.15" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.17" }, "funding": [ { @@ -8813,7 +7849,7 @@ "type": "tidelift" } ], - "time": "2026-07-21T15:13:06+00:00" + "time": "2026-08-21T17:40:08+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -8897,16 +7933,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.15", + "version": "v7.4.18", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "ff16a16bf87fdf264638b8f6995b3515975e3c79" + "reference": "90d412aa5277c6819db39e7605aa46b1019e3232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ff16a16bf87fdf264638b8f6995b3515975e3c79", - "reference": "ff16a16bf87fdf264638b8f6995b3515975e3c79", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/90d412aa5277c6819db39e7605aa46b1019e3232", + "reference": "90d412aa5277c6819db39e7605aa46b1019e3232", "shasum": "" }, "require": { @@ -8943,7 +7979,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.15" + "source": "https://github.com/symfony/filesystem/tree/v7.4.18" }, "funding": [ { @@ -8963,20 +7999,20 @@ "type": "tidelift" } ], - "time": "2026-07-22T07:36:05+00:00" + "time": "2026-08-23T10:03:40+00:00" }, { "name": "symfony/finder", - "version": "v7.4.14", + "version": "v7.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "13b38720174286f55d1761152b575a8d1436fc25" + "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/13b38720174286f55d1761152b575a8d1436fc25", - "reference": "13b38720174286f55d1761152b575a8d1436fc25", + "url": "https://api.github.com/repos/symfony/finder/zipball/5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", + "reference": "5ce28827081f6d1f0c32eaf3882750f19cb5bbe6", "shasum": "" }, "require": { @@ -9011,7 +8047,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.14" + "source": "https://github.com/symfony/finder/tree/v7.4.17" }, "funding": [ { @@ -9031,7 +8067,7 @@ "type": "tidelift" } ], - "time": "2026-06-27T08:31:18+00:00" + "time": "2026-08-21T12:09:28+00:00" }, { "name": "symfony/options-resolver", @@ -9266,16 +8302,16 @@ }, { "name": "symfony/process", - "version": "v7.4.13", + "version": "v7.4.18", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f5804be144caceb570f6747519999636b664f24c" + "reference": "058d17fc284cce14efb2385783b55014a461b176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f5804be144caceb570f6747519999636b664f24c", - "reference": "f5804be144caceb570f6747519999636b664f24c", + "url": "https://api.github.com/repos/symfony/process/zipball/058d17fc284cce14efb2385783b55014a461b176", + "reference": "058d17fc284cce14efb2385783b55014a461b176", "shasum": "" }, "require": { @@ -9307,7 +8343,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.13" + "source": "https://github.com/symfony/process/tree/v7.4.18" }, "funding": [ { @@ -9327,7 +8363,7 @@ "type": "tidelift" } ], - "time": "2026-05-23T16:05:06+00:00" + "time": "2026-08-21T17:40:08+00:00" }, { "name": "symfony/stopwatch", @@ -9397,16 +8433,16 @@ }, { "name": "symfony/yaml", - "version": "v7.4.15", + "version": "v7.4.18", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e101850ded5d2c0d44bf32abb8996404afec2dec" + "reference": "4cef939e55b8a21c5780418de0d98ab00d0736e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e101850ded5d2c0d44bf32abb8996404afec2dec", - "reference": "e101850ded5d2c0d44bf32abb8996404afec2dec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cef939e55b8a21c5780418de0d98ab00d0736e1", + "reference": "4cef939e55b8a21c5780418de0d98ab00d0736e1", "shasum": "" }, "require": { @@ -9449,7 +8485,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.15" + "source": "https://github.com/symfony/yaml/tree/v7.4.18" }, "funding": [ { @@ -9469,7 +8505,7 @@ "type": "tidelift" } ], - "time": "2026-07-21T15:13:06+00:00" + "time": "2026-08-30T00:47:26+00:00" }, { "name": "theseer/tokenizer", diff --git a/conf/application.config.php b/conf/application.config.php index 34b96d35..934789bf 100644 --- a/conf/application.config.php +++ b/conf/application.config.php @@ -1,7 +1,7 @@ array_unique($modules), - 'module_listener_options' => [ - 'config_glob_paths' => [ - 'config/autoload/{,*.}{global,local}.php', - ], - 'config_cache_enabled' => false, - 'module_map_cache_enabled' => false, - 'check_dependencies' => getenv('APPLICATION_ENV') == 'development', - 'module_paths' => [ - './src/RecordManager', - './vendor', - ], - ], 'service_manager' => [ 'use_defaults' => true, - 'factories' => [], + 'factories' => [ + // This needs to be available before module initialization: + \RecordManager\Base\ModuleManager\ModuleManager::class + => \RecordManager\Base\ModuleManager\ModuleManagerFactory::class, + 'Config' => \RecordManager\Base\ModuleManager\MergedConfigFactory::class, + ], ], ]; diff --git a/conf/container.php b/conf/container.php new file mode 100644 index 00000000..32f7b0ee --- /dev/null +++ b/conf/container.php @@ -0,0 +1,14 @@ +configure($applicationConfig['service_manager'] ?? []); +$serviceManager->setService('ApplicationConfig', $applicationConfig); + +// Load modules: +$moduleManager = $serviceManager->get(\RecordManager\Base\ModuleManager\ModuleManager::class); +$moduleManager->initialize(); + +// Return service manager: +return $serviceManager; diff --git a/console b/console index 67a08a0c..a24c57e8 100755 --- a/console +++ b/console @@ -59,10 +59,9 @@ $_SERVER['argc'] = count($remainingArgs); define('RECMAN_BASE_PATH', $basepath ?: getenv('RECMAN_BASE_PATH') ?: __DIR__); -$app = Laminas\Mvc\Application::init(require 'conf/application.config.php'); -$sm = $app->getServiceManager(); +$serviceManager = require __DIR__ . '/conf/container.php'; if ($overrides) { - $configReader = $sm->get(\RecordManager\Base\Settings\Ini::class); + $configReader = $serviceManager->get(\RecordManager\Base\Settings\Ini::class); $configReader->addOverrides('recordmanager.ini', $overrides); } -return $sm->get(\RecordManager\Base\ConsoleRunner::class)->run(); +return $serviceManager->get(\RecordManager\Base\ConsoleRunner::class)->run(); diff --git a/oai-pmh.php b/oai-pmh.php index d5d10f7a..50dfab24 100755 --- a/oai-pmh.php +++ b/oai-pmh.php @@ -4,7 +4,7 @@ * * PHP version 8 * - * Copyright (C) Ere Maijala 2021. + * Copyright (C) The National Library of Finland 2021-2026. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -32,9 +32,6 @@ require_once __DIR__ . '/vendor/autoload.php'; define('RECMAN_BASE_PATH', getenv('RECMAN_BASE_PATH') ?: __DIR__); -$app = Laminas\Mvc\Application::init( - include RECMAN_BASE_PATH . '/conf/application.config.php' -); -$sm = $app->getServiceManager(); -$provider = $sm->get(\RecordManager\Base\Controller\OaiPmhProvider::class); +$serviceManager = require __DIR__ . '/conf/container.php'; +$provider = $serviceManager->get(\RecordManager\Base\Controller\OaiPmhProvider::class); $provider->launch(); diff --git a/preview.php b/preview.php index f5be3a04..847a056d 100644 --- a/preview.php +++ b/preview.php @@ -33,12 +33,9 @@ ob_start(); define('RECMAN_BASE_PATH', getenv('RECMAN_BASE_PATH') ?: __DIR__); - $app = \Laminas\Mvc\Application::init( - include RECMAN_BASE_PATH . '/conf/application.config.php' - ); - $sm = $app->getServiceManager(); + $serviceManager = require __DIR__ . '/conf/container.php'; - $configReader = $sm->get(\RecordManager\Base\Settings\Ini::class); + $configReader = $serviceManager->get(\RecordManager\Base\Settings\Ini::class); $dataSourceConfig = $configReader->get('datasources.ini'); if (!isset($dataSourceConfig['_preview'])) { $configReader->addOverrides( @@ -70,7 +67,7 @@ ); } - $createPreview = $sm->get(\RecordManager\Base\Controller\CreatePreview::class); + $createPreview = $serviceManager->get(\RecordManager\Base\Controller\CreatePreview::class); $func = $_REQUEST['func'] ?? ''; if ($func === 'get_sources') { diff --git a/src/RecordManager/Base/Module.php b/src/RecordManager/Base/Module.php index 46f200d6..9ef850f5 100644 --- a/src/RecordManager/Base/Module.php +++ b/src/RecordManager/Base/Module.php @@ -29,6 +29,9 @@ namespace RecordManager\Base; +use Laminas\ServiceManager\ServiceManager; +use RecordManager\Base\ModuleManager\ModuleInterface; + /** * RecordManager base module * @@ -38,15 +41,26 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://github.com/NatLibFi/RecordManager */ -class Module +class Module implements ModuleInterface { /** - * Get module configuration + * Get module configuration. * * @return array */ - public function getConfig() + public function getConfig(): array { return include __DIR__ . '/config/module.config.php'; } + + /** + * Initialize the module. + * + * @param ServiceManager $serviceManager Service manager + * + * @return void + */ + public function initialize(ServiceManager $serviceManager) + { + } } diff --git a/src/RecordManager/Base/ModuleManager/MergedConfigFactory.php b/src/RecordManager/Base/ModuleManager/MergedConfigFactory.php new file mode 100644 index 00000000..d724f5f5 --- /dev/null +++ b/src/RecordManager/Base/ModuleManager/MergedConfigFactory.php @@ -0,0 +1,75 @@ + + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ + +namespace RecordManager\Base\ModuleManager; + +use Laminas\ServiceManager\Exception\ServiceNotCreatedException; +use Laminas\ServiceManager\Exception\ServiceNotFoundException; +use Psr\Container\ContainerExceptionInterface as ContainerException; +use Psr\Container\ContainerInterface; + +/** + * Merged module config factory. + * + * @category DataManagement + * @package RecordManager + * @author Ere Maijala + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ +class MergedConfigFactory implements \Laminas\ServiceManager\Factory\FactoryInterface +{ + /** + * Create an object + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return object + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws ContainerException&\Throwable if any other error occurs + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @psalm-suppress UndefinedDocblockClass + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + ?array $options = null + ) { + $moduleManager = $container->get(ModuleManager::class); + $moduleManager->initialize(); + return $moduleManager->getMergedConfig(); + } +} diff --git a/src/RecordManager/Base/ModuleManager/ModuleInterface.php b/src/RecordManager/Base/ModuleManager/ModuleInterface.php new file mode 100644 index 00000000..3002ced9 --- /dev/null +++ b/src/RecordManager/Base/ModuleManager/ModuleInterface.php @@ -0,0 +1,60 @@ + + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ + +namespace RecordManager\Base\ModuleManager; + +use Laminas\ServiceManager\ServiceManager; + +/** + * Module interface. + * + * @category DataManagement + * @package RecordManager + * @author Ere Maijala + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ +interface ModuleInterface +{ + /** + * Get module configuration. + * + * @return array + */ + public function getConfig(): array; + + /** + * Initialize the module. + * + * @param ServiceManager $serviceManager Service manager + * + * @return void + */ + public function initialize(ServiceManager $serviceManager); +} diff --git a/src/RecordManager/Base/ModuleManager/ModuleManager.php b/src/RecordManager/Base/ModuleManager/ModuleManager.php new file mode 100644 index 00000000..96510fd7 --- /dev/null +++ b/src/RecordManager/Base/ModuleManager/ModuleManager.php @@ -0,0 +1,150 @@ + + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ + +namespace RecordManager\Base\ModuleManager; + +use Exception; +use Laminas\ServiceManager\ServiceManager; +use Laminas\Stdlib\ArrayUtils; + +/** + * Module manager. + * + * @category DataManagement + * @package RecordManager + * @author Ere Maijala + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ +class ModuleManager +{ + /** + * All loaded modules. + * + * @var array + */ + protected array $loadedModules = []; + + /** + * All module-specific configs. + * + * @var array + */ + protected array $allConfigs = []; + + /** + * Constructor. + * + * @param ServiceManager $serviceManager Service manager + * @param array $modules List of modules + */ + public function __construct( + protected ServiceManager $serviceManager, + protected array $modules + ) { + } + + /** + * Load and initialize modules. + * + * @return void + */ + public function initialize(): void + { + if (!$this->modules || $this->loadedModules) { + return; + } + $this->loadedModules = []; + $this->allConfigs = []; + + $this->loadModules(); + $this->updateServiceManager(); + $this->initializeModules(); + } + + /** + * Get merged module configuration. + * + * @return array + */ + public function getMergedConfig(): array + { + $merged = []; + foreach ($this->allConfigs as $config) { + $merged = ArrayUtils::merge($merged, $config); + } + return $merged; + } + + /** + * Load modules. + * + * @return void + */ + protected function loadModules(): void + { + foreach ($this->modules as $moduleName) { + $moduleClass = "$moduleName\Module"; + if (class_exists($moduleClass)) { + $module = new $moduleClass(); + if (!($module instanceof ModuleInterface)) { + throw new Exception($module::class . ' does not implement ModuleInterface'); + } + $this->allConfigs[$moduleName] = $module->getConfig(); + } + } + } + + /** + * Update service manager with merged module configuration. + * + * @return void + */ + protected function updateServiceManager(): void + { + $mergedConfig = $this->getMergedConfig(); + + $saveOverride = $this->serviceManager->getAllowOverride(); + $this->serviceManager->setAllowOverride(true); + $this->serviceManager->configure($mergedConfig['service_manager'] ?? []); + $this->serviceManager->setAllowOverride($saveOverride); + } + + /** + * Initialize loaded modules. + * + * @return void + */ + protected function initializeModules(): void + { + foreach ($this->loadedModules as $module) { + $module->initialize($this->serviceManager); + } + } +} diff --git a/src/RecordManager/Base/ModuleManager/ModuleManagerFactory.php b/src/RecordManager/Base/ModuleManager/ModuleManagerFactory.php new file mode 100644 index 00000000..2dc36541 --- /dev/null +++ b/src/RecordManager/Base/ModuleManager/ModuleManagerFactory.php @@ -0,0 +1,78 @@ + + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ + +namespace RecordManager\Base\ModuleManager; + +use Laminas\ServiceManager\Exception\ServiceNotCreatedException; +use Laminas\ServiceManager\Exception\ServiceNotFoundException; +use Psr\Container\ContainerExceptionInterface as ContainerException; +use Psr\Container\ContainerInterface; + +/** + * Module manager factory. + * + * @category DataManagement + * @package RecordManager + * @author Ere Maijala + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://github.com/NatLibFi/RecordManager + */ +class ModuleManagerFactory implements \Laminas\ServiceManager\Factory\FactoryInterface +{ + /** + * Create an object + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return object + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws ContainerException&\Throwable if any other error occurs + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * + * @psalm-suppress UndefinedDocblockClass + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + ?array $options = null + ) { + $configuration = $container->get('ApplicationConfig'); + + return new $requestedName( + $container, + $configuration['modules'] ?? [] + ); + } +}