Skip to content
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

Small code tweaks #2046

Merged
merged 1 commit into from
Jun 27, 2018
Merged

Small code tweaks #2046

merged 1 commit into from
Jun 27, 2018

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Jun 26, 2018

Add final to the WriteListener
Don't call getResponse in the cache, use the variable instead

@jewome62 jewome62 mentioned this pull request Jun 26, 2018
@@ -22,7 +22,7 @@
* @author Kévin Dunglas <dunglas@gmail.com>
* @author Baptiste Meyer <baptiste.meyer@gmail.com>
*/
class WriteListener
final class WriteListener
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we really do this? It's a BC break, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes! I think we did it in another file recently and we accepted it anyway.

Copy link
Member

Choose a reason for hiding this comment

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

We considered it as a bug fix... Because our policy is to make all classes final by default. But it's border line I agree.

What I suggest: make it final, if someone complain switch to @final. It's a brand new class, the chances somebody actually extended it are low.

@soyuka soyuka changed the base branch from master to 2.2 June 26, 2018 13:42
@teohhanhui teohhanhui merged commit 755d192 into api-platform:2.2 Jun 27, 2018
@teohhanhui
Copy link
Contributor

Thanks @soyuka

@soyuka soyuka deleted the small-tweaks branch June 27, 2018 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants