http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692014-11-25T16:42:24ZTYPO3 ForgeTYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376232014-11-25T16:42:24ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Under Review</i></li></ul><p>Patch set 1 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/34614">http://review.typo3.org/34614</a></p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376252014-11-25T17:23:56ZMathias Schreibermathias.schreiber@typo3.com
<ul></ul><p>Absolutely not too risky:<br />Here's some info on this kind of cleanups:</p>
<ul>
<li>Please use imports on top of the class
<ul>
<li>see <a class="external" href="https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l22">https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l22</a></li>
</ul>
</li>
<li>Please supply constructor injection as long as it makes sense (*)
<ul>
<li>see <a class="external" href="https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l44">https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l44</a></li>
</ul>
</li>
<li>Please supply a meaningful comment on the property
<ul>
<li><a class="external" href="https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l35">https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php#l35</a></li>
</ul></li>
</ul>
<p>The thing with "where is makes sense".<br />Your constructor might get a little big over time.<br />Helmut and I came up with the plan that 3-4 parameters are fine within the constructor DI.<br />If you should need more than that and have no clue how to deal with it, ping the #typo3-cms channel on slack and we'll find a solution.</p>
<p>These cleanups are a lot more important than you might think.<br />For starters, they supply code completion in an IDE.<br />In PHPStorm in particular, it makes even more sense, because <strong>all</strong> calls to $GLOBALS[SOMETHING] are marked as a warning.<br />While the warning in itself isn't an issue, the amount of warnings results in a sort of "I don't care" mentality and "real" warnings simply get lost.</p>
<p>So, by all means... YES, PLEASE! Keep fixes like these coming :)</p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376442014-11-25T21:23:19ZGerrit Code Review
<ul></ul><p>Patch set 2 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/34614">http://review.typo3.org/34614</a></p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376502014-11-25T21:54:36ZGerrit Code Review
<ul></ul><p>Patch set 3 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/34614">http://review.typo3.org/34614</a></p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376932014-11-26T12:00:58ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[TASK] Avoid using $GLOBALS['TYPO3_DB'] in DataHandler Instead of $GLOBALS['TYPO3_DB'] a type hi..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/fea7b36dbfd2957cc076ad247594d5f52015c2f1">fea7b36dbfd2957cc076ad247594d5f52015c2f1</a>.</p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376942014-11-26T12:51:05ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Under Review</i></li></ul><p>Patch set 1 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/34630">http://review.typo3.org/34630</a></p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2376952014-11-26T12:57:29ZGerrit Code Review
<ul></ul><p>Patch set 2 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/34630">http://review.typo3.org/34630</a></p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=2377032014-11-26T14:00:37ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li></ul><p>Applied in changeset <a class="changeset" title="Followup: [TASK] Avoid using $GLOBALS['TYPO3_DB'] in DataHandler * Fix wrong PHP namespace when ..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/c2c1fc6936c2d0ba27b63f981f276b7fec13ea4b">c2c1fc6936c2d0ba27b63f981f276b7fec13ea4b</a>.</p> TYPO3 Core - Task #63326: Avoid using $GLOBALS['TYPO3_DB'] in DataHandlerhttp://forge.typo3.org/issues/63326?journal_id=3817622018-10-02T11:47:42ZBenni Mackbenni@typo3.org
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>