43536[!!!][BUGFIX] Allow checking conditions for "empty" values (not set or zero)
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 5
- typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php+3 −3
- typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php+7 −6
- typo3/sysext/core/Documentation/Changelog/master/Breaking-46935-AllowCheckingConditionsForEmptyValuesNotSetOrZero.rst3new+24 −0
- typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php1+71 −0
- typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php+3 −3
Review log 25
-
Stefan Neufeind uploaded patch set 1 09/24/15, 18:49
-
Oliver Hader uploaded patch set 2 10/09/15, 00:21
-
Markus Klein commented on patch set 2 10/15/15, 22:34
AbstractConditionMatcherTest.php:133invokeArgs -
Stefan Neufeind commented on patch set 2 10/15/15, 23:23
Breaking-46935-AllowCheckingConditionsForEmptyValuesNotSetOrZero.rst:9ReplyNote we talk about number-comparisons! the method is "compareNumber". -
Benni Mack commented on patch set 2 11/30/15, 21:51
This is rather a breaking change, as we change the expected behaviour. Should go into v8 only IMHO. -
Stefan Neufeind commented on patch set 2 11/30/15, 22:28
Benni, do I overlook something? We're talking about number-comparisons. And we're changing a behaviour that was not defined (or not working) before while the rest continues to function as before, or not? But after all, I will accept your decision on this. -
Benni Mack commented on patch set 2 12/04/15, 13:19
Just saying... We have installations where we explicitly check for [globalVar = GP:type = ] [else] ... do my stuff [global] as this bug was present - but your patches might break a lot of existing websites - thus it's breaking (as you marked it already) - so I stated "we should wait until we branched off v7 to only get it in v8". -
Stefan Neufeind commented on patch set 2 12/04/15, 15:11
Thanks for the hint. I haven't seen that code with the else-workaround yet - and solved my cases different since the zero-compare didn't work. Let's look at it then for CMS 8. -
Benni Mack wrote 03/06/16, 00:21
Patch set 3: Published edit on patch set 2. -
Benni Mack voted on patch set 3 CR +1 03/06/16, 00:21
-
Markus Klein voted on patch set 3 CR +1 03/10/16, 00:02
-
Andreas Kienast wrote 03/11/16, 07:38
Patch set 4: Commit message was updated. -
Andreas Kienast commented on patch set 4 CR -1 03/11/16, 07:39
Breaking-46935-AllowCheckingConditionsForEmptyValuesNotSetOrZero.rst:30Is this todo or is there no migration possible? If the latter, please write a meaningful sentence. -
Benni Mack commented on patch set 5 03/31/16, 18:05
Published edit on patch set 4. -
Susi Moog voted on patch set 5 CR +1 V +1 03/31/16, 20:17
-
Morton Jonuschat voted on patch set 5 CR +1 V +1 03/31/16, 20:19
-
Susi Moog voted on patch set 5 CR 0 V 0 03/31/16, 20:25
-
Oliver Hader commented on patch set 5 CR -1 03/31/16, 20:27
I'd like to test that -
Morton Jonuschat voted on patch set 5 CR 0 V 0 03/31/16, 20:27
-
Oliver Hader commented on patch set 5 V -1 03/31/16, 20:36
This is not a bugfix. This is rather a feature, since it enforces weak type casting on zero and empty strings. Currently, without the patch, checking for "= 0" and "= " already works if the accordant argument values is "0" or empty. The current solution thus allows to check for either of both scenarios. In general I don't see a need for this feature. -
Susi Moog commented on patch set 5 03/31/16, 20:38
what does not work is just 0 = '' and '' = 0, which is strictly speaking correct. from what the tests say you could chain conditions (checking for '' OR checking for 0) to achieve what you want. or can't you? -
Oliver Hader commented on patch set 5 03/31/16, 20:45
See my notes in the Forge issue: https://forge.typo3.org/issues/46935#note-10 A check for either zero or empty values currently can be done with: [globalVar = GP:test = 0, GP:test =] This is not a bugfix!! -
Oliver Hader voted on patch set 5 CR -2 03/31/16, 20:45
-
Christian Kuhn commented on patch set 5 04/01/16, 09:15
i'm totally with olly here and suggest to abandon this patch for now. in case anyone comes up with a new solution, this patch could be used as inspiration. -
Christian Kuhn abandoned the change 04/01/16, 09:15
Breaking-46935-AllowCheckingConditionsForEmptyValuesNotSetOrZero.rst:9