Doctrine2 multi-platform support for spatial types and functions
Installs: 153 839
Open Issues: 7
- php: ^8.1
- ext-json: *
- ext-mbstring: *
- creof/geo-parser: ~2.2
- creof/wkb-parser: ~2.3
- doctrine/orm: ^2.8.0
- longitude-one/wkt-parser: ~1.0
- cache/array-adapter: ^1.1
- dg/bypass-finals: ^1.3
- friendsofphp/php-cs-fixer: ^3.0
- php-coveralls/php-coveralls: ^2.4
- phpmd/phpmd: ^2.10
- phpunit/phpcov: ^8.2
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
Doctrine-spatial is a doctrine extension. It implements spatial types and functions. As exemple, this extension can help you to know if your favorite superheroes is inside Gotham city.
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 in your repositories,
- contribute (and test)
The documentation contains a glossary of all available types and all available spatial functions.
This useful library was created by Derek J. Lambert. Alexandre Tranchant forked it from creof/doctrine-spatial because project seems to be non-active since 2017.
dev branch can be used, but be careful backward compatibility aren't warrantied.
main branch will be dedicated to fix issue.
The release 3.0 has been published during summer 2021.
The release 4.0 will be published during spring 2023 and compatibility with PHP7.4 and 8.0 will be abandoned because of
This doctrine extension is compatible with PHP 8.1+ Security fixes will follow the PHP Roadmap.
MySQL 5.7 and 8.0
A lot of functions change their names between these 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).
This spatial library is compatible with PostgreSql13. This library is tested with Postgis 3.1.
Migrating from creof/doctrine2-spatial
Update your composer.json to replace
Update the namespace, each
use CrEOF\Spatial\... by
I don't have enough money to buy the last edition of the ISO/IEC 13249-3:2016.
I only bought the previous version. This document is essential to know which functions are in Standard and which one
are specific to a database engine. If anyone has bought one and don't use it anymore, feel free to forward it. You can
contact me by mail, specified in
Microsoft SQL Server I'm searching help to create a docker delivering a Microsoft SQL Server service. So I'll be able to implement compatibility with this database server.
MariaDB I'm searching help to create a Github action delivering a MariaDB service, to launch test and determine if this library is compatible.