Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[PropertyInfo] BC break in ReflectionExtractor::isReadable introduced in Symfony 5.1 #39885

Copy link
Copy link
Closed
@pamil

Description

@pamil
Issue body actions

Symfony version(s) affected: 5.1.0+

Description
There's a class with method hasProvince(Province $province): bool which checks whether a given province exists in a list.

Calling ReflectionExtractor::isReadable($class, 'province') returns different results:

  • in Symfony 4.4 and 5.0: false - there's a check that requires this has* method to require 0 arguments
  • in Symfony 5.1 and higher: true - that check is missing

How to reproduce
I've created a reproduced in this repository: https://github.com/pamil/SymfonyPropertyInfoReproducer
There's a test.php file that performs a few assertions and GitHub Actions set up which show that the BC break exists:
https://github.com/pamil/SymfonyPropertyInfoReproducer/actions/runs/494310508

Possible Solution
I guess bringing back that check to isReadable - but I'm not sure what that 5.0 -> 5.1 refactor was for so I don't understand how it works yet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.