Skip to content

IBX-11664: Fixed correct filtering out of fields not specified in user_registration.form.allowed_field_definitions_identifiers config#122

Open
bnowak wants to merge 5 commits into5.0from
fixed-user-register-form-to-work-with-allowed_field_definitions_identifiers-config
Open

IBX-11664: Fixed correct filtering out of fields not specified in user_registration.form.allowed_field_definitions_identifiers config#122
bnowak wants to merge 5 commits into5.0from
fixed-user-register-form-to-work-with-allowed_field_definitions_identifiers-config

Conversation

@bnowak
Copy link
Copy Markdown

@bnowak bnowak commented Apr 22, 2026

🎫 Issue IBX-11664

Description:

From SF 7.2 version ResizeFormListener added handling of FormEvents::POST_SET_DATA, so our filtering out of not defined fields in user_registration.form.allowed_field_definitions_identifiers didn't impact form because it was done before (on FormEvents::POST_SET_DATA event).

It looks like it was adjusted in FieldCollectionType in version 5.0.0, but was missed here in UserRegisterType.

For QA:

It worked in 4.6 version, however in 5.0 with Symfony 7.2 internal \Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener changed its behaviour, which impacted our feature and it stopped working.

Documentation:

@bnowak bnowak marked this pull request as ready for review April 22, 2026 09:26
@tbialcz tbialcz requested a review from a team April 22, 2026 09:42
bnowak added 3 commits April 22, 2026 11:54
…ser_registration.form.allowed_field_definitions_identifiers" config
…vent handling order, in the way to allowed fields id filtering take place at correct time in form processing.
@bnowak bnowak force-pushed the fixed-user-register-form-to-work-with-allowed_field_definitions_identifiers-config branch from d7d4531 to 7ac096a Compare April 22, 2026 09:59
Comment thread tests/integration/Form/Type/UserRegisterTypeTest.php Outdated
Copy link
Copy Markdown
Contributor

@barw4 barw4 left a comment

Choose a reason for hiding this comment

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

I assume test is failing after switching back to PRE_SET_DATA?

Comment thread tests/integration/Form/Type/UserRegisterTypeTest.php Outdated
@bnowak bnowak changed the title Fixed correct filtering out of fields not specified in user_registration.form.allowed_field_definitions_identifiers config IBX-11664: Fixed correct filtering out of fields not specified in user_registration.form.allowed_field_definitions_identifiers config Apr 22, 2026
Co-authored-by: Bartek Wajda <bartlomiej.wajda@ibexa.co>
@bnowak
Copy link
Copy Markdown
Author

bnowak commented Apr 22, 2026

I assume test is failing after switching back to PRE_SET_DATA?

@barw4 yes. In fact I created failing tests first and fix commit as last one (the change from PRE_SET_DATA into POST_SET_DATA) to make the test pass.

@ibexa-yuna ibexa-yuna deleted the branch 5.0 April 29, 2026 08:26
@ibexa-yuna ibexa-yuna closed this Apr 29, 2026
@mnocon mnocon reopened this Apr 29, 2026
@sonarqubecloud
Copy link
Copy Markdown

@mnocon mnocon changed the base branch from main to 5.0 April 29, 2026 09:10
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.

9 participants