From 459a50bc5ec38428d08df66c13ba3fc02bac88df Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 14 Mar 2025 02:25:26 -0500 Subject: [PATCH 1/6] base deps Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- composer.json | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..548d8a3 --- /dev/null +++ b/composer.json @@ -0,0 +1,73 @@ +{ + "name": "axleus/laminas-db-mysql", + "description": "MySQL support for laminas-db", + "license": "BSD-3-Clause", + "keywords": [ + "laminas", + "mysql", + "db" + ], + "homepage": "https://github.com/axleus/laminas-db-mysql/discussions", + "support": { + "issues": "https://github.com/alxeus/laminas-db/issues", + "source": "https://github.com/axleus/laminas-db-mysql", + "forum": "https://github.com/axleus/laminas-db-mysql/discussions" + }, + "config": { + "sort-packages": true, + "platform": { + "php": "8.1.99" + }, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, + "extra": { + "laminas": { + "component": "Laminas\\Db", + "config-provider": "Laminas\\Db\\ConfigProvider" + } + }, + "require": { + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "axleus/laminas-db": "dev-3.0.x" + }, + "require-dev": { + "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", + "psalm/plugin-phpunit": "^0.19.2", + "vimeo/psalm": "^6.8.8" + }, + "suggest": { + "laminas/laminas-servicemanager": "Laminas\\ServiceManager component" + }, + "autoload": { + "psr-4": { + "Laminas\\Db\\Mysql": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "LaminasTest\\Db\\Mysql": "test/unit/", + "LaminasIntegrationTest\\Db\\Mysql": "test/integration/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "test": "phpunit --colors=always --testsuite \"unit test\"", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", + "test-integration": "phpunit --colors=always --testsuite \"integration test\"", + "upload-coverage": "coveralls -v" + }, + "conflict": { + "laminas/laminas-db": "*" + } +} From 8c83a348bff624dbc9a8fec87aa5f7a34f681c3b Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 14 Mar 2025 17:53:09 -0500 Subject: [PATCH 2/6] Namespace corrections Fix component installer support Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 548d8a3..8d97434 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "homepage": "https://github.com/axleus/laminas-db-mysql/discussions", "support": { - "issues": "https://github.com/alxeus/laminas-db/issues", + "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" }, @@ -24,8 +24,8 @@ }, "extra": { "laminas": { - "component": "Laminas\\Db", - "config-provider": "Laminas\\Db\\ConfigProvider" + "component": "Laminas\\Db\\Mysql", + "config-provider": "Laminas\\Db\\Mysql\\ConfigProvider" } }, "require": { From f6535907c56299ebfaa534c8214473fab36b5be7 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 14 Mar 2025 17:56:46 -0500 Subject: [PATCH 3/6] Signed-off-by: Joey Smith --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8d97434..550d79e 100644 --- a/composer.json +++ b/composer.json @@ -46,13 +46,13 @@ }, "autoload": { "psr-4": { - "Laminas\\Db\\Mysql": "src/" + "Laminas\\Db\\Mysql\\": "src/" } }, "autoload-dev": { "psr-4": { - "LaminasTest\\Db\\Mysql": "test/unit/", - "LaminasIntegrationTest\\Db\\Mysql": "test/integration/" + "LaminasTest\\Db\\Mysql\\": "test/unit/", + "LaminasIntegrationTest\\Db\\Mysql\\": "test/integration/" } }, "scripts": { From bc6d7358f8fe5841ef937b325ef17b51bdab1a96 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 14 Mar 2025 18:03:17 -0500 Subject: [PATCH 4/6] For early development allow a minimum-stability Add script shortcut for psalm Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 550d79e..8b21e73 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,8 @@ "source": "https://github.com/axleus/laminas-db-mysql", "forum": "https://github.com/axleus/laminas-db-mysql/discussions" }, + "minimum-stability": "dev", + "prefer-stable": true, "config": { "sort-packages": true, "platform": { @@ -65,6 +67,7 @@ "test": "phpunit --colors=always --testsuite \"unit test\"", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", "test-integration": "phpunit --colors=always --testsuite \"integration test\"", + "static-analysis": "psalm --shepherd --stats", "upload-coverage": "coveralls -v" }, "conflict": { From 097bd067f7f6037eed16a59a0f2630f6c69a49d6 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 14 Mar 2025 19:10:41 -0500 Subject: [PATCH 5/6] Add required extensions to require-dev Add suggest for extensions to require Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- composer.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composer.json b/composer.json index 8b21e73..355e33c 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,8 @@ "axleus/laminas-db": "dev-3.0.x" }, "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", @@ -44,6 +46,8 @@ "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" }, "autoload": { From 16e4455451e7b57239b4f61490b52d9c242bf2d3 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Sat, 15 Mar 2025 04:28:28 -0500 Subject: [PATCH 6/6] Add laminas github ci action Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- .gitattributes | 9 +++++ .github/workflows/continuous-integration.yml | 11 ++++++ .gitignore | 7 ++++ .laminas-ci.json | 19 +++++++++++ README.md | 3 +- coveralls.yml | 2 ++ phpunit.xml.dist | 35 ++++++++++++++++++++ renovate.json | 6 ++++ 8 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/continuous-integration.yml create mode 100644 .gitignore create mode 100644 .laminas-ci.json create mode 100644 coveralls.yml create mode 100644 phpunit.xml.dist create mode 100644 renovate.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4a2d42f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/.gitattributes export-ignore +/.github/ export-ignore +/.gitignore export-ignore +/phpcs.xml export-ignore +/renovate.json export-ignore +/.laminas-ci.json export-ignore +/phpunit.xml.dist export-ignore +/test/ export-ignore +/clover.xml export-ignore \ No newline at end of file diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..2f02e70 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,11 @@ +name: "Continuous Integration" + +on: + pull_request: + push: + branches: + tags: + +jobs: + ci: + uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f382b26 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.phpcs-cache +/.phpunit.cache +/.phpunit.result.cache +/phpunit.xml +/vendor/ +/xdebug_filter.php +/clover.xml \ No newline at end of file diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..13d383a --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,19 @@ +{ + "ignore_php_platform_requirements": { + "8.1": true, + "8.2": true, + "8.3": true, + "8.4": true + }, + "exclude": [ + { + "name": "PHPUnit", + "php": "8.1" + }, + { + "name": "PHPUnit", + "php": "8.4", + "dependencies": "lowest" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 5919748..5f41cd7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # axleus-repo-template -Template repo for starting all new repo's + +This package provides MySQL support for Laminas Db. diff --git a/coveralls.yml b/coveralls.yml new file mode 100644 index 0000000..bc71b62 --- /dev/null +++ b/coveralls.yml @@ -0,0 +1,2 @@ +coverage_clover: clover.xml +json_path: coveralls-upload.json diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..c79ac12 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,35 @@ + + + + + test/unit + + + test/integration + + + + + + + src + + + test/config + test/resource + + + \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..580e320 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>axleus/.github:renovate-config" + ] +} \ No newline at end of file