fix to make tests pass on full range of php versions