When doing internal development, add cweagans/composer-patches to Package Manager's list of trusted plugins
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3574824. -->
Reported by: [thejimbirch](https://www.drupal.org/user/2507260)
Related to !829 !818
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Visit: /admin/modules/browse/ai_dashboard_recommended</p>
<p>Applying the AI Dashboard recipe works as expected.</p>
<p>Applying any of the other recipes gets you this error in a modal.</p>
<pre>Error while installing package(s)<br><br>SandboxException:<br><br> An unsupported Composer plugin was detected.<br> cweagans/composer-patches</pre><p>Project browser warning:</p>
<p><code>Drupal\package_manager\Exception\SandboxException: <ul><li>An unsupported Composer plugin was detected.</li><li><code>cweagans/composer-patches</code>
</p><p>. #0 [internal function]: Drupal\project_browser\Controller\InstallerController->begin() #1 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #2 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(634): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() #3 [internal function]: Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():634}() #4 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(635): Fiber->start() #5 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #6 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #7 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() #8 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #9 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle() #10 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #11 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #12 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #13 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(118): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #14 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(92): Drupal\page_cache\StackMiddleware\PageCache->pass() #15 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle() #16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(54): Drupal\Core\StackMiddleware\AjaxPageState->handle() #19 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(745): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #20 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle() #21 {main} </p>
<p>Package manager info log:</p>
<p><code>The following paths in /var/www/html aren't recognized as part of your Drupal site, so to be safe, Package Manager is excluding them from all stage operations. If these files are not needed for Composer to work properly in your site, no action is needed. Otherwise, you can disable this behavior by setting the package_manager.settings:include_unknown_files_in_project_root config setting to TRUE. .ddev .git .gitignore .gitlab-ci.yml .tugboat AGENTS.md DrupalCmsCompatibilityTest.php LICENSE.txt MAINTAINERS.txt README.md cpanel_template dev.composer.json drupal_cms_helper patches patches.lock.json phpunit.xml project_template scripts splitter</code></p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-data-model-changes">Configuration changes</h3>
issue