Upgrading to 8.x-1.0-rc1 from 8.x-1.0-beta4 causes following fatal error:

Fatal error: Declaration of Drupal\address\Entity\Zone::match() must be compatible with CommerceGuys\Zone\Model\ZoneInterface::match(CommerceGuys\Addressing\Model\AddressInterface $address) in /Users/rob/Sites/IDT-D8/docroot/modules/contrib/address/src/Entity/Zone.php on line 48

Unable to access any site pages or run drush commands.

CommentFileSizeAuthor
#10 composer.lock_.txt160.18 KBchriscalip
#10 composer.json_.txt1.8 KBchriscalip
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robphillips created an issue. See original summary.

bojanz’s picture

Category: Bug report » Support request
Priority: Critical » Normal

Looks like you didn't perform the update properly:

1) The code needs to be updated using "composer update drupal/address --with-dependencies", as documented on the module page. This gives you a new version of the libraries.
2) Once that's done, you need to run update.php

Let me know if this helps.

robphillips’s picture

Status: Active » Reviewed & tested by the community

Thanks, that method worked for updating.

Rar9’s picture

I´ve also updated Address via Drupal Gui.

Then tried composer update drupal/address --with-dependencies

but libraries don´t update.

Any solution?

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Good! I've updated the release notes at https://www.drupal.org/project/address/releases/8.x-1.0-rc1 to mention this.

@Rar9
That's all that's needed unless you also added the libraries to your root composer.json yourself. If you have, remove them from that file.

jean-jacques L’s picture

It didn't work for me. I receive a message of composer: nothing to update.

bojanz’s picture

You can always do a "composer remove drupal/address" to remove everything, then "composer require drupal/address ~1.0" to redownload.

chriscalip’s picture

I am currently encountering this problem of updating to address-rc1
The vendor library commerceguys/addressing does not seem to update ... even if I do

"composer remove drupal/address"
"composer require drupal/address ~1.0"

bojanz’s picture

You'll need to post your full composer.json file.
The only way for the library to not update is if it's already required somewhere else in a different constraint.

chriscalip’s picture

FileSize
1.8 KB
160.18 KB

Commands:

composer config repositories.drupal composer https://packages.drupal.org/8
composer require "drupal/address ~1.0"
composer update drupal/address --with-dependencies

Having both address-rc1 :
modules/address
modules/contrib/address

composer.lock seems to be always set to beta4

chriscalip’s picture

Feedback :

composer remove drupal/address
composer require drupal/address ~1.0 -vvv
Dependency resolution completed in 0.007 seconds
  - Installing drupal/address (1.0.0-beta4)

git diff composer.lock
+            "name": "drupal/address",
+            "version": "1.0.0-beta4",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupal.org/project/address",
+                "reference": "8.x-1.0-beta4"
+            },
chriscalip’s picture

More Feedback :

composer remove drupal/address -vvv
composer require "drupal/address ~1.x-dev"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package drupal/address ~1.x-dev exists as drupal/address[dev-1.x, 1.x-dev, 1.0.0-rc1, 1.0.0-beta4, 1.0.0-beta3, 1.0.0-beta2, 1.0.0-beta1] but these are rejected by your constraint.


Installation failed, reverting ./composer.json to its original content.
chriscalip’s picture

Status: Fixed » Active

I am updating this issue as "active" because the documented protocols for updating address module and its dependency vendor libraries are currently not working .. as demonstrated by previous posts.

bojanz’s picture

"~1.x-dev" is an invalid constraint. You either use "~1.0" or you use "1.x-dev", not both. If you want stable releases "~1.0" is fine.

Testing locally now.

chriscalip’s picture

Status: Active » Fixed

Well I found the solution.

In my drupal install I had the address module located at
/modules/contrib/addresss

I changed the address module location to :
/modules/address

Then the documented protocols for updating vendor library dependencies apply.

I believe address module supporting module location other than /modules is another issue.

bojanz’s picture

Sounds like you tried to manually download Address elsewhere?
All of my modules are are in modules/contrib, Composer is configured to download them there (I use the template from github.com/drupal-composer/drupal-project since it's a lot better than what Core provides).

chriscalip’s picture

@bojanz
I described situation here:
https://www.drupal.org/node/2808897

I am trying to move out of this specific issue thread to prevent scope creep.

Status: Fixed » Closed (fixed)

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