Problem/Motivation

The module currently relies on libraries module to find the library in non-standard paths. That project is not maintained and has an unknown future.

#3096648: Add support for third party libraries in site specific and install profile specific libraries folders aims to move the minimal functionality that is needed by most modules that rely on libraries directly in core.

Proposed resolution

Replace all libraries_get_path() calls with the new API.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new2.92 KB
berdir’s picture

Updating for the changed service and class name in core and also make this optional as it will only land in 8.9, and we still want to support libraries.module for 8.8. Once we require 8.9+, we can remove the old code like in the initial patch.

Should be able to commit this as soon as the core patch is in.

chr.fritsch’s picture

Status: Needs review » Needs work

dropzonejs_library_info_alter also needs to be adjusted

chr.fritsch’s picture

And I think the $exif_path should be added here:

      'js' => [
        '/libraries/exif-js/exif.js' => [],
      ],
phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new4.34 KB

This should handle dropzonejs_library_info_alter().

phenaproxima’s picture

StatusFileSize
new4.56 KB

Oh, and this addresses the concern in #5.

berdir’s picture

Status: Needs review » Needs work

No, the library alter is not required, that's the neat thing about this. It just works for libraries that are defined as /libraries/..., they are automatically resolved. Explicitly using the service is only needed for the requirements check and dynamically defined library.

See how that was completely removed in #2.

I did manually test my patch in #3 and it worked for me.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new3.36 KB
new1.43 KB

Thanks for the clarification, @Berdir! I added a couple of todo comments to the patch in #3, and also fixed a potential call to file_exists(false).

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Well, I did write most of the code, so can't really RTBC, but lets say we cross-reviewed each others code ;)

chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Oh, whoo 😲 I didn't realize that it does the job automatically.

So, awesome!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.