Skip to content

Commit

Permalink
Remove Doctrine
Browse files Browse the repository at this point in the history
This will be moved to a separate package.
  • Loading branch information
BenMorel committed Aug 17, 2021
1 parent 4769a5d commit 640d12b
Show file tree
Hide file tree
Showing 63 changed files with 1 addition and 1,992 deletions.
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"ext-json": "*",
"ext-sqlite3": "*",
"brick/reflection": "~0.2.0 || ~0.3.0 || ~0.4.0",
"doctrine/orm": "^2.0",
"doctrine/data-fixtures": "^1.0",
"doctrine/cache": "^1.11",
"phpunit/phpunit": "^8.0 || ^9.0",
"php-coveralls/php-coveralls": "^2.0",
"vimeo/psalm": "4.3.1"
Expand Down
68 changes: 1 addition & 67 deletions phpunit-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,9 @@
use Brick\Geo\Engine\PDOEngine;
use Brick\Geo\Engine\SQLite3Engine;
use Brick\Geo\Engine\GEOSEngine;
use Doctrine\DBAL\Types\Type;

(function() {
/** @var \Composer\Autoload\ClassLoader $classLoader */
$classLoader = require 'vendor/autoload.php';

// Add namespace for doctrine base tests
$classLoader->addPsr4('Doctrine\\Tests\\', [
__DIR__ . '/vendor/doctrine/orm/tests/Doctrine/Tests',
__DIR__ . '/vendor/doctrine/dbal/tests/Doctrine/Tests'
]);
$classLoader->loadClass('Doctrine\Tests\DbalFunctionalTestCase');
$classLoader->loadClass('Doctrine\Tests\DBAL\Mocks\MockPlatform');

Type::addType('geometry', Types\GeometryType::class);
Type::addType('linestring', Types\LineStringType::class);
Type::addType('multilinestring', Types\MultiLineStringType::class);
Type::addType('multipoint', Types\MultiPointType::class);
Type::addType('multipolygon', Types\MultiPolygonType::class);
Type::addType('point', Types\PointType::class);
Type::addType('polygon', Types\PolygonType::class);
require 'vendor/autoload.php';

$engine = getenv('ENGINE');

Expand Down Expand Up @@ -57,30 +39,6 @@

echo 'MySQL version: ' . $version . PHP_EOL;

// Connect data for doctrine integration tests
$GLOBALS['db_type'] = 'pdo_mysql';
$GLOBALS['db_host'] = '127.0.0.1';
$GLOBALS['db_port'] = 3306;
$GLOBALS['db_username'] = 'root';
$GLOBALS['db_password'] = '';
$GLOBALS['db_name'] = 'geo_tests';

$GLOBALS['tmpdb_type'] = 'pdo_mysql';
$GLOBALS['tmpdb_host'] = '127.0.0.1';
$GLOBALS['tmpdb_port'] = 3306;
$GLOBALS['tmpdb_username'] = 'root';
$GLOBALS['tmpdb_password'] = '';
$GLOBALS['tmpdb_name'] = 'geo_tests_tmp';

// doctrine/dbal >= 2.13.0
$GLOBALS['db_driver'] = 'pdo_mysql';
$GLOBALS['db_user'] = 'root';
$GLOBALS['db_dbname'] = 'geo_tests';

$GLOBALS['tmpdb_driver'] = 'pdo_mysql';
$GLOBALS['tmpdb_user'] = 'root';
$GLOBALS['tmpdb_dbname'] = 'geo_tests_tmp';

$engine = new PDOEngine($pdo);
break;

Expand All @@ -106,30 +64,6 @@

echo 'PostGIS version: ' . $version . PHP_EOL;

// Connect data for doctrine integration tests
$GLOBALS['db_type'] = 'pdo_pgsql';
$GLOBALS['db_host'] = 'localhost';
$GLOBALS['db_port'] = 5432;
$GLOBALS['db_username'] = 'postgres';
$GLOBALS['db_password'] = 'postgres';
$GLOBALS['db_name'] = 'geo_tests';

$GLOBALS['tmpdb_type'] = 'pdo_pgsql';
$GLOBALS['tmpdb_host'] = 'localhost';
$GLOBALS['tmpdb_port'] = 5432;
$GLOBALS['tmpdb_username'] = 'postgres';
$GLOBALS['tmpdb_password'] = 'postgres';
$GLOBALS['tmpdb_name'] = 'geo_tests_tmp';

// doctrine/dbal >= 2.13.0
$GLOBALS['db_driver'] = 'pdo_pgsql';
$GLOBALS['db_user'] = 'postgres';
$GLOBALS['db_dbname'] = 'geo_tests';

$GLOBALS['tmpdb_driver'] = 'pdo_pgsql';
$GLOBALS['tmpdb_user'] = 'postgres';
$GLOBALS['tmpdb_dbname'] = 'geo_tests_tmp';

$engine = new PDOEngine($pdo);
break;

Expand Down
63 changes: 0 additions & 63 deletions src/Doctrine/Functions/AbstractFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/AreaFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/AzimuthFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/BoundaryFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/BufferFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/CentroidFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/ContainsFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/ConvexHullFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/CrossesFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/DifferenceFunction.php

This file was deleted.

21 changes: 0 additions & 21 deletions src/Doctrine/Functions/DisjointFunction.php

This file was deleted.

Loading

0 comments on commit 640d12b

Please sign in to comment.