Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 0 additions & 95 deletions .github/dependabot.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ jobs:
${{ runner.os }}-php${{ matrix.php }}-composer-

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader ${{ matrix.stability == 'prefer-lowest' && '--prefer-lowest' || '' }}
if: matrix.stability != 'prefer-lowest'
run: composer install --no-interaction --prefer-dist --optimize-autoloader ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl --ignore-platform-req=ext-posix' || '' }}

- name: Install dependencies (prefer-lowest)
if: matrix.stability == 'prefer-lowest'
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-lowest ${{ matrix.os == 'windows-latest' && '--ignore-platform-req=ext-pcntl --ignore-platform-req=ext-posix' || '' }}

- name: Execute tests
run: composer test
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
with:
comment-summary-in-pr: always
fail-on-severity: moderate
allow-dependencies-licenses: GPL-3.0-or-later, MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, ISC, LGPL-2.1, LGPL-3.0
allow-licenses: GPL-3.0-or-later, MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, ISC, LGPL-2.1, LGPL-3.0
58 changes: 40 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Release Notes

## [Unreleased](https://github.com/Thavarshan/fetch-php/compare/v3.2.3...HEAD)
## [Unreleased](https://github.com/Thavarshan/fetch-php/compare/v3.3.0...HEAD)

## [v3.3.0](https://github.com/Thavarshan/fetch-php/compare/v3.2.3...v3.3.0) - 2025-01-17

### Added

- **Comprehensive Testing Utilities** inspired by Laravel's HTTP client testing:
- `MockServer` with URL pattern matching (wildcards, method-specific, callbacks)
- `MockResponse` fluent builder with convenience methods for all HTTP status codes
- `MockResponseSequence` for testing retry logic and flaky endpoints
- `Recorder` for capturing and replaying request/response pairs
- Comprehensive assertion helpers (`assertSent()`, `assertNotSent()`, `assertSentCount()`, `assertNothingSent()`)
- Request recording with JSON export/import for test fixtures
- Stray request prevention with allowlist support
- `HandlesMocking` trait integrated into `ClientHandler` for request interception
- `Request::createFromBase()` method for PSR-7 request conversion
- 117 new tests with 288 assertions for testing utilities
- Comprehensive testing documentation in `docs/guide/testing.md` (617 lines)
- Complete API reference in `docs/api/testing.md` (539 lines)
- Testing utilities section in VitePress sidebar navigation

### Changed

- Updated `PerformsHttpRequests` to support mock request interception
- Enhanced `ClientHandler` with `HandlesMocking` trait for testing support

### Fixed

- Fixed async helper function imports to use correct `Matrix\Support\*` namespace:
- Updated imports in `ManagesPromises` trait (`async`, `await`, `all`, `any`, `race`, `reject`, `resolve`, `timeout`)
- Updated imports in `PerformsHttpRequests` trait (`async`)
- Updated imports in `ManagesPromisesTest` and `AsyncRequestsTest`
- All 282 tests now passing with 841 assertions

### Removed

- Removed Dependabot configuration (`dependabot.yml`)
- Removed Dependabot auto-merge workflow

**Full Changelog**: <https://github.com/Thavarshan/fetch-php/compare/v3.2.3...v3.3.0>

## [v3.2.3](https://github.com/Thavarshan/fetch-php/compare/v3.2.2...v3.2.3) - 2025-05-24

Expand Down Expand Up @@ -338,20 +377,3 @@
## v1.0.0 - 2024-09-14

Initial release.

## [v3.2.2](https://github.com/Thavarshan/fetch-php/compare/v3.2.1...v3.2.2) - 2025-05-19

### Fixed

- "Fatal error: Uncaught Error: Interface `Psr\Log\LoggerAwareInterface` not found" closes #21

**Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/3.2.1...3.2.2](https://github.com/Thavarshan/fetch-php/compare/3.2.1...3.2.2)

## [v3.2.1](https://github.com/Thavarshan/fetch-php/compare/v3.2.1...v3.2.1) - 2025-05-17

### Changed

- Updated documentation
- Updated dependencies

**Full Changelog**: [https://github.com/Thavarshan/fetch-php/compare/3.2.0...3.2.1](https://github.com/Thavarshan/fetch-php/compare/3.2.0...3.2.1)
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jerome/fetch-php",
"description": "The JavaScript fetch API for PHP.",
"version": "3.2.3",
"version": "3.3.0",
"type": "library",
"license": "MIT",
"authors": [
Expand All @@ -28,7 +28,7 @@
"ext-pcntl": "*",
"guzzlehttp/guzzle": "^7.9",
"guzzlehttp/psr7": "^2.7",
"jerome/matrix": "^3.3",
"jerome/matrix": "^3.4",
"psr/http-message": "^1.0|^2.0",
"psr/log": "^1.0|^2.0|^3.0",
"react/event-loop": "^1.5",
Expand All @@ -52,10 +52,10 @@
"scripts": {
"lint": "duster lint src",
"fix": "duster fix src",
"test": "phpunit --do-not-fail-on-skipped --no-coverage",
"test:unit": "phpunit --do-not-fail-on-skipped --no-coverage tests/Unit",
"test:integration": "phpunit --do-not-fail-on-skipped --no-coverage tests/Integration",
"test:coverage": "XDEBUG_MODE=coverage phpunit --do-not-fail-on-skipped --coverage-html=coverage --coverage-text --coverage-xml=coverage",
"test": "phpunit --no-coverage",
"test:unit": "phpunit --no-coverage tests/Unit",
"test:integration": "phpunit --no-coverage tests/Integration",
"test:coverage": "XDEBUG_MODE=coverage phpunit --coverage-html=coverage --coverage-text --coverage-xml=coverage",
"analyse": "phpstan analyse",
"check": [
"@analyse",
Expand Down
6 changes: 6 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ export default defineConfig({
{ text: "Status", link: "/api/status-enum" },
],
},
{
text: "Testing",
items: [
{ text: "Testing Utilities", link: "/api/testing" },
],
},
],
"/examples/": [
{
Expand Down
Loading
Loading