Closed (fixed)
Project:
Field Permissions
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2019 at 22:29 UTC
Updated:
18 Jun 2020 at 19:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Snehal Brahmbhatt commented@mcdwayne, Please find the below-attached patch, & let me know if any further changes are required.
Thanks!
Comment #4
clemens.tolboomdrupal-check (https://github.com/mglaman/drupal-check) is about https://pantheon.io/blog/your-module-ready-drupal-9-click-here-find-out
Comment #5
jeroentDrupal::service(...)
Should be \Drupal::service(...)
$this->assertSession() should not be used like that. See Drupal\FunctionalTests\AssertLegacyTrait for all alternatives.
E.g. $this->assertText() should be $this->assertSession()->pageTextContains().
$this->assertResponse() should be $this->assertSession()->statusCodeEquals()
and so on.
Comment #6
Snehal Brahmbhatt commented@JeroenT, Please find the updated patch for the same, thanks for your inputs. Hope this works now.
Comment #7
Snehal Brahmbhatt commentedComment #9
jeroentEntityFormDisplay class should be imported.
This line seems odd. Should be replaced with $this->assertSession()->responseContains($this->commentSubject);
Comment #10
dhirendra.mishra commentedI am working on it.
Comment #11
dhirendra.mishra commentedHere is the correct patch. Kindly review and merge.
Comment #12
dhirendra.mishra commentedComment #14
AmandeepKaur commentedComment #15
-enzo- commentedHi folks
I took the patch in comment #12, and solved to issues reported by drupal-check, but there two internal @deprecated issues that should be fixed or may be ignored.
Comment #16
-enzo- commentedPlease ignore the files attached in the previous comment
Comment #17
-enzo- commentedComment #18
xem8vfdh commentedis this done and ready to be merged, and are we all squared away for D9 support after merging?
Comment #19
xem8vfdh commentedI believe there is also acomposer.jsonchange that should be made to add the Drupal 9 support badge to the module's main page, as explained here: https://www.drupal.org/project/auto_entitylabel/issues/3111526EDIT: or perhaps the change needs to be made to thecore_version_requirementfield in the module's.infofile. Here's an example from another project: https://www.drupal.org/files/issues/2020-03-12/3119389-d9-upgrade-2.patchEDIT 2: my information about composer.yml and info.yml was incorrect, sorry. Apparently there is some switch the maintainer can flip to trigger the badge and mark the module as D9 compatible, but I don't know where that switch is since I am not a maintainer. Sorry.
Comment #20
xem8vfdh commentedComment #21
xem8vfdh commented@-enzo-, I applied patch field-permission-3042752-12.patch and I see no core deprecation warnings. However, I do still see the internal field_permissions warnings:
Seeing as this issue is about Drupal 9 compatibility, I think these internal deprecation are outside the scope of this issue, thus I am marking this as RTBC. Maintainers, should we open another issue about these internal deprecation warnings?
Comment #22
heddnI don't see any further deprecations then what are fixed in this issue. I've added a D9 test pass, to see if it catches things we can't find via static test analysis.
However, this module still needs
core_version_requirement: ^8 || ^9to info.yml and (possibily)drupal/core: "^8 || ^9. For that, marking NW.Comment #23
xem8vfdh commented@heddn, can you provide that patch?
Comment #24
heddnI'll try to get to that. But I learned a few more things since I posted that comment yesterday and
core_version_requirement: ^8 || ^9to info.yml is all that is needed.Comment #25
xem8vfdh commented@heddn I have attached 3042752-13.patch, which includes
core_version_requirementchange. Please review.Comment #26
heddnThat looks good to me. Thanks for throwing up the patch. Here's an interdiff for anyone else between #16and #25.
Comment #27
xem8vfdh commentedthanks @heddn
Comment #28
heddnWith D9 releasing today, any chance for a commit and new tagged release? Maybe a mention in the Drupal 9 support project field what the plans are for supporting D9?
Comment #29
xem8vfdh commented+1
Comment #30
jeroentTests are still failing.
EntityFormDisplay class should be imported.
Comment #31
xem8vfdh commentedSorry, my fault, I am having issues running tests on my machine
attaching 3042752-13.patch to address #30. I'm not sure if the other test failures are related.
Comment #32
jeroentComment #33
jeroentComment #34
xem8vfdh commentedsorry @JeroenT, thanks for cleaning up my mess *facepalm*
I just applied your patch 3042752-32.patch cleanly and it resolved the D9 deprecations. Again, I;m having trouble running test on my machine, but your testbot results obviously passed. So, if you aren't still working and 3042752-32.patch is your final patch, feel free to mark this RTBC.
Comment #35
jeroent@xeM8VfDh, np.
Marking the issue RTBC.
Comment #37
japerryThanks all for working on this. Fixed!