Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Mar 17, 2025

Backport of #51380

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added bug 3. to review Waiting for reviews pending documentation This pull request needs an associated documentation update feature: carddav Related to CardDAV internals labels Mar 17, 2025
@backportbot backportbot bot added this to the Nextcloud 29.0.14 milestone Mar 17, 2025
@hamza221 hamza221 force-pushed the backport/51380/stable29 branch from 3f98715 to 0f1ff70 Compare March 21, 2025 13:42
@hamza221 hamza221 marked this pull request as ready for review March 21, 2025 13:42
@hamza221 hamza221 force-pushed the backport/51380/stable29 branch from 0f1ff70 to 6c39f7d Compare March 21, 2025 13:43

private function setupSystemContactsProvider(IContactsManager $contactsManager,
IAppContainer $container): void {
private function setupSystemContactsProvider(IContactsManager $contactsManager, IAppContainer $container): void {

Check notice

Code scanning / Psalm

DeprecatedInterface Note

Interface OCP\AppFramework\IAppContainer is marked as deprecated
* @param IURLGenerator $urlGenerator
*/
public function setupSystemContactsProvider(IManager $cm, IURLGenerator $urlGenerator) {
public function setupSystemContactsProvider(IManager $cm, ?string $userId, IURLGenerator $urlGenerator) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\DAV\CardDAV\ContactsManager::setupSystemContactsProvider does not have a return type, expecting void
* @param ?string $userId
*/
private function register(IManager $cm, $addressBooks, $urlGenerator) {
private function register(IManager $cm, $addressBooks, $urlGenerator, ?string $userId) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\DAV\CardDAV\ContactsManager::register does not have a return type, expecting void
* @param ?string $userId
*/
private function register(IManager $cm, $addressBooks, $urlGenerator) {
private function register(IManager $cm, $addressBooks, $urlGenerator, ?string $userId) {

Check notice

Code scanning / Psalm

MissingParamType Note

Parameter $addressBooks has no provided type
@hamza221 hamza221 marked this pull request as draft March 21, 2025 13:52
@hamza221 hamza221 force-pushed the backport/51380/stable29 branch from 6c39f7d to 4f44398 Compare March 21, 2025 13:54
}

public function isEnabled(): bool {
if (!$this->userId) {

Check notice

Code scanning / Psalm

RiskyTruthyFalsyComparison Note

Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead.
$uri = $this->addressBookInfo['uri'];
}

$path = 'addressbooks/users/' . $user . '/' . $uri;

Check notice

Code scanning / Psalm

PossiblyInvalidOperand Note

Cannot concatenate with a array<array-key, string>|string
}

$path = 'addressbooks/users/' . $user . '/' . $uri;
$properties = $this->propertyMapper->findPropertyByPathAndName($user, $path, '{http://owncloud.org/ns}enabled');

Check notice

Code scanning / Psalm

PossiblyInvalidArgument Note

Argument 1 of OCA\DAV\Db\PropertyMapper::findPropertyByPathAndName expects string, but possibly different type array<array-key, string>|string provided
@hamza221 hamza221 force-pushed the backport/51380/stable29 branch from 4f44398 to 408c4bf Compare March 21, 2025 13:58
@hamza221 hamza221 marked this pull request as ready for review March 21, 2025 13:59
@hamza221 hamza221 merged commit c896c5f into stable29 Mar 21, 2025
198 of 202 checks passed
@hamza221 hamza221 deleted the backport/51380/stable29 branch March 21, 2025 15:09
@skjnldsv skjnldsv removed the pending documentation This pull request needs an associated documentation update label Mar 27, 2025
@Altahrim Altahrim mentioned this pull request Apr 3, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: carddav Related to CardDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants