{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/5308","repository_url":"https://api.github.com/repos/Sylius/Sylius","labels_url":"https://api.github.com/repos/Sylius/Sylius/issues/5308/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/5308/comments","events_url":"https://api.github.com/repos/Sylius/Sylius/issues/5308/events","html_url":"https://github.com/Sylius/Sylius/issues/5308","id":161424280,"number":5308,"title":"Pb OrderRepository","user":{"login":"MattZ9","id":19529609,"avatar_url":"https://avatars.githubusercontent.com/u/19529609?v=3","gravatar_id":"","url":"https://api.github.com/users/MattZ9","html_url":"https://github.com/MattZ9","followers_url":"https://api.github.com/users/MattZ9/followers","following_url":"https://api.github.com/users/MattZ9/following{/other_user}","gists_url":"https://api.github.com/users/MattZ9/gists{/gist_id}","starred_url":"https://api.github.com/users/MattZ9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattZ9/subscriptions","organizations_url":"https://api.github.com/users/MattZ9/orgs","repos_url":"https://api.github.com/users/MattZ9/repos","events_url":"https://api.github.com/users/MattZ9/events{/privacy}","received_events_url":"https://api.github.com/users/MattZ9/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-21T12:31:03Z","updated_at":"2016-06-21T17:56:19Z","closed_at":null,"body":"Hello,\r\n\r\nI created a OrderRepository which extends EntityRepository, like this :\r\n```\r\nuse Sylius\\Bundle\\ResourceBundle\\Doctrine\\ORM\\EntityRepository;\r\n\r\nclass OrderRepository extends EntityRepository\r\n{\r\n\t...\r\n}\r\n```\r\n\r\nAnd in my config.yml I put this:\r\n```\r\nsylius_cart:\r\n    resources:\r\n        cart:\r\n            classes:\r\n                controller: AppcartBundle\\Controller\\CartController\r\n            validation_groups:\r\n                default: [ sylius ]\r\n        cart_item:\r\n            classes:\r\n                controller: Sylius\\Bundle\\CartBundle\\Controller\\CartItemController\r\n            validation_groups:\r\n                default: [ sylius ]\r\n\r\nsylius_order:\r\n    driver: doctrine/orm\r\n    resources:\r\n        order:\r\n            classes:\r\n                model: Sylius\\Component\\Core\\Model\\Product\r\n                interface: Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface\r\n                repository: AppBundle\\Entity\\OrderRepository\r\n```\r\n\r\nOn the site, when I want to add an item to the cart, I get the following error :\r\n`Catchable Fatal Error: Argument 1 passed to Sylius\\Component\\Cart\\Context\\CartContext::setCurrentCartIdentifier() must implement interface Sylius\\Component\\Cart\\Model\\CartInterface, instance of Sylius\\Component\\Core\\Model\\Product given, called in C:\\wamp\\www\\myproject\\vendor\\sylius\\sylius\\src\\Sylius\\Bundle\\CartBundle\\Provider\\CartProvider.php on line 132 and defined`\r\n\r\nCan you help me please ?\r\n\r\nI don't know if my config is good, if I forgot something or if the problem is elsewhere.\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/comments/227519995","html_url":"https://github.com/Sylius/Sylius/issues/5308#issuecomment-227519995","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/5308","id":227519995,"user":{"login":"MattZ9","id":19529609,"avatar_url":"https://avatars.githubusercontent.com/u/19529609?v=3","gravatar_id":"","url":"https://api.github.com/users/MattZ9","html_url":"https://github.com/MattZ9","followers_url":"https://api.github.com/users/MattZ9/followers","following_url":"https://api.github.com/users/MattZ9/following{/other_user}","gists_url":"https://api.github.com/users/MattZ9/gists{/gist_id}","starred_url":"https://api.github.com/users/MattZ9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattZ9/subscriptions","organizations_url":"https://api.github.com/users/MattZ9/orgs","repos_url":"https://api.github.com/users/MattZ9/repos","events_url":"https://api.github.com/users/MattZ9/events{/privacy}","received_events_url":"https://api.github.com/users/MattZ9/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T17:56:19Z","updated_at":"2016-06-21T17:56:19Z","body":"Ok Thank you for your help. It's been a month that I use Sylius, that's why I make mistakes..\r\nI was using the doc http://docs.sylius.org/en/latest/bundles/general/overriding_repositories.html\r\nI will see my code with what you said."}}
{"actor":{"display_login":"MattZ9"}}