http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692021-04-02T09:26:15ZTYPO3 ForgeTYPO3 Core - Bug #85311: Extbase/ObjectManager does not fully support nullable typeshttp://forge.typo3.org/issues/85311?journal_id=4421862021-04-02T09:26:15ZRémy DANIEL
<ul></ul><p>Another usecase where nullable is not supported.</p>
<p>In Model:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="k">protected</span> <span class="kt">?FrontendUser</span> <span class="nv">$feUser</span><span class="p">;</span>
</code></pre>
<p>Extbase's validation throw a "1546632293 RuntimeException : Could not get value of property "Site\Site\Domain\Model\Order::feUser", make sure the property is either public or has a getter getFeUser(), a hasser hasFeUser() or an isser isFeUser()."</p>
<p>If I add a default value :<br /><pre><code class="php syntaxhl" data-language="php"><span class="k">protected</span> <span class="kt">?FrontendUser</span> <span class="nv">$feUser</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>
</code></pre></p>
<p>Extbase is happy. It's weird because null is the default value of every unassigned variable, but I have to assign it explicitly.</p>
<p>TYPO3 10.4.</p> TYPO3 Core - Bug #85311: Extbase/ObjectManager does not fully support nullable typeshttp://forge.typo3.org/issues/85311?journal_id=4422592021-04-06T16:32:52ZRémy DANIEL
<ul></ul><p>To read: <a class="external" href="https://blog.reelworx.at/detail/typo3-extbase-and-type-annotations-with-php-74/">https://blog.reelworx.at/detail/typo3-extbase-and-type-annotations-with-php-74/</a></p> TYPO3 Core - Bug #85311: Extbase/ObjectManager does not fully support nullable typeshttp://forge.typo3.org/issues/85311?journal_id=4672812022-04-12T05:21:25ZStefan P
<ul></ul><p>Can be closed. Works on v10 and ObjectManager is deprecated anyway.</p> TYPO3 Core - Bug #85311: Extbase/ObjectManager does not fully support nullable typeshttp://forge.typo3.org/issues/85311?journal_id=4672832022-04-12T08:36:05ZMarkus Kleinmarkus.klein@typo3.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul>