Unable to use satis to apply patch
PatrickRose opened this issue · comments
We've got a situation where we've got a patch for a dependency that hasn't yet been merged into upstream. However, we can't seem to get satis to get any of the releases from our fork.
Satis.conf
{
"name": "...",
"homepage": "...",
"config": {
"secure-http": true
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/dsas/predis"
},
{
"type": "composer",
"url": "https://packagist.org"
}
],
"require": {
"predis/predis": ">=1.1.0",
},
"require-dependencies": true,
"archive": {
"directory": "dist",
"format": "tar",
"skip-dev": true
},
"output-html": true
}
I was expecting v1.1.2-disconnect
to be an installable version but it looks like it's just taken all the branches/tags from upstream looking at the versions I see in packages.json
:
"predis/predis": {
"v1.1.0": {
"name": "predis/predis",
"version": "v1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2"
},
"dist": {
"type": "tar",
"url": "https://our.satis.install/dist/predis/predis/predis-predis-0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2-zip-b709d6.tar",
"reference": "0e17edbefb50c6cbd1acc4a6f6ef06399deb1af2",
"shasum": "215de088209d8ce6f42ea523360c6e2e856e52be"
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"time": "2016-06-01T22:06:21+00:00",
"type": "library",
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
]
},
"v1.1.1": {
"name": "predis/predis",
"version": "v1.1.1",
"version_normalized": "1.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1"
},
"dist": {
"type": "tar",
"url": "https://our.satis.install/dist/predis/predis/predis-predis-f0210e38881631afeafb56ab43405a92cafd9fd1-zip-628b74.tar",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1",
"shasum": "4ea46c41a4b73fc09bc95a673512c87740ec7ee7"
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"time": "2016-06-16T16:22:20+00:00",
"type": "library",
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
]
},
"v1.1.x-dev": {
"name": "predis/predis",
"version": "v1.1.x-dev",
"version_normalized": "1.1.9999999.9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "111d100ee389d624036b46b35ed0c9ac59c71313"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/111d100ee389d624036b46b35ed0c9ac59c71313",
"reference": "111d100ee389d624036b46b35ed0c9ac59c71313",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"time": "2017-07-12T14:39:17+00:00",
"type": "library",
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
]
},
"dev-master": {
"name": "predis/predis",
"version": "dev-master",
"version_normalized": "9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "d72f0678bade78af953605622760fe262d82eb58"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/d72f0678bade78af953605622760fe262d82eb58",
"reference": "d72f0678bade78af953605622760fe262d82eb58",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"time": "2017-07-12T14:44:10+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
]
}
},
First, you did not disable Packagist, so it still fetches all tags from Packagist as well. Second, v1.1.2-disconnect
is not a valid tag for Composer, so I doubt Satis would accept it either.
First, you did not disable Packagist, so it still fetches all tags from Packagist as well.
Yes - we've got some standard packages included in our satis.json
. I removed them from the above because they're noise. But from #407 it should be preferring our versions over the ones upstream? The generated packages.json
all point to upstream.
Ok I was not sure if that was an issue or not. But second still applies.
We've changed the tag to 1.1.2+disconnect
which meant that satis picked it up, but I'm still not sure why it's downloading from upstream instead of our package?
The problem is that build metadata is basically discarded when doing version matching. But still, if the original has tag 1.1.2 and you have tag 1.1.2 (discarded the build metadata), it should pick yours afaik yes.