Skip to content

Commit c7c3d0a

Browse files
authored
Merge pull request #7 from tyrsson/code-alignment-with-phpdb-0-6-x
Code alignment
2 parents 264c453 + a40e147 commit c7c3d0a

40 files changed

+99
-162
lines changed

.ci/pgsql_fixtures.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
postgres:
3434
image: postgres
3535
env:
36-
POSTGRES_USER: 'gha'
3736
POSTGRES_PASSWORD: 'password'
3837
POSTGRES_DB: 'phpdb_test'
3938
options: >-
@@ -42,4 +41,4 @@ jobs:
4241
--health-timeout 5s
4342
--health-retries 3
4443
ports:
45-
- 5432
44+
- 5432

.laminas-ci/phpunit.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.laminas-ci/pre-install.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

.laminas-ci/pre-run.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ services:
88
volumes:
99
- ./:/var/www/html
1010
depends_on:
11-
- postgresql
11+
- postgres
1212

13-
postgresql:
13+
postgres:
1414
build:
1515
context: ./
16-
dockerfile: docker/databases/postgresql/Dockerfile
16+
dockerfile: docker/databases/postgres/Dockerfile
1717
args:
1818
- VERSION=${VERSION:-17.4}
1919
- ALPINE_VERSION=${ALPINE_VERSION:-3.21}
@@ -30,4 +30,4 @@ services:
3030
interval: 30s
3131
timeout: 60s
3232
retries: 5
33-
start_period: 80s
33+
start_period: 80s

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"extra": {
2828
"laminas": {
29-
"config-provider": "PhpDb\\Adapter\\Pgsql\\ConfigProvider"
29+
"config-provider": "PhpDb\\Pgsql\\ConfigProvider"
3030
}
3131
},
3232
"require": {
@@ -48,14 +48,14 @@
4848
},
4949
"autoload": {
5050
"psr-4": {
51-
"PhpDb\\Adapter\\Pgsql\\": "src/"
51+
"PhpDb\\Pgsql\\": "src/"
5252
}
5353
},
5454
"autoload-dev": {
5555
"psr-4": {
56-
"PhpDbTest\\Adapter\\Pgsql\\": "test/unit/",
56+
"PhpDbTest\\Pgsql\\": "test/unit/",
5757
"PhpDbTestAsset\\Pgsql\\": "test/asset/",
58-
"PhpDbIntegrationTest\\Adapter\\Pgsql\\": "test/integration/"
58+
"PhpDbIntegrationTest\\Pgsql\\": "test/integration/"
5959
}
6060
},
6161
"scripts": {

phpstan-baseline.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: '#^PHPDoc tag @throws with type PhpDb\\Adapter\\Exception\\InvalidConnectionParametersException\|PhpDb\\Adapter\\Pgsql\\Exception\\ContainerException is not subtype of Throwable$#'
5+
identifier: throws.notThrowable
6+
count: 1
7+
path: src/Container/ConnectionInterfaceFactory.php
8+
39
-
410
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<int, array\<int\|string, string\>\> given\.$#'
511
identifier: argument.type

phpunit.xml.dist

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
failOnNotice="true"
1414
failOnDeprecation="true"
1515
failOnWarning="true">
16+
17+
<extensions>
18+
<bootstrap class="PhpDbIntegrationTest\Pgsql\Extension\ListenerExtension" />
19+
</extensions>
1620
<testsuites>
1721
<testsuite name="unit test">
1822
<directory>./test/unit</directory>
@@ -29,10 +33,10 @@
2933
</include>
3034
</source>
3135
<php>
32-
<env name="TESTS_PHPDB_ADAPTER_PGSQL" value="true"/>
33-
<env name="TESTS_PHPDB_ADAPTER_PGSQL_HOSTNAME" value="postgresql"/>
34-
<env name="TESTS_PHPDB_ADAPTER_PGSQL_USERNAME" value="postgres"/>
35-
<env name="TESTS_PHPDB_ADAPTER_PGSQL_PASSWORD" value="postgres"/>
36-
<env name="TESTS_PHPDB_ADAPTER_PGSQL_DATABASE" value="phpdb_test"/>
36+
<env name="TESTS_PHPDB_PGSQL" value="true"/>
37+
<env name="TESTS_PHPDB_PGSQL_HOSTNAME" value="postgres"/>
38+
<env name="TESTS_PHPDB_PGSQL_USERNAME" value="postgres"/>
39+
<env name="TESTS_PHPDB_PGSQL_PASSWORD" value="password"/>
40+
<env name="TESTS_PHPDB_PGSQL_DATABASE" value="phpdb_test"/>
3741
</php>
38-
</phpunit>
42+
</phpunit>

0 commit comments

Comments
 (0)