This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(security+nc34): symfony CVEs, \OC::$server accessors, array-shape bug#317
Merged
Conversation
…ved \OC::\$server accessors, fix OrganizationSyncService array shape
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
This PR resolves three categories of code-quality and security findings from the fleet quality sweep:
1. Symfony CVEs (security) — 4 advisories fixed
Symfony\Component\Mime\Addresscomposer update --with-all-dependencies.composer auditreturns clean.2. NC34 legacy
\OC::$server->get*()accessors replaced (15 calls → constructor-injected interfaces)SoftwareCatalogueService: injectedIUserSession,IUserManager,IGroupManager(replacedgetUserSession()×1,getUserManager()×2,getGroupManager()×2)SettingsService: injectedIGroupManager(replacedgetGroupManager()×3); also fixed two$group !== falsechecks that should be!== null(now thatIGroupManager::createGroup()is properly typed)HierarchyHandler: injectedIUserManager,IGroupManager(replacedgetUserManager()×2,getGroupManager()×1)ContactPersonHandler: replaced\OC::$server->getConfig()->setUserValue()andgetUserValue()with the already-injectedIConfig $config(×2)ArchiMateImportService: injectedIDBConnection(replacedgetDatabaseConnection()×1)Application.php: updated all explicit DI registrations to pass the new constructor params3. PHPStan array-shape bug in OrganizationSyncService
lib/Service/OrganizationSyncService.php:2585-2586: added/** @var array<string, mixed> */annotation on$contactEntityObjectso PHPStan no longer narrows the type toarray{username: string}after the['username']assignment, fixing the two "offset 'organisatie' does not exist" errors.Test plan
composer auditreturns no advisoriesphp -lon all edited files — no syntax errorsvendor/bin/phpstan analyse— the 2 OrganizationSyncService errors gone; no new errors introduced (SoftwareCatalogAdmin unused-property pre-exists)