Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d8aaa35
latest changes. Pdo named arguments are broken
tyrsson Apr 19, 2025
3d24705
Update StatementInterface prepare signature
tyrsson Apr 23, 2025
c239faa
fix config provider
tyrsson Apr 23, 2025
446f46e
Fixes regression of "mapped" parameters thanks to @simon-mundy
tyrsson Apr 26, 2025
e97ba15
Merge branch '3.0.x' into adapter-migration-mysql
tyrsson May 4, 2025
db1cd25
Introduces Driver\Pdo\AbstractPdo
tyrsson May 6, 2025
db979f5
Missed strict types
tyrsson May 6, 2025
6f7f915
Adding temp debug comments
tyrsson May 13, 2025
61c04d1
Removes MySQL related code that has been migrated to laminas-db-adapt…
tyrsson May 14, 2025
d5b3f4e
Temp removes ci constraint on which actions trigger workflow runs for…
tyrsson May 14, 2025
f29d5cf
Refactoring around ConnectionInterface, AbstractConnection, AbstractP…
tyrsson May 15, 2025
f8baa9a
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 15, 2025
05b6f99
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 15, 2025
6088adf
Refactor AdapterAwareInterface and Trait
tyrsson May 16, 2025
68d0e22
DriverInterface::getDatabasePlatformName() signature change
tyrsson May 20, 2025
0e01fa0
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 20, 2025
674b596
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 20, 2025
8bd2bb1
Updating StatementInterface typing and \Pdo\Statement typing
tyrsson May 21, 2025
4aed88e
Updating StatementInterface::execute to nullable return type
tyrsson May 21, 2025
b046b57
Updating \Pdo\Statement::execute to nullable return type
tyrsson May 21, 2025
838ef3d
Refactoring typing
tyrsson May 22, 2025
a7e589c
Fixed type in DriverAwareInterface file/class name
tyrsson May 23, 2025
9d6d275
Interface typing
tyrsson May 23, 2025
213e6d3
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 23, 2025
1d6a464
Fixing formatParameterName parameter typing for $name
tyrsson May 24, 2025
924aa67
testing temp fix for formatParameterName
tyrsson May 24, 2025
3525c63
updating temp fix to proposed fix, see comment in AbstractPdo::format…
tyrsson May 24, 2025
8236c4d
Aligning for integration test
tyrsson May 24, 2025
a700452
Package initialization refactoring
tyrsson May 25, 2025
9766886
Latest revisions
tyrsson May 26, 2025
6a42b1b
Code alignment with adapter-mysql code
tyrsson May 27, 2025
9ebb415
Derp, gotta have a factory mapping
tyrsson May 27, 2025
8084414
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 27, 2025
82f55af
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 2, 2025
c462c66
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 2, 2025
5d6901e
Code is running with adapter-mysql and the mysqli driver
tyrsson Jun 2, 2025
6188d0b
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 4, 2025
750fabf
Test prototyping the DriverFeature changes.
tyrsson Jun 4, 2025
863c2e0
Completes the initial refactor of the DriverFeature implementation
tyrsson Jun 5, 2025
a4e1ad8
Comment cleanup as per Setter's review.
tyrsson Jun 11, 2025
132cfba
Merge pull request #57 from axleus/driver-feature-interface-poc
tyrsson Jun 11, 2025
5154e43
Pdo drivers should check against PdoDriverAwareInterface
tyrsson Jun 17, 2025
cc81596
Updates ConnectionInterface, AbstractConnection, AbstractPdoConnection
tyrsson Jun 22, 2025
0b57362
Introduces PdoConnectionInterface for getDsn() contract
tyrsson Jun 22, 2025
63c0692
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 22, 2025
df9d90c
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 22, 2025
a8dc192
Update Exception classes to strict types
tyrsson Jun 22, 2025
5709dbf
Code cleanup
tyrsson Jun 23, 2025
4cc37e0
Update Pdo\Statement::construct to add $options param
tyrsson Jun 23, 2025
da5f2c1
Removes DriverInterface::registerConnection()
tyrsson Jun 23, 2025
4361f41
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 23, 2025
01d57d3
Types Metadata\MetadataInterface, Metadata\Source\AbstractSource
tyrsson Jun 23, 2025
9946f42
Improve typing and strict types to Adapter\Platform\AbstractPlatform
tyrsson Jun 23, 2025
d7c418c
Improve typing in ResultInterface
tyrsson Jun 23, 2025
25780bb
Align Pdo\Result with ResultInterface
tyrsson Jun 23, 2025
f2b82d5
Align AbstractPdo with DriverInterface
tyrsson Jun 24, 2025
c260163
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 25, 2025
2bef721
Removes most of the unused mysql related files
tyrsson Jun 30, 2025
356d0b0
troubleshooting around Laminas\Db\Adapter\Platform::getSqlPlatformDec…
tyrsson Jun 30, 2025
52c63a7
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jul 6, 2025
b4801df
Namespace refactor
tyrsson Jul 6, 2025
ba76132
Missed string env vars
tyrsson Jul 7, 2025
df3d344
continues namespace refactor
tyrsson Jul 7, 2025
ce670d1
namespaces
tyrsson Jul 7, 2025
82b2614
Update README.md
tyrsson Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'refs/pull/*'
tags:

jobs:
Expand Down
4 changes: 0 additions & 4 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"extensions": [
"pdo-mysql",
"pdo-pgsql",
"pdo-sqlite",
"mysqli",
"pgsql",
"sqlite3",
"sqlsrv"
]
Expand Down
12 changes: 6 additions & 6 deletions .laminas-ci/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
</testsuites>

<listeners>
<listener class="LaminasIntegrationTest\Db\IntegrationTestListener" file="./test/integration/IntegrationTestListener.php"/>
<listener class="PhpDbIntegrationTest\IntegrationTestListener" file="./test/integration/IntegrationTestListener.php"/>
</listeners>

<php>
<!-- Integration Test Variables -->
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL" value="true" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL_HOSTNAME" value="mysql" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL_USERNAME" value="gha" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL_PASSWORD" value="password" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL_DATABASE" value="laminasdb_test" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL" value="true" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_HOSTNAME" value="mysql" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_USERNAME" value="gha" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_PASSWORD" value="password" />
<env name="TESTS_PHPDB_ADAPTER_DRIVER_MYSQL_DATABASE" value="laminasdb_test" />

<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV" value="true" />
<env name="TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLSRV_HOSTNAME" value="mssql" />
Expand Down
50 changes: 19 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
# laminas-db

[![Build Status](https://github.com/laminas/laminas-db/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-db/actions/workflows/continuous-integration.yml)

> ## 🇷🇺 Русским гражданам
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

`Laminas\Db` is a component that abstract the access to a Database using an object
oriented API to build the queries. `Laminas\Db` consumes different storage adapters
# phpdb

The continuation of the Laminas Db component, now under the `php-db` organization.

The following information is outdated and will be updated in the coming days.

[![Build Status](https://github.com/php-db/phpdb/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/php-db/phpdb/actions/workflows/continuous-integration.yml)

`PhpDb` is a component that abstract the access to a Database using an object
oriented API to build the queries. `PhpDb` consumes different storage adapters
to access different database vendors such as MySQL, PostgreSQL, Oracle, IBM DB2,
Microsoft Sql Server, PDO, etc.

## Contributing

Please be sure to read the [contributor's guide](https://github.com/laminas/.github/blob/main/CONTRIBUTING.md) for general information on contributing.
This section outlines specifics for laminas-db.
Please be sure to read the [contributor's guide](https://github.com/php-db/.github/blob/main/CONTRIBUTING.md) for general information on contributing.
This section outlines specifics for php-db.

### Test suites

Expand Down Expand Up @@ -62,17 +50,17 @@
```bash
docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
laminas-db-mysql-1 docker.io/library/laminas-db-mysql:latest "mysqld" mysql 7 hours ago Up 7 hours
laminas-db-php-1 docker.io/library/laminas-db-php:latest "apache2-foreground" php 7 hours ago Up 7 hours
laminas-db-mysql-1 docker.io/library/laminas-db-mysql:latest "mysqld" mysql 7 hours ago Up 7 hours
laminas-db-php-1 docker.io/library/laminas-db-php:latest "apache2-foreground" php 7 hours ago Up 7 hours
laminas-db-postgresql-1 docker.io/library/laminas-db-postgresql:latest "postgres" postgresql 7 hours ago Up 7 hours
```

If you see three containers listed, then they're all running, and you are ready to run the test suite.
So, copy `phpunit.xml.dist` to `phpunit.xml`, and change the following environment variable to "true" to enable the three databases:

- TESTS_LAMINAS_DB_ADAPTER_DRIVER_MYSQL
- TESTS_LAMINAS_DB_ADAPTER_DRIVER_PGSQL
- TESTS_LAMINAS_DB_ADAPTER_DRIVER_SQLITE_MEMORY
- TESTS_PHPDB_ADAPTER_DRIVER_MYSQL
- TESTS_PHPDB_ADAPTER_DRIVER_PGSQL
- TESTS_PHPDB_ADAPTER_DRIVER_SQLITE_MEMORY

From there, you can run the integration tests by running the following command:

Expand All @@ -85,8 +73,8 @@

-----

- File issues at https://github.com/laminas/laminas-db/issues
- Documentation is at https://docs.laminas.dev/laminas-db/
- File issues at https://github.com/php-db/phpdb/issues
- Documentation is at https://docs.php-db.dev

[docker-compose]: https://docs.docker.com/compose/intro/features-uses/
[deploy-with-docker-compose]: https://deploywithdockercompose.com

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character

Check failure on line 80 in README.md

View workflow job for this annotation

GitHub Actions / QA Checks (README Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Files should end with a single newline character
21 changes: 0 additions & 21 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,8 @@ services:
volumes:
- ./:/var/www/html
depends_on:
- mysql
- postgresql

mysql:
build:
context: ./
dockerfile: docker/databases/mysql/Dockerfile
args:
- VERSION=${MYSQL_VERSION:-oraclelinux9}
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-laminasdb_test}
- MYSQL_USER=${MYSQL_USER:-user}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}
- MYSQL_RANDOM_ROOT_PASSWORD=${MYSQL_RANDOM_ROOT_PASSWORD:-yes}
volumes:
- ./test/integration/TestFixtures/mysql.sql:/docker-entrypoint-initdb.d/mysql.sql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10

postgresql:
build:
context: ./
Expand Down
37 changes: 17 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,60 @@
{
"name": "laminas/laminas-db",
"name": "php-db/phpdb",
"description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations",
"license": "BSD-3-Clause",
"keywords": [
"laminas",
"mezzio",
"php-db",
"db"
],
"homepage": "https://laminas.dev",
"homepage": "https://php-db.dev",
"support": {
"docs": "https://docs.laminas.dev/laminas-db/",
"issues": "https://github.com/laminas/laminas-db/issues",
"source": "https://github.com/laminas/laminas-db",
"rss": "https://github.com/laminas/laminas-db/releases.atom",
"chat": "https://laminas.dev/chat",
"forum": "https://discourse.laminas.dev"
"docs": "https://docs.php-db.dev/",
"issues": "https://github.com/php-db/phpdb/issues",
"source": "https://github.com/php-db/phpdb"
},
"config": {
"sort-packages": true,
"platform": {
"php": "8.3.99"
"php": "8.2.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"extra": {
"laminas": {
"component": "Laminas\\Db",
"config-provider": "Laminas\\Db\\ConfigProvider"
"config-provider": "PhpDb\\Container\\ConfigProvider"
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"laminas/laminas-servicemanager": "^4.0.0",
"laminas/laminas-stdlib": "^3.20.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "^3.0.1",
"laminas/laminas-eventmanager": "^3.14.0",
"laminas/laminas-hydrator": "^4.16.0",
"laminas/laminas-servicemanager": "^3.23.0",
"phpunit/phpunit": "^11.5.12",
"psalm/plugin-phpunit": "^0.19.2",
"rector/rector": "^2.0",
"vimeo/psalm": "^6.8.8"
},
"suggest": {
"laminas/laminas-eventmanager": "Laminas\\EventManager component",
"laminas/laminas-hydrator": "(^3.2 || ^4.3) Laminas\\Hydrator component for using HydratingResultSets",
"laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
"laminas/laminas-hydrator": "(^5.0.0) Laminas\\Hydrator component for using HydratingResultSets"
},
"autoload": {
"psr-4": {
"Laminas\\Db\\": "src/",
"PhpDb\\": "src/",
"CustomRule\\PHPUnit\\": "rector/"
}
},
"autoload-dev": {
"psr-4": {
"LaminasTest\\Db\\": "test/unit/",
"LaminasIntegrationTest\\Db\\": "test/integration/"
"PhpDbTest\\": "test/unit/",
"PhpDbIntegrationTest\\": "test/integration/"
}
},
"scripts": {
Expand All @@ -75,6 +71,7 @@
"upload-coverage": "coveralls -v"
},
"conflict": {
"zendframework/zend-db": "*"
"zendframework/zend-db": "*",
"laminas/laminas-db": "*"
}
}
Loading
Loading