From f14095c7764335677571a3aa10d903814b0a58e8 Mon Sep 17 00:00:00 2001 From: Marjo Date: Sat, 24 Feb 2024 21:42:33 +0100 Subject: [PATCH] (Changed) Addressed PHP 8.4 compatibility issues, updated dependency versions, and simplified scripts (#10) * Update PHP versions and workflow in PHP.yml PHP.yml has been updated to include PHP version "8.4" in the matrix. The workflow has also been improved by adding comments for each step to increase readability. Minor adjustments to the syntax have been made for consistency. * Update dependency versions and simplify scripts This commit updates the version for the "vimeo/psalm" dependency. Additionally, scripts were simplified by removing the PHP calls and memory limit flags before each command, presumably to improve readability and maintainability. * Update CHANGELOG.md * Update php version constraints in workflow PHP 8.4 has been removed from the list of PHP versions in the workflow matrix due to package dependency conflicts. The packages roave/no-floaters and vimeo/psalm do not support PHP 8.4 and this prevents a successful build. * Remove outdated changelog entries The outdated entries in the CHANGELOG.md file have been removed. These entries, originally summarized current development updates, are no longer essential as the mentioned updates have already been implemented and deployed. * Update CHANGELOG.md --------- Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com> --- .github/workflows/php.yml | 10 +++++++--- CHANGELOG.md | 7 +++++++ composer.json | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c8173db..a6e70c9 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.2', '8.3'] + php-versions: ["8.2", "8.3"] steps: # This step checks out a copy of your repository. @@ -55,21 +55,24 @@ jobs: id: composer-install run: composer install --prefer-dist --no-progress --no-suggest + # This step sets up Go environment for the job. - name: Set up Go uses: actions/setup-go@v3 with: go-version: "1.22" + # This step installs osv-scanner for vulnerability scanning. - name: Install osv-scanner run: go install github.com/google/osv-scanner/cmd/osv-scanner@v1 + # This step scans composer.lock for vulnerabilities using osv-scanner. - name: Scan composer.lock for vulnerabilities run: osv-scanner scan --no-ignore composer.lock # This step checks for vulnerabilities in the project dependencies. - name: Check for vulnerabilities id: vulnerabilities-check - if: steps.composer-install.outcome =='success' + if: steps.composer-install.outcome == 'success' run: composer test:vulnerabilities-check # This step runs linting in parallel to speed up the process. @@ -165,11 +168,12 @@ jobs: # This step creates and pushes a new tag to the repository. - name: Create and push new tag id: push-tag - if: github.ref == 'refs/heads/main' && env.NEW_TAG != '' && steps.new-tag.outcome =='success' + if: github.ref == 'refs/heads/main' && env.NEW_TAG != '' && steps.new-tag.outcome == 'success' run: | git tag $NEW_TAG git push origin $NEW_TAG + # This step creates a comparison link between the latest and the new tag. - name: Create comparison link id: comparison-link if: env.LATEST_TAG != '' && steps.push-tag.outcome == 'success' diff --git a/CHANGELOG.md b/CHANGELOG.md index bc894c3..2160d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## 2024-02-24 +### Changed +- Removed PHP 8.4 from the testing matrix due to compatibility issues, ensuring the project's stability and compatibility with supported PHP versions. +- Updated the "vimeo/psalm" dependency to version "5.22.2", enhancing compatibility and stability. +- Simplified script executions in `composer.json`, improving readability and maintainability by removing unnecessary PHP calls and memory limit flags. + +## 2024-02-24 + ### Fixed - Corrected the conditions for invoking the 'Create Release' step in the GitHub workflow. The step now triggers only when the 'Get Commits' step is successful, enhancing the reliability of the release process. - Fixed a misnamed step reference in the 'Get commit messages' step, changing 'compare-link' to 'comparison-link.outcome', ensuring it triggers correctly. diff --git a/composer.json b/composer.json index 7b71029..6008595 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "rector/rector": ">=1.0.1", "roave/no-floaters": ">=1.11.0", "roave/security-advisories": "dev-latest", - "vimeo/psalm": ">=5.22.1" + "vimeo/psalm": ">=5.22.2" }, "scripts-descriptions": { "test:code-style": "Check code for stylistic consistency.", @@ -74,7 +74,7 @@ "scripts": { "post-update-cmd": [ "composer validate --strict", - "php -d memory_limit=-1 ./vendor/bin/security-checker security:check", + "security-checker security:check", "composer outdated -D" ], "tests": [ @@ -90,16 +90,16 @@ "@test:psalm", "@test:rector" ], - "test:code-style": "php -d memory_limit=-1 ./vendor/bin/pint --test", + "test:code-style": "pint --test", "test:composer-validate": "composer validate --strict", "test:infection": "php -d memory_limit=-1 -d zend_extension=xdebug -d xdebug.mode=coverage ./vendor/bin/infection --threads=4 --show-mutations", - "test:lint": "php -d memory_limit=-1 ./vendor/bin/parallel-lint --exclude vendor --show-deprecated .", - "test:phan": "php -d memory_limit=-1 ./vendor/bin/phan --allow-polyfill-parser --no-progress-bar", - "test:phpmd": "php -d memory_limit=-1 ./vendor/bin/phpmd src,tests text phpmd.xml", - "test:phpstan": "php -d memory_limit=-1 ./vendor/bin/phpstan analyse --no-progress --no-interaction", - "test:phpunit": "php -d memory_limit=-1 ./vendor/bin/phpunit --no-coverage --no-logging", - "test:psalm": "php -d memory_limit=-1 ./vendor/bin/psalm --no-cache --no-progress --show-info=false", - "test:rector": "php -d memory_limit=-1 ./vendor/bin/rector --dry-run", - "test:vulnerabilities-check": "php -d memory_limit=-1 ./vendor/bin/security-checker security:check" + "test:lint": "parallel-lint --exclude vendor --show-deprecated .", + "test:phan": "phan --allow-polyfill-parser --no-progress-bar", + "test:phpmd": "phpmd src,tests text phpmd.xml", + "test:phpstan": "phpstan analyse --no-progress --no-interaction", + "test:phpunit": "phpunit --no-coverage --no-logging", + "test:psalm": "psalm --no-cache --no-progress --show-info=false", + "test:rector": "rector --dry-run", + "test:vulnerabilities-check": "security-checker security:check" } }