Skip to content

[3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8 #15929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

[3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8 #15929

wants to merge 4 commits into from

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Sep 26, 2015

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Deprecated in #15719.

@stof
Copy link
Member

stof commented Sep 26, 2015

shouldn't it also be removed from implementations ? Or are the existing resources needing it ?

@mpdude
Copy link
Contributor Author

mpdude commented Sep 26, 2015

Some tests rely on it and I don't know if users do.

It only does not make sense at the interface level because different implementations returned different types of values.

@Tobion
Copy link
Contributor

Tobion commented Sep 27, 2015

When the implementations are kept, the documentation would need to be updated. They use inheritdoc at the moment which doesn't work anymore.

Status: Needs Work

@Tobion
Copy link
Contributor

Tobion commented Sep 27, 2015

Several resources used for tests also implement getResource for no reason anymore.

@stof
Copy link
Member

stof commented Sep 27, 2015

this branch needs to be rebased too, as it conflicts with the current state

@mpdude
Copy link
Contributor Author

mpdude commented Sep 27, 2015

Rebased, cleaned up and fixed.

@@ -44,7 +44,7 @@ public function __toString()
}

/**
* {@inheritdoc}
* @return string The file path to the resource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently it can also return false when realpath returns an error. So I propose to throw an exception in the constructor in this case which is ok in 3.0 i guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, maybe. But that has nothing to do with this PR, or? Shouldn't that be a differnt PR possibly with a test?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with a different PR. But then the phpdoc is wrong at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Tobion
Copy link
Contributor

Tobion commented Sep 27, 2015

Why does DirectoryResource not call realpath but FileResource does, seems like a bug as well.

@mpdude
Copy link
Contributor Author

mpdude commented Sep 27, 2015

I don't know why DirectoryResource does not do that, and I also don't know what users expect from it. What I do know is that for ConfigCache we don't care :-).

@Tobion
Copy link
Contributor

Tobion commented Sep 27, 2015

👍

Status: Reviewed

@Tobion
Copy link
Contributor

Tobion commented Sep 27, 2015

Created #15946 for the remainder

@fabpot
Copy link
Member

fabpot commented Sep 28, 2015

Thank you @mpdude.

fabpot added a commit that referenced this pull request Sep 28, 2015
…which was deprecated in 2.8 (mpdude)

This PR was squashed before being merged into the 3.0-dev branch (closes #15929).

Discussion
----------

[3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Deprecated in #15719.

Commits
-------

7cef180 [3.0][Config] Remove ResourceInterface::getResource() which was deprecated in 2.8
@fabpot fabpot closed this Sep 28, 2015
@mpdude mpdude deleted the remove_deprecations branch September 28, 2015 21:05
@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants