Problem/Motivation

After #2225353: Convert $form_state to an object and provide methods like setError() goes in, start in on removing the array usage of FormState

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

tim.plunkett’s picture

Title: Remove » Remove ArrayAccess from FormState
tim.plunkett’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Postponed » Active
Issue tags: +FormState
tim.plunkett’s picture

Title: Remove ArrayAccess from FormState » [meta] Remove ArrayAccess from FormState
jibran’s picture

Why you moved it 8.0.x-dev to 8.1.x-dev?

tim.plunkett’s picture

Because there's no way we're holding beta up on this, and there are 2006 usages of 107 unique form_state keys. We can remove all of the *usages* of the magic [] syntax in core, but we can just remove the ArrayAccess code itself later.

Xano’s picture

Issue summary: View changes
catch’s picture

Version: 8.1.x-dev » 8.0.x-dev
Issue tags: +minor version target, +beta target

That still doesn't need to be 8.1.x - if we'd make a change in 8.1.x, then we should be prepared to make it at any point up until an RC of 8.0.0 (except for large new features which are likely to add release blocking tasks/bugs once committed).

How's this?

tim.plunkett’s picture

Fine by me. #2316533: Add getValue/setValue/hasValue and isValueEmpty to FormState removes ~1000 usages of form_state['values'], we can make good progress on this if the issues keep going in.

xjm’s picture

tim.plunkett’s picture

#2332389: Finish adding methods to FormStateInterface should add the remaining methods needed.

xjm’s picture

We ready to tear the bandaid off then?

tim.plunkett’s picture

#2335659: Remove FormState ArrayAccess usage from core currently contains the entirety of the conversion. It's 259K, and could be split into a 106K views and 153K non-views patch... But then they'd have to go in a specific order.

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned
Status: Active » Fixed
Issue tags: -Needs change record, -Needs change record updates

Both child issues are in! Thanks everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.