AiContentSuggestions class removed but file still exists
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3540210. -->
Reported by: [sijumpk](https://www.drupal.org/user/389053)
Related to !820
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>
In the <code>1.2.x</code> branch of the AI module, the <a href="https://git.drupalcode.org/project/ai/-/blob/1.2.x/modules/ai_content_suggestions/src/Hook/AiContentSuggestions.php?ref_type=heads" target="_blank">class</a> <code>Drupal\ai_content_suggestions\Hook\AiContentSuggestions</code> appears to have been removed as part of the changes introduced in<br>
<a href="https://www.drupal.org/project/ai/issues/3528684">#3528684</a>. However, the corresponding file<br>
<code>modules/contrib/ai/modules/ai_content_suggestions/src/Hook/AiContentSuggestions.php</code> still exists as an empty file. Noticed this while running a functional test.
</p>
<p>
This results in a fatal error during test runs:
</p>
<pre><pre>RuntimeException: The autoloader expected class "Drupal\ai_content_suggestions\Hook\AiContentSuggestions" to be defined in file "/var/www/html/web/modules/contrib/ai/modules/ai_content_suggestions/src/Hook/AiContentSuggestions.php". The file was found but the class was not in it, the class name or namespace probably has a typo.</pre></pre><p>
The class is still present in the <code>1.1.x</code> branch, so this seems to be either an accidental deletion.
</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>Either fully remove the file <code>AiContentSuggestions.php</code> if it is no longer needed and ensure all references to the class are removed.</li>
<li>Or restore the class definition if it is still required and was removed by mistake.</li>
</ul>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Confirm whether the class was intentionally removed.</li>
<li>Based on the outcome, either restore the class or remove the file and references entirely.</li>
</ul>
<h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
issue