Doctrine2 multi-platform support for spatial types and functions. Currently MySQL and PostgreSQL with PostGIS are supported. Could potentially add support for other platforms if an interest is expressed.
The new documentation explain how to:
- install this doctrine extension,
- configure this extension,
- create spatial entities,
- use spatial functions into your repositories,
- contribute (and test)
The documentation contains a glossary of all available types and all available spatial functions.
This useful project was created by Derek J. Lambert. Alexandre Tranchant forked it from creof/doctrine2-spatial because project seems to be non-active since 2017.
The master release can be used, but be careful of backward incompatibility.
This fork will upgrade this package to the last doctrine version and the PHP supported versions. I would like to release the 2.0.0 version at the end of March.
This doctrine extension is compatible with PHP 7.2, 7.3 and 7.4 Security fixes will follow the PHP Roadmap.
This extension should be used with the actual doctrine stable version: 2.7 Continuous integration tests libraries with 2.8.x-dev version. We ONLY try to stay compatible with this version, currently.
A lot of functions change their names between this two versions. The MySQL 5.7 deprecated functions are not implemented.
This version is NOT compatible with MariaDB version. Some spatial functions seems to work but their results are different from MySQL version (StContains function is a good example). You can contribute, but I suggest to avoid MySql and MariaDb servers, because of their shortcomings and vulnerabilities.
You should use PostgreSql server. This is a most powerful server and this is a "true" database server. It preserves data integrity and respect atomicity concepts. This spatial library is compatible with PostgreSql9.6, PostgreSql10 and PostgreSql11. I tested it with PostgreSql12. But I do not know how to install a PostgreSql 12 server on travis to be sure that library stay compatible. Be careful, this library is only tested with Postgis 2.5+. It is not tested with Postgis3.0, but feel free to contribute by updating the travis configuration