10000 [3.0][Config] Remove ResourceInterface::getResource() which was depre… · symfony/symfony@7cef180 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cef180

Browse files
mpdudefabpot
authored andcommitted
[3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8
1 parent 8d7b498 commit 7cef180

File tree

8 files changed

+5
-26
lines changed

8 files changed

+5
-26
lines changed

src/Symfony/Component/Config/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CHANGELOG
77
* removed `ReferenceDumper` class
88
* removed the `ResourceInterface::isFresh()` method
99
* removed `BCResourceInterfaceChecker` class
10+
* removed `ResourceInterface::getResource()` method
1011

1112
2.8.0
1213
-----

src/Symfony/Component/Config/Resource/DirectoryResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __toString()
4242
}
4343

4444
/**
45-
* {@inheritdoc}
45+
* @return string The file path to the resource
4646
*/
4747
public function getResource()
4848
{

src/Symfony/Component/Config/Resource/FileExistenceResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __toString()
4545
}
4646

4747
/**
48-
* {@inheritdoc}
48+
* @return string The file path to the resource
4949
*/
5050
public function getResource()
5151
{

src/Symfony/Component/Config/Resource/FileResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __toString()
4444
}
4545

4646
/**
47-
* {@inheritdoc}
47+
* @return string|false The canonicalized, absolute path to the resource or false if the resource does not exist.
4848
*/
4949
public function getResource()
5050
{

src/Symfony/Component/Config/Resource/ResourceInterface.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,4 @@ interface ResourceInterface
3030
* @return string A string representation unique to the underlying Resource
3131
*/
3232
public function __toString();
33-
34-
/**
35-
* Returns the tied resource.
36-
*
37-
* @return mixed The resource
38-
*
39-
* @deprecated since 2.8, to be removed in 3.0. As there are many different kinds of resource,
40-
* a single getResource() method does not make sense at the interface level. You
41-
* can still call getResource() on implementing classes, probably after performing
42-
* a type check. If you know the concrete type of Resource at hand, the return value
43-
* of this method may make sense to you.
44-
*/
45-
public function getResource();
4633
}

src/Symfony/Component/Config/Tests/Resource/ResourceStub.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,4 @@ public function isFresh($timestamp)
3131
{
3232
return $this->fresh;
3333
}
34-
35-
public function getResource()
36-
{
37-
return 'stub';
38-
}
3934
}

src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __toString()
5050
}
5151

5252
/**
53-
* {@inheritdoc}
53+
* @return array An array with two keys: 'prefix' for the prefix used and 'variables' containing all the variables watched by this resource
5454
*/
5555
public function getResource()
5656
{

src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,6 @@ public function isFresh($timestamp)
288288
return false;
289289
}
290290

291-
public function getResource()
292-
{
293-
}
294-
295291
public function __toString()
296292
{
297293
return '';

0 commit comments

Comments
 (0)
0