maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

PHP 5.3 not supported due to JsonSerializable (5.4+) dependency in GeoIp2\Model\AbstractModel #21

Closed colinrotherham closed 10 years ago

colinrotherham commented 10 years ago

I'm getting a blank screen (no stack trace or error log) when calling the various \GeoIp2\Database\Reader methods (city/country etc) with PHP 5.3.28.

PHP > 5.4 is working as expected.

Can you confirm if PHP 5.3 is supported as stated in the README?

Thanks

colinrotherham commented 10 years ago

It looks like the class Autoloader I was using was squashing error output.

In my case, PHP 5.3 support is broken due to the JsonSerializable (5.4+) dependency in GeoIp2\Model\AbstractModel.

oschwald commented 10 years ago

We include a shim class in compat/ for 5.3. This package is tested and works on 5.3 when that shim class is loaded (as it is with Composer). Perhaps we should add a comment to that effect for people using other autoloaders.