fix: expect interface, not a specific implementation
- Resolves: https://github.com/owncloud/music/issues/1068
Summary
- fixes a regression when deleting folders while music app was enabled, for a LazyRoot was passed to this method.
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [X] Screenshots before/after for front-end changes
- [X] Documentation (manuals or wiki) has been updated or is not required
- [x] Backports requested where applicable (ex: critical bugfixes)
Why is this slated for NC28? It's a regression that effects NC26 and 27.
It's a regression that effects NC26 and 27.
And also NC25.
Why is this slated for NC28? It's a regression that effects NC26 and 27.
For this PR is against the master branch. Backports would have the specific milestone of the next maintenance release assigned.
ERROR: UndefinedInterfaceMethod - lib/private/Files/Node/Folder.php:347:24 - Method OCP\Files\IRootFolder::createNode does not exist (see https://psalm.dev/181)
return [$this->root->createNode(
Wow, how did this even work, ever? createNode is protected.
To answer the question myself:
Objects of the same type will have access to each others private and protected members even though they are not the same instances. This is because the implementation specific details are already known when inside those objects.
– phpdoc
/backport to stable27
/backport to stable26
/backport to stable25
The backport to stable25 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable25
git pull origin stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport
/backport to stable25
The backport to stable25 failed. Please do this backport manually.
# Switch to the target branch and update it
git checkout stable25
git pull origin stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25
More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport