only set deprecated attribute in older php versions so it does not break the test in php 5.6(+)