Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge options to use snak hashes into one (#233)
* Merge options to use snak hashes into one Suppressing snak hashes was initially added as a single option in 6563985, but then split up into three options in 679774d, since the previous lib serializer included qualifier hashes but not main snak or reference hashes, and the goal was to migrate from that serializer to this one with absolutely no change in the output. Now that this migration is done, we can merge the three options into one again, since it’s hardly useful to have snak hashes for some snaks but not others: either include all hashes, or omit all of them. This is implemented as an extra constant, which is the bitwise union of the three existing ones, for backwards compatibility. With the next major release, the three old options should be removed and the single option made functional instead (with a single method shouldSerializeSnaksWithHash()). Since we still need to support PHP 5.5, the constant can’t be computed from the other constant. Instead, a test checks that it is the bitwise union of the other constants, as intended.
- Loading branch information