Skip to content

Conversation

@WyriHaximus
Copy link
Member

As stated in the PHP documentation the __toString has to return a string. Currently the DummyTest::__toString method doesn't comply with this and throws errors like this one in several of my PSR-3 releated packages.

Returning a string from DummyTest::__toString as is expected by the language would solve those errors.

@GrahamCampbell
Copy link
Contributor

Don't move the stub to its own file. This will make phpunit complain about there being no tests in the file.

@WyriHaximus
Copy link
Member Author

Don't move the stub to its own file. This will make phpunit complain about there being no tests in the file.

Normally that would make sense but we don't run any of the tests in this repo ourself so I don't see a very obvious issue here putting it in it's own file. We could also rename it to Dummy since it doesn't have any tests in it it shouldn't be called DummyTest (maybe TestDummy would have been more appropriate).

@Seldaek
Copy link
Collaborator

Seldaek commented Oct 29, 2019

Makes sense that this should return a string to be a valid impl, but I think moving it out into its own file gives it the look that it's part of the official API vs an implementation detail. As it was it was kind of a "private" class, and I'd rather keep it that way.

@WyriHaximus
Copy link
Member Author

but I think moving it out into its own file gives it the look that it's part of the official API vs an implementation detail. As it was it was kind of a "private" class, and I'd rather keep it that way.

We could mark it internal if that's the intend. But for this PR I'll revert that change 👍

@WyriHaximus WyriHaximus force-pushed the extract-DummyTest-into-its-own-file-and-return-empty-string-from-___toString branch from 42d580e to 79736b4 Compare October 29, 2019 18:40
@WyriHaximus
Copy link
Member Author

@Seldaek updated the PR and undid the file extraction

@Seldaek Seldaek merged commit d477130 into php-fig:master Oct 30, 2019
@Seldaek
Copy link
Collaborator

Seldaek commented Oct 30, 2019

Thanks

@WyriHaximus
Copy link
Member Author

Cheers 👍

@Seldaek
Copy link
Collaborator

Seldaek commented Nov 1, 2019

tagged 1.1.2 now

@WyriHaximus
Copy link
Member Author

Thanks <3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants