Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
General code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2016 at 08:24 UTC
Updated:
31 Oct 2016 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sebas5384 commentedI can confirm this warning is happening.
Comment #3
rbayliss commentedYeah, I can confirm. Here's a stab at fixing it.
Comment #4
borisson_Not sure this change is needed.
Comment #5
rbayliss commentedI think you're just talking about the last one, right? (not explicitly passing in $this->entityTypeManager in the trait). The reason this change was made is that there is no longer an entityTypeManager on the trait - it belongs to EntityForm, and the trait doesn't have any knowledge of it since you could easily implement this trait on a non-EntityForm class. If we need to be explicit there, we should add an abstract getEntityTypeManager() to the trait and implement it on the classes that use the trait. Rerolling with this change.
Comment #6
borisson_@rbayliss, not sure why you made an abstract function on the trait and you didn't just put the method in the trait? Anyway - not too fussed about that and it does resolve the issue. So setting to RTBC.
Comment #7
tregismoreira commentedThe patch #5 worked for me. Thanks! ;)
Comment #8
drunken monkeyAh, yes, that's a pretty stupid problem in PHP 5. It's fixed in PHP 7, but that unfortunately doesn't help us much for the module. We've run into it before. Thanks for reporting it!
The proposed solution is way too complicated, though – why not just this? (I would even argue the
isset()check isn't needed, but it's not much of a problem either way.)Comment #9
borisson_Yeah, that does look a lot simpler!
Comment #10
mkalkbrennerThis patch reduces the amount of fails at https://travis-ci.org/mkalkbrenner/search_api_integration_tests/builds/1... a lot compared to https://travis-ci.org/mkalkbrenner/search_api_integration_tests/builds/1...
Can we commit it soon?
Comment #11
mkalkbrennerwithout patch:
with patch applied, all exceptions are gone:
Comment #12
drunken monkeyGood to hear, thanks for reviewing!
Committed.
Thanks again, everyone!