Skip to content

Conversation

@wkania
Copy link
Contributor

@wkania wkania commented Jul 15, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

Currently, the validator does not work with fields of type simple_array, json, or with associations like ONE_TO_MANY and MANY_TO_MANY.
In such cases, a custom repository method must be defined - the default findBy method cannot handle these field types.

This PR adds an explicit error when no such method is provided.

Is this a deprecation? Not really - it's unlikely anyone was using this with unsupported fields, and if they were, it wasn’t working anyway.

@carsonbot carsonbot added this to the 7.4 milestone Jul 15, 2025
@wkania wkania force-pushed the unique-entity-all-types branch from 93b2d73 to 761df8d Compare July 15, 2025 16:39
@wkania wkania force-pushed the unique-entity-all-types branch 2 times, most recently from 11a8ac5 to 2b1a80e Compare August 5, 2025 15:49
@wkania wkania force-pushed the unique-entity-all-types branch from 2b1a80e to 636699a Compare August 5, 2025 16:36
@wkania
Copy link
Contributor Author

wkania commented Sep 16, 2025

This should be more DX then a bug.

$this->assertCount(1, $this->context->getViolations());
}

#[IgnoreDeprecations]
Copy link
Member

Choose a reason for hiding this comment

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

Why making this a legacy test ? Is this testing a deprecated behavior ? Would it be a test that we delete in 8.0 ?
Adding new legacy tests is quite suspicious for a PR that does not introduce any new deprecations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • All tests have DoctrineStyle variation.
  • Since PR DoctrineStyle is deprecated, but will be removed in Symfony 8.
  • Since PR DoctrineStyle tests are marked as #[IgnoreDeprecations]

@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 8.1 Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants