[Pkg-owncloud-commits] [php-sabredav] 53/220: Removed deprecated function Sabre\DAV\Auth\Plugin::getCurrentUser()
David Prévot
taffit at moszumanska.debian.org
Thu May 12 01:21:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit f9685da29dfff4a5e01fe747132060af58bd4d59
Author: Evert Pot <me at evertpot.com>
Date: Thu Jan 21 15:18:16 2016 -0500
Removed deprecated function Sabre\DAV\Auth\Plugin::getCurrentUser()
---
CHANGELOG.md | 1 +
lib/DAV/Auth/Plugin.php | 21 ---------------------
tests/Sabre/DAV/Auth/PluginTest.php | 14 --------------
3 files changed, 1 insertion(+), 35 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6fece7e..bbfb0b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ ChangeLog
* Removed database migration script for sabre/dav 1.7. To update from that
version you now first need to update to sabre/dav 3.1.
+* Removed deprecated function: `Sabre\DAV\Auth\Plugin::getCurrentUser()`.
3.1.1 (????-??-??)
diff --git a/lib/DAV/Auth/Plugin.php b/lib/DAV/Auth/Plugin.php
index 818d8a4..acf3b64 100644
--- a/lib/DAV/Auth/Plugin.php
+++ b/lib/DAV/Auth/Plugin.php
@@ -108,27 +108,6 @@ class Plugin extends ServerPlugin {
}
/**
- * Returns the current username.
- *
- * This method is deprecated and is only kept for backwards compatibility
- * purposes. Please switch to getCurrentPrincipal().
- *
- * @deprecated Will be removed in a future version!
- * @return string|null
- */
- function getCurrentUser() {
-
- // We just do a 'basename' on the principal to give back a sane value
- // here.
- list(, $userName) = URLUtil::splitPath(
- $this->getCurrentPrincipal()
- );
-
- return $userName;
-
- }
-
- /**
* This method is called before any HTTP method and forces users to be authenticated
*
* @param RequestInterface $request
diff --git a/tests/Sabre/DAV/Auth/PluginTest.php b/tests/Sabre/DAV/Auth/PluginTest.php
index 0ac9e06..865356a 100644
--- a/tests/Sabre/DAV/Auth/PluginTest.php
+++ b/tests/Sabre/DAV/Auth/PluginTest.php
@@ -113,18 +113,4 @@ class PluginTest extends \PHPUnit_Framework_TestCase {
}
- /**
- * @depends testAuthenticate
- */
- function testGetCurrentUser() {
-
- $fakeServer = new DAV\Server( new DAV\SimpleCollection('bla'));
- $plugin = new Plugin(new Backend\Mock());
- $fakeServer->addPlugin($plugin);
- $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]);
- $this->assertEquals('admin', $plugin->getCurrentUser());
-
- }
-
}
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list