Add PHP code block type expectation to PromptCodeBlockExtractor class in AI core
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3500709. -->
Reported by: [spec0](https://www.drupal.org/user/2438344)
Related to !419
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>PromptCodeBlockExtractor.php class has hard-coded regex to extract code blocks from ai inference responses.<br>
Current allowed types are: yaml, json, html, twig. This can be limiting if we expect php code as a code block response.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add a new array value for handling php code blocks.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Perhaps try to think of a more generic way to detect different code blocks outside of the php stack expectations.</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None</p>
issue