API Platform version(s) affected: 2.6.0
Description
With the profiler enabled, queries to subresources break, and the profiler information is not saved (a profiler token is generated, but the data is lost.
How to reproduce
Minimal repo demonstrating the issue here:
https://github.com/yivi/api-platform-bug-subresource-profiler
composer create-project symfony/skeleton project
cd project
composer req api
composer req profiler
Created two basic Book and Author entities, with Book -> ManyToOne -> Author, and Author::books marked as subresource:
/**
* @ORM\OneToMany(targetEntity=Book::class, mappedBy="author")
* @ApiSubresource
*/
private $books;
Trying:
curl -X GET "http://localhost:9898/api/authors/1/books?page=1" -H "accept: application/ld+json"
I get:
error.log
Possible Solution
Sadly I have no clue. I'll try to dig more tomorrow.
Additional Context
Found out about this mostly because I saw that the profiler data was being disappearing from some requests, which seemed very strange. Going back to 2.5.9 everything works as it should.
API Platform version(s) affected: 2.6.0
Description
With the profiler enabled, queries to subresources break, and the profiler information is not saved (a profiler token is generated, but the data is lost.
How to reproduce
Minimal repo demonstrating the issue here:
https://github.com/yivi/api-platform-bug-subresource-profiler
Created two basic
BookandAuthorentities, withBook-> ManyToOne ->Author, andAuthor::booksmarked as subresource:Trying:
I get:
error.log
Possible Solution
Sadly I have no clue. I'll try to dig more tomorrow.
Additional Context
Found out about this mostly because I saw that the profiler data was being disappearing from some requests, which seemed very strange. Going back to 2.5.9 everything works as it should.