When using the Address module with commerceguys/intl v0.7.3 the system gives an error on installation of Open Social.
Error: Access level to Drupal\address\Repository\CountryRepository::getDefaultLocale() must
be public (as in class CommerceGuys\Intl\Country\CountryRepository) in
/var/www/html/modules/contrib/address/src/Repository/CountryRepository.php, line 16
This is due to the fact that the access level of getDefaultLocale() method in the LocalResolverTrait has been changed to public: https://github.com/commerceguys/intl/commit/1a394eaa338f71c67af9bd1a00f4...
This trait is used in CommerceGuys\Intl\Country\CountryRepository which is extended in Drupal\address\Repository\CountryRepository.
This method should be made public in Drupal\address\Repository\CountryRepository as well.
Comments
Comment #2
jaapjan commentedComment #4
bojanz commentedImproved the fix and committed, thanks!
I'll tag RC3 within the next 24h.
Comment #5
keboca commentedGood catch! #2 works just fine! thanks @jaapjan & @bojanz
Comment #6
flutterstack commentedGood catch! #2 works just fine! thanks @jaapjan & @bojanz
Comment #7
Polly commentedBeginner question: On linux I am hoping to use this patch following this tutorial. I am unsure from which directory I should apply this patch. I tried:
How do I apply this patch?
Or do I understand correctly that I should soon be able to pick up this fix running composer drupal-update (I've just tried with no luck)?
Comment #8
ilya.no commented@Polly, instead of
cd vendor/commerceguys/you should navigate to module's directory, i.e.cd modules/address.Comment #9
Polly commented@ilya.no Thank you very much. The patch worked for me.
Comment #10
di3gopa commentedI can Confirm that the patch works.
Comment #11
di3gopa commentedAttaching a patch that works with 1.0-beta3 in case someone needs it.
Comment #12
alexrayu commentedSubscribing. Appreciate #11.
Comment #13
bojanz commentedWhy? There is no reason for anyone to patch an older Address version. Use the latest code.
Comment #14
dpalmer commentedGetting this error on the 8.x-1.0-rc3. I don't even see this getDefaultLocale function in the src/Repository/CountryRepository.php to patch it...
I tried the dev branch and same issue.
What am I doing wrong?
Comment #15
bojanz commented@dpalmer You probably tried to update Address outside of Composer, and now your library versions are out of sync. "composer update drupal/address --with-dependencies" is the only way.
Comment #16
dpalmer commented@bojanz ah thanks, that did the trick!