Problem/Motivation
To land #3364108: Configuration schema & required keys, we need to ensure that all properties in schema's are correct, Since #3382510: Introduce a new #config_target Form API property to make it super simple to use validation constraints on simple config forms, and adopt it in several core config forms landed, we added configuration schema validation to system.file.
This property needs to be deprecated.
Steps to reproduce
N/A
Proposed resolution
Deprecate path.temporary in system.file
Remaining tasks
Review.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A
Issue fork drupal-3400368
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3400368-deprecate-path-in
changes, plain diff MR !5387
Comments
Comment #3
wim leersThis was deprecated in #3039026: Deprecate file_directory_temp() and move to FileSystem service.
So why is it still in the config schema? Because it was necessary for tests. Why was it not deprecated? Because #2997100: Introduce a way to deprecate config schemas landed a year later.
Comment #4
wim leersThis blocks #3364108: Configuration schema & required keys.
Comment #6
wim leersExisting change record updated: https://www.drupal.org/node/3039255.
Comment #7
smustgrave commentedSeemed to cause a number of functional tests to fail.
Comment #8
wim leersI was confused by the change record. Not
path, butpath.temporarywas deprecated.system_update_8801()provided the necessary update path. 👍Comment #9
wim leersComment #10
wim leersThis is tricky 😬🙃
Even though
system_update_8801()should have run, it's been possible to regress in any given site because there has been no validation (which is true for all config except CKEditor 5's) and it was not yet deprecated yet (which is what this issue is doing). Setting a deprecated key-value pair would've triggered a test failure if a site had regressed.… and that's literally what we're seeing here for some update path tests 😮
Investigation
The last update to the update path test fixtures happened in #3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x.
system.filein theconfigtable in both fixtures.✅ The one in the "filled" fixture looks fine:
❌ But the one in the "bare" fixture does NOT:
Conclusion
Let's change the "bare" fixture to match the "filled" one to the same value in the DB, and then update the fixture:
Did that in https://git.drupalcode.org/project/drupal/-/merge_requests/5387/diffs?co....
Comment #11
wim leersDown to a single failure!
Turns out there's a new
drupal-9.4.0.phpass.standard.php.gzfixture that was introduced in #1845004: Replace custom password hashing library with PHP password_hash() and contains the same problem.Same fix:
Comment #12
wim leersGreen 👍
Comment #13
borisson_The change itself is really small, and the other changes to the fixtures are logical imho.
Comment #14
xjmThis is an interesting issue. I had to read all the comments to understand what's going on (excellent explanations as always, thanks @Wim Leers).
That said, I'm not sure if re-exporting the 9.4 upgrade fixture is the correct choice. If this was done with a D10 codebase, it could pollute the fixture with D10 data and make upgrade path tests for other update hooks not work properly. Was the export created with a 9.4 codebase?
Comment #15
xjmSetting NR to answer the above question (also pinged @Wim Leers in Slack). Meanwhile, asking the other committers just to make sure they have no concerns with this approach, since it's an odd sort of issue with a previously-impossible deprecation spanning four major releases.
Comment #16
wim leersComment #17
wim leersNo, I didn't do this from the
9.4.0codebase.But that is irrelevant AFAICT. All I did was
db-tools.php import, modify one row manually in the database (i.e. without using Drupal),db-tools.php dump-database-d8-mysql, done.Neither
core/lib/Drupal/Core/Command/DbImportCommand.phpnor\Drupal\Core\Command\DbDumpCommandhave changed in any way since9.4.0(released June 15, 2022) that would make either the imported or dumped result different.You would have a really good point if I had recreated the
bareandphpassfixtures from scratch. But I literally modified one row in the DB directly, and did so in a way where I copied the literal string value from thefilledfixture.Comment #18
catchYes it's OK to use the dump scripts from later releases, we actually had to do that with the 9.3.0 dumps at the time due to a bug in the 9.3.0 dump script that was only fixed in 9.4.something (vaguely mentioned in #3305003: Create standard steps for creating database dumps).
Comment #19
xjmThanks @Wim Leers and @catch; that info is helpful.
Saving credits.
Comment #20
xjmI think we should update https://www.drupal.org/node/3039255 to mention this missing deprecation?
Comment #21
wim leersDone! 😊
Comment #24
xjmThanks @Wim Leers!
Committed to 11.x and 10.2.x as a newly surfaced deprecation. I also toggled the publish status of the CR to move it up the list for the additional deprecation.
Thanks everyone!
Comment #26
wim leersGood call! 👏