<p dir="auto">I'm using Symfony Process to execute <a href="http://wp-cli.org" rel="nofollow">wp-cli</a> commands and one of them was something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wp post create --post_title=&quot;Hello VersionPress!&quot; --post_date=&quot;2011-11-11 11:11:11&quot;"><pre class="notranslate"><code class="notranslate">wp post create --post_title="Hello VersionPress!" --post_date="2011-11-11 11:11:11"
</code></pre></div>
<p dir="auto">If I executed this command on Windows <code class="notranslate">cmd</code> it worked fine but when Symfony Process ran it, the post title was created as "Hello VersionPress11:11" and the data was generally not right, even though the command technically succeeded (no error).</p>
<p dir="auto">After some experimenting, it seems that <strong>the exclamation mark is somehow a problem</strong>. When I removed it, all worked fine. Is that a bug in Symfony Process on Windows or maybe some kind of misconfiguration on my side?</p>
<p dir="auto">In <code class="notranslate">Symfony/Component/HttpKernel/EventListener/ExceptionListener::duplicate()</code> the <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php#L120"><code class="notranslate">format</code></a> attribute is set without an underscore. This results in the cloned <code class="notranslate">Request</code> having a <code class="notranslate">null</code> format which in turn causes <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php#L55">ExceptionController::showAction</a> to always render exceptions in html.</p>
<p dir="auto">Looks like <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/f946108d6526ceaad9b8340fb58335ed4a93eda6/hovercard" href="https://github.com/symfony/symfony/commit/f946108d6526ceaad9b8340fb58335ed4a93eda6"><tt>f946108</tt></a> broke it.</p>