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
7 changes: 7 additions & 0 deletions docs/en/appendices/6-0-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ Some properties have also been renamed to better reflect their purpose. These ar
- The methods `_getCookies()`, `_getJson()`, `_getXml()`, `_getHeaders()`
and `_getBody()` have been removed. Use/Overwrite their non-prefixed public alternative instead.

- URL parsing now uses PHP 8.5's `Uri\WhatWg\Url` and `Uri\Rfc3986\Uri`
parsers. Review malformed or relative URL inputs and exception handling. In
particular, `Client::createFromUrl()` can now throw
`Uri\WhatWg\InvalidUrlException` for inputs previously rejected with
`InvalidArgumentException`. See
[Creating Scoped Clients](../core-libraries/httpclient#http_client_scoped_client).

### ORM

- The `_accessible` property inside Entities has been renamed to `patchable`
Expand Down
11 changes: 9 additions & 2 deletions docs/en/core-libraries/httpclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,15 @@ If your scoped client only needs information from the URL you can use
$http = Client::createFromUrl('https://api.example.com/v1/test');
```

The above would create a client instance with the `protocol`, `host`, and
`basePath` options set.
The above creates a client with `scheme`, `host`, `port` and `basePath`
options derived from the URL. Query strings and fragments are not used to
configure the scoped client.

`createFromUrl()` uses PHP's WHATWG URL parser. Supply an absolute URL with
a scheme and host. Malformed or relative URLs can throw
`Uri\WhatWg\InvalidUrlException`; a parsed URL with no host raises
`InvalidArgumentException`. The parser normalizes URLs, including removing
default ports such as `:80` from HTTP URLs.

The following information can be used when creating a scoped client:

Expand Down
Loading