[Pkg-owncloud-commits] [owncloud] 86/165: Replace `_method` requirement by {g, s}etMethods()

David Prévot taffit at moszumanska.debian.org
Thu Apr 23 04:06:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 7f2f92847be98bbf3a0a5ca8567fab001bb131c1
Author: David Prévot <taffit at debian.org>
Date:   Sun Apr 19 12:00:58 2015 -0400

    Replace `_method` requirement by {g,s}etMethods()
    
    Make the call compatible with future Symfony version, and avoid
    E_USER_DEPRECATED as thrown by the current 2.7.0-beta1:
    
    The "_method" requirement is deprecated since version 2.2 and will be
    removed in 3.0. Use getMethods() instead. at
    …/Symfony/Component/Routing/Route.php#554
    
    The "_method" requirement is deprecated since version 2.2 and will be
    removed in 3.0. Use the setMethods() method instead or the "methods"
    option in the route definition. at
    …/Symfony/Component/Routing/Route.php#662
---
 lib/private/route/route.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/private/route/route.php b/lib/private/route/route.php
index cb864d3..b33360f 100644
--- a/lib/private/route/route.php
+++ b/lib/private/route/route.php
@@ -37,7 +37,7 @@ class Route extends SymfonyRoute implements IRoute {
 	 * @return \OC\Route\Route
 	 */
 	public function method($method) {
-		$this->setRequirement('_method', strtoupper($method));
+		$this->setMethods($method);
 		return $this;
 	}
 
@@ -109,7 +109,7 @@ class Route extends SymfonyRoute implements IRoute {
 	 * @return \OC\Route\Route
 	 */
 	public function requirements($requirements) {
-		$method = $this->getRequirement('_method');
+		$method = $this->getMethods();
 		$this->setRequirements($requirements);
 		if (isset($requirements['_method'])) {
 			$method = $requirements['_method'];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list