Skip to content
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

Regression in XmlPropertyTask RC3 -> RC4 #1692

Closed
fooman opened this issue Jan 25, 2023 · 1 comment
Closed

Regression in XmlPropertyTask RC3 -> RC4 #1692

fooman opened this issue Jan 25, 2023 · 1 comment
Milestone

Comments

@fooman
Copy link
Contributor

fooman commented Jan 25, 2023

Describe the bug
A previously working phing build file no longer works on RC4/php8.2.

Steps To Reproduce
Try to read an xml file via

<xmlproperty file="report.xml" required="true" collapseAttributes="true"/>

Example file

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="Magento\FunctionalTestingFramework.functional" tests="2" assertions="0" errors="2" failures="0" skipped="0" time="0.000000">
    <testcase file="/var/www/dev/tests/acceptance/tests/functional/Magento/_generated/AdminOrderPrintActionsTestCest.php" name="AdminOrderPrintActionsTest" class="Magento\AcceptanceTest\Backend\AdminOrderPrintActionsTestCest" feature="admin order print actions test" assertions="0" time="0.000000"/>
    <testcase file="/var/www/dev/tests/acceptance/tests/functional/Magento/_generated/StorefrontGuestCheckoutTestCest.php" name="StorefrontGuestCheckoutTest" class="Magento\AcceptanceTest\Backend\StorefrontGuestCheckoutTestCest" feature="storefront guest checkout test" assertions="0" time="0.000000"/>
  </testsuite>
</testsuites>

Expected behavior
Xml file is read (this works with RC3 / php8.1)

Screenshots / terminal output

BUILD FAILED
count(): Argument #1 ($value) must be of type Countable|array, string given

Total time: 0.0334 seconds

Additional context
I believe the issue is this line here
https://github.com/phingofficial/phing/blob/3.0.0-RC4/src/Phing/Io/XmlFileParser.php#L94
as implode returns a string https://www.php.net/manual/en/function.implode.php
maybe strlen could be an option?

The change was introduced via this commit.

@fooman
Copy link
Contributor Author

fooman commented Jan 25, 2023

#1691 seems to address this.

@mrook mrook added this to the 3.0.0-RC5 milestone Jan 25, 2023
@mrook mrook closed this as completed in 94cdf79 Jan 25, 2023
mrook pushed a commit that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants