Skip to content

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Aug 25, 2023

Description

When trying to login, and using PHP 8, I see in data/owncloud.log

{"reqId":"l9hXAPcOXzVrL00eKrhJ","level":3,"time":"2023-08-25T08:06:01+00:00","remoteAddr":"192.168.0.12","user":"joan","app":"PHP","method":"PROPFIND","url":"\/remote.php\/dav\/files\/joan\/","message":"Creation of dynamic property Sabre\\DAV\\Xml\\Service::$namespacesMap is deprecated at \/home\/phil\/git\/owncloud\/core\/apps\/dav\/lib\/Connector\/Sabre\/TagsPlugin.php#109"}

That is because the name of the property is not namespacesMap, it is namespaceMap.

The typo has been around for a long time in these 2 files - SharesPlugin.php and TagsPlugin.php
For example, see https://github.com/owncloud/core/pull/20931/files
It is correct in apps/dav/lib/Connector/Sabre/FilesPlugin.php

This PR fixes the typos.

I wonder what behavior this will fix?

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis phil-davis changed the title [WIP] Fix spelling of namespaceMap Fix spelling of namespaceMap Aug 25, 2023
@owncloud owncloud deleted a comment from update-docs bot Aug 25, 2023
@phil-davis phil-davis marked this pull request as ready for review August 25, 2023 10:33
@phil-davis
Copy link
Contributor Author

@jvillafanez @DeepDiver1975 the existing unit tests and acceptance tests all pass with and without this fix.
What behavior might be improved by fixing this typo in the namespaceMap property name?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@jvillafanez
Copy link
Member

I'd bet that a lot of plugins set the right namespace. Basically, each plugin would be overwriting what the previous one set, it's just that all of them set the same value. When the code runs through the plugin, it would use the right namespaceMap variable, which was set by a different plugin. At least this would explain why there is no change in the behavior and why it worked before.

@phil-davis phil-davis merged commit 55f9667 into master Aug 25, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-namespaceMap branch August 25, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants