No one expects the manipulation methods of AxisAlignedBB to alter the AABB directly. Allowing this is also a headache.
We already don't use Vector3 as mutable since PM 4.0.
In PHP 8.1, it's possible to use readonly to make all of the properties immutable. In 8.2, we'll be able to make whole classes readonly, but that also prevents inheritance by non-readonly classes.
No one expects the manipulation methods of AxisAlignedBB to alter the AABB directly. Allowing this is also a headache.
We already don't use Vector3 as mutable since PM 4.0.
In PHP 8.1, it's possible to use
readonly
to make all of the properties immutable. In 8.2, we'll be able to make whole classes readonly, but that also prevents inheritance by non-readonly classes.