Repository navigation
Fix/ci and sample api - #1
Merged
Merged
Conversation
The workflow triggered on `branches: [main]`, but this repository's default branch is `master`, so it had never run a single time. The README badge also pointed at `tests.yml` while the file was named `php.yml`. Renamed the file to `tests.yml` (matching the badge) and triggered it on both `master` and `main`. Laravel 11 is past its security-fix window, so every 11.x release now carries an open advisory and Composer refuses to install it — the `laravel: '11.*'` matrix legs would have failed at dependency resolution even once they started running. The install step opts the CI checkout out of that block; applications should leave the check on. Also: install the framework with `--dev` rather than adding it to `require`, add `--prefer-stable` to the update, cache Composer downloads, restrict `permissions` to `contents: read`, cancel superseded runs, and move Pint and PHPStan into their own job instead of repeating them across all six matrix legs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DriverRegistrar snapshotted `config('http-adapter.drivers')` when the manager
was constructed and captured each driver's array by value, so any driver added
or reconfigured after that point was silently ignored. The suite only passed
because every test happened to mutate config before the first resolution.
Driver resolution now reads the live config repository in
AdapterManager::createDriver(), with a new InvalidDriverConfigException::
unknownDriver() for names that are absent from config entirely. Two tests cover
the behaviour, including one that resolves a driver registered after the manager
was already built.
Note that Illuminate\Support\Manager memoises resolved drivers, so changing a
driver's config at runtime still requires forgetDrivers() — documented in the
README and declared on the facade.
The Postex references throughout the docs, fixtures and workbench are replaced
with JSONPlaceholder, a free public sample API:
- tests: `SampleApiClient` fixture with posts/show_post/create_post endpoints.
The suite still never touches the network; every test stubs the transport.
- workbench: a matching `sample` driver plus a new `http-adapter:sample` command
that makes a real call and then demonstrates the mock path.
- README: rebuilt around the sample API, with new notes on `@method` docblocks
for endpoint methods (they go through __call, so static analysers can't see
them), resolve-time config, and the forgetDrivers() caveat.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.