Skip to content

[VarDumper] Add caster for Socket instances #59026

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

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Nov 28, 2024

Q A
Branch? 7.3
Bug fix? no
New feature? yes
Deprecations? no
Issues -
License MIT

@alexandre-daubois
Copy link
Member

alexandre-daubois commented Nov 28, 2024

While working on other casters, this is the solution I came up with Socket. Feel free to use any idea (or none 😄) in your PR!

@nicolas-grekas
Copy link
Member Author

I can close here :)

@nicolas-grekas
Copy link
Member Author

or we can merge and improve in a follow up

@alexandre-daubois
Copy link
Member

Let's get this one merged and iterate over it 👍

/**
* @author Nicolas Grekas <p@tchwork.com>
*/
final class SocketCaster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest tagging it as @internal as it is an internal implementation detail of AbstractCloner.

@fabpot
Copy link
Member

fabpot commented Dec 6, 2024

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 2d1838a into symfony:7.3 Dec 6, 2024
9 of 10 checks passed
@nicolas-grekas nicolas-grekas deleted the vd-socket branch January 3, 2025 16:26
nicolas-grekas added a commit that referenced this pull request Jan 9, 2025
… (alexandre-daubois)

This PR was squashed before being merged into the 7.3 branch.

Discussion
----------

[VarDumper] Add casters for object-converted resources

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Issues        | -
| License       | MIT

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`):
- ext-curl
    - `CurlMultiHandle`: **no information to gather**
- ext-openssl
  -  `OpenSSLCertificateSigningRequest`
  - `OpenSSLAsymmetricKey`
- ext-finfo
  - **No information to gather**
- ext-sqlite3
	- `Sqlite3Result`
- ext-sockets
	- `Sockets` (to rebase on #59026)
- ext-pgsql
	- `PgSql\Lob`
	- `PgSql\Connection`
	- `PgSql\Result`

⚠️ Remaining classes I couldn't test/find enough info yet (introduced in PHP 8.4):
- `Odbc\Connection`
- `Odbc\Result`
- `Soap\Url`
- `Soap\Sdl`

Commits
-------

7be6483 [VarDumper] Add casters for object-converted resources
symfony-splitter pushed a commit to symfony/var-dumper that referenced this pull request Jan 9, 2025
… (alexandre-daubois)

This PR was squashed before being merged into the 7.3 branch.

Discussion
----------

[VarDumper] Add casters for object-converted resources

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Issues        | -
| License       | MIT

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`):
- ext-curl
    - `CurlMultiHandle`: **no information to gather**
- ext-openssl
  -  `OpenSSLCertificateSigningRequest`
  - `OpenSSLAsymmetricKey`
- ext-finfo
  - **No information to gather**
- ext-sqlite3
	- `Sqlite3Result`
- ext-sockets
	- `Sockets` (to rebase on symfony/symfony#59026)
- ext-pgsql
	- `PgSql\Lob`
	- `PgSql\Connection`
	- `PgSql\Result`

⚠️ Remaining classes I couldn't test/find enough info yet (introduced in PHP 8.4):
- `Odbc\Connection`
- `Odbc\Result`
- `Soap\Url`
- `Soap\Sdl`

Commits
-------

7be64835c4b [VarDumper] Add casters for object-converted resources
@fabpot fabpot mentioned this pull request May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants