Skip to content

Commit

Permalink
(Changed) Addressed PHP 8.4 compatibility issues, updated dependency …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
MarjovanLier and qodo-merge-pro[bot] authored Feb 24, 2024
1 parent 5bc912e commit f14095c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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": [
Expand All @@ -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"
}
}

0 comments on commit f14095c

Please sign in to comment.