Skip to content

Improve abstract plugin factories#4801

Draft
demiankatz wants to merge 20 commits intovufind-org:dev-12.0from
demiankatz:improve-abstract-plugin-factories
Draft

Improve abstract plugin factories#4801
demiankatz wants to merge 20 commits intovufind-org:dev-12.0from
demiankatz:improve-abstract-plugin-factories

Conversation

@demiankatz
Copy link
Member

@demiankatz demiankatz commented Oct 31, 2025

This is a proof of concept which makes the AbstractPluginFactory smarter, so it can take advantage of existing factories based on a naming convention. In theory, this could greatly reduce the size of our factory configuration, though at the cost of less explicit/more "magical" behavior.

TODO

  • Finish reducing top-level service configurations (use more autowiring to replace shared factories?)
  • Finish reducing plugin configurations where possible
    • VuFind\AjaxHandler\PluginManager
    • VuFind\Auth\PluginManager
    • VuFind\Autocomplete\PluginManager
    • VuFind\Captcha\PluginManager
    • VuFind\ChannelProvider\PluginManager
    • VuFind\Config\Handler\PluginManager
    • VuFind\Content\PluginManager
    • VuFind\Content\AuthorNotes\PluginManager
    • VuFind\Content\Covers\PluginManager
    • VuFind\Content\Excerpts\PluginManager
    • VuFind\Content\Reviews\PluginManager
    • VuFind\Content\Summaries\PluginManager
    • VuFind\Content\TOC\PluginManager
    • VuFind\ContentBlock\PluginManager
    • VuFind\Cover\Layer\PluginManager
    • VuFind\Db\Entity\PluginManager
    • VuFind\Db\Service\PluginManager
    • VuFind\Form\Handler\PluginManager
    • VuFind\Hierarchy\Driver\PluginManager
    • VuFind\Hierarchy\TreeDataFormatter\PluginManager
    • VuFind\Hierarchy\TreeDataSource\PluginManager
    • VuFind\Hierarchy\TreeRenderer\PluginManager
    • VuFind\IdentifierLinker\PluginManager
    • VuFind\ILS\Driver\PluginManager
    • VuFind\MetadataVocabulary\PluginManager
    • VuFind\Navigation\PluginManager
    • VuFind\OnlinePayment\Handler\PluginManager
    • VuFind\Recommend\PluginManager
    • VuFind\Record\FallbackLoader\PluginManager
    • VuFind\RecordDataFormatter\Specs\PluginManager
    • VuFind\RecordDriver\PluginManager
    • VuFind\RecordTab\PluginManager
    • VuFind\Related\PluginManager
    • VuFind\Resolver\Driver\PluginManager
    • VuFind\Search\BackendRegistry
    • VuFind\Search\Explanation\PluginManager
    • VuFind\Search\FacetCache\PluginManager
    • VuFind\Search\Options\PluginManager
    • VuFind\Search\Params\PluginManager
    • VuFind\Search\Results\PluginManager
    • VuFind\Section\Plugin\PluginManager
    • VuFind\Session\PluginManager
    • VuFind\Sitemap\PluginManager
    • VuFind\UrlShortener\PluginManager
    • VuFindConsole\Command\PluginManager
  • Profile the result

@demiankatz demiankatz added discussion architecture pull requests that involve significant refactoring / architectural changes labels Oct 31, 2025
@EreMaijala
Copy link
Contributor

I think this is a good idea. I'm not sure if it's feasible to apply to the top-level service manager, though. Perhaps it would be better to limit this to plugin managers at least for now.

@demiankatz demiankatz changed the base branch from dev to dev-12.0 December 4, 2025 12:13
@demiankatz
Copy link
Member Author

I think this is a good idea. I'm not sure if it's feasible to apply to the top-level service manager, though. Perhaps it would be better to limit this to plugin managers at least for now.

Commit 911dfac contains a proof of concept for abstract top-level service handling which greatly reduces the configuration and doesn't seem to break anything. We can likely reduce it further with some minor tweaks. Note that my work should definitely be carefully reviewed in case I deleted something I shouldn't have, but all Mink tests are passing, so if I made a mistake, it's probably in an obscure area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture pull requests that involve significant refactoring / architectural changes discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants