Repository navigation
chore(deps): sync fork with upstream 2.0.0 [SQZLY-14423] #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7f814e2
Add `composer require cloudflare/sdk` in how to install doc
PululuK 20da7aa
Adding semgrep yaml file
2d3f198
make cache purge environment aware (#267)
jafowler 33cba42
Upgrade PSR HTTP Message
davidbarratt 57f157d
Fix Deprecations
davidbarratt a9e2377
Remove composer.lock and make tests run on lowest and furthest deps
davidbarratt 3c471d5
Linter does not run on PHP 8.4
davidbarratt 5716458
Lining only needs to happen once
davidbarratt 5bb58bd
Fix PHP 8.4 implicit-nullable deprecations (#277)
andreicotaga-ebank 2add4e2
Merge pull request #275 from davidbarratt/psr-http-upgrade
ssicard 7002792
Merge pull request #280 from transferfintech/fix/php-84-nullable
ssicard 9185639
Merge pull request #217 from PululuK/patch-1
ssicard 78cae5a
fix: update CI workflows, linter config, and PHP version constraint
ssicard d7fc209
fix: remove --prefer-stable from composer install args
ssicard dfbb2ed
fix: add missing use import for InvalidArgumentException
ssicard dc73beb
fix: add PHPMD ruleset and fix pre-existing lint violations
ssicard de59dde
fix: update semgrep workflow to ubuntu-latest
ssicard 9d09daf
Merge pull request #283 from cloudflare/fix/ci-and-linter
ssicard 2c15d68
docs: update README and add CHANGELOG for 2.0.0 release
ssicard e571eed
Merge pull request #284 from cloudflare/docs/readme-and-changelog
ssicard c16707f
Merge upstream/master (2.0.0) into fork
e8438b5
Apply upstream PSR-12 spacing to WorkersRoute
0abb510
fix(ci): make the prefer-lowest matrix real and raise the PHPUnit floor
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
|
|
||
| on: | ||
| pull_request: {} | ||
| workflow_dispatch: {} | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| name: Semgrep config | ||
| jobs: | ||
| semgrep: | ||
| name: semgrep/ci | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
| SEMGREP_URL: https://cloudflare.semgrep.dev | ||
| SEMGREP_APP_URL: https://cloudflare.semgrep.dev | ||
| SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version | ||
| container: | ||
| image: returntocorp/semgrep | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: semgrep ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| /.idea | ||
| /vendor/ | ||
| /composer.lock | ||
| /vendor/ | ||
| /.phpunit.result.cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Changelog | ||
|
|
||
| ## 2.0.0 | ||
|
|
||
| ### Breaking Changes | ||
|
|
||
| - **Minimum PHP version raised from 7.2.5 to 8.1.** PHP 7.x and 8.0 are no | ||
| longer supported. All of these versions are past end-of-life upstream. | ||
|
|
||
| ### Changes | ||
|
|
||
| - Add support for `psr/http-message` v2.0 (constraint is now `^1.1 || ^2.0`). | ||
| This resolves dependency conflicts with libraries that require PSR-7 v2, | ||
| including `league/oauth2-server` and newer Drupal modules. | ||
| ([#275](https://github.com/cloudflare/cloudflare-php/pull/275)) | ||
| - Fix PHP 8.4 implicit-nullable deprecation warnings in `Guzzle::__construct()` | ||
| and `Zones::cachePurge()`. | ||
| ([#280](https://github.com/cloudflare/cloudflare-php/pull/280)) | ||
| - Upgrade `guzzlehttp/guzzle` constraint from `^7.0.1` to `^7.4`. | ||
| - Upgrade `phpunit/phpunit` from `^5.7` to `^9.6 || ^10.0 || ^11.0`. | ||
| - Upgrade `friendsofphp/php-cs-fixer` from `^2.6` to `^3.0`. | ||
| - Remove committed `composer.lock` (correct practice for libraries). | ||
| - Update GitHub Actions workflows: `actions/checkout` v4, `actions/cache` v4, | ||
| `php-actions/composer` v6, Semgrep runner to `ubuntu-latest`. | ||
| - Fix PHP test matrix to 8.1, 8.2, 8.3, 8.4. | ||
| - Migrate linter config from `.php_cs` to `.php-cs-fixer.php`. | ||
| - Add PHPMD ruleset file (`phpmd.xml`). | ||
| - Remove unused test variables in `DNSAnalyticsTest`. | ||
| - Update README to reflect PHP 8.1+ requirement and current project status. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer-lowest CI installs incompatible PHPUnit
Low Severity
The new test matrix sets
COMPOSER_PREFER_LOWESTwhilephpunit/phpunitis constrained to^9.0. Prefer-lowest resolves PHPUnit 9.0, which does not defineassertObjectHasProperty(added in 9.6.11) that the suite already calls, so thelowest=1jobs fail.Additional Locations (1)
composer.json#L11-L12Reviewed by Cursor Bugbot for commit e8438b5. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 0abb510 — the constraint bug is real, though the symptom isn't quite what's described here.
The
lowest=1jobs weren't failing — they were passing without testing anything. Composer only honoursCOMPOSER_PREFER_LOWESTonupdate; this workflow raninstall, so the variable was inert and those four jobs silently re-resolved the highest versions, duplicating thelowest=0jobs:So the matrix was reporting green for work it never did. The constraint problem was sitting behind that, latent — with prefer-lowest genuinely applied,
^9.0resolves 9.3.0 and the suite errors 28 times onassertObjectHasProperty(), exactly as described.The fix needed both halves: correcting only the constraint would have left the matrix still inert, and correcting only the workflow would have turned the PR red.
One correction worth flagging:
^9.6is not a sufficient floor.assertObjectHasProperty()landed in 9.6.11, so prefer-lowest on^9.6resolves 9.6.0 and still fails. Measured both:^9.6^9.6.11Landed as
command: install→updateand^9.0→^9.6.11. Both arms now pass and genuinely differ — the lowest arm installspsr/http-message1.1 and the highest 2.0, so this PR's^1.0 || ^2.0change is actually exercised across PHP 8.1–8.4 rather than merely asserted.