Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We are currently skipping the Install profile will be a mandatory parameter in Drupal 9.0.
deprecation.
Proposed resolution
Remove deprecation skipping and fix how it is triggered to be only when \Drupal::installProfile()
results in setting a profile value.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#19 | 2959282-2-19.patch | 5.44 KB | alexpott |
#19 | 16-19-interdiff.txt | 2.06 KB | alexpott |
#16 | 2959282-2-16.patch | 5.42 KB | alexpott |
#16 | 15-16-interdiff.txt | 4.76 KB | alexpott |
#15 | 2959282-15.patch | 3.98 KB | Lendude |
Comments
Comment #2
alexpottComment #3
jibranLet's simplify the logic.
Comment #4
jibranCorrect patch.
Comment #5
alexpottIt's very debatable if assignment in an if with other conditions is simplying anything.
Also the latest patch does not remove the deprecation message for getSkippedDeprecations().
Comment #6
alexpottRe-uploading #2 after re-rolling.
Comment #7
alexpottAdded a test because we have logic about when and how the deprecation is triggered.
Comment #9
alexpott#8 Unrelated test fail in
Drupal\Tests\quickedit\FunctionalJavascript\FieldTest
Comment #11
Mile23Reroll.
Comment #12
Mile23It looks like this deprecation comes from #2156401: Write install_profile value to configuration and only to settings.php if it is writeable which also deprecates a lot of other top-level functions. None were committed with change record @see, but some have them now. None of them appear to have @trigger_error, either, though I'd assume there's a reason.
Anyway, poking around led me to this CR but I'm not sure it's the right one: https://www.drupal.org/node/2538996
Adding 'CR updates' because we need to point to a CR from the error message and the deprecation notice.
Comment #13
Mile23Patch still applies. :-) I guess I should have said 'needs work' in october.
Comment #15
LendudeThe change record in #12 seems pretty appropriate, so let's use that. Also updated the test so that all three scenarios are actually run.
edit: interdiff looks a bit weird for the getSkippedDeprecations change
Comment #16
alexpottAfter discussing this a bit with @berdir I realised that this is confusing because in Drupal 9 all of the constructor params are going to have to be required so really that's what we need to deprecate for.
Comment #17
mikelutzThat makes more sense to me. Now you can still call the constructor with a NULL profile, you just have to explicitly call it with NULL. It's cleaner.
Comment #18
catchShould this be !isset($profile) before the count()? I realise it's not a code path that needs micro-optimizing though.
9.0.0?
Comment #19
alexpott@catch thanks for the review.
1. Sure why not - can't hurt I guess.
2. Fixed.
Comment #20
catchCommitted 36dd174 and pushed to 8.8.x. Thanks!