Skip to content

Commit

Permalink
Simplify Oracle CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Feb 24, 2024
1 parent 00d8f60 commit 31fdae4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 91 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
composer-options: "--ignore-platform-req=php+"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/oci8${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml"
run: "vendor/bin/phpunit -c ci/github/phpunit/oci8.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v3"
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
composer-options: "--ignore-platform-req=php+"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci${{ matrix.oracle-version < 23 && '-21' || '' }}.xml --coverage-clover=coverage.xml"
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v3"
Expand Down
39 changes: 0 additions & 39 deletions ci/github/phpunit/oci8-21.xml

This file was deleted.

39 changes: 0 additions & 39 deletions ci/github/phpunit/pdo_oci-21.xml

This file was deleted.

10 changes: 1 addition & 9 deletions src/Driver/AbstractOracleDriver/EasyConnectString.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,7 @@ public static function fromConnectionParameters(array $params): self
$connectData = [];

if (isset($params['servicename']) || isset($params['dbname'])) {
$serviceKey = 'SID';

if (isset($params['service'])) {
$serviceKey = 'SERVICE_NAME';
}

$serviceName = $params['servicename'] ?? $params['dbname'];

$connectData[$serviceKey] = $serviceName;
$connectData['SERVICE_NAME'] = $params['servicename'] ?? $params['dbname'];
}

if (isset($params['instancename'])) {
Expand Down
5 changes: 3 additions & 2 deletions tests/Driver/AbstractOracleDriver/EasyConnectStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public static function connectionParametersProvider(): iterable
'port' => 1521,
'dbname' => 'XE',
],
'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.example.com)(PORT=1521))(CONNECT_DATA=(SID=XE)))',
'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.example.com)(PORT=1521))'
. '(CONNECT_DATA=(SERVICE_NAME=XE)))',
],
'no-db-name' => [
['host' => 'localhost'],
Expand All @@ -55,7 +56,7 @@ public static function connectionParametersProvider(): iterable
'pooled' => true,
],
'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=41521))'
. '(CONNECT_DATA=(SID=XE)(INSTANCE_NAME=SALES)(SERVER=POOLED)))',
. '(CONNECT_DATA=(SERVICE_NAME=XE)(INSTANCE_NAME=SALES)(SERVER=POOLED)))',
],
];
}
Expand Down

0 comments on commit 31fdae4

Please sign in to comment.