Skip to content

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

Closed
ndossche wants to merge 4 commits into
php:masterfrom
ndossche:fix-15711
Closed

ndossche wants to merge 4 commits into
php:masterfrom
ndossche:fix-15711

Conversation

@ndossche

@ndossche ndossche commented Sep 8, 2024

Copy link
Copy Markdown
Member

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

Comment thread ext/soap/php_encoding.c Outdated

Copy link
Copy Markdown
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
Copy Markdown
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 🤷

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

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?

@ndossche

ndossche commented Sep 9, 2024

Copy link
Copy Markdown
Member Author

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)

@ndossche

ndossche commented Sep 9, 2024

Copy link
Copy Markdown
Member Author

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.
@ndossche

ndossche commented Sep 9, 2024

Copy link
Copy Markdown
Member Author

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

Comment thread ext/soap/php_encoding.c
}
ZEND_FALLTHROUGH;
default:
return zval_get_long(data);

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

@ndossche

Copy link
Copy Markdown
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
Copy Markdown
Member

@nielsdos
I would consider this mostly a bug fix.

@NattyNarwhal
How do you think?

@NattyNarwhal

Copy link
Copy Markdown
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.

@ndossche

ndossche commented Sep 10, 2024 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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 ...

@ndossche

Copy link
Copy Markdown
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