59626[TASK] Replace bool properties in ClassSchema with a BitSet
Commit message
Review
-
Code review CR +2 Done
- Susi Moog +2
- Oliver Klee +1
- Anja Leichsenring +1
-
Verified V +2 Done
- Susi Moog +2
- Anja Leichsenring +1
Issues 1
Files 1
Review log 1822
-
Alexander Schnitzler uploaded patch set 1 02/03/19, 17:33
-
TYPO3com voted on patch set 1 V +1 02/03/19, 17:46 Completed build in 12m 57s on Sun, 3 Feb, 06:46 PM Test Summary: 46409 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31998
-
Alexander Schnitzler wrote 02/04/19, 12:06
Topic set to extbase -
Andreas Wolf commented on patch set 1 02/05/19, 20:32
ClassSchema.php:704IMO this could also have the value to set (true/false) as the third parameter. That would save the rather complicated if-constructs in the constructor -
Alexander Schnitzler commented on patch set 1 02/06/19, 07:45
ClassSchema.php:704ReplyHmm, how would we call this param? bool $areYouSureYouWantToSetThisBit ? I see the problem with the ifs in the constructor but I also see issues with a guard clause in the method because then its complexity is unnecessarily increased. It provides multiple paths then and the method name does no necessarily reflect its function. It would rather be a setBitIfYouAreReallySure. What about a new method that acts as a guard clause? We could easily extract the bitmap methods in the future then if we need more bitmaps and want to make it a class. -
Andreas Wolf commented on patch set 1 02/06/19, 08:05
ClassSchema.php:704ReplyI would just call the parameter "value". But I think this is something where the semantics of the operation are not really clear. To "set" a bit could be interpreted as "set it to 1", but also to "set it to <value>", which could as well be "0" (i.e. "unset" that bit. Not sure if this ambiguity can actually be solved, except with a comment (which IMO is fine as long as we have this method private). -
Alexander Schnitzler commented on patch set 1 02/06/19, 08:54
ClassSchema.php:704ReplyOk, what do you think about implementing a small class here? I'd call it BitSet then, instead of BitMap as the latter is more used in graphic related code. There's also a BitSet class in Java, which I find quite good. We don't have method overloading but we could use optional params like you proposed or use a totally different method. Maybe set($bit) vs. setValue($bit, $value). wdyt? -
Alexander Schnitzler commented on patch set 1 02/06/19, 09:01
ClassSchema.php:704ReplyI just remembered the Enum classes we have in the core as well but then I had a look at them and saw, that we use reflection there and tbh I don't want to use that for a simple BitSet. I'll try to come up with a solid BitSet class before ad then we can use that here and for other cases in the core where Enum is used for bits but where its complexity is not needed. -
Alexander Schnitzler commented on patch set 1 V -1 02/06/19, 16:55
Let's wait for this patch. https://review.typo3.org/#/c/59650/ -
Alexander Schnitzler uploaded patch set 2 03/04/19, 12:22
-
TYPO3com voted on patch set 2 V +1 03/04/19, 12:34 Completed build in 11m 46s on Mon, 4 Mar, 01:34 PM Test Summary: 46641 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32505
-
Alexander Schnitzler uploaded patch set 3 03/08/19, 09:43
-
TYPO3com voted on patch set 3 V +1 03/08/19, 09:57 Completed build in 13m 21s on Fri, 8 Mar, 10:57 AM Test Summary: 47197 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32602
-
Oliver Klee voted on patch set 3 CR +1 03/08/19, 12:58
-
Susi Moog voted on patch set 3 CR +1 03/14/19, 07:08
-
Susi Moog voted on patch set 3 V +1 03/15/19, 13:32
-
Anja Leichsenring uploaded patch set 4 03/15/19, 15:31
-
Anja Leichsenring voted on patch set 4 V +1 CR +1 03/15/19, 15:32
-
Oliver Klee voted on patch set 4 CR +1 03/15/19, 15:36
-
Susi Moog voted on patch set 4 V +2 CR +2 03/15/19, 15:43
-
Susi Moog merged patch set 5 03/15/19, 15:43
-
TYPO3com voted on patch set 4 V +1 03/15/19, 15:58 Completed build in 19m 13s on Fri, 15 Mar, 04:58 PM Test Summary: 47215 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32766