DateTime not found ...continued
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3204154. --> Reported by: [dragonwize](https://www.drupal.org/user/137882) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>DateTime class not namespaced correctly. Results in a DateTime not found error as it is looking in the current namespace instead of the base namespace. A couple of these were fixed in <a href="https://www.drupal.org/project/calendar/issues/3196736#comment-14033006">https://www.drupal.org/project/calendar/issues/3196736#comment-14033006</a> however a couple were missed in the type hints of the difference function: <a href="https://git.drupalcode.org/project/calendar/-/blob/8.x-1.x/src/CalendarHelper.php#L114">https://git.drupalcode.org/project/calendar/-/blob/8.x-1.x/src/CalendarHelper.php#L114</a></p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Use anything that uses the CalendarHelper::difference function.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add the namespace \ to the DateTime type hints.</p>
issue