<p dir="auto">In 3.5 the <code class="notranslate">getPropertyPath</code> does not return the correct path.</p>
<p dir="auto">2.5.0 output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[test1]:This value should not be blank.
[test1].[test2]:This value should not be blank."><pre class="notranslate"><code class="notranslate">[test1]:This value should not be blank.
[test1].[test2]:This value should not be blank.
</code></pre></div>
<p dir="auto">2.4.6 output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[test1]:This value should not be blank.
[test2]:This value should not be blank."><pre class="notranslate"><code class="notranslate">[test1]:This value should not be blank.
[test2]:This value should not be blank.
</code></pre></div>
<p dir="auto">Test script:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?php
use Symfony\Component\Validator;
require_once __DIR__ . '/vendor/autoload.php';

$constraint = new Validator\Constraints\Collection([
    'fields' =&gt; [
        'test1' =&gt; new Validator\Constraints\NotBlank(),
        'test2' =&gt; new Validator\Constraints\NotBlank(),
    ],
]);

$data = [
    'test1' =&gt; '',
    'test2' =&gt; '',
];

$validator = Validator\Validation::createValidator();
$violations = $validator-&gt;validateValue($data, $constraint);
foreach ($violations as $violation) {
    echo $violation-&gt;getPropertyPath() . ':' . $violation-&gt;getMessage() . '&lt;br&gt;' . PHP_EOL;
}"><pre class="notranslate"><code class="notranslate">&lt;?php
use Symfony\Component\Validator;
require_once __DIR__ . '/vendor/autoload.php';

$constraint = new Validator\Constraints\Collection([
    'fields' =&gt; [
        'test1' =&gt; new Validator\Constraints\NotBlank(),
        'test2' =&gt; new Validator\Constraints\NotBlank(),
    ],
]);

$data = [
    'test1' =&gt; '',
    'test2' =&gt; '',
];

$validator = Validator\Validation::createValidator();
$violations = $validator-&gt;validateValue($data, $constraint);
foreach ($violations as $violation) {
    echo $violation-&gt;getPropertyPath() . ':' . $violation-&gt;getMessage() . '&lt;br&gt;' . PHP_EOL;
}
</code></pre></div>
<p dir="auto">Hello,</p>
<p dir="auto">When using Validator 2.5 to validate an array of scalars, the <code class="notranslate">propertyPath</code> of the returned violations has really strange values.</p>
<p dir="auto">Consider the following script:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;?php

require 'vendor/autoload.php';

use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Validation;

$constraints = array(
    'foo' =&gt; array(
        new Constraints\NotBlank(),
        new Constraints\Date()
    ),
    'bar' =&gt; new Constraints\NotBlank()
);

$collectionConstraint = new Constraints\Collection(array('fields' =&gt; $constraints));

$validator = Validation::createValidatorBuilder()
    -&gt;setApiVersion(Validation::API_VERSION_2_5)
    -&gt;getValidator();

$value = array(
    'foo' =&gt; 'bar'
);

$violations = $validator-&gt;validate($value, $collectionConstraint);

foreach ($violations as $violation) {
    var_dump($violation-&gt;getPropertyPath());
}"><pre class="notranslate"><code class="notranslate">&lt;?php

require 'vendor/autoload.php';

use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Validation;

$constraints = array(
    'foo' =&gt; array(
        new Constraints\NotBlank(),
        new Constraints\Date()
    ),
    'bar' =&gt; new Constraints\NotBlank()
);

$collectionConstraint = new Constraints\Collection(array('fields' =&gt; $constraints));

$validator = Validation::createValidatorBuilder()
    -&gt;setApiVersion(Validation::API_VERSION_2_5)
    -&gt;getValidator();

$value = array(
    'foo' =&gt; 'bar'
);

$violations = $validator-&gt;validate($value, $collectionConstraint);

foreach ($violations as $violation) {
    var_dump($violation-&gt;getPropertyPath());
}
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="string(11) &quot;[foo].[foo]&quot;
string(17) &quot;[foo].[foo].[bar]&quot;"><pre class="notranslate"><code class="notranslate">string(11) "[foo].[foo]"
string(17) "[foo].[foo].[bar]"
</code></pre></div>
<p dir="auto">If I set <code class="notranslate">Validation::API_VERSION_2_4</code> and call the old <code class="notranslate">validateValue</code> method, it outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="string(5) &quot;[foo]&quot;
string(5) &quot;[bar]&quot;"><pre class="notranslate"><code class="notranslate">string(5) "[foo]"
string(5) "[bar]"
</code></pre></div>
<p dir="auto">Is this something expected ?</p>