Daursu/postcode-lookup

Composer Installation

Closed this issue · 4 comments

Perhaps it's me, but I can't include versions 0.3.0 or 0.4.0 easily using Composer. Following the guidance I use:

{
    "require": {
        "lodge/postcode-lookup": "0.4.0"
    }
}

but Composer Install or Composer update responds with

Problem 1
    - The requested package lodge/postcode-lookup 0.4.0 exists as lodge/postcode-lookup[0.1.1, 0.1.2, 0.2.0, dev-develop, dev-master] but these are rejected by your constraint

I can include the versions listed above, but not the versions unlisted but tagged in the Git Repo.

I notice versions 0.3.0 or 0.4.0 aren't listed on Packagist: https://packagist.org/packages/lodge/postcode-lookup either.

I have tried to reference the Git Repo directly using:

[]( "repositories": [
{
"type": "vcs",
"url": "https://github.com/Daursu/postcode-lookup"
}
],)

And a couple of variations of the above but receive the same error. Almost like the Packagist repo is blocking access to the Git Repo. Not sure what is happening there.

The only solution I have is:

"repositories": [
	{
		"type": "package",
		"package": {
			"name": "lodge/postcode-lookup",
			"version": "4.0",
			"source": {
				"url": "https://github.com/Daursu/postcode-lookup.git",
				"type": "git",
				"reference": "0.4.0"
			}
		}
	}
],

And requiring the package as version 4.0 (I think the version could be anything here). This works, it referencing the GitRepo before the version in Packagist, although I have to tweak the class autoloading.

I wonder if anyone else is seeing these issues and what's causing them?

Hi @JustAGuyTryingToCodeSomething, can you confirm that it works for you now without having to setup a custom repository?

Yes. It just updated to 0.4.1 using "lodge/postcode-lookup": "~0.4.0".

Thanks. If you have time to briefly explain the solution I'd appreciate it.

Packagist was connecting using a legacy hook that GitHub stopped supporting at the beginning of this year, hence being out of sync.

Thanks again for the fast support, explanation and useful component. Consider the issue closed :)