Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8b7011e
latest revisions. Pdo named arguments are broken
tyrsson Apr 19, 2025
a157df6
Update Statement::prepare() signature.
tyrsson Apr 23, 2025
c1ca88e
temp change laminas-db required version
tyrsson Apr 23, 2025
d3ac706
Fixes regression in "mapped" parameters for Pdo.
tyrsson Apr 26, 2025
d695c12
Completes code move to this satellite. (does not include working unit…
tyrsson May 6, 2025
367fd43
Missed strict types
tyrsson May 6, 2025
f9ecb1f
Brings repo up to date on dev deps and ci/cd tooling (have not tested…
tyrsson May 7, 2025
01e7c5e
Completes code migration
tyrsson May 14, 2025
b3d8700
Latest revision
tyrsson May 15, 2025
c54093e
Updating lock to sync the laminas-db latest revisions
tyrsson May 16, 2025
ef509e1
testing ci fixes
tyrsson May 18, 2025
85efd87
Type casting, documentation minor fixes
simon-mundy May 19, 2025
fb639db
stash local changes prior to pulling code from @simon-mundy
tyrsson May 20, 2025
4a9c4f5
Merge remote-tracking branch 'origin/adapter-migration-sm-250519' int…
tyrsson May 20, 2025
3aca44f
Unit test are running. With following results:
tyrsson May 20, 2025
b4da8d5
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 21, 2025
86d5d4a
Aligning with laminas-db changes
tyrsson May 23, 2025
f486c15
Latest revisions
tyrsson May 26, 2025
4941f90
Refactor
tyrsson May 27, 2025
6550b83
update composer.json to reflect new working branch for laminas-db
tyrsson May 27, 2025
2bf33e3
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 27, 2025
1ba7212
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson May 27, 2025
6de09ff
formatting
tyrsson Jun 2, 2025
4cc048c
Refactor to simplify factoring all services
tyrsson Jun 2, 2025
ae0f940
Merge pull request #16 from axleus/adapter-migration-alternate-driver…
tyrsson Jun 2, 2025
9cbe4ed
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 2, 2025
1a4a698
Working code (not tested, just running) for Mysqli Driver
tyrsson Jun 2, 2025
76859bc
Updates required laminas-db to target branch to include the new drive…
tyrsson Jun 8, 2025
cac490a
Updating composer.json to correctly point to current development bran…
tyrsson Jun 11, 2025
6b06e00
Updating deps and lock file.
tyrsson Jun 11, 2025
ffa62d6
Updates lock file for latest deps
tyrsson Jun 17, 2025
e07d0dc
Cleaned up SetupTrait and improved configuration workflow.
tyrsson Jun 19, 2025
73c4d6a
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 19, 2025
8bece35
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 19, 2025
53163b6
Adds the start of docs
tyrsson Jun 22, 2025
cd909b8
Fixes Unit and Integration test
tyrsson Jun 22, 2025
04987c9
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 22, 2025
27ac584
Fixes namespace error
tyrsson Jun 22, 2025
83142bc
Update laminas-ci phpunit.xml file
tyrsson Jun 22, 2025
2d80155
Fix Exception namespace
tyrsson Jun 22, 2025
523bd01
PHP_CS code cleanup
tyrsson Jun 23, 2025
03da20a
Update lock file
tyrsson Jun 23, 2025
129be3c
Updating psalm files
tyrsson Jun 23, 2025
2c9828b
Updates psalm baseline file with coverage at 95%
tyrsson Jun 24, 2025
9963f1b
Minor cleanup
tyrsson Jun 24, 2025
4018980
Completes AdapterFactoryTest
tyrsson Jun 24, 2025
e5ecf49
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 24, 2025
a82589b
Downgrade mysql version in github action to test
tyrsson Jun 24, 2025
fd384cc
Change mysql user in phpunit.xml.dist
tyrsson Jun 24, 2025
0533d9c
Fix incorrect env value in IntegrationTestStartedListener
tyrsson Jun 24, 2025
407d80f
Removes unused unit/Driver/Pdo/ConnectionIntegrationTest.php file
tyrsson Jun 25, 2025
ccc6a19
troubleshooting github action runs
tyrsson Jun 25, 2025
5708fe1
troubleshooting githubactions
tyrsson Jun 25, 2025
488ec8c
Updating test and baseline
tyrsson Jun 25, 2025
d6d3e70
Updating integration mysqli connection test.
tyrsson Jun 25, 2025
a45a9bd
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 25, 2025
352e9fe
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 25, 2025
ca5fe95
Add integration test factory test for all Pdo related components
tyrsson Jun 26, 2025
ca8ad84
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jun 26, 2025
9519c3a
Adds missing integration test for new factories
tyrsson Jun 29, 2025
492d191
Namespace update
tyrsson Jul 7, 2025
84c4924
Signed-off-by: Joey Smith <jsmith@webinertia.net>
tyrsson Jul 7, 2025
0134f17
updating composer.lock to target the correct 0.0.x-dev version for ph…
tyrsson Jul 7, 2025
72a4af7
Correct order of use statements PhpCS cleanup
tyrsson Jul 7, 2025
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
5 changes: 5 additions & 0 deletions .ci/mysql_fixtures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

echo "Configure MySQL test database"

mysql --user=root --password=Password123 -e "create database laminasdb_test;"
40 changes: 38 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,41 @@ on:
tags:

jobs:
ci:
uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: 'password'
MYSQL_ROOT_HOST: '%'
MYSQL_USER: 'gha'
MYSQL_PASSWORD: 'password'
MYSQL_DATABASE: 'laminasdb_test'
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 3306
3 changes: 3 additions & 0 deletions .laminas-ci/mysql_permissions.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE USER 'gha'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'gha'@'%';
FLUSH PRIVILEGES;
29 changes: 29 additions & 0 deletions .laminas-ci/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
requireCoverageMetadata="true"
colors="true">

<extensions>
<bootstrap class="PhpDbIntegrationTest\Mysql\Extension\ListenerExtension" />
</extensions>
<testsuites>
<testsuite name="unit test">
<directory>./test/unit</directory>
</testsuite>
<testsuite name="integration test">
<directory>./test/integration</directory>
</testsuite>
</testsuites>
<php>
<!-- Integration Test Variables -->
<env name="TESTS_PHPDB_ADAPTER_MYSQL" value="true" /><!-- todo: remove this env variable as its no longer needed-->
<env name="TESTS_PHPDB_ADAPTER_MYSQL_HOSTNAME" value="mysql" />
<env name="TESTS_PHPDB_ADAPTER_MYSQL_USERNAME" value="gha" />
<env name="TESTS_PHPDB_ADAPTER_MYSQL_PASSWORD" value="password" />
<env name="TESTS_PHPDB_ADAPTER_MYSQL_DATABASE" value="laminasdb_test" />
</php>
</phpunit>

17 changes: 17 additions & 0 deletions .laminas-ci/pre-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

WORKING_DIRECTORY=$2
JOB=$3
PHP_VERSION=$(echo "${JOB}" | jq -r '.php')


if [ ! -z "$GITHUB_BASE_REF" ] && [[ "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9] ]]; then
readarray -td. TARGET_BRANCH_VERSION_PARTS <<<"${GITHUB_BASE_REF}.";
unset 'TARGET_BRANCH_VERSION_PARTS[-1]';
declare -a TARGET_BRANCH_VERSION_PARTS
MAJOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[0]}
MINOR_OF_TARGET_BRANCH=${TARGET_BRANCH_VERSION_PARTS[1]}

export COMPOSER_ROOT_VERISON="${MAJOR_OF_TARGET_BRANCH}.${MINOR_OF_TARGET_BRANCH}.99"
echo "Exported COMPOSER_ROOT_VERISON as ${COMPOSER_ROOT_VERISON}"
fi
22 changes: 22 additions & 0 deletions .laminas-ci/pre-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -e

TEST_USER=$1
WORKSPACE=$2
JOB=$3

COMMAND=$(echo "${JOB}" | jq -r '.command')

if [[ ! ${COMMAND} =~ phpunit ]]; then
exit 0
fi

PHP_VERSION=$(echo "${JOB}" | jq -r '.php')

# Install CI version of phpunit config
cp .laminas-ci/phpunit.xml phpunit.xml

# Install lsof (used in integration tests)
apt update -qq
apt install -yqq lsof
7 changes: 7 additions & 0 deletions bin/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

/usr/bin/composer validate && \
/usr/bin/composer --ignore-platform-reqs install \
--no-ansi --no-progress --no-scripts \
--classmap-authoritative --no-interaction \
--quiet
31 changes: 31 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
php:
build:
context: ./
dockerfile: docker/php/Dockerfile
args:
- PHP_VERSION=${PHP_VERSION:-8.3.19}
volumes:
- ./:/var/www/html
depends_on:
- mysql

mysql:
build:
context: ./
dockerfile: docker/databases/mysql/Dockerfile
args:
- VERSION=${MYSQL_VERSION:-8.0.41}
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
39 changes: 18 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,62 @@
{
"name": "laminas/laminas-db-mysql-adapter",
"description": "MySQL support for laminas-db",
"name": "php-db/phpdb-adapter-mysql",
"description": "MySQL support for php-db",
"license": "BSD-3-Clause",
"keywords": [
"laminas",
"mezzio",
"php-db",
"mysql",
"db"
],
"homepage": "https://github.com/axleus/laminas-db-mysql/discussions",
"homepage": "https://github.com/php-db/phpdb-adapter-mysql/discussions",
"support": {
"issues": "https://github.com/alxeus/laminas-db-mysql/issues",
"source": "https://github.com/axleus/laminas-db-mysql",
"forum": "https://github.com/axleus/laminas-db-mysql/discussions"
"issues": "https://github.com/php-db/phpdb-adapter-mysql/issues",
"source": "https://github.com/php-db/phpdb-adapter-mysql",
"forum": "https://github.com/php-db/phpdb-adapter-mysql/discussions"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"platform": {
"php": "8.1.99"
"php": "8.2.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"laminas": {
"component": "Laminas\\Db\\Mysql",
"config-provider": "Laminas\\Db\\Mysql\\ConfigProvider"
"config-provider": "PhpDb\\Adapter\\Mysql\\ConfigProvider"
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"laminas/laminas-db": "3.0.x"
"php-db/phpdb": "0.0.x-dev"
},
"require-dev": {
"ext-mysqli": "*",
"ext-pdo_mysql": "*",
"laminas/laminas-coding-standard": "^3.0.1",
"laminas/laminas-eventmanager": "^3.6.0",
"laminas/laminas-hydrator": "^4.7",
"laminas/laminas-servicemanager": "^3.19.0",
"phpunit/phpunit": "^9.5.25",
"phpunit/phpunit": "^11.5.15",
"psalm/plugin-phpunit": "^0.19.2",
"vimeo/psalm": "^6.8.8"
},
"suggest": {
"ext-mysqli": "Required for MySQLi support",
"ext-pdo_mysql": "Required for PDO MySQL support",
"laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
"laminas/laminas-eventmanager": "Required for TableGateway events support"
},
"autoload": {
"psr-4": {
"Laminas\\Db\\Mysql\\": "src/"
"PhpDb\\Adapter\\Mysql\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"LaminasTest\\Db\\Mysql\\": "test/unit/",
"LaminasIntegrationTest\\Db\\Mysql\\": "test/integration/"
"PhpDbTest\\Adapter\\Mysql\\": "test/unit/",
"PhpDbIntegrationTest\\Adapter\\Mysql\\": "test/integration/"
}
},
"scripts": {
Expand All @@ -72,9 +70,8 @@
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"test-integration": "phpunit --colors=always --testsuite \"integration test\"",
"static-analysis": "psalm --shepherd --stats",
"sa-update-baseline": "psalm --update-baseline",
"sa-no-baseline": "psalm --shepherd --stats --ignore-baseline",
"upload-coverage": "coveralls -v"
},
"conflict": {
"laminas/laminas-db": "*"
}
}
Loading