Skip to content

Conversation

@NathanPesneau
Copy link
Contributor

Completes #7478

use PHPUnit\Framework\Attributes\DataProvider;

/**
* @author Votre Nom <votre@email.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to replace it with your name and email

}

if (':property' === $key) {
if (str_contains($key, ':property')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then the handling of properties aware filters is skipped (see at line 150), by the continue (line 145).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed we should just merge the below branch in this code

            if (str_contains($key, ':property') || ((($f = $parameter->getFilter()) && is_a($f, PropertiesAwareInterface::class, true)) || $parameter instanceof PropertiesAwareInterface)) {
                $p = [];
                foreach ($propertyNames as $prop) {
                    $p[$this->nameConverter?->denormalize($prop) ?? $prop] = $prop;
                }
                $parameter = $parameter->withExtraProperties($parameter->getExtraProperties() + ['_properties' => $p]);
            }

properties: ['description', 'name']
),
]
)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$this->loadFixtures();
}

#[DataProvider('partialFilterParameterProvider')]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add these tests to the DoctrineTest file

}

if (':property' === $key) {
if (str_contains($key, ':property')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed we should just merge the below branch in this code

            if (str_contains($key, ':property') || ((($f = $parameter->getFilter()) && is_a($f, PropertiesAwareInterface::class, true)) || $parameter instanceof PropertiesAwareInterface)) {
                $p = [];
                foreach ($propertyNames as $prop) {
                    $p[$this->nameConverter?->denormalize($prop) ?? $prop] = $prop;
                }
                $parameter = $parameter->withExtraProperties($parameter->getExtraProperties() + ['_properties' => $p]);
            }

@Coffee2CodeNL
Copy link

@soyuka if @NathanPesneau isn't moving this along, could you do that instead?

@soyuka
Copy link
Member

soyuka commented Dec 1, 2025

I'm indeed already working on this (haven't published anything yet). This week I'll have to be afk for a few days as I need to help dismantling a yurt where I live and it's a high priority. Anyways this is my top priority (had to push symfony 8 first).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants