Skip to content

Speed up plugin::isInstalled and use it instead of byId for existence checks - #3446

Open
Salvialf wants to merge 3 commits into
developfrom
refactor/plugin-isinstalled
Open

Speed up plugin::isInstalled and use it instead of byId for existence checks#3446
Salvialf wants to merge 3 commits into
developfrom
refactor/plugin-isinstalled

Conversation

@Salvialf

Copy link
Copy Markdown
Contributor
  • plugin::isInstalled() no longer goes through plugin::byId() (full JSON decode, object hydration, method_exists checks, category resolution) just to answer a yes/no question. It now resolves the plugin path and validates the JSON directly, without building a plugin object.
  • plugin::byId() arguments and return type are now typed (string $_id, bool $_full = false): plugin), and both methods share a new private resolvePath() helper instead of duplicating the path resolution logic.
  • Replaced three plugin::byId() calls in core that were only used to check plugin existence, never using the returned object, with plugin::isInstalled(): cache::clean(), jeedom::getApiKey(), and the jeeasy detection in the first-use modal.

@Salvialf Salvialf added the changelog-dev Use to generate release notes / changelog To be apply on PR label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-dev Use to generate release notes / changelog To be apply on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants