Problem/Motivation

The module declares Composer dependencies on drupal/firebase_php and drupal/apns_php, but these modules are not listed as dependencies in push_notifications_registration_tokens.info.yml.

Because of this, Composer downloads the required projects, but Drupal does not ask to enable firebase_php or apns_php when enabling push_notifications_registration_tokens.

Steps to reproduce

Run Composer:

composer require \
  'drupal/push_notifications_registration_tokens:^1.0@beta' \
  'drupal/firebase_php:7.0.x-dev@dev' \
  'drupal/apns_php:1.0.x-dev@dev' \
  -W

Enable the module:
drush en -y push_notifications_registration_tokens

Observe that Drupal enables the module without prompting to enable any dependency modules provided by the Composer dependencies.

Proposed resolution

Add firebase_php and apns_php as explicit dependencies in push_notifications_registration_tokens.info.yml:

dependencies:
  - firebase_php:firebase_php
  - apns_php:apns_php

Remaining tasks

  • Verify the exact machine names of firebase_php and apns_php modules and update dependencies: in push_notifications_registration_tokens.info.yml accordingly.
  • Test that drush en -y push_notifications_registration_tokens correctly prompts or auto-enables the dependency modules after the fix.
Command icon 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

dkmishra created an issue. See original summary.

ptmkenny’s picture

Thank you for this report. Actually, these are optional dependencies that I should have marked as dev dependencies; the module does not require them, although they are recommended.

ptmkenny’s picture

Title: Missing .info.yml module dependencies » Optional modules should be dev dependencies, not regular dependencies
ptmkenny’s picture

I'm going to make a few more changes to the module, and then I'll make a new release later today.

  • ptmkenny committed 5247a4ab on 1.0.x
    fix: #3600747 Optional modules should be dev dependencies, not regular...
dkmishra’s picture

@ptmkenny, thanks. I appreciate you taking the time to make the additional improvements.

ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.