44137[TASK] Avoid redundant condition blocking arrays as form object
Commit message
Review
-
Code review CR +2
- Andreas Kienast +2
- Oliver Eglseder +1
-
Verified V +2
- Andreas Kienast +2
- Oliver Eglseder +1
Issues 1
Files 2
Review log 18
-
Claus Due uploaded patch set 1 10/18/15, 00:09
-
Claus Due uploaded patch set 2 10/18/15, 18:26
-
Mathias Brodala commented on patch set 2 10/19/15, 08:23
Could you add a unit test with a multi-dimensional value? -
Stefan Neufeind commented on patch set 2 CR +1 10/20/15, 04:56
ack. Looked up details about ObjectAccess::getPropertyPath(). -
Claus Due commented on patch set 2 10/24/15, 16:54
> Could you add a unit test with a multi-dimensional value? Theoretically, yes - but formally that would be testing a unit belonging to ObjectAccess::getPropertyPath which already has its own test for accessing multidimensional properties. IMHO this is not something we should be testing in this unit. -
Claus Due uploaded patch set 3 10/24/15, 16:56
-
Claus Due commented on patch set 3 10/24/15, 16:56
Rebased -
Stefan Neufeind commented on patch set 3 CR +1 10/25/15, 18:57
ack, same behaviour is done in ObjectAccess::getPropertyInternal(). So it is redundant here as Claus wrote. -
Mathias Brodala commented on patch set 3 10/26/15, 08:08
I was thinking about a test which ensures there's no regression in the future but you are right that the new behavior is already covered. -
Frank Nägler commented on patch set 3 CR +1 10/26/15, 08:25
on reading +1 looks like it make sense. But can we add some unit tests for this method? The current tests does not contains any tests for the getPropertyValue method. -
Andreas Kienast voted on patch set 3 CR +1 10/26/15, 09:06
-
Oliver Hader commented on patch set 3 CR +1 10/26/15, 13:30
Unit tests would be great here, especially to document the new behavior on accessing an array with the property name "some.property" which is considered as segment in a nested structure now instead of the current direct index-access $array['some.property']. -
Tymoteusz Motylewski commented on patch set 3 11/14/15, 11:07
Claus, It looks like a nice improvement. Do you have any code example or test extension to ease up testing? -
Claus Due commented on patch set 3 11/14/15, 11:57
@Tymoteusz I'm a little stuck between the wishes of commenters in this thread and the actual situation: the unit we would be testing is not part of this class and is already thoroughly tested in the ObjectAccessorTest. TBH I don't see this as needing a unit test. The other units involved are already tested and this change is about *removing* code that wasn't tested before, either. -
Oliver Eglseder uploaded patch set 4 11/14/15, 12:47
-
Oliver Eglseder commented on patch set 4 CR +1 V +1 11/14/15, 12:51
I agree with Oliver Hader and Mathias Brodala, therefore i've added the test, that will fail without this patch to prevent regression. -
Andreas Kienast voted on patch set 4 CR +2 V +2 11/14/15, 16:42
-
Gerrit merged patch set 4 11/14/15, 16:42