Closed (duplicate)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Mar 2017 at 19:38 UTC
Updated:
18 Dec 2018 at 12:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mgoncalves commentedComment #4
megachrizUsing
t()isn't strictly wrong, this function is not deprecated, but it is encouraged to not use it when possible. The reason behind replacingt()with something else is to make it unit testable.$this->t()cannot be used in static functions. Instead a new TranslatableMarkup object should be created.The PubSubHubbub class does not have a
t()method. In order to get one, it should use the StringTranslationTrait.Comment #5
megachrizIf applying the best practises anyway, the PubSubHubbub class should also get the string translation service injected. This service can be passed by specifying it in feeds.services.yml: add an argument for the service 'feeds.pubsubhubbub'.
Comment #6
megachrizComment #7
megachrizComment #8
megachrizThis got fixed in #3021003: use function t() on EventSubscriber/PubSubHubbub.php.