<p dir="auto">I was looking into the classes for GetResponseEvent and PostResponseEvent and found tthat even tought they share a lot of code they do not have common acentors.</p>
<p dir="auto">Here is what i found:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GetResponseEvent -&gt; KernelEvent -&gt; Event"><pre class="notranslate"><code class="notranslate">GetResponseEvent -&gt; KernelEvent -&gt; Event
</code></pre></div>
<p dir="auto">and</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PostResponseEvent -&gt; Event"><pre class="notranslate"><code class="notranslate">PostResponseEvent -&gt; Event
</code></pre></div>
<p dir="auto">Get: implements <code class="notranslate">response property</code><br>
KernelEvent: Implements <code class="notranslate">kernel</code>, <code class="notranslate">request</code> and <code class="notranslate">request type</code><br>
Post: implements <code class="notranslate">kernel</code>, <code class="notranslate">request</code>, <code class="notranslate">response</code></p>
<p dir="auto">It seems to me that there is a clear overlap, would it make sense to organize this so that both have a common ancestor and less duplicate code? Or is PostResponseEvent not considered a <code class="notranslate">KernelEvent</code>?</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/symfony/symfony/blob/1cada24000ccfc76033bd216f07fb8cc5382bf7a/src/Symfony/Component/HttpFoundation/FileBag.php#L49">symfony/src/Symfony/Component/HttpFoundation/FileBag.php</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 49
      in
      <a data-pjax="true" class="commit-tease-sha" href="/symfony/symfony/commit/1cada24000ccfc76033bd216f07fb8cc5382bf7a">1cada24</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L49" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="49"></td>
          <td id="LC49" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">throw</span> <span class="pl-k">new</span> \<span class="pl-v">InvalidArgumentException</span>(<span class="pl-s">'An uploaded file must be an array or an instance of UploadedFile.'</span>); </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">"An uploaded file must be an array or an instance of UploadedFile"</p>
<p dir="auto">Where is the check for null?, if the $value is null, why don't you ignore the request, currently the forms doesn't work if you don't submit a file.</p>
<p dir="auto">and why is this approach of throwing an exception on every error?, if the $value is not an array and not an uploadeded file, whats the harm of ignoring the value and continue?</p>