Commit 4f558c9
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.1 parent 747eee0 commit 4f558c9
3 files changed
Lines changed: 39 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
161 | 172 | | |
0 commit comments