From 7cef1807420d90bf1be86091e4a7531cbd89ef5c Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sat, 26 Sep 2015 21:19:15 +0200 Subject: [PATCH] [3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8 --- src/Symfony/Component/Config/CHANGELOG.md | 1 + .../Component/Config/Resource/DirectoryResource.php | 2 +- .../Config/Resource/FileExistenceResource.php | 2 +- .../Component/Config/Resource/FileResource.php | 2 +- .../Component/Config/Resource/ResourceInterface.php | 13 ------------- .../Config/Tests/Resource/ResourceStub.php | 5 ----- .../HttpKernel/Config/EnvParametersResource.php | 2 +- .../Translation/Tests/TranslatorCacheTest.php | 4 ---- 8 files changed, 5 insertions(+), 26 deletions(-) diff --git a/src/Symfony/Component/Config/CHANGELOG.md b/src/Symfony/Component/Config/CHANGELOG.md index 3424d93a3eb7..b752df6fe234 100644 --- a/src/Symfony/Component/Config/CHANGELOG.md +++ b/src/Symfony/Component/Config/CHANGELOG.md @@ -7,6 +7,7 @@ CHANGELOG * removed `ReferenceDumper` class * removed the `ResourceInterface::isFresh()` method * removed `BCResourceInterfaceChecker` class + * removed `ResourceInterface::getResource()` method 2.8.0 ----- diff --git a/src/Symfony/Component/Config/Resource/DirectoryResource.php b/src/Symfony/Component/Config/Resource/DirectoryResource.php index 9407ba509a90..38413934f35d 100644 --- a/src/Symfony/Component/Config/Resource/DirectoryResource.php +++ b/src/Symfony/Component/Config/Resource/DirectoryResource.php @@ -42,7 +42,7 @@ public function __toString() } /** - * {@inheritdoc} + * @return string The file path to the resource */ public function getResource() { diff --git a/src/Symfony/Component/Config/Resource/FileExistenceResource.php b/src/Symfony/Component/Config/Resource/FileExistenceResource.php index ba1584638186..349402edf049 100644 --- a/src/Symfony/Component/Config/Resource/FileExistenceResource.php +++ b/src/Symfony/Component/Config/Resource/FileExistenceResource.php @@ -45,7 +45,7 @@ public function __toString() } /** - * {@inheritdoc} + * @return string The file path to the resource */ public function getResource() { diff --git a/src/Symfony/Component/Config/Resource/FileResource.php b/src/Symfony/Component/Config/Resource/FileResource.php index bd0ce03eafe8..54a974caef3d 100644 --- a/src/Symfony/Component/Config/Resource/FileResource.php +++ b/src/Symfony/Component/Config/Resource/FileResource.php @@ -44,7 +44,7 @@ public function __toString() } /** - * {@inheritdoc} + * @return string|false The canonicalized, absolute path to the resource or false if the resource does not exist. */ public function getResource() { diff --git a/src/Symfony/Component/Config/Resource/ResourceInterface.php b/src/Symfony/Component/Config/Resource/ResourceInterface.php index d27ca2e4f3ea..d98fd427a25e 100644 --- a/src/Symfony/Component/Config/Resource/ResourceInterface.php +++ b/src/Symfony/Component/Config/Resource/ResourceInterface.php @@ -30,17 +30,4 @@ interface ResourceInterface * @return string A string representation unique to the underlying Resource */ public function __toString(); - - /** - * Returns the tied resource. - * - * @return mixed The resource - * - * @deprecated since 2.8, to be removed in 3.0. As there are many different kinds of resource, - * a single getResource() method does not make sense at the interface level. You - * can still call getResource() on implementing classes, probably after performing - * a type check. If you know the concrete type of Resource at hand, the return value - * of this method may make sense to you. - */ - public function getResource(); } diff --git a/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php b/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php index 78799d7b9196..b01729cbff85 100644 --- a/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php +++ b/src/Symfony/Component/Config/Tests/Resource/ResourceStub.php @@ -31,9 +31,4 @@ public function isFresh($timestamp) { return $this->fresh; } - - public function getResource() - { - return 'stub'; - } } diff --git a/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php b/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php index b4178a50ee3e..bad199be94be 100644 --- a/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php +++ b/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php @@ -50,7 +50,7 @@ public function __toString() } /** - * {@inheritdoc} + * @return array An array with two keys: 'prefix' for the prefix used and 'variables' containing all the variables watched by this resource */ public function getResource() { diff --git a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php index 75093580b472..6bd7bb4c9ef3 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php @@ -288,10 +288,6 @@ public function isFresh($timestamp) return false; } - public function getResource() - { - } - public function __toString() { return '';