Tried:

⇒  composer require drupal/ckeditor_indentblock
Using version 1.x-dev for drupal/ckeditor_indentblock
./composer.json has been updated
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for drupal/ckeditor_indentblock 1.x-dev -> satisfiable by drupal/ckeditor_indentblock[1.x-dev].
    - drupal/ckeditor_indentblock 1.x-dev requires drupal/drupal ^1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

What's "drupal/drupal ^1.0" ?

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

I checked numerous contrib modules and most of them didn't have any requirements and none of them had requirement for Drupal. So this is my first try with some other fixes to the composer.json.

This is also not correct:

"drupal/ckeditor": "*",
    "drupal/libraries": "*"

Didn't have time to dig deep but here's what my editor is saying to read: https://getcomposer.org/doc/faqs/why-are-unbound-version-constraints-a-b...

hkirsman’s picture

Currently I added this to my own composer to get the project downloaded:

{
            "type": "package",
            "package": {
                "name": "drupal/ckeditor_indentblock",
                "version": "1.x-dev",
                "type": "drupal-module",
                "dist": {
                    "url": "https://ftp.drupal.org/files/projects/ckeditor_indentblock-8.x-1.x-dev.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor/indentblock",
                "version": "4.7.0",
                "type": "drupal-library",
                "dist": {
                    "url": "http://download.ckeditor.com/indentblock/releases/indentblock_4.7.0.zip",
                    "type": "zip"
                },
                "extra": {
                    "installer-name": "indentblock"
                }
            }
        }

And then:

composer require drupal/libraries
composer require drupal/ckeditor_indentblock
composer require ckeditor/indentblock

Also I would suggest more strict html filter. So instead of <p class> it would be <p class="Indent*">

gnuget’s picture

Priority: Normal » Major

I'm going to move this to "major" because this prevents the module to being installed.

Thanks for the workaround

meichr’s picture

@hkirsman, thanks for the patch and workaround. The wrong links are a leftover from, when the module was in a sandbox.

The require drupal 8.1.0 intended to prevent an installation of this module under Drupal 8.0.* as some functionality requires at least Drupal 8.1.0.
@gnuget, @hkirsman, do you see a replacement for this part to have this check implemented? This is the only piece, why the suggested patch has not been committed.

  "require": {
    "drupal/drupal": "^8.1.0",

Thanks for your insight.

gnuget’s picture

Try just removing the 8. something like:

  "require": {
    "drupal/drupal": "^1.0",

That should do the trick.

gnuget’s picture

Or maybe the problem is the name of the package it should be drupal/core NOT drupal/drupal

So you can try this instead:

  "require": {
    "drupal/core": "^8.1.0",

I think that should work.

I just attached a patch with this change.

meichr’s picture

Thank you, @gnuget, great!
On a final check, I found that also the issue link was still the one by the sandbox, I'm adding this change to the patch before committing it.

  • meichr committed 67b8e88 on 8.x-1.x
    Issue #2887520 by gnuget, meichr, hkirsman: Can't fetch the project with...
meichr’s picture

Status: Active » Fixed

Tested by creating a drupal project using

$ composer create-project drupal-composer/drupal-project:8.x-dev ckeditor_indentblock_project --stability dev --no-interaction
$ composer require drupal/ckeditor_indentblock

Result: Drupal project and contributed module ckeditor_indentblock have been downloaded; ckeditor_indentblock was added to composer.json.

=> Fixed.

Status: Fixed » Closed (fixed)

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