Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
234 changed files
with
5,645 additions
and
4,238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.phpcs-cache | ||
.php_cs.cache | ||
composer.lock | ||
phpunit.xml | ||
vendor/ | ||
composer.lock* | ||
doctrine2-spatial.iml | ||
.idea* | ||
.idea/* | ||
/nbproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('var') | ||
->exclude('vendor') | ||
; | ||
|
||
$header = <<<EOF | ||
Copyright (C) 2020 Alexandre Tranchant | ||
Copyright (C) 2015 Derek J. Lambert | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
EOF; | ||
|
||
return PhpCsFixer\Config::create() | ||
// ->setCacheFile(__DIR__.'/.php_cs.cache') | ||
->setRules([ | ||
'@DoctrineAnnotation' => true, | ||
'@PhpCsFixer' => true, | ||
'@Symfony' => true, | ||
'@PHPUnit60Migration:risky' => true, | ||
'@PHP70Migration' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP73Migration' => true, | ||
// 'strict_param' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'dir_constant' => true, | ||
'ereg_to_preg' => true, | ||
'header_comment' => [ | ||
'comment_type' => 'PHPDoc', | ||
'header' => $header, | ||
'location' => 'after_open', | ||
'separate' => 'bottom' | ||
], | ||
// 'date_time_immutable' => true, | ||
// 'declare_strict_types' => true, | ||
'is_null' => true, | ||
'mb_str_functions' => true, | ||
'modernize_types_casting' => true, | ||
'no_unneeded_final_method' => true, | ||
// 'no_alias_functions' =>true, | ||
'ordered_interfaces' => [ | ||
'direction' => 'ascend', | ||
'order' => 'alpha', | ||
], | ||
'ordered_class_elements' => [ | ||
'order' => [ | ||
'use_trait', | ||
'constant_public', 'constant_protected', 'constant_private', 'constant', | ||
'property_public_static', 'property_protected_static', 'property_private_static', 'property_static', | ||
'property_public', 'property_protected', 'property_private', 'property', | ||
'construct', 'destruct', | ||
'phpunit', | ||
'method_public_static', 'method_protected_static', 'method_private_static', 'method_static', | ||
'method_public', 'method_protected', 'method_private', 'method', 'magic' | ||
], | ||
'sortAlgorithm' => 'alpha' | ||
], | ||
'single_line_throw' => false | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
(this is a work in progress) | ||
Contributing | ||
============ | ||
|
||
- Code formatting MUST follow PSR-2. | ||
- Issues SHOULD include code and/or data to reproduce the issue. | ||
- PR's for issues SHOULD include test(s) for issue. | ||
- PR's SHOULD have adequate documentation (commit messages, comments, etc.) to readily convey what and/or why. | ||
- Code SHOULD attempt to follow [Object Calisthenics](http://www.xpteam.com/jeff/writings/objectcalisthenics.rtf) methodology. | ||
Quality of code is auto-verified by php-cs-fixer, php code sniffer and php mess detector. | ||
|
||
Before a commit, launch the quality script: | ||
|
||
```bash | ||
composer quality | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
# Doctrine2-Spatial | ||
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. | ||
|
||
[![Build Status](https://travis-ci.org/creof/doctrine2-spatial.svg?branch=master)](https://travis-ci.org/creof/doctrine2-spatial) | ||
[![Code Climate](https://codeclimate.com/github/creof/doctrine2-spatial/badges/gpa.svg)](https://codeclimate.com/github/creof/doctrine2-spatial) | ||
[![Coverage Status](https://coveralls.io/repos/creof/doctrine2-spatial/badge.svg?branch=master&service=github)](https://coveralls.io/github/creof/doctrine2-spatial?branch=master) | ||
[![Downloads](https://img.shields.io/packagist/dm/creof/doctrine2-spatial.svg)](https://packagist.org/packages/creof/doctrine2-spatial) | ||
[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/creof/doctrine2-spatial) | ||
## Project origins | ||
This useful project was created by Derek J. Lambert. | ||
Alexandre Tranchant forked it from [creof/doctrine2-spatial](https://github.com/creof/doctrine2-spatial) | ||
because project seems to be unactive since 2017. | ||
|
||
## Developments in progress | ||
This fork will upgrade this package to the last doctrine version and the [PHP supported versions](https://www.php.net/supported-versions.php). | ||
|
||
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. | ||
Feel free to [contribute](./CONTRIBUTING.md)! | ||
|
||
Documentation can be found at [here](./doc/index.md) | ||
## Current status | ||
[![Build Status](https://travis-ci.org/Alexandre-T/doctrine2-spatial.svg?branch=master)](https://travis-ci.org/Alexandre-T/doctrine2-spatial) | ||
[![Code Climate](https://codeclimate.com/github/Alexandre-T/doctrine2-spatial/badges/gpa.svg)](https://codeclimate.com/github/Alexandre-T/doctrine2-spatial) | ||
[![Coverage Status](https://coveralls.io/repos/Alexandre-T/doctrine2-spatial/badge.svg?branch=master&service=github)](https://coveralls.io/github/Alexandre-T/doctrine2-spatial?branch=master) | ||
[![Downloads](https://img.shields.io/packagist/dm/Alexandre-T/doctrine2-spatial.svg)](https://packagist.org/packages/Alexandre-T/doctrine2-spatial) | ||
|
||
## composer.json | ||
```javascript | ||
{ | ||
### [Documentation](./doc/index.md) | ||
|
||
### Installation | ||
|
||
Update your composer.json to add this package: | ||
```yaml | ||
"require": { | ||
... | ||
"creof/doctrine2-spatial": "~1" | ||
.... | ||
"alexandret/doctrine2-spatial": "~1" | ||
.... | ||
} | ||
``` | ||
|
||
You will also have to change the version requirement of doctrine to at least 2.3: | ||
```javascript | ||
|
||
```yaml | ||
"doctrine/orm": ">=2.3", | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.