Skip to content

Implement GH-15711: Allow SoapClient to use the backing value during response serialization #15803

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

Closed
wants to merge 4 commits into from

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Sep 8, 2024

See individual commits, some code had to be adapted first.

@@ -830,33 +831,34 @@ static zval *to_zval_hexbin(zval *ret, encodeTypePtr type, xmlNodePtr data)
return ret;
}

static zend_string *get_serialization_string_from_zval(zval *data)
Copy link
Member

Choose a reason for hiding this comment

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

Should this have a "SOAP" prefix? I don't remember if SOAP uses them or not

Copy link
Member Author

Choose a reason for hiding this comment

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

The other methods here don't do that, most methods in soap actually don't 🤷

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

The overall logic makes sense to me, possibly should be backported as it could be considered a bug?

@nielsdos
Copy link
Member Author

nielsdos commented Sep 9, 2024

I updated one commit to remove a dead break statement, and I added a commit adding support for int-backed enums as per #15711 (comment)

@nielsdos
Copy link
Member Author

nielsdos commented Sep 9, 2024

Possibly should be backported as it could be considered a bug?

I don't know, I think this is closer to a feature than a bugfix.

…tring()

For now this new function only returns a copy of the string, but its
functionality will be expanded by later commits.
to_xml_string() now uses this function and the memory management is
simplified as well.
@nielsdos
Copy link
Member Author

nielsdos commented Sep 9, 2024

Had to rebase to make CI green again due to master failure

}
ZEND_FALLTHROUGH;
default:
return zval_get_long(data);
Copy link
Member

Choose a reason for hiding this comment

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

Is this guaranteed to be an integer string?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. It'll throw if that's not the case.

@MrMeshok
Copy link

Possibly should be backported as it could be considered a bug?

I don't know, I think this is closer to a feature than a bugfix.

I would appreciate backport to 8.3. But if not, it's not a big deal. I'll just add TODOs to remove workarounds when 8.4 releases

@nielsdos
Copy link
Member Author

Afaik today is the last day we can still add features to 8.4. The question is whether this is a feature or a bugfix. Cc @SakiTakamachi @ericmann @NattyNarwhal

@SakiTakamachi
Copy link
Member

@nielsdos
I would consider this mostly a bug fix.

@NattyNarwhal
How do you think?

@NattyNarwhal
Copy link
Member

Unfortunately I just cut the release already. It might not be too late to get a feature in though, from the sounds of this comment, it might be possible to get it after beta but before RC, but I could be misreading it though.

That said, I am sympathetic to call this a bug fix based on the original issue's description, since it's an inconsistency between places where you'd want to serialize values.

@nielsdos
Copy link
Member Author

nielsdos commented Sep 10, 2024

I'll wait for Eric to see if he sees this too as a bugfix, and in that case there's no issue at all. Thanks for the feedback!

Unfortunately I just cut the release already. It might not be too late to get a feature in though, from the sounds of this comment, it might be possible to get it after beta but before RC, but I could be misreading it though.

I am reading https://wiki.php.net/rfc/release_cycle_update and getting confused:

One the one hand it states:

We propose to drop this small feature exception, and disallow any feature addition in Release Candidates, Bug Fix releases, and of course, Security releases.

But it also states (under "Revised timeline"):

Sep 26 2024: RC 1 — No more new features may be introduced into the 8.4 release from now on.

So this seems contradictory?

@ericmann
Copy link
Contributor

I'll wait for Eric to see if he sees this too as a bugfix, and in that case there's no issue at all.

I don't have a strong feeling either way, but this does feel like a bugfix. I'd like to see it land in both 8.3 and 8.4 though ...

@nielsdos
Copy link
Member Author

Thanks for the feedback, I'll reclassify the issue report and get this into 8.3 & master.

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.

SoapClient can't convert BackedEnum to scalar value
6 participants