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

[Metadata] PHP warning only when unittesting #255

Closed
pyrech opened this issue Mar 28, 2014 · 3 comments
Closed

[Metadata] PHP warning only when unittesting #255

pyrech opened this issue Mar 28, 2014 · 3 comments

Comments

@pyrech
Copy link

pyrech commented Mar 28, 2014

Since few days, I have a weird bug when unitesting my rest api based on SF2. The bug doesn't happen when using the api but only when unitesting it.

The exception thrown comes from a PHP warning (undefined offset: 14) at src/JMS/Serializer/Metadata/ClassMetadata.php#L255:

[2014-03-28 21:50:42] request.CRITICAL: Uncaught PHP Exception PHPUnit_Framework_Error_Notice: "Undefined offset: 14" at D:\my-repos\vendor\jms\serializer\src\JMS\Serializer\Metadata\ClassMetadata.php line 255 {"exception":"[object] (PHPUnit_Framework_Error_Notice: Undefined offset: 14 at D:\\my-repos\\vendor\\jms\\serializer\\src\\JMS\\Serializer\\Metadata\\ClassMetadata.php:255)"} []
@pyrech
Copy link
Author

pyrech commented Apr 7, 2014

After running a composer update I have the same problem in my centos server too, not only Windows. I failed to detect which upgraded package is causing the issue. It's really a strange bug.

@pyrech pyrech changed the title Issue when unittesting on Windows [Metadata] PHP warning only when unittesting Apr 7, 2014
@daFish
Copy link

daFish commented Apr 8, 2014

@pyrech Try to remove the dev-/prod-folder from cache as the structure has been changed some time ago. I suffered from the same issue and this helped.

@pyrech
Copy link
Author

pyrech commented Apr 8, 2014

Thank you very much, it works now. Clear the cache is not something I'm used to do when I run into problems.

@pyrech pyrech closed this as completed Apr 8, 2014
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

No branches or pull requests

2 participants