This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(integrations): pass Tier-2 constructor args in calendar/email/tasks DI factories + log provider boot failures#1869
Merged
Conversation
…ks DI factories + log provider boot failures
The DI factory closures in Application::registerBuiltinIntegrationProviders()
were not updated when three providers gained Tier-2 constructor args:
- CalendarProvider gained $calendarLinkService
- EmailProvider gained $emailLinkService
- TasksProvider gained $registerMapper + $schemaMapper + $objectService
The closures still passed the old arg lists, so the providers threw
ArgumentCountError on construction. bootBuiltinIntegrationProviders()'s
try/catch silently swallowed the Throwable, dropping the calendar, email
and tasks providers from the IntegrationRegistry. Their tabs 404'd on the
OCS registry and the registered-provider count was 22 instead of 25. The
regression was invisible to the existing tests (they instantiate providers
directly with mocks) and only surfaced in a live-NC E2E.
Changes:
- Update the three factory closures to resolve and pass the Tier-2
dependencies, matching the already-correct contacts/deck/etc. factories.
- Harden bootBuiltinIntegrationProviders(): log a warning (provider class +
exception) when a provider fails to construct, so a mis-wired factory is
diagnosable instead of silently swallowed. Graceful degradation is kept —
the boot does not crash on one bad provider.
- Align the maps/time-tracker OCS labels ("Location"/"Time") with the in-page
registry pills from the nc-vue descriptors ("Locations"/"Time tracker").
- Add BuiltinProviderDiFactoryTest, a DI-container regression test that
invokes the actual factory closures and asserts every provider constructs
without throwing. It fails on the pre-fix code (3 ArgumentCountErrors),
closing the direct-instantiation blind spot in the existing provider tests.
Refs ADR-019, ADR-022.
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 165/165 | |||
| npm | ✅ | ✅ 532/532 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-25 09:45 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A live-NC E2E surfaced that three integration providers — calendar, email, tasks — were missing in production. Their OCS registry tabs 404'd and the registered-provider count was 22 instead of 25.
Root cause
The DI factory closures in
Application::registerBuiltinIntegrationProviders()were not updated when these providers gained Tier-2 constructor args:CalendarProvider$calendarLinkServiceEmailProvider$emailLinkServiceTasksProvider$registerMapper,$schemaMapper,$objectServiceThe closures still passed the old arg lists, so each provider threw
ArgumentCountErroron construction.bootBuiltinIntegrationProviders()'stry/catchsilently swallowed theThrowable, dropping the three providers from theIntegrationRegistry. Existing tests instantiate providers directly with mocks, so they were blind to the factory-wiring bug — only the live E2E caught it.Changes
bootBuiltinIntegrationProviders()now logs awarning(provider class + exception message) when a provider fails to construct, so a mis-wired factory is diagnosable in the logs instead of a silently-missing tab. Graceful degradation is preserved (boot does not crash on one bad provider).Location/Time) with the in-page registry pills from the nc-vue descriptors (Locations/Time tracker). ORgetLabel()is the smaller change, so no nc-vue PR is needed.BuiltinProviderDiFactoryTestinvokes the actual factory closures (via a capturedIRegistrationContext+ a mocking container) and asserts every provider constructs without throwing. This closes the direct-instantiation blind spot. It fails on the pre-fix code (3ArgumentCountErrors for calendar/email/tasks).Verification
php -lclean on all 4 touched files.origin/developmentproduces exactly 3ArgumentCountErrors (Calendar [Changelog CI] Add Changelog for Version 0.1.2 #2$calendarLinkService, Email [Changelog CI] Add Changelog for Version 0.1.2 #2$emailLinkService, Tasks [Changelog CI] Add Changelog for Version 0.1.2 #2$registerMapper).apache2ctl graceful:integrations.registeredlength 25, now includingtasks,calendar,email.Refs ADR-019, ADR-022.
Test plan
BuiltinProviderDiFactoryTest) + PHPCS/PHPMD/Psalm/PHPStan greencapabilities.openregister.integrations.registeredlength is 25 incl. calendar/email/tasks