<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>no</td>
</tr>
<tr>
<td>Feature request?</td>
<td>yes</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>yes</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.1+</td>
</tr>
</tbody>
</table>
<p dir="auto">The Validator component comes with some constraints that require optional third-party libraries (for example, the <code class="notranslate">EmailValidator</code> constraint can optionally be used with the <code class="notranslate">egulias/email-validator</code> library). Right now, these requirements are evaluated at runtime when the validator is executed. If you do not have tests covering the validators, you may only notice at runtime that you needed to set up something when your application breaks with an exception.</p>
<p dir="auto">To improve DX here I suggest to move these checks from the validators to the actual constraint classes to allow to catch mistakes earlier. However, we cannot do that in 4.1 as this would break applications where constraint metadata is loaded for classes that are never used (for example, when you depend on some third-party bundle that defines those constraints while you do not use all of their classes).</p>
<p dir="auto">As an upgrade path I suggest to duplicate the checks in 4.1 from the validator classes to the constraint, but not throw exceptions there but trigger deprecations instead. So at least we can then finally make this move in 5.0.</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>Maybe</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.4.x</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello,</p>
<p dir="auto">I have run a composer update to my project runnning PHP 5.6</p>
<p dir="auto">These are the packages that have been updated:</p>
<table role="table">
<thead>
<tr>
<th>Package</th>
<th>Old Version</th>
<th>New Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>league/csv</td>
<td>8.2.2</td>
<td>8.2.3</td>
</tr>
<tr>
<td>php-amqplib/php-amqplib</td>
<td>v2.7.0</td>
<td>v2.7.2</td>
</tr>
<tr>
<td>symfony/polyfill-mbstring</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>symfony/polyfill-php70</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>symfony/polyfill-util</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>symfony/polyfill-php56</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>symfony/symfony</td>
<td>v3.4.3</td>
<td>v3.4.4</td>
</tr>
<tr>
<td>symfony/polyfill-intl-icu</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>symfony/polyfill-apcu</td>
<td>v1.6.0</td>
<td>v1.7.0</td>
</tr>
<tr>
<td>sensio/framework-extra-bundle</td>
<td>v5.1.4</td>
<td>v5.1.5</td>
</tr>
<tr>
<td>symfony/phpunit-bridge</td>
<td>v3.4.3</td>
<td>v3.4.4</td>
</tr>
<tr>
<td>webmozart/assert</td>
<td>1.2.0</td>
<td>1.3.0</td>
</tr>
<tr>
<td>phpspec/prophecy</td>
<td>1.7.3</td>
<td>1.7.4</td>
</tr>
</tbody>
</table>
<p dir="auto">One of these packages seems to have increased the memory usage of my tests. Most of them are symfony packages so I thought I might ask here first.</p>
<p dir="auto"><code class="notranslate">PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in symfony/var/cache/test/ContainerHnbtgen/appTestDebugProjectContainer.php on line 9372</code></p>
<p dir="auto">My tests used to get around 400 MB</p>