Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ jobs:
runs-on: ubuntu-latest

services:
mongo:
image: mongo:latest
env:
MONGO_INITDB_ROOT_USERNAME: testing
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: testing
ports:
- 27017:27017

mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions app/WaterlineApplicationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use Waterline\Repositories\Workflow\Infrastructure\WorkflowRepositoryMongoDB;
use Waterline\Repositories\Workflow\Infrastructure\WorkflowRepositoryMySQL;
use Waterline\Repositories\Workflow\Infrastructure\WorkflowRepositoryPostgreSQL;
use Waterline\Repositories\Workflow\Infrastructure\WorkflowRepositorySQLite;
Expand Down Expand Up @@ -46,7 +45,6 @@ class_alias(config('workflows.base_model', Model::class), 'Workflow\Models\Model
}

$drivers = [
'mongodb' => WorkflowRepositoryMongoDB::class,
'mysql' => WorkflowRepositoryMySQL::class,
'pgsql' => WorkflowRepositoryPostgreSQL::class,
'sqlite' => WorkflowRepositorySQLite::class,
Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.4",
"mongodb/laravel-mongodb": "^3.9",
"mongodb/mongodb": "1.11",
"orchestra/testbench": "^7.29",
"orchestra/workbench": "^7.29",
"phpunit/phpunit": "^9.5.10"
Expand Down Expand Up @@ -47,9 +45,8 @@
"@php vendor/bin/testbench serve --ansi"
],
"build": "@php vendor/bin/testbench workbench:build --ansi",
"test": "composer test-mongo && composer test-mssql && composer test-mysql && composer test-pgsql && composer test-sqlite",
"test-all": "composer test-mongo && composer test-mssql && composer test-mysql && composer test-pgsql && composer test-sqlite",
"test-mongo": "vendor/bin/phpunit --testdox --configuration=phpunit-mongo.xml",
"test": "composer test-mssql && composer test-mysql && composer test-pgsql && composer test-sqlite",
"test-all": "composer test-mssql && composer test-mysql && composer test-pgsql && composer test-sqlite",
"test-mssql": "vendor/bin/phpunit --testdox --configuration=phpunit-mssql.xml",
"test-mysql": "vendor/bin/phpunit --testdox --configuration=phpunit-mysql.xml",
"test-pgsql": "vendor/bin/phpunit --testdox --configuration=phpunit-pgsql.xml",
Expand Down
19 changes: 0 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ services:
depends_on:
- mysql
- redis
mongo:
image: 'mongo:latest'
ports:
- '${FORWARD_DB_PORT:-27017}:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: 'testing'
MONGO_INITDB_ROOT_PASSWORD: 'password'
MONGO_INITDB_DATABASE: 'testing'
volumes:
- 'sail-mongo:/data/db'
# - './docker/create-testing-database-mongo.js:/docker-entrypoint-initdb.d/10-create-testing-database.js'
networks:
- sail
healthcheck:
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
retries: 3
timeout: 5s
mssql:
image: 'mcr.microsoft.com/mssql/server:2022-latest'
ports:
Expand Down Expand Up @@ -114,8 +97,6 @@ networks:
sail:
driver: bridge
volumes:
sail-mongo:
driver: local
sail-mssql:
driver: local
sail-mysql:
Expand Down
4 changes: 0 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ RUN apt-get update \
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> /etc/profile.d/mssql.sh \
&& apt-get install -y php-pear php8.2-xml php8.2-dev \
&& apt-get remove --purge -y php8.2-mongodb || true \
&& pecl channel-update pecl.php.net \
&& pecl install mongodb-1.15.0 \
&& echo "extension=mongodb.so" > /etc/php/8.2/mods-available/mongodb.ini \
&& phpenmod mongodb \
&& pecl install sqlsrv \
&& pecl install pdo_sqlsrv \
&& echo "extension=sqlsrv.so" > /etc/php/8.2/mods-available/sqlsrv.ini \
Expand Down
35 changes: 0 additions & 35 deletions phpunit-mongo.xml

This file was deleted.

17 changes: 2 additions & 15 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,9 @@ protected function defineDatabaseMigrations()
protected function getPackageProviders($app)
{
if (! class_exists('\Workflow\Models\Model')) {
if (env('DB_CONNECTION') === 'mongodb') {
class_alias(\Jenssegers\Mongodb\Eloquent\Model::class, '\Workflow\Models\Model');
} else {
class_alias(\Illuminate\Database\Eloquent\Model::class, '\Workflow\Models\Model');
}
class_alias(\Illuminate\Database\Eloquent\Model::class, '\Workflow\Models\Model');
}

$app['config']->set('database.connections.mongodb', [
'driver' => 'mongodb',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', 27017),
'database' => env('DB_DATABASE', 'homestead'),
'username' => env('DB_USERNAME', 'homestead'),
'password' => env('DB_PASSWORD', 'secret'),
]);

return ['Jenssegers\Mongodb\MongodbServiceProvider', 'Waterline\WaterlineServiceProvider', 'Waterline\WaterlineApplicationServiceProvider'];
return ['Waterline\WaterlineServiceProvider', 'Waterline\WaterlineApplicationServiceProvider'];
}
}