Please apply new {project}:{module} format for dependencies in info.yml filehttps://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-about-your-module-with-an-infoyml-file

It is supported since 8.0 and 7.40 Change Record: Project namespaces can now be added for module dependencies, and is now a Best Practice Define project dependencies in core module .info files).

It is useful to install/update via composer. So sooner is better.
Hope this helps.

Comments

chipway created an issue. See original summary.

chipway’s picture

Assigned: chipway » Unassigned
Status: Needs work » Needs review
StatusFileSize
new243 bytes

Here is the patch. Please review.

alonaoneill’s picture

Status: Needs review » Reviewed & tested by the community

Code looks good. The dependency namespacing aligns with Drupal documentation standards.
Patch applied via simplytest.me
Marking as RTBC
Thank you for working on module!

hkirsman’s picture

Is that the reason I can't install via Composer?

 [InvalidArgumentException]                                                                                                                                                                                            
  Could not find a matching version of package drupal/search_kint. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
hkirsman’s picture

Sorry, my bad. But still I think could be merged :)

mmjvb’s picture

Status: Reviewed & tested by the community » Needs work

No, completely unrelated. It is related to how Drupal works with dependencies, not composer. It does use the same notation as composer.
That is why I set this back to Needs work. It should be drupal/kint instead of kint/kint.

docker@cli:/var/www/html/sites/default$ composer show --all kint/kint
No composer.json in current directory, do you want to use the one at /var/www? [Y,n]? y


  [InvalidArgumentException]
  Package kint/kint not found


show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [-m|--minor-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--] [<package>] [<version>]

docker@cli:/var/www/html/sites/default$ composer show --all drupal/kint
No composer.json in current directory, do you want to use the one at /var/www? [Y,n]? y
name     : drupal/kint
descrip. : Wrapper for Kint debugging tool
keywords :
versions : 2.x-dev, 2.0.0, 1.x-dev, 1.2.0, 1.1.0, 1.0.0, 1.0.0-rc2, 1.0.0-rc1, 1.0.0-beta1, 1.0.0-alpha1, dev-2.x, dev-1.x
type     : metapackage
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
source   : []
dist     : []
names    : drupal/kint

support
source : http://cgit.drupalcode.org/devel

requires
drupal/devel 2.x-dev
drupal/core ~8.0
docker@cli:/var/www/html/sites/default$ composer show --all drupal/search_kint
No composer.json in current directory, do you want to use the one at /var/www? [Y,n]? y
name     : drupal/search_kint
descrip. : Allows searching through the Kint dump.
keywords :
versions : 1.x-dev, 1.0.0, dev-1.x
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
source   : [git] https://git.drupal.org/project/search_kint 66109819ba67971e1d735d259b6c2ef30bacbd21
dist     : []
names    : drupal/search_kint

support
source : http://cgit.drupalcode.org/search_kint

requires
drupal/kint *
drupal/core ~8.0

docker@cli:/var/www/html/sites/default$

The only reason for your error I can think of is that the drupal repository is missing in your project. The package exists and has a stable release!

  • 5edf2ff committed on 8.x-1.x
    Issue #3000336 by chipway: Update Dependencies for composer
    
dahousecat’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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