Skip to content

Commit 9e949fa

Browse files
committed
AllowDynamicProperties on RegisterSelfAssertedSecondFactorCommand and UpdateIdentityCommand
Prior to this change, `Deprecated: Creation of dynamic property` was logged when running the behat tests in devconf. This can be caused when properties are set in old events, that are later removed from the class. We could check in the CommandValueResolver whether a field exists before setting it, but that carries more risk, in case the properties might be still read dynamically somewhere.
1 parent c44012d commit 9e949fa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/RegisterSelfAssertedSecondFactorCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818

1919
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command;
2020

21+
use AllowDynamicProperties;
2122
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
2223
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfAsserted;
2324
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfServiceExecutable;
2425
use Symfony\Component\Validator\Constraints as Assert;
2526

27+
#[AllowDynamicProperties]
2628
class RegisterSelfAssertedSecondFactorCommand extends AbstractCommand implements SelfServiceExecutable, SelfAsserted
2729
{
2830
/**

src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Command/UpdateIdentityCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Command;
2020

21+
use AllowDynamicProperties;
2122
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\AbstractCommand;
2223
use Surfnet\StepupMiddleware\CommandHandlingBundle\Command\SelfServiceExecutable;
2324
use Symfony\Component\Validator\Constraints as Assert;
2425

26+
#[AllowDynamicProperties]
2527
class UpdateIdentityCommand extends AbstractCommand implements SelfServiceExecutable
2628
{
2729
/**

0 commit comments

Comments
 (0)