Problem/Motivation

Error: Class 'Firebase\JWT\JWT' not found after "composer update".

"drupal/salesforce_jwt" doesn't require "firebase/php-jwt" on the https://packages.drupal.org endpoint.

Steps to reproduce

Install drupal/recommended-project:^10

$ composer require drupal/salesforce_jwt
./composer.json has been updated
Running composer update drupal/salesforce_jwt
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
  - Locking drupal/key (1.17.0)
  - Locking drupal/salesforce (5.0.2)
  - Locking drupal/salesforce_jwt (5.0.2)
  - Locking lusitanian/oauth (v0.8.11)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Downloading lusitanian/oauth (v0.8.11)
  - Downloading drupal/salesforce (5.0.2)
  - Downloading drupal/key (1.17.0)
  - Installing lusitanian/oauth (v0.8.11): Extracting archive
  - Installing drupal/salesforce (5.0.2): Extracting archive
  - Installing drupal/key (1.17.0): Extracting archive
  - Installing drupal/salesforce_jwt (5.0.2)
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
Using version ^5.0 for drupal/salesforce_jwt

See
https://packages.drupal.org/files/packages/8/p2/drupal/salesforce_jwt.json,
it requires only drupal/* packages.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

luenemann created an issue. See original summary.

luenemann’s picture

Issue summary: View changes
hestenet’s picture

Status: Active » Needs review

There is some complexity to this issue:

Composer itself doesn't have a concept of packages that contain packages, whereas Drupal has this concept of sub-modules that might be contained within a parent module.

We've done some work to try and automatically generate meta-packages for sub-modules, but the logic for that can be tricky and brittle, especially when it comes to external dependencies as opposed to additional Drupal dependencies.

The best solution here is probably to include this external dependency in the parent modules composer.json

aaronbauman’s picture

This must be a recent change to Drupal's packaging system.
salesforce_jwt submodule requires firebase/php-jwt. Up until a few days ago (a few weeks maybe?) you could simply require drupal/salesforce_jwt in your Drupal project root to get the dependency.

aaronbauman’s picture

Status: Needs review » Active
aaronbauman’s picture

Status: Fixed » Closed (fixed)

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