Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Aug 2014 at 01:55 UTC
Updated:
24 Aug 2014 at 22:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tim.plunkettComment #2
xjmI'd also add a note to the docblock of the class itself documenting that the ArrayAccess support is interim, since people using ArrayAccess don't actually call the methods.
I'd support this change; wherever possible, we should use FormState's methods rather than accessing it as an array, as described in https://www.drupal.org/node/2310411. We should probably get confirmation that this is okay to remove in 8.1 when explicitly deprecated now. (I don't think it would be an acceptable BC break otherwise.)
Comment #3
catchI'm not sure it's an acceptable bc break in 8.1.x either, but let's mark it deprecated asap either way.
Comment #4
dries commentedI agree with catch that if we don't remove this before 8.0, then it would be too disruptive to remove in a minor. I also don't want to hold up 8.0 on removing this, nor prevent it from getting removed if it makes it. So, how about we change "will be" to "might be":
@deprecated in Drupal 8.0.x, might be removed before Drupal 8.0.Comment #5
xjmBased on the feedback from @Dries and @catch, perhaps #2310255: [meta] Remove ArrayAccess from FormState should be rc deadline instead of filed against 8.1.x currently?
Comment #6
xjmOh, and the related question was: What would be the negative impacts of leaving ArrayAccess in as a BC layer until 9.0.0?
Comment #7
tim.plunkettLeaving that code will make things harder to refactor internally later, but it does not stop us completely.
#2310255-7: [meta] Remove ArrayAccess from FormState is fine by me, as is the wording @Dries suggested in #4.
But with that in mind, do we really need this issue?
Comment #8
xjmI definitely think we do, because people developing with beta 1 need to know about this.
Comment #9
tim.plunkettWFM
Comment #10
xjmThere's already the @todo in the docblock to remove \ArrayAccess in #2310255: [meta] Remove ArrayAccess from FormState, so I think that covers my feedback in #2. So this is all we need!
Comment #11
chx commentedGiven that
$form_state['values']is ubiquitous$form_state->getValuefrom wherever they find it in coreI recommend a separate gdo announcement on this .
Comment #12
xjmRe: #11, that's a good point. Not a g.d.o announcement though; a change record on the issue that actually removes the array access.
Comment #13
chx commentedOh well, I tried.
Comment #14
alexpottCommitted d21c9a4 and pushed to 8.0.x. Thanks!