<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>TYPO3 v10: Cannot autowire service PageRepository</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/728 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="728"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;p&gt;I got an error when updating to TYPO3 v10 and dependency injection:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Symfony\Component\DependencyInjection\Exception\RuntimeException

Cannot autowire service &amp;quot;Vendor\Example\Domain\JobData&amp;quot;: argument &amp;quot;$pageRepository&amp;quot; of method &amp;quot;__construct()&amp;quot; references class &amp;quot;TYPO3\CMS\Frontend\Page\PageRepository&amp;quot; but no such service exists.
&lt;/pre&gt;
&lt;p&gt;The problem was that the class &lt;tt class="docutils literal"&gt;TYPO3\CMS\Frontend\Page\PageRepository&lt;/tt&gt; is an old name; the new one is &lt;tt class="docutils literal"&gt;TYPO3\CMS\Core\Domain\Repository\PageRepository&lt;/tt&gt;. Using that one works.&lt;/p&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/728/rev-raw/6330755117ea6cf73c1d35066e7e4e2da0725dc7/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/728#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
