-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Add casters for object-converted resources #59035
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
[VarDumper] Add casters for object-converted resources #59035
Conversation
13e4077
to
1ff8865
Compare
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.
tedious topic, thanks for working on it
7096471
to
24c00c5
Compare
ed8fdf2
to
d382421
Compare
Revamped the PR, so most things are still in ResourceCaster now. The regression in PHP has been reported to php/php-src#16990, and most casters now "simply" map infos to |
9830222
to
8ec4800
Compare
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.
@internal since 7.3
👍
34d936d
to
d0b95fc
Compare
Marked all casters as internal and added |
5cf62d8
to
27a573b
Compare
4952bc6
to
7ea55ce
Compare
7ea55ce
to
afbb31e
Compare
Solved by silencing |
ec86ba0
to
9d65675
Compare
The |
This PR was merged into the 6.4 branch. Discussion ---------- Add CI job for PHP 8.5 | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Enables PHP 8.5 nightlies on the CI. What motivated this early addition is the continuous effort of converting resources to actual classes. PHP 8.5 already embeds features like https://wiki.php.net/rfc/directory-opaque-object, which could already be handled in PRs such as #59035. Also we'll be able to fix future deprecations as soon as they appear during the next year. Commits ------- 15d56bb Add an experimental CI job for PHP 8.5
9d65675
to
94aa998
Compare
{ | ||
if (\PHP_VERSION_ID < 80402 && !\is_resource($dba)) { |
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.
The fix was shipped with PHP 8.4.2.
392eb5a
to
ece56db
Compare
public static function castGd(\GdImage $gd, array $a, Stub $stub, bool $isNested): array | ||
{ | ||
$a['size'] = imagesx($gd).'x'.imagesy($gd); | ||
$a['trueColor'] = imageistruecolor($gd); |
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.
don't these miss the virtual prefix?
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.
Virtual prefixes weren't present before the refactoring, but I'm fine adding them, it makes sense
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.
they weren't present because resource's properties are always virtual
now that we deal with objects, we have to make the virtual explicitly
48619eb
to
8c99b6a
Compare
8c99b6a
to
7be6483
Compare
Thank you @alexandre-daubois. |
This PR makes up for the backlog of resources transformed into objects in the latest versions of PHP.
✅ Support added (or already existing with an update in
AbstractCloner
):CurlMultiHandle
: no information to gatherOpenSSLCertificateSigningRequest
OpenSSLAsymmetricKey
Sqlite3Result
Sockets
(to rebase on [VarDumper] Add caster for Socket instances #59026)PgSql\Lob
PgSql\Connection
PgSql\Result
Odbc\Connection
Odbc\Result
Soap\Url
Soap\Sdl