-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Resolve fatal error in repository generator #10601
Conversation
Both InputException and NoSuchEntityException require a Phrase object as first constructor argument `PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Framework\\Exception\\InputException::__construct() must be an instance of Magento\\Framework\\Phrase, string given`
@ajpevers Thanks for this PR. We are currently working on deprecating repository generation feature and materialization of all existing auto-generated repositories, so please do not rely heavily on this approach |
@ishakhsuvarov ooh, good that you mention it. In that case I won't use it in my own code. |
@ishakhsuvarov do you have a good example of a repository class in the Magento code base? On http://devdocs.magento.com/guides/v2.1/extension-dev-guide/service-contracts/design-patterns.html the interfaces CustomerRepositoryInterface, AddressRepositoryInterface and GroupRepositoryInterface are mentioned as good examples, but 2 of them use the deprecated |
@ajpevers Yes, currently this is an applicable way to go, however this may be swapped out for a better way (from the architectural perspective) in the future. |
Description
Both InputException and NoSuchEntityException require a Phrase object as first constructor argument
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Framework\\Exception\\InputException::__construct() must be an instance of Magento\\Framework\\Phrase, string given
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist