2019-09-06 23:58:12 +00:00
|
|
|
--TEST--
|
|
|
|
Update mirrors updates URLs for all packages if they have changed without updating versions
|
|
|
|
|
|
|
|
a/a is dev and gets everything updated as it updates to a new ref
|
|
|
|
b/b is a tag and gets everything updated by updating the package URL directly
|
2020-06-25 06:56:14 +00:00
|
|
|
c/c is a tag and not allowlisted for update and gets the new URL but keeps its old ref
|
2019-09-06 23:58:12 +00:00
|
|
|
d/d is dev but with a #ref so it should get URL updated but not the reference
|
|
|
|
e/e is dev and newly installed with a #ref so it should get the correct URL but with the #111 ref
|
2020-06-25 06:56:14 +00:00
|
|
|
e/e is dev but not allowlisted for update and gets the new URL but keeps its old ref
|
2019-09-06 23:58:12 +00:00
|
|
|
g/g is dev and installed in a different ref than the #ref, so it gets updated and gets the new URL but not the new ref
|
|
|
|
--COMPOSER--
|
|
|
|
{
|
|
|
|
"repositories": [
|
|
|
|
{
|
|
|
|
"type": "package",
|
|
|
|
"package": [
|
|
|
|
{
|
|
|
|
"name": "a/a", "version": "dev-master",
|
2024-03-05 10:32:40 +00:00
|
|
|
"require": { "b/b": "^2.0.1" },
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/a/newa", "type": "git", "mirrors": [{"url": "https://example.org/src/%package%/%version%/r%reference%.%type%", "preferred": true}] },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/a/newa/zipball/2222222222222222222222222222222222222222", "type": "zip", "mirrors": [{"url": "https://example.org/dists/%package%/%version%/r%reference%.%type%", "preferred": true}] },
|
2021-04-08 08:55:48 +00:00
|
|
|
"time": "2021-03-27T14:32:16+00:00"
|
2019-09-06 23:58:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "b/b", "version": "2.0.3",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/b/newb", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/b/newb/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "c/c", "version": "1.0.0",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/c/newc", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/c/newc/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "d/d", "version": "dev-master",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/d/newd", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/d/newd/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "e/e", "version": "dev-master",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/e/newe", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/e/newe/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "f/f", "version": "dev-master",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/f/newf", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/f/newf/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "g/g", "version": "dev-master",
|
|
|
|
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/g/newg", "type": "git" },
|
|
|
|
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/g/newg/zipball/2222222222222222222222222222222222222222", "type": "zip" }
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"require": {
|
|
|
|
"a/a": "dev-master",
|
|
|
|
"b/b": "2.0.3",
|
|
|
|
"c/c": "1.0.0",
|
|
|
|
"d/d": "dev-master#1111111111111111111111111111111111111111",
|
|
|
|
"e/e": "dev-master#1111111111111111111111111111111111111111",
|
|
|
|
"f/f": "dev-master",
|
|
|
|
"g/g": "dev-master#1111111111111111111111111111111111111111"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--INSTALLED--
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "a/a", "version": "dev-master",
|
2024-03-05 10:32:40 +00:00
|
|
|
"require": { "b/b": "^2" },
|
2019-09-06 23:58:12 +00:00
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/a", "type": "git" },
|
2021-04-08 08:55:48 +00:00
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/a/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"time": "2021-03-14T16:24:37+00:00"
|
2019-09-06 23:58:12 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "b/b", "version": "2.0.3",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/b", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/b/zipball/1111111111111111111111111111111111111111", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "c/c", "version": "1.0.0",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/c", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/c/zipball/1111111111111111111111111111111111111111", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "d/d", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/d", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/d/zipball/1111111111111111111111111111111111111111", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "f/f", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip" }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "g/g", "version": "dev-master",
|
|
|
|
"source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" },
|
|
|
|
"dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip" }
|
|
|
|
}
|
|
|
|
]
|
|
|
|
--LOCK--
|
|
|
|
{
|
|
|
|
"packages": [
|
|
|
|
{
|
|
|
|
"name": "a/a", "version": "dev-master",
|
2024-03-05 10:32:40 +00:00
|
|
|
"require": { "b/b": "^2" },
|
2019-09-06 23:58:12 +00:00
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/a", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/a/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
2021-04-08 08:55:48 +00:00
|
|
|
"time": "2021-03-14T16:24:37+00:00",
|
2019-09-06 23:58:12 +00:00
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "b/b", "version": "2.0.3",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/b", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/b/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "c/c", "version": "1.0.0",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/c", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/c/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "d/d", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/d", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/d/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "f/f", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "g/g", "version": "dev-master",
|
|
|
|
"source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" },
|
|
|
|
"dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"packages-dev": [],
|
|
|
|
"aliases": [],
|
|
|
|
"minimum-stability": "stable",
|
|
|
|
"stability-flags": {},
|
|
|
|
"prefer-stable": false,
|
|
|
|
"prefer-lowest": false,
|
|
|
|
"platform": [],
|
|
|
|
"platform-dev": []
|
|
|
|
}
|
|
|
|
--EXPECT-LOCK--
|
|
|
|
{
|
|
|
|
"packages": [
|
|
|
|
{
|
|
|
|
"name": "a/a", "version": "dev-master",
|
2024-03-05 10:32:40 +00:00
|
|
|
"require": { "b/b": "^2" },
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/newa", "type": "git", "mirrors": [{"url": "https://example.org/src/%package%/%version%/r%reference%.%type%", "preferred": true}] },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/newa/zipball/1111111111111111111111111111111111111111", "type": "zip", "mirrors": [{"url": "https://example.org/dists/%package%/%version%/r%reference%.%type%", "preferred": true}] },
|
2021-04-08 09:54:39 +00:00
|
|
|
"time": "2021-03-14T16:24:37+00:00",
|
2019-09-06 23:58:12 +00:00
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "b/b", "version": "2.0.3",
|
2019-11-07 16:35:44 +00:00
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/b/newb", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/b/newb/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
2019-09-06 23:58:12 +00:00
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "c/c", "version": "1.0.0",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/c/newc", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/c/newc/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "d/d", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/d/newd", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/d/newd/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "f/f", "version": "dev-master",
|
|
|
|
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/newf", "type": "git" },
|
|
|
|
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/newf/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
|
|
|
"type": "library"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "g/g", "version": "dev-master",
|
2019-11-07 16:35:44 +00:00
|
|
|
"source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/newg", "type": "git" },
|
|
|
|
"dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/newg/zipball/0000000000000000000000000000000000000000", "type": "zip" },
|
2019-09-06 23:58:12 +00:00
|
|
|
"type": "library"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"packages-dev": [],
|
|
|
|
"aliases": [],
|
|
|
|
"minimum-stability": "stable",
|
|
|
|
"stability-flags": {
|
|
|
|
"a/a": 20,
|
|
|
|
"d/d": 20,
|
|
|
|
"e/e": 20,
|
|
|
|
"f/f": 20,
|
|
|
|
"g/g": 20
|
|
|
|
},
|
|
|
|
"prefer-stable": false,
|
|
|
|
"prefer-lowest": false,
|
|
|
|
"platform": [],
|
|
|
|
"platform-dev": []
|
|
|
|
}
|
|
|
|
--RUN--
|
2019-11-07 16:35:44 +00:00
|
|
|
update mirrors
|
2019-09-06 23:58:12 +00:00
|
|
|
--EXPECT--
|
2021-04-08 08:55:48 +00:00
|
|
|
|
|
|
|
--EXPECT-OUTPUT--
|
|
|
|
Loading composer repositories with package information
|
|
|
|
Updating dependencies
|
|
|
|
Lock file operations: 0 installs, 0 updates, 0 removals
|
|
|
|
Writing lock file
|
|
|
|
Installing dependencies from lock file (including require-dev)
|
|
|
|
Nothing to install, update or remove
|
|
|
|
Generating autoload files
|