<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>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.<em>, 3.</em></td>
</tr>
</tbody>
</table>
<p dir="auto">Description: There is constraint "All" that allows us to provide several fundamental constraints that all has to be valid for validation to pass. There is no constraint "Any" for which we can provide several fundamental constraints expecting at least one of those to be valid.</p>
<p dir="auto">Example: We can, per example, have several classes, Invoice, ProInvoice, DebitNote, CreditNote (accounting). For some property path, we can expect for, per example, Invoice or ProInvoice to be provided, example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Assert\Any([ @Assert\Type(type=&quot;Model\Invoice&quot;), @Assert\Type(type=&quot;Model\ProInvoice&quot;) ])"><pre class="notranslate"><code class="notranslate">@Assert\Any([ @Assert\Type(type="Model\Invoice"), @Assert\Type(type="Model\ProInvoice") ])
</code></pre></div>
<p dir="auto">This can be done differently, via Callback validator, or Expression validator, or whatever...</p>
<p dir="auto">However, "Any" seams a "syntactic sugar", if there is no reason for "No" I would like to submit a PR.</p>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.0.11 (might as well be earlier versions)</p>
<p dir="auto"><strong>Description</strong><br>
In Finder 4.0.8 the commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/finder/commit/45429ad35d323bec3d1b7d13b907761d74666d23/hovercard" href="https://github.com/symfony/finder/commit/45429ad35d323bec3d1b7d13b907761d74666d23">symfony/finder@<tt>45429ad</tt></a> was released which should remove duplicate slashes from path names.</p>
<p dir="auto">However, this results in an error when used to find files in an FTP root dir.<br>
The documentation (<a href="https://symfony.com/doc/current/components/finder.html" rel="nofollow">https://symfony.com/doc/current/components/finder.html</a>:) by the way explicitly states that the slash is required in this case:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// always add a trailing slash when looking for in the FTP root dir
$finder-&gt;in('ftp://example.com/');"><pre class="notranslate"><code class="notranslate">// always add a trailing slash when looking for in the FTP root dir
$finder-&gt;in('ftp://example.com/');
</code></pre></div>
<p dir="auto"><strong>How to reproduce</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        $finder = new Finder();
        $files = $finder-&gt;files()-&gt;in('ftp://speedtest.tele2.net/');
        foreach ($files as $file) {
            var_dump($file);
        }"><pre class="notranslate"><code class="notranslate">        $finder = new Finder();
        $files = $finder-&gt;files()-&gt;in('ftp://speedtest.tele2.net/');
        foreach ($files as $file) {
            var_dump($file);
        }
</code></pre></div>
<p dir="auto"><strong>Possible Solution</strong><br>
One might parse the given <code class="notranslate">$dir</code>string and trwat it differently if ti starts with "ftp://"</p>