Skip to content

Commit

Permalink
Disabling Accessor setter when value resolution falls back to the pro…
Browse files Browse the repository at this point in the history
…perty default value
  • Loading branch information
joaojacome committed Aug 10, 2022
1 parent 47aed2b commit bf06ece
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

namespace JMS\Serializer\Tests\Fixtures\TypedProperties\ConstructorPromotion;

use JMS\Serializer\Annotation\Accessor;
use JMS\Serializer\Annotation as JMS;

class DefaultValuesAndAccessors
{
public string $traditional = 'default';
#[Accessor(setter: 'setTraditionalWithSetter')]
#[JMS\Accessor(setter: 'setTraditionalWithSetter')]
public string $traditionalWithSetter = 'default';

public function __construct(
public string $promoted = 'default',
#[Accessor(setter: 'setPromotedWithSetter')]
#[JMS\Accessor(setter: 'setPromotedWithSetter')]
public string $promotedWithSetter = 'default',
) {
}
Expand Down

0 comments on commit bf06ece

Please sign in to comment.