Problem/Motivation
Compatibility with Drupal 9
Proposed resolution
Remove deprecated API calls.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | interdiff-25_28.txt | 2.23 KB | matroskeen |
| #28 | 3042682-28-deprecated-code-report.patch | 6.21 KB | matroskeen |
| #22 | 3042682-21-deprecated-code-report.patch | 5.7 KB | mikeegoulding |
| #20 | upgrade_status_config_split.JPG | 30.96 KB | Sudeepthi Peteti |
| #20 | interdiff.txt | 8.08 KB | Sudeepthi Peteti |
Comments
Comment #2
driverok commentedComment #3
driverok commentedComment #4
driverok commentedComment #5
nikolas.tatianenko commentedHi Aleh,
Please fix codestyles issues.
Comment #6
driverok commentedThanks, @nikolas.tatianenko, fixed in #6
Comment #7
bircherHi,
thanks for the patch. I am not sure the move of the ConfigSplitDrush8Io class definition is a good idea. I know that it is not conform with coding standards and that is why it is in a codingStandardsIgnore block. The reason it is in that file is that only the drush 8 commands need it and we needed to be php5 compatible, so an anonymous class was not an option. It has nothing to do with the Drupal 9 compatibility. I don't know if drupal-check has an "ignore" annotation but I would accept a patch that added that to make the tool happy.
It would be much more interesting to see what is up with:
Comment #8
driverok commentedHi guys.
Please check this #8 patch to address deprecated warning in ConfigSplitCliServiceTest.php.
Please notice that I changed `file_directory_temp()` and `file_uri_target` as well ( drupal_check didn't catch them for some reason, but they are deprecated).
As for ConfigSplitDrush8Io class, I totally understand the reason behind, but, why don't we use patch #6? It's not about D9 compatibility and only used in drush commands, I know. What are other concerns about placing the class in the src/ folder?
Comment #9
driverok commentedComment #10
kir lazur commentedWas reviewed. Test works well
Comment #11
bircherThank you all for working on this!
There is a new one though:
Comment #12
bircherAnother thing I just noticed.
We don't need to catch the exception here. Tests fail when exceptions are thrown.
Comment #13
jkswoods commentedUpdated patch as per @bircher comments in #11 and #12.
Comment #14
jkswoods commentedHmmm, followup to the patch above, we'd need to specify the core_version_requirement constraint as "^8.8 || ^9", simply due to the fact that FileSecurity was introduced in 8.8 https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21File....
Comment #15
jkswoods commentedPatch with the version constraint applied.
Comment #16
jkswoods commentedComment #17
danepowell commentedRegardless of the state of this patch, could the maintainers please update the Drupal 9 porting/status field on the project homepage so that users have some assurance that there is a plan to port to Drupal 9 (or not)?
Comment #18
bircherI would like this to be compatible with all supported versions of Drupal core, so we need to do some if/else to support Drupal 8.7 where the new class doesn't exist yet and Drupal 9 where the old one doesn't any more.
we don't need this.
we can leave core: 8.x, it doesn't hurt anyone.
and we should make it ^8 || ^9
we should wrap this in a class_exists if-clause to be compatible with both 8.7 and 9
Comment #19
Sudeepthi Peteti commentedComment #20
Sudeepthi Peteti commentedHi @bircher, Applied changes that you have given to patch number 15.
Also, after applying patch number 15 there is one more deprected constant CONFIG_SYNC_DIRECTORY, changed it and created a patch.
Please Review.
Comment #22
mikeegouldingLooks like that last patch needed a small tweak as class_exists() expects a string.
Comment #24
mikeegouldingI guess I should have paid attention to the other tests! I missed the $this in the static method on the form. Does that need to be static? Here is a patch that should cover that if it is meant to be static.
Comment #25
matroskeenHere is the patch with test fixes (hopefully) and some clean-up (interdiff attached).
Cheers!
Comment #26
bircherGreat, this is coming along nicely!
Thanks for all the patches.
RE: #20, #22 We don't inject the drupal settings. We use them as the static singleton instead, no need to try to inject anything to the constructor.
RE #25:
We need to stop using the global
$config_directories, and also the code here is wrong.Settings::get('config_sync_directory')already is the config directory path.same here, we need to set the Settings here instead of the global variable.
Doesn't this need the fully qualified name? so
FileSecurity::classmaybe?Also I guess we need to then finally run the patch here against Drupal 9.x
Comment #27
bircherComment #28
matroskeenThanks for the feedback! Here is the patch according to #26.
Comment #30
gaëlgdrupal-check on latest dev:
But these may be false positive due to D8.7- compatibility? If so, this may confuse people making their checks to see if they can upgrade the core, some message will have to added in project description to explain that.
Comment #31
gambryI believe this is Fixed.
RE #30 those are false positive due phpstan complaining about class defined in the same file and the module strategy wanting to support version below 8.8.
There is a
/* @phpstan-ignore-next-line */annotation we can use, but it works only for actual validation error and not for syntax issues, so it would work for the deprecatedhtaccessLines()but the autoloading error will still fires.I don't think there is a suitable option, other than re-factoring the code in here or suggesting a patch do phpstan-drupal to ignore autoloading errors. Both not ideal.
Comment #32
gaëlgIt's OK, thank you for the explanation! There's a "Drupal 9 porting info " field in the d.o project page where it could be said which version of the module is compatible with which versions of core.