title: Defining integer parameter in parameters.yml in Symfony
body: <p>I have a numeric parameter in the symfony's parameters.yml file and I have a configuration class in my bundle where I validate that the parameter is an integer, but I get the following error in the validation proccess:</p>
  
  <pre><code>[Symfony\Component\Config\Definition\Exception\InvalidTypeException]    
  Invalid type for path "page_size". Expected int, but got string. 
  </code></pre>
  
  <p>Is there a way to specify the parameter type in the parameters.yml file?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>parameters.yml:</p>
  
  <pre><code>parameters:
      ...
      list_page_size: 15
      ...
  </code></pre>
  
  <p>config.yml:</p>
  
  <pre><code>...
  example:
      page_size: %list_page_size%
  ...
  </code></pre>
  
  <p>Configuration.php:</p>
  
  <pre><code>class Configuration implements ConfigurationInterface
  {
      /**
       * {@inheritDoc}
       */
      public function getConfigTreeBuilder()
      {
          $treeBuilder = new TreeBuilder();
          $rootNode = $treeBuilder-&gt;root('example');
  
          $rootNode-&gt;children()
  
              // Some code here
              -&gt;integerNode('page_size')
                  -&gt;defaultValue(15)
              -&gt;end()
              // More code here
  
          -&gt;end();
  
          return $treeBuilder;
      }
  }
  </code></pre>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I have discovered that the exception is thrown in the <code>prepend()</code> method in the bundle extension file (DependencyInjection/ExampleExtension.php), but the error is not thrown in the <code>load</code> method of the same file. It seems like if the parameters.yml file was not loaded at prepend method execution time.</p>