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 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: 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 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" }