From 01bc6ccf6523a8795cbc4eaed109b168ed6831ad Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 24 Mar 2026 09:07:23 +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 bcedb222..03a23d28 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 17b38c7cbd029ae4d645bb3380c5f080bf290caa Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 24 Mar 2026 09:18:41 +0100 Subject: [PATCH 2/4] Normalize `composer.json` Run `composer normalize` to establish a consistent structure for `composer.json`. This keeps future dependency changes deterministic and reduces unnecessary diff noise. --- composer.json | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 4a1b9119..2633fd65 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,19 @@ { "name": "ipl/html", - "type": "library", "description": "Icinga PHP Library - HTML abstraction layer", "license": "MIT", - "keywords": ["html"], + "type": "library", + "keywords": [ + "html" + ], "homepage": "https://github.com/Icinga/ipl-html", - "config": { - "sort-packages": true - }, "require": { "php": ">=8.2", "ext-fileinfo": "*", + "guzzlehttp/psr7": "^2.8", "ipl/stdlib": ">=0.15.0", "ipl/validator": ">=1.0.0", - "psr/http-message": "^1.1", - "guzzlehttp/psr7": "^2.8" + "psr/http-message": "^1.1" }, "require-dev": { "ext-dom": "*", @@ -30,5 +29,8 @@ "psr-4": { "ipl\\Tests\\Html\\": "tests" } + }, + "config": { + "sort-packages": true } } From d2d733667f78aff7b3fabf7c72155aab8b686c22 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 24 Mar 2026 09:27:15 +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 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..d8bac3e0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# Exclude Git and CI configuration files from archives. +.git* export-ignore + +# Exclude test-related files from archives. +tests/ export-ignore +phpstan* export-ignore From 1921b9beb4e2efcf68223acb36d71e333fa42e8b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 24 Mar 2026 09:38:52 +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 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 9ec221c9..681b17e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,5 @@ -# Exclude all hidden files -.* - -# Except those related to Git and GitHub -!.git* -!.github* - -# 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