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.
Ran drupal-check against 3b7ae61
.
90/90 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------
Line libraries.drush.inc
------ ------------------------------------------------------------------
65 Call to deprecated function libraries_info():
Will be removed before a stable Drupal 8 release. Please use the
new library load and managment concepts described at:
https://www.drupal.org/node/2170763
66 Call to deprecated function libraries_detect():
Will be removed before a stable Drupal 8 release. Please use the
new library load and managment concepts described at:
https://www.drupal.org/node/2170763
------ ------------------------------------------------------------------
------ ----------------------------------------------------------------
Line libraries.install
------ ----------------------------------------------------------------
26 Call to deprecated function file_unmanaged_delete_recursive():
in drupal:8.7.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\File\FileSystemInterface::deleteRecursive().
------ ----------------------------------------------------------------
------ ----------------------------------------------------------------------
Line tests/modules/libraries_test/libraries_test.module
------ ----------------------------------------------------------------------
464 Call to deprecated function drupal_set_message():
in drupal:8.5.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ -------------------------------------------------------------------
Line tests/modules/libraries_test/src/Controller/ExampleController.php
------ -------------------------------------------------------------------
26 Call to deprecated function libraries_load():
Will be removed before a stable Drupal 8 release. Please use the
new library load and managment concepts described at:
https://www.drupal.org/node/2170763
------ -------------------------------------------------------------------
------ ------------------------------------------------------------------------------------------------------------------
Line tests/src/Kernel/LibraryTypeKernelTestBase.php
------ ------------------------------------------------------------------------------------------------------------------
Class Drupal\libraries\ExternalLibrary\Exception\LibraryAccessorInterface not found and could not be autoloaded.
------ ------------------------------------------------------------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------
Error
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------
Child process error (exit code 255): Fatal error: Trait method getLibrary has not been applied, because there are collisions with other trait methods
on Drupal\libraries\ExternalLibrary\Exception\InvalidLibraryDependencyException in
/Users/stevenworx/code/php/drupal/clients/internal/platforms/deprecated_check/web/modules/contrib/libraries/src/ExternalLibrary/Exception/InvalidLibrar
yDependencyException.php on line 13
Child process error (exit code 255): Fatal error: Trait method getLibrary has not been applied, because there are collisions with other trait methods
on Drupal\libraries\ExternalLibrary\Exception\InvalidLibraryDependencyException in
/Users/stevenworx/code/php/drupal/clients/internal/platforms/deprecated_check/web/modules/contrib/libraries/src/ExternalLibrary/Exception/InvalidLibrar
yDependencyException.php on line 13
-- ---------------------------------------------------------------------------------------------------------------------------------------------------------
[ERROR] Found 8 errors
Comment | File | Size | Author |
---|---|---|---|
#36 | 3119010-14.patch | 8.83 KB | xeM8VfDh |
#2 | 3119010-2.patch | 2.45 KB | Suresh Prabhu Parkala |
Issue fork libraries-3119010
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:
Comments
Comment #2
Suresh Prabhu Parkala CreditAttribution: Suresh Prabhu Parkala at Specbee commentedPlease review the patch. Thank you. Done with the deprecated code.
Comment #4
xeM8VfDh CreditAttribution: xeM8VfDh commentedThanks @Suresh Prabhu Parkala for working on the patch!
Comment #5
xeM8VfDh CreditAttribution: xeM8VfDh commented@Suresh Prabhu Parkala I believe there is also acomposer.json
change 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_requirement
field in the module's.info
file. 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 #6
Suresh Prabhu Parkala CreditAttribution: Suresh Prabhu Parkala at Specbee commentedComment #7
Suresh Prabhu Parkala CreditAttribution: Suresh Prabhu Parkala at Specbee commentedAdd the 'core version requirement' key support in .info file. Please review.
Comment #8
xeM8VfDh CreditAttribution: xeM8VfDh commented@Suresh Prabhu Parkala, maybe I am doing something wrong, but when I execute drupal-check against 8.x-3.x, both before and after applying 3119010-7.patch, I get the following output:
There's obviously an unresolved trait collision, which appears to have been fixed in 3039243. I'm even more curious why I didn't get the actual Drupal9 deprecation noticed you did when I ran drupal-check before applying your patch. So I guess I can't review this as a success, as I don't see the reported deprecations to begin with.
Comment #9
GaëlGYes, I confirm that, using latest dev :
- I get the same error with drupal-check 1.1.1 (trait collision)
- I get no deprecation notice with upgrade_status 2.4.0 without the patch (except the .info.yml thing)
- I get no deprecation notice at all with upgrade_status 2.4.0 with the patch #7
Comment #10
xeM8VfDh CreditAttribution: xeM8VfDh commentedthanks for confirming @GaëlG
What do you think @Suresh Prabhu Parkala
Can any maintainers chime in?
Comment #11
xeM8VfDh CreditAttribution: xeM8VfDh commentedChanging the status, as the patch seems good and the Trait issue seems out of the scope of this issue and appears to be fixed in 3039243. Feel free to switch back, if you think this is incorrect.
Comment #12
GaëlGUnfortunately, with both patches:
I still get:
Comment #13
xeM8VfDh CreditAttribution: xeM8VfDh commented@GaëlG hmm, I don't get those errors. Do you want to take a stab at resolving them in a new patch?
Comment #14
xeM8VfDh CreditAttribution: xeM8VfDh commentedAlso, @GaëlG, are you sure you're testing the patch against the latest state of the 8.x-3.x branch? Your comment in #12 seems to contradict your comment in #9. Appologies if I am misunderstanding.
Comment #15
xeM8VfDh CreditAttribution: xeM8VfDh commentedOkay, so i applied this patch to fix the trait issue, and then I applied the patch in #7, and I was able to reproduce @GaëlG's results:
I will take a look later today
Comment #16
xeM8VfDh CreditAttribution: xeM8VfDh commentedOkay, I created a new patch
3119010-8.patch3119010-9.patch, which resolves all of the core drupal deprecations show above. The output after applying this patch (remember, you must apply this patch first if you are using a fresh clone of 8.x-3.x) now only includes deprecation warnings for internal Libraries functions. These remaining errors are outside the scope of this issue, as they are unrelated to Drupal 9 compatibility, so I think we shouldn't worry about them here.Comment #17
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #18
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #20
xeM8VfDh CreditAttribution: xeM8VfDh commentedtrying again to to test failure (3119010-10.patch)
Comment #22
xeM8VfDh CreditAttribution: xeM8VfDh commentedapologies, I am struggling with running tests on my local machine for this module. maybe someone else can pick up where I left off and resolve those failing tests.
Comment #23
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #24
Suresh Prabhu Parkala CreditAttribution: Suresh Prabhu Parkala at Specbee commentedComment #25
xeM8VfDh CreditAttribution: xeM8VfDh commentedOkay, was able to get testing partially working on my machine and believe I've resolved the issue causing tests to fail on the path in #20.
Adding patch 3119010-11.patch, which must be applied in conjunction with this patch. Once both are applied, I see 29 errors from
drupal-check
, but there are for internal libraries functions that have been marked deprecated, which, as I mentioned above, I believe to be outside the scope of this issue. No more drupal 9 issues.Comment #26
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #27
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #28
aspilicious CreditAttribution: aspilicious commentedGot a fatal in d9. drupal_get_profile is deprecated
Needs to be fixed.
Comment #29
xeM8VfDh CreditAttribution: xeM8VfDh commentedThanks for the heads up @aspilicious. I'm not sure why
drupal-check
is not picking that up. I'm adding 3119010-12.patch to fix that. Again, it should be installed in conjunction with this patch. Can you please test again?Comment #30
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #31
aspilicious CreditAttribution: aspilicious commentedI found a problem with another module and this one is affected to: "file_scan_directory" is deprecated
Comment #32
aspilicious CreditAttribution: aspilicious commentedComment #33
aspilicious CreditAttribution: aspilicious commentedComment #34
xeM8VfDh CreditAttribution: xeM8VfDh commented(see comment below)
Comment #36
xeM8VfDh CreditAttribution: xeM8VfDh commentedthanks @aspilicious, I also noticed
ModuleHandler::parseDependency
anddrupal_check_incompatibility
are also deprecated, so I also fixed those along withfile_scan_directory
. Please see3119010-13.patch3119010-14 (as usual, must be applied with this patch to allowdrupal-check
to work).P.S. I am not very familiar with the libraries code, or the core APIs. Some of the deprecation notices and suggested changes are not entirely clear, and some of the libraries code that needs to be updated is not entirely clear. If someone with more direct experience with libraries/core APIs could review these changes, particularly those implemented in
libraries_detect_dependencies
, that would be super helpful.Comment #37
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #38
xeM8VfDh CreditAttribution: xeM8VfDh commentedComment #39
Anybody@Maintainer: Any plans or ETA for the Drupal 9 compatibility already?
Comment #40
xeM8VfDh CreditAttribution: xeM8VfDh commented@Anybody, this is it lol. I've privately messaged folks form this issue to come test again, but no luck so far. I'm not sure how active the maintenance of this module is.
Comment #41
podarok@xeM8VfDh - just release a patch to dev and you'd get more people to test against Drupal 9
Comment #42
podarokComment #43
podaroktested #36 - seems like working
Comment #44
xeM8VfDh CreditAttribution: xeM8VfDh commented@podarok I cannot release anything, I am not a maintainer. Thanks for testing and updating status :)
I fear this module might be on its deathbed.
Comment #45
GaëlGThis might help? https://www.drupal.org/blog/the-maintainers-intiative
Comment #46
xeM8VfDh CreditAttribution: xeM8VfDh commentedthis seems like a cool initiative @GaeIG and a good avenue to explore. My philosophy is to use as few modules as possible, and steer clear of those that are not actively maintained. Therefore, my personal preference is to drop Libraries altogether, and I think I have managed to do just that. But, I recognize that this isn't always an option for everyone, in which case the initiative you mentioned is definitely worth pursuing, especially since the work seems to be mostly done here with the patch and its just a matter of the maintainers not being around. but, if this patch gets force merged, this issue will eventually arise again with some other Drupal update. The key is to have some maintainer around who is reviewing and merging RBTC at the very least.
Comment #47
GaëlGRight. If this module doesn't seem to be given much love from the community so far, it might be that it's not so useful anymore. I checked on my side: I have only two little modules requiring it, when I have more time I'll have a look if they still really need it.
Anyway, drupal-check still doesn't like the latest dev:
Comment #48
xeM8VfDh CreditAttribution: xeM8VfDh commentedyeah, I think most modules that used to require Libraries have dropped it (or have conditionals to use it IF its installed, but don't require it to be installed).
as for latest patch not working, I think its because you must apply it on latest dev along side this patch
But since that patch is also not merged, I am kind of just giving up on this. Apologies to those still holding out for this to be fixed.
Comment #49
sajid_007 CreditAttribution: sajid_007 commentedHere is the patch.
Comment #50
rishab.singh CreditAttribution: rishab.singh as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #52
xeM8VfDh CreditAttribution: xeM8VfDh commented@sajid_007 should fix their latest patch and maybe explain what it fixes that the working 3119010-14.patch patch doesn't.
Comment #53
boromino CreditAttribution: boromino at LakeDrops commentedInjected extension.list.$type services into LibraryManager.
Comment #54
jungleShould add to the test module as well.
Comment #55
devdesagar CreditAttribution: devdesagar at TATA Consultancy Services for Pfizer, Inc. commentedPatch 54 is working for me. Tested on Drupal8 and Drupal9.
Comment #56
devdesagar CreditAttribution: devdesagar at TATA Consultancy Services for Pfizer, Inc. commentedComment #57
xeM8VfDh CreditAttribution: xeM8VfDh commentedIs this module still actively maintained? I know much of its functionality has moved to core. Is it even worth patching, or is the more forward-compatible approach to advise all users and module maintainers that consumer Libraries to drop the dependency? I do know many modules that depend on Libraries have already done this are are actively in the process.
Comment #58
berramou CreditAttribution: berramou commentedI use Masonry AP module depends on it!
Comment #59
xeM8VfDh CreditAttribution: xeM8VfDh commentedI hear you, its frustrating dealing with the dependency tree. You should reach out to that module maintainer and encourage them to remove the dependency, as other modules are doing or have done.
Comment #60
dksdev01 CreditAttribution: dksdev01 commented+1 for the D9 release
Comment #62
joseph.olstadI am a co-maintainer here, which patch do you want me to review/commit ?
Comment #63
podarok@joseph.olstad
See https://www.drupal.org/project/libraries/issues/3178575#comment-13933890
Comment #64
fgmThe one at https://www.drupal.org/project/libraries/issues/2952316 works for me and @MosheWeitzman set it to RTBC too.Actually, it's about Drush, not core, sorry.
Comment #65
drupgirl CreditAttribution: drupgirl commented+1 for getting this patch committed soon, as I am sure it's a blocker for lots of sites that need to be bumped up to D9.
Comment #67
joseph.olstadBig thanks to @podarok and everyone else, we now have a new tagged release 8.x-3.0-alpha2 with Drupal 9 support, hopefully this does the trick for everyone.
Comment #69
joseph.olstadalpha3 is tagged, you'll need this for Drupal 9, I replaced a couple deprecated calls and incorrect substitutes for deprecated functions in libraries.module that were missed by padaroks version
should be good to go now, I'm running 3.0-alpha3 with Drupal 9 and haven't noticed any issues.