The filter is using types as a bitmap, but then adding those values rather than using boolean math. This means initializing the filter with an array of the same type more than once, or the same type in different representations will result in completely unintended type.
$filter = new Boolean([Boolean::TYPE_BOOLEAN, Boolean::TYPE_BOOLEAN]);
or
$filter = new Boolean(['boolean', Boolean::TYPE_BOOLEAN]);
or
$filter = new Boolean(['boolean', 'boolean']);
The same holds true for every defined constant as well as any strings that map to those constants. In the examples above, rather than the expected Boolean type on the filter, it will be seen as though the user specified the integer type. This happens with any combination of any of the types as long as there are one or more duplicated representations of a particular type.
The filter is using types as a bitmap, but then adding those values rather than using boolean math. This means initializing the filter with an array of the same type more than once, or the same type in different representations will result in completely unintended type.
$filter = new Boolean([Boolean::TYPE_BOOLEAN, Boolean::TYPE_BOOLEAN]);
or
$filter = new Boolean(['boolean', Boolean::TYPE_BOOLEAN]);
or
$filter = new Boolean(['boolean', 'boolean']);
The same holds true for every defined constant as well as any strings that map to those constants. In the examples above, rather than the expected Boolean type on the filter, it will be seen as though the user specified the integer type. This happens with any combination of any of the types as long as there are one or more duplicated representations of a particular type.
PR with fix incoming shortly.