Comments

legolasbo’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB
claudiu.cristea’s picture

Status: Needs review » Needs work

There are still some references in comments to form_set_cache(). We need to replace them as well.

$ grep -nr form_set_cache core
...
core/lib/Drupal/Core/Form/FormCache.php:187:    // form_set_cache from accidentally overwriting immutable form state.
core/modules/system/src/Tests/Form/StorageTest.php:227:    // Assert that a watchdog message was logged by form_set_cache.
core/modules/system/src/Tests/Form/StorageTest.php:229:    $this->assert($status, 'A watchdog message was logged by form_set_cache');
core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php:44:   * form_get_cache and stored using form_set_cache after manipulation. This
legolasbo’s picture

StatusFileSize
new3.52 KB

Also removed the references in the comments.

Intentionally left the reference in core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php because it describes the relation between form_set_cache() and \Drupal::formBuilder()->setCache() in a legacy test.

legolasbo’s picture

Status: Needs work » Needs review
claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

Thank you. Good to go.

ianthomas_uk’s picture

Don't forget to make sure change records are up to date and linked to these issues. I've done that for this and #2355179: Remove usage of form_get_cache() and form_set_cache()

alexpott’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Closing in favour of merging with #2355179: Remove usage of form_get_cache() and form_set_cache() since both patches are rtbc and they conflict. Having one function without the other does not make sense therefore removing them should happen in one patch.