Skip to content

[PropertyInfo] read-only property is marked as writeable #47756

@MartkCz

Description

@MartkCz

Symfony version(s) affected

6.1.*

Description

Read-only property is marked as writeable.

How to reproduce

<?php

use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;

require __DIR__ . '/vendor/autoload.php';

$extractor = new ReflectionExtractor();

class Foo {

	public readonly string $name;

}

var_dump($extractor->isWritable(Foo::class, 'name'));

output bool(true)

Possible Solution

No response

Additional Context

No response

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