<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.7</td>
</tr>
</tbody>
</table>
<p dir="auto">commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/faf671db0f7493c15fdcef8446b9472a1ce80445/hovercard" href="https://github.com/symfony/symfony/commit/faf671db0f7493c15fdcef8446b9472a1ce80445"><tt>faf671d</tt></a><br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/c891413f6c82257777eb3673827eea3ee47f0501/hovercard" href="https://github.com/symfony/symfony/commit/c891413f6c82257777eb3673827eea3ee47f0501"><tt>c891413</tt></a></p>
<p dir="auto">These commits clear $this-&gt;refs inside the Symfony\Component\Yaml\Parser\parse method and references to anchors in previously parsed files don't work. Removing the lines solves the problem and configurations based on such overrides/includes work as expected.</p>
<p dir="auto">Please, make a revision of the commited code and put some proper unit tests for such configurations.</p>
<p dir="auto">Hi there,</p>
<p dir="auto">At work we wanted to check if a date (in a form) was greater than "now". The problem was that we were using annotations in our entity for the validation and (apparently)  there is no "simple" way to do so.</p>
<p dir="auto">The solutions which came to my mind were:</p>
<ul dir="auto">
<li>Use the "assert greater than" validator directly in the form type (<code class="notranslate">$builder-&gt;add('foo', 'bar', array('constraints' =&gt; new \DateTime())</code>)</li>
<li>Use the annotation <code class="notranslate">@Assert\True</code> on my date field and implement an <code class="notranslate">isDateValid</code> method</li>
<li>Create a dedicated annotation</li>
<li>Create an <code class="notranslate">@DateTime</code> annotation which would extends from <code class="notranslate">\DateTime</code> and could be used everywhere (in my case : <code class="notranslate">@Assert\GreaterThan(value = @DateTime)</code>)</li>
</ul>
<p dir="auto">I've chosen to implement the latest of my proposal (<code class="notranslate">@DateTime</code>), it works well (IMO it is flexible, clean and reusable) and I think it could be a very good idea to implement it in symfony.<br>
What do you think about it?<br>
If you feel like it, I can share my work.</p>