I am not sure what is going wrong here, but it doesn't look good. I cannot update core with composer, it is stating there is a broken package dependency.

$ composer-update
> 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
    - remove drupal/file_entity 2.x-dev|keep drupal/file_entity dev-2.x
    - drupal/file_entity 2.x-dev requires drupal/core-file * -> no matching package found.
    - drupal/file_entity dev-2.x requires drupal/core-file * -> no matching package found.
    - Installation request for drupal/file_entity 2.x-dev -> satisfiable by drupal/file_entity[2.x-dev].

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.

Comments

nicholas.alipaz created an issue. See original summary.

nicholas.alipaz’s picture

Priority: Critical » Normal

I ended up removing file_entity from my composer.json and then manually adding this one module to my modules directory. Not the best solution overall but it got me past my issue.

It is strange that I can't have it in my composer.json any longer.

killua99’s picture

I'm guessing the file_entity.info.yml is wrong plus the composer.json also has some extra lines.

The .info.yml file should be:

type: module
name: File entity
description: "Extends Drupal file entities to be fieldable and viewable."
package: Media
core: 8.x
dependencies:
  - drupal:file
  - drupal:text
  - drupal:views
  - drupal:image
  - token:token
configure: file_entity.settings
test_dependencies:
  - pathauto:pathauto

Also the composer.json should be:

{
  "name": "drupal/file_entity",
  "description": "Extends Drupal file entities to be fieldable and viewable.",
  "type": "drupal-module",
  "license": "GPL-2.0+",
  "minimum-stability": "dev"
}

If we compare to others info.yml and composer.json

The composer.json maybe is nothing wrong there. But the `require: { }` look useless there because the .info.yml is taking care of it.

Berdir’s picture

Title: Can't upgrade core to 8.2.0 » Fix incorrect project dependency in file_entity.info.yml
Status: Active » Reviewed & tested by the community
killua99’s picture

I'm wonder if we could build a new tag (when this issue is merged into mastet 8.x), so composer might be enable to get the new version on Drupal 8.2.

I don't want to put a tag into my composer file, but if you're thinking to add extra issues I can definitive handle this by commit hash.

  • killua99 committed 5bd36e7 on 8.x-2.x
    Issue #2818727 by killua99: Fix incorrect project dependency in...
slashrsm’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +D8Media

Committed. Thanks!

Status: Fixed » Closed (fixed)

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