php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73379 BC break from 7.0.10 to 7.0.11+
Submitted: 2016-10-23 10:53 UTC Modified: 2016-11-21 12:33 UTC
From: goetas at gmail dot com Assigned: nikic (profile)
Status: Not a bug Package: SimpleXML related
PHP Version: 7.0.12 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: goetas at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-23 10:53 UTC] goetas at gmail dot com
Description:
------------
There is a different behavior on the php simple xml parser.

There is the test code

https://3v4l.org/Jve27

As you can see there is a new behavior starting from 7.0.11


This looks to be introduced with https://bugs.php.net/bug.php?id=72971 that does exactly the opposite.

Feel free to close it as Not a bug, but BC breaks in bugfix release broke https://github.com/schmittjoh/serializer



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-25 14:56 UTC] cmb@php.net
-Assigned To: +Assigned To: nikic
 [2016-10-25 14:56 UTC] cmb@php.net
In my opinion, bug #72971 is a valid bug report and as such fixing
the issue is appropriate even in a revision.

Nikita, what do you think?
 [2016-10-25 19:23 UTC] nikic@php.net
IIRC this issue came up when implementing proper null-coalesce support for SimpleXMLElement. $sxe->foo ?? 'bar' is supposed to be the same as isset($sxe->foo) ? $sxe->foo : 'bar'. If isset($sxe->foo) and $sxe->foo behave differently, because the latter takes namespaces into account while the former doesn't, that obviously leads to problems.

Anyway, I don't have a strong opinion here.
 [2016-10-25 20:38 UTC] goetas at gmail dot com
To me https://bugs.php.net/bug.php?id=72971 looks a bug... it is just a pity this kind of BC break in a minor 

I have already solved the problem on https://github.com/schmittjoh/serializer
 and will be released soon.

I guess you are not planning to revert the bugfix, right?
 [2016-11-21 12:30 UTC] ab@php.net
-Status: Assigned +Status: Not a bug
 [2016-11-21 12:30 UTC] ab@php.net
I would like to keep this patch further on. It is clearly a BC breach, as erroneous data won't be handled anymore. But reverting it back and forth seems not feasible, besides it's related to a bug fix. I know, @goetas, that it's not quite fair in regard to your project. However, the patch is already released, there seems to be no major BC breach, and you've released a new version to workaround this. 

Thanks.
 [2016-11-21 12:33 UTC] goetas at gmail dot com
Thanks for the reply. No worries, I have already released a fix for the BC break :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 00:01:28 2024 UTC