Problem/Motivation

The Date module cannot be installed with composer due to "not fully declared" dependency on date_api.

The date module declares its dependency on date_api submodule. But external tools like Composer don't know that it is a submodule.

Proposed resolution

The is a change record for Drupal core that introduced a project namespaces for module dependencies.

According to that the date.info should be changed to replace dependencies with the following:

dependencies[] = date:date_api

Original report

https://www.drupal.org/node/2718229#comment-11562359 by @borsna

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pingwin4eg created an issue. See original summary.

aadil.addweb’s picture

aadil.addweb’s picture

Status: Active » Needs review
pingwin4eg’s picture

Thanks @binoli.lalani

Maybe we should include all submodules in this issue alltogether? (Because the fix is pretty simple)

aadil.addweb’s picture

aadil.addweb’s picture

@pingwin4eg: Awaiting for your inputs/feedbacks.

pingwin4eg’s picture

Status: Needs review » Needs work

@binoli.lalani Sorry, I totally missed this.

I tested the latest patch. It's OK. date_api namespaced everywhere. But there are still other submodules left in dependencies.

To be exact I checked all of them. And these 2 also need to have namespace of date::

  • date_repeat
  • date_repeat_field

in these 2 info files:

  • date_migrate/date_migrate_example/date_migrate_example.info
  • date_repeat_field/date_repeat_field.info
aadil.addweb’s picture

PFA patch w.r.t #7 comments.

riddhi.addweb’s picture

Assigned: Unassigned » riddhi.addweb
pingwin4eg’s picture

Status: Needs review » Needs work

@binoli.addweb 2 last patches need to be combined.

aadil.addweb’s picture

aadil.addweb’s picture

Assigned: aadil.addweb » Unassigned
Status: Needs work » Needs review
FileSize
3.17 KB

PFA revised patch.

pingwin4eg’s picture

Status: Needs review » Reviewed & tested by the community

OK now. Good job!

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Postponed
Related issues: +#2855026: Installation profiles do not support project:module format for dependencies
brunodbo’s picture

Status: Postponed » Needs review
FileSize
3.05 KB

Reroll of patch in #12. #2855026: Installation profiles do not support project:module format for dependencies is fixed, so this should be good to go in now?

DamienMcKenna’s picture

Status: Needs review » Needs work

A far as Drupal 7 is concerned, the core issue turned out to be a bug in Panopoly.

This needs a little work as the other modules should also be listed in project:module format.

brunodbo’s picture

Status: Needs work » Needs review
FileSize
4.32 KB

New patch with all dependencies listed in project:module format.

joelpittet’s picture

Status: Needs review » Needs work

From the docs:
https://www.drupal.org/docs/7/creating-custom-modules/writing-module-inf...

We need to add this if we are changing to the new format:
dependencies[] = drupal:system (>= 7.40)

DamienMcKenna’s picture

Priority: Major » Normal
Status: Needs work » Needs review
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

Given that we're at core 7.61, I'm not going to worry about supporting a version of core that old.

joelpittet’s picture

Status: Needs review » Needs work

I guess the people not willing to update core will likely not update contrib, and if they are patching an old version they'd likely patch contrib...
And that core version is > 3 years old...

I'm not sure what happens with test dependencies, does anybody know?

./tests/date_views_popup.test 
'dependencies' => array('ctools', 'views'),

But this test module should get the same treatment:
./tests/date_test/date_test.info:dependencies[] = date

I just ran this to review: grep -ir dependencies . in the date project.

brunodbo’s picture

Status: Needs work » Needs review
FileSize
6.12 KB

New patch with updated test dependencies.

brunodbo’s picture

Wait, I read the note on test dependencies wrong on https://www.drupal.org/docs/7/creating-custom-modules/writing-module-inf.... Hm, not sure what should happen with dependencies in tests (as opposed to test dependencies listed in a module .info file).

joelpittet’s picture

I'm learning some new things here too... the reason for that change is composer, in the test it doesn't download anything... I'm kinda surprised it worked, lol.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

@brunodbo Maybe we remove that change in the test file because it's not needed, but otherwise this is got all the bits and RTBC.

brunodbo’s picture

Yep, agreed not to change the test files if not needed. Reverted that change in this patch.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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