42983[BUGFIX] Fix Liskov substitution violation in PackageManager
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Martin Helmich +1
- Markus Klein +1
- Nicole Hummel +1
- Helmut Hummel +1
-
Verified V +2
- Christian Kuhn +2
- Nicole Hummel +1
- Helmut Hummel +1
Files 3
Review log 34
Show 9 earlier messages
-
Martin Helmich uploaded patch set 1 09/02/15, 13:37
-
Benni Mack commented on patch set 1 09/02/15, 13:43
This is also a problem for PHP7 btw. -
Stefan Neufeind commented on patch set 1 CR +1 09/08/15, 09:23
I'd be fine with such a solution for 6.2. Not an issue on master, since it doesn't extend from a Flow-class there. -
Thorsten Bringewatt voted on patch set 1 CR +1 09/14/15, 14:12
-
Stephan Großberndt voted on patch set 1 CR +1 09/15/15, 11:40
-
Nicole Hummel commented on patch set 1 CR -1 09/15/15, 11:41
@Benni: Shouldn't we adjust the method name in master first? -
Benni Mack commented on patch set 1 CR -1 09/15/15, 11:41
In general this is OK, but let's have Helmut to look over that patch. -
Alexander Stehlik commented on patch set 1 CR +1 09/15/15, 11:48
@Nicole: I can not find the method in current master. -
Martin Helmich commented on patch set 1 09/15/15, 11:55
> @Benni: Shouldn't we adjust the method name in master first? @Nicole, this issue only occurs in the 6.2 branch; in later branches the PackageManager is implemented differently.
-
Nicole Hummel commented on patch set 1 09/17/15, 14:22
I just took another look into the issue again. I don't know if it is worth to change the implementation here. There are several other places, where the method parameters are changed from parent to child class. I can't even load backend nor frontend without strict warnings. -
Stephan Großberndt commented on patch set 1 CR 0 09/17/15, 14:33
If TYPO3 6.2 is going to be supported on PHP7 it's worth it, otherwise not IMHO -
Nicole Hummel commented on patch set 1 09/17/15, 14:34
@Stephan but then we need to fix all places not only one special, don't we? -
Stephan Großberndt commented on patch set 1 09/17/15, 14:34
exactly -
Stephan Großberndt commented on patch set 1 09/17/15, 14:35
this would just be a first step -
Helmut Hummel voted on patch set 1 CR +1 V +1 10/01/15, 00:03
-
Helmut Hummel commented on patch set 1 10/01/15, 00:05
low impact change, fine with me -
Stefan Neufeind commented on patch set 1 10/01/15, 00:09
@Benni: Helmut voted now, as you requested. Could you please re-consider your vote now? -
Nicole Hummel voted on patch set 1 CR 0 10/01/15, 00:14
-
Helmut Hummel commented on patch set 1 CR -1 V 0 10/01/15, 00:42
Ok, after giving this a second thought, I think it is not worth the hassle. Most likely 6.2 will not be able to support PHP 7, and we will not take the effort to do so. If I'm mistaken with that, we should still gather all fixes and commit them altogether and not as a single change alone. -
Helmut Hummel commented on patch set 1 10/01/15, 00:43
-> low impact, but no benefit, so rather no change … -
Martin Helmich commented on patch set 1 10/06/15, 11:58
I'm starting to grow really frustrated about this. First of all, I feel that the debate around this seemingly simple change has grown way out of proportion. All I saw was a warning message that annoyed the hell out of me and that I wanted gone. And now there's a month-long debate about three lines of changed code. >Most likely 6.2 will not be able to support PHP 7, and we will not take the effort to do so. I did never intend or expect for this change to turn into a political discussion about PHP 7 compatibility (which I really do not care about right now). All this change was intended to do was to fix a particularly annoying warning (which I believe to be triggered for a good reason as it indicates a serious code smell in that class). >but no benefit I strongly disagree. I do agree that this is a really minor change. It does not solve all problems with the PHP strict mode or PHP 7 compatibility (and doesn't attempt to). Then, on the other hand, "benefit" may be a fairly subjective thing. This change does fix one particular issue that occurs on literally *every* request. It is massively annoying for developers that have strict mode enabled. Am I supposed to simply turn down my error reporting levels until TYPO3 keeps quiet, at the danger of missing issues in my own application? Fixing this issue (for me) is a benefit -- admittedly, not a huge one, but also not insignificant. >not worth the hassle It must have taken you longer to write that comment than it would have taken to actually submit this change. So please forgive me if I cannot follow that particular train of thought. I'm completely aware that there might be technical implications attached to this change that I do not see and that might actually speak against this change. I am fully prepared to discuss these if you see any, and find another way to fix this issue if necessary. Apart from that, I find it strange that a small, but self-contained and atomic fix is rejected because it "does not do enough". Yes, this change does not make TYPO3 compatible with PHP 7. It's not supposed to. But does it diminish the value of this change in itself just because there are even more issues that could be fixed? As an occasional, once-in-a-blue-moon contributor, this feels very off-putting and discouraging to me. Sorry for the rant. Maybe you can help me understand your reasoning in rejecting changes like these? -
Ruven Fehling voted on patch set 1 CR +1 10/06/15, 12:30
-
Nicole Hummel commented on patch set 1 10/06/15, 13:12
@Martin: Can you explain your server environment to me? I really tried to reproduce your issue. I have error_reporting = E_ALL enabled in my php.ini but at the very beginning of every (frontend) call, TYPO3 sets error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED)) (in \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::initializeBasicErrorReporting) which prevents any strict reporting for me. Please be so kind to explain why you see strict messages in your error log -
Martin Helmich commented on patch set 1 10/06/15, 13:45
@Nicole We're using a custom error_handler function that handles *all* errors and is registered in the AdditionalConfiguration.php. We do this because we have a lot of custom code running in extensions for which we actually *want* notices and strict errors to be reported. -
Nicole Hummel commented on patch set 1 10/06/15, 13:51
@martin: but the errorHandler stuff is set after the packagerManager is initialized. So I still don't understand why the error is triggered as the error_reporting is turned of before? -
Helmut Hummel commented on patch set 1 10/06/15, 14:57
@Martin: we do not want to put you off or block simple changes. If it is a fix, as important as you describe, we will of course change it. If it only moves the problem from one side to another and by that uncover further issues which we cannot tackle, then we might abstain from this change. I now also tried to reproduce this and failed. So can you please provide some more steps how to reproduce, so we can get a better overview on the impact? Thanks for your patience! -
Helmut Hummel uploaded patch set 2 10/07/15, 12:13
-
Helmut Hummel commented on patch set 2 CR +1 V +1 10/07/15, 12:28
Here are my investigations: It is possible to reproduce it when registering an own error_handler with set_error_handler() in AdditionalConfiguration.php (or for simplicity by removing E_STRICT from SystemEnvironmentBuilder::initializeBasicErrorReporting()) Like Nicole pointed out, this would be only a small change in a list of many needed changes to fix all issues in the backend. However, when fixing this, we get a PHP strict error free front end request, which is a benefit of its own. My suggestion is to fix it like I proposed, by doing a class_alias for the class loader class (same as we do for the bootstrap class). This way we do not need to change the method signature, and do not risk breaking something and at the same time enjoy the benefit for frontend requests in this special edge cases mentioned above. For the future, I'd abstain from further fixes of strict errors in the 6.2 branch and also do not do other work on PHP 7 compatibility. -
Nicole Hummel commented on patch set 2 CR +1 V +1 10/07/15, 12:49
@Helmut: Thank you for further investigations. The provided patch seems to be more complicated but prevents a flow function becoming public available. IMHO this ensures functionality for all kind of extensions which might hook into the bootstrap. And thanks for clarification that this is the only strict error for frontend requests. -
Markus Klein voted on patch set 2 CR +1 10/07/15, 12:53
-
Martin Helmich commented on patch set 2 CR +1 10/07/15, 12:57
+1 I really like this solution! -
Christian Kuhn voted on patch set 2 CR +2 V +2 10/08/15, 11:27
-
Helmut Hummel commented on patch set 2 10/08/15, 11:27
Thanks Christian! -
Helmut Hummel merged patch set 2 10/08/15, 11:27