Skip to content

Small code tweaks #2046

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

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EventListener/WriteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.

{
private $dataPersister;

Expand Down
2 changes: 1 addition & 1 deletion src/HttpCache/EventListener/AddTagsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ public function onKernelResponse(FilterResponseEvent $event)
return;
}

$event->getResponse()->headers->set('Cache-Tags', implode(',', $resources));
$response->headers->set('Cache-Tags', implode(',', $resources));
}
}