- Issue created by @rp7
- Merge request !52Change return type declaration of ExternalEntityType::getLogger() to LoggerInterface → (Merged) created by rp7
- Issue was unassigned.
- Status changed to Needs review
2 months ago 2:45pm 19 September 2024 - 🇫🇷France guignonv
I reviewed the code quickly, I doubt it would work as expected. "LoggerInterface" is not defined (in the scope of the class). What is the expected behavior then? PHP will try to resolve the LoggerInterface by looking at \Drupal\external_entities\Entity\ for that interface right?
Did you forget to adduse Psr\Log\LoggerInterface;
Or was it on purpose?
- 🇧🇪Belgium rp7
use Psr\Log\LoggerInterface;
It's already in the file, see line #18.
I think you can ask yourself: why is there even a
getLogger()
method, while the class already has alogger()
method. - 🇫🇷France guignonv
I think you can ask yourself: why is there even a getLogger() method, while the class already has a logger() method.
Good question. My bad. Maybe I need some rest... (but not talking about "REST" services! :p )
OK, there should be some cleaning to do there and maybe to check also other similar issue on other classes. The logger service was not added the same way (at the same time) to every plugin and I tried to homogenize things but it looks like I failed. :-s I'm thinking of a new issue for that... or add it to the to-do list of the v3 roadmap.Anyway, merged! :)
- 🇧🇪Belgium rp7
Thx! Maybe a new issue would be useful for such a clean-up.
I think you forgot to merge this, though (:
- 🇫🇷France guignonv
I think you forgot to merge this, though (:
I did not. I tried to merge but did not notice there was an error. It was 2 commits behind so I updated the branch and it seems it has been merged now. Sorry for the inconvenience. :-]
Automatically closed - issue fixed for 2 weeks with no activity.