title: How to get POST global variable in PHP Symfony 4?
body: <p>I have a very strange problem getting the result of a POST global variable in Symfony 4.</p>
  <p>I tried this way:</p>
  <pre><code>$date = $request-&gt;request-&gt;get('date');
  </code></pre>
  <p>This is how I actually send the AJAX request when the Calendar input's date changed:</p>
  <pre><code>onSelect: function(date, instance) {
      $.ajax({
        url : 'home',
        type : 'POST',
        data : {'date':date},
        dataType : 'html',
        success : function(code_html, statut){
          console.log(statut);
        },
  
        error : function(resultat, statut, erreur){
        
        },
  
        complete : function(resultat, statut){
  
        }          
      });
  </code></pre>
  <p>The onSelect callback successfully receive the date value I want.</p>
  <p>And this result shows the 200 success code with right values for the date variable :</p>
  <p><a href="https://i.stack.imgur.com/x9OJn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x9OJn.jpg" alt="profiler screenshot" /></a></p>
  <p>But <code>$date</code> is <code>null</code>.</p>