I have an error when I try to upgrade from version 1.2 to version 1.3 with Composer :

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
- drupal/viewsreference 1.3.0 requires drupal/views ^1.0 -> no matching package found.
- drupal/viewsreference 1.x-dev requires drupal/views ^1.0 -> no matching package found.
- Installation request for drupal/viewsreference ^1.3 -> satisfiable by drupal/viewsreference[1.x-dev, 1.3.0].

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 for more details.
- It's a private package and you forgot to add a custom repository to find it

CommentFileSizeAuthor
#4 viewsreference-3020314.patch293 bytespaulmckibben

Comments

zenimagine created an issue. See original summary.

paulmckibben’s picture

The problem seems to be highlighted by this line in the error message:
- drupal/viewsreference 1.3.0 requires drupal/views ^1.0 -> no matching package found.

There is no drupal/views package, I presume because because views is part of Drupal core.

zenimagine’s picture

So is the update that has a problem ?

paulmckibben’s picture

Title: Unable to update to 1.3 » composer require fails for 1.3
Status: Active » Needs review
StatusFileSize
new293 bytes

This patch should fix it.

paulmckibben’s picture

@zenimagine, yes, version 8.x-1.3 has an updated composer.json file with an invalid requirement.

Status: Needs review » Needs work

The last submitted patch, 4: viewsreference-3020314.patch, failed testing. View results

paulmckibben’s picture

Status: Needs work » Needs review

I'm not sure why the testbot's attempt to composer require failed with "drupal/viewsreference dev-1.x requires drupal/views ^1.0" when I deleted that line from composer.json. I suspect an issue with the testbot.

Putting this back in "Needs Review"

cri2mars’s picture

note that after an update
composer info drupal/viewsreference
still returns the old version...

name     : drupal/viewsreference
descrip. : Views Reference
keywords : Drupal
versions : * 1.2.0
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0+) (OSI approved) https://spdx.org/licenses/GPL-2.0+.html#licenseText
source   : [git] https://git.drupal.org/project/viewsreference 8.x-1.2
dist     : [zip] https://ftp.drupal.org/files/projects/viewsreference-8.x-1.2.zip 8.x-1.2
names    : drupal/viewsreference

support
source : http://cgit.drupalcode.org/viewsreference
issues : http://drupal.org/project/issues/viewsreference

requires
drupal/core ~8.0

conflicts
<strong>drupal/viewsreferennce *</strong>

the typo reference/referennce was the cause of the issue

dubcanada’s picture

Status: Needs review » Reviewed & tested by the community

This patch fixes it for me.

dubcanada’s picture

"squizlabs/php_codesniffer": "*"

should also be moved to dev.

NewZeal’s picture

I've reverted the composer.json changes in 1.3. Sorry, they should never have gotten in there without proper testing.

NewZeal’s picture

Status: Reviewed & tested by the community » Fixed

Problem caught and composer reverted to previous state.

Status: Fixed » Closed (fixed)

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