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

Unable to send array arg to listeners #3233

Closed
ChangePlaces opened this issue Aug 1, 2018 · 5 comments
Closed

Unable to send array arg to listeners #3233

ChangePlaces opened this issue Aug 1, 2018 · 5 comments
Labels
type/bug Something is broken

Comments

@ChangePlaces
Copy link

ChangePlaces commented Aug 1, 2018

Q A
PHPUnit version 7.2.7
PHP version 7.2
Installation Method Composer

I have a listener that requires an array, the docs for 7.1 state that array is a legal arg type. However, in 7.2 (which I can't find the docs for) I get this error:

Element 'array': This element is not expected. Expected is one of ( string, double, null, object, file, directory, boolean ).

My config inside the <arguments>

                <string>foo</string>
                <string>bar</string>
                <array> <!-- includes -->
                    <element key="0">
                        <string>string value</string>
                    </element>
                </array>

After some experimentation, it would appear that array elements must appear first in the list of arguments though the documentation makes no mention of this.

Is this a bug?

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Aug 13, 2018
@sebastianbergmann
Copy link
Owner

This is probably another case (like #3248) where the XSD is too strict.

@ChangePlaces
Copy link
Author

It does look similar!

@theseer
Copy link
Collaborator

theseer commented Aug 13, 2018

Most certainly.

Maybe I should have checked more occasions of <xs:sequence> while fixing bug #3248.

I'll have a look later unless somebody beats me to it.

@sebastianbergmann
Copy link
Owner

@theseer That would be much appreciated!

theseer added a commit to theseer/phpunit that referenced this issue Aug 14, 2018
@theseer
Copy link
Collaborator

theseer commented Aug 14, 2018

As part of an upcoming code sprint, we might want to add more integration level tests for the schema checks by adding multiple valid xml files that should pass.

There might be more things :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants