From 59d42fb953e8c414628c481adc7f6d204ad925ab Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 23 Mar 2026 09:03:47 +0100 Subject: [PATCH 1/4] Run CI on support branches, all PRs, and on demand Potential bugfix releases for maintained older versions should receive the same PHP checks as the default branch. Extend push builds to also cover `support/*` and drop the pull request target filter so validation still runs for pull requests merged through other pull requests. Enable `workflow_dispatch` for ad-hoc verification. --- .github/workflows/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 22bfa1e..137caa3 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -4,9 +4,9 @@ on: push: branches: - main + - support/* pull_request: - branches: - - main + workflow_dispatch: jobs: php: From 72bc747bd5d36e4f26ee37bb5fcf81abcefdb3d1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 23 Mar 2026 09:14:22 +0100 Subject: [PATCH 2/4] Normalize `composer.json` and enable sorted package lists Enable Composer's `sort-packages` setting and run `composer normalize` to establish a consistent structure for `composer.json`. This keeps future dependency changes deterministic and reduces unnecessary diff noise. --- composer.json | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 3a6e7d9..3923080 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,13 @@ { "name": "ipl/sql", - "type": "library", "description": "Icinga PHP Library - SQL abstraction layer", - "keywords": ["sql", "database"], - "homepage": "https://github.com/Icinga/ipl-sql", "license": "MIT", + "type": "library", + "keywords": [ + "sql", + "database" + ], + "homepage": "https://github.com/Icinga/ipl-sql", "require": { "php": ">=8.2", "ext-pdo": "*", @@ -14,18 +17,21 @@ "ipl/stdlib": "dev-main" }, "autoload": { - "files": [ - "src/pdo-driver-consts-forward-compat.php" - ], "psr-4": { "ipl\\Sql\\": "src" - } + }, + "files": [ + "src/pdo-driver-consts-forward-compat.php" + ] }, "autoload-dev": { "psr-4": { "ipl\\Tests\\Sql\\": "tests" } }, + "config": { + "sort-packages": true + }, "scripts": { "test": "vendor/bin/phpunit" } From 2c10fcc88bf48016b98c5ccdcb0f38d4c09c3bf3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 23 Mar 2026 09:22:08 +0100 Subject: [PATCH 3/4] Keep `git archive` outputs free of repository-only files Add a minimal `.gitattributes` file so `git archive` excludes CI and Git configuration files as well as test-related files. This keeps release archives focused on the package contents. --- .gitattributes | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ff4c28e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Exclude Git and CI configuration files from archives. +.git* export-ignore +.github/ export-ignore + +# Exclude test-related files from archives. +tests/ export-ignore +phpstan* export-ignore From fffb8c9ab58dc76321ac974afa05dfaeaad68e93 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 23 Mar 2026 09:31:55 +0100 Subject: [PATCH 4/4] Clean up `.gitignore` to only cover project-specific artifacts Remove the broad hidden file exclusion and its `.git*` whitelist in favor of a global `~/.gitignore`. Editor and OS artifacts such as `.DS_Store`, `.idea/`, or `.vscode/` are environment-specific and not the project's responsibility to exclude. Each developer should maintain a global ignore file for such artifacts: git config --global core.excludesFile ~/.gitignore Keep only Composer installation artifacts with a comment clarifying why `composer.lock` is excluded for library projects. --- .gitignore | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 34d585a..681b17e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -# Exclude all hidden files -.* - -# Except those related to Git (and GitHub) -!.git* - -# Exclude files from composer install -vendor/ +# Ignore Composer installation artifacts; composer.lock is intentionally +# excluded as this is a library - applications depending on this package +# manage their own lock file. +/vendor/ composer.lock