{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"TYPO3 v10: Cannot autowire service PageRepository","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/728 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"728\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p>I got an error when updating to TYPO3 v10 and dependency injection:<\/p>\n<pre class=\"literal-block\">\nSymfony\\Component\\DependencyInjection\\Exception\\RuntimeException\n\nCannot autowire service &quot;Vendor\\Example\\Domain\\JobData&quot;: argument &quot;$pageRepository&quot; of method &quot;__construct()&quot; references class &quot;TYPO3\\CMS\\Frontend\\Page\\PageRepository&quot; but no such service exists.\n<\/pre>\n<p>The problem was that the class <tt class=\"docutils literal\">TYPO3\\CMS\\Frontend\\Page\\PageRepository<\/tt> is an old name; the new one is <tt class=\"docutils literal\">TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository<\/tt>. Using that one works.<\/p>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/728\/rev-raw\/6330755117ea6cf73c1d35066e7e4e2da0725dc7\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/728#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
