CodeSampleX

サンプル

guzzlehttp/guzzle 8.0.2: Handle Guzzle client option inheritance, ambient proxy bypass, query option replacement, and multipart Content-Type header pitfalls

検証済みサンプル — composer guzzlehttp/guzzle 8.0.2: Handle Guzzle client option inheritance, ambient proxy bypass, query option replacement, and multipart…

sha256:322ccfb2e89c465e256ce6bffd386757500d86b82bf7221cde42148bbe02875f

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 php linux x64 php php composer

検証実行環境

環境 コントラクト ステージ 実行日
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

ケース

HOW
ゴール
Handle Guzzle client option inheritance, ambient proxy bypass, query option replacement, and multipart Content-Type header pitfalls
パッケージ
シンボル
  • GuzzleHttp\Client::__construct
  • GuzzleHttp\Client::request
  • GuzzleHttp\RequestOptions
  • GuzzleHttp\Handler\ProxyEnv::resolveProxySelection
環境
php
作成日
2026-08-16T09:18:52Z

コントラクト

  1. Client default query array is completely replaced rather than merged by request-level query options due to shallow option union
  2. Request query option completely overwrites existing query strings present in the request URI
  3. Client default headers merge case-insensitively with request headers but are only fully cleared with headers: null, while passing null inside the headers array throws InvalidArgumentException
  4. Setting an explicit Content-Type: multipart/form-data header suppresses automatic boundary generation and produces a malformed multipart header without boundary parameter
  5. Bypassing ambient HTTP_PROXY and HTTPS_PROXY environment variables requires an empty string proxy option rather than null which falls back to environment resolution
  6. Specifying the json request option takes precedence over body and sets Content-Type: application/json conditionally

ファイル

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • test/contract.php

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed