Change UpdateOperation::show to match what the installers output, fixes the dry-run output to be more like real output
parent
4e7702598e
commit
438c45e991
|
@ -74,8 +74,7 @@ class UpdateOperation extends SolverOperation
|
|||
*/
|
||||
public function show($lock)
|
||||
{
|
||||
return 'Updating '.$this->initialPackage->getPrettyName().' ('.$this->formatVersion($this->initialPackage).') to '.
|
||||
$this->targetPackage->getPrettyName(). ' ('.$this->formatVersion($this->targetPackage).')';
|
||||
return 'Updating '.$this->initialPackage->getPrettyName().' ('.$this->formatVersion($this->initialPackage).' => '.$this->formatVersion($this->targetPackage).')';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,13 +55,13 @@ update a/a b/b --with-dependencies
|
|||
Loading composer repositories with package information
|
||||
Updating dependencies
|
||||
Lock file operations: 0 installs, 2 updates, 0 removals
|
||||
- Updating a/a (1.0.0) to a/a (1.1.0)
|
||||
- Updating b/b (1.0.0) to b/b (1.1.0)
|
||||
- Updating a/a (1.0.0 => 1.1.0)
|
||||
- Updating b/b (1.0.0 => 1.1.0)
|
||||
Writing lock file
|
||||
Installing dependencies from lock file (including require-dev)
|
||||
Package operations: 0 installs, 2 updates, 0 removals
|
||||
Generating autoload files
|
||||
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.1.0)
|
||||
Updating b/b (1.0.0) to b/b (1.1.0)
|
||||
Updating a/a (1.0.0 => 1.1.0)
|
||||
Updating b/b (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -41,4 +41,4 @@ Install from a lock file that deleted a package
|
|||
install
|
||||
--EXPECT--
|
||||
Uninstalling old-dependency (1.0.0)
|
||||
Updating whitelisted (1.0.0) to whitelisted (1.1.0)
|
||||
Updating whitelisted (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -66,7 +66,7 @@ update c/uptodate
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/old (0.9.0) to a/old (1.0.0)
|
||||
Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)
|
||||
Updating c/uptodate (2.0.0) to c/uptodate (1.0.0)
|
||||
Updating a/old (0.9.0 => 1.0.0)
|
||||
Updating b/unstable (1.1.0-alpha => 1.0.0)
|
||||
Updating c/uptodate (2.0.0 => 1.0.0)
|
||||
Installing d/removed (1.0.0)
|
||||
|
|
|
@ -93,5 +93,5 @@ update b/b
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master oldmaster-a) to a/a (dev-master newmaster-a)
|
||||
Updating b/b (dev-master oldmaster-b) to b/b (dev-master newmaster-b2)
|
||||
Updating a/a (dev-master oldmaster-a => dev-master newmaster-a)
|
||||
Updating b/b (dev-master oldmaster-b => dev-master newmaster-b2)
|
||||
|
|
|
@ -74,8 +74,8 @@ update b/unstable
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/old (0.9.0) to a/old (1.0.0)
|
||||
Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)
|
||||
Updating c/uptodate (2.0.0) to c/uptodate (1.0.0)
|
||||
Updating a/old (0.9.0 => 1.0.0)
|
||||
Updating b/unstable (1.1.0-alpha => 1.0.0)
|
||||
Updating c/uptodate (2.0.0 => 1.0.0)
|
||||
Installing d/removed (1.0.0)
|
||||
Installing e/newreq (1.0.0)
|
||||
|
|
|
@ -97,9 +97,9 @@ update b/b
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master oldmaster-a) to a/a (dev-master newmaster-a)
|
||||
Updating a/a (dev-master oldmaster-a => dev-master newmaster-a)
|
||||
Marking a/a (2.2.x-dev newmaster-a) as installed, alias of a/a (dev-master newmaster-a)
|
||||
Updating b/b (dev-master oldmaster-b) to b/b (dev-master newmaster-b2)
|
||||
Updating b/b (dev-master oldmaster-b => dev-master newmaster-b2)
|
||||
Marking b/b (2.3.x-dev newmaster-b2) as installed, alias of b/b (dev-master newmaster-b2)
|
||||
Marking a/a (2.1.x-dev oldmaster-a) as uninstalled, alias of a/a (dev-master oldmaster-a)
|
||||
Marking b/b (2.1.x-dev oldmaster-b) as uninstalled, alias of b/b (dev-master oldmaster-b)
|
||||
|
|
|
@ -38,4 +38,4 @@ The locked version will not get overwritten by an install
|
|||
--RUN--
|
||||
install
|
||||
--EXPECT--
|
||||
Updating foo/baz (1.0.0) to foo/baz (2.0.0)
|
||||
Updating foo/baz (1.0.0 => 2.0.0)
|
||||
|
|
|
@ -59,4 +59,4 @@ update
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master 1234) to a/a (dev-master master)
|
||||
Updating a/a (dev-master 1234 => dev-master master)
|
||||
|
|
|
@ -33,5 +33,5 @@ Update aliased package to non-aliased version
|
|||
--RUN--
|
||||
update
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master master) to a/a (dev-foo foo)
|
||||
Marking a/a (1.0.x-dev master) as uninstalled, alias of a/a (dev-master master)
|
||||
Updating a/a (dev-master master => dev-foo foo)
|
||||
Marking a/a (1.0.x-dev master) as uninstalled, alias of a/a (dev-master master)
|
||||
|
|
|
@ -44,6 +44,6 @@ Lock file operations: 3 installs, 0 updates, 0 removals
|
|||
- Locking a/c (1.0.0)
|
||||
Installing dependencies from lock file (including require-dev)
|
||||
Package operations: 0 installs, 2 updates, 0 removals
|
||||
- Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
- Updating a/b (1.0.0) to a/b (2.0.0)
|
||||
- Updating a/a (1.0.0 => 1.0.1)
|
||||
- Updating a/b (1.0.0 => 2.0.0)
|
||||
--EXPECT--
|
||||
|
|
|
@ -36,5 +36,5 @@ Updates updateable packages
|
|||
--RUN--
|
||||
update
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
Updating a/b (1.0.0) to a/b (2.0.0)
|
||||
Updating a/a (1.0.0 => 1.0.1)
|
||||
Updating a/b (1.0.0 => 2.0.0)
|
||||
|
|
|
@ -214,6 +214,6 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
|
|||
--RUN--
|
||||
update a/a b/b d/d g/g
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master 1111111) to a/a (dev-master 2222222)
|
||||
Updating a/a (dev-master 1111111 => dev-master 2222222)
|
||||
Installing e/e (dev-master 1111111)
|
||||
Updating g/g (dev-master 0000000) to g/g (dev-master 1111111)
|
||||
Updating g/g (dev-master 0000000 => dev-master 1111111)
|
||||
|
|
|
@ -35,4 +35,4 @@ Updating a dev package selects its newest version but no providers
|
|||
--RUN--
|
||||
update
|
||||
--EXPECT--
|
||||
Updating a/installed (dev-master oldref) to a/installed (dev-master newref)
|
||||
Updating a/installed (dev-master oldref => dev-master newref)
|
||||
|
|
|
@ -93,4 +93,4 @@ update
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master oldmaster) to a/a (dev-master newmaster)
|
||||
Updating a/a (dev-master oldmaster => dev-master newmaster)
|
||||
|
|
|
@ -38,4 +38,4 @@ Updating a dev package to its latest ref should pick up new dependencies
|
|||
update
|
||||
--EXPECT--
|
||||
Installing a/dependency (dev-master ref)
|
||||
Updating a/devpackage (dev-master oldref) to a/devpackage (dev-master newref)
|
||||
Updating a/devpackage (dev-master oldref => dev-master newref)
|
||||
|
|
|
@ -46,4 +46,4 @@ Downgrading from unstable to more stable package should work even if already ins
|
|||
--RUN--
|
||||
update
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master abcd) to a/a (1.0.0)
|
||||
Updating a/a (dev-master abcd => 1.0.0)
|
||||
|
|
|
@ -23,4 +23,4 @@ Update in ignore-platform-reqs mode
|
|||
--RUN--
|
||||
update --ignore-platform-reqs
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
Updating a/a (1.0.0 => 1.0.1)
|
||||
|
|
|
@ -61,8 +61,8 @@ Updates with --no-dev but we still end up with a complete lock file including de
|
|||
update --no-dev
|
||||
--EXPECT--
|
||||
Uninstalling a/b (1.0.0)
|
||||
Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
Updating a/a (1.0.0 => 1.0.1)
|
||||
Installing a/c (1.0.0)
|
||||
Updating dev/pkg (dev-master old) to dev/pkg (dev-master new)
|
||||
Updating dev/pkg (dev-master old => dev-master new)
|
||||
Marking dev/pkg (1.1.x-dev new) as installed, alias of dev/pkg (dev-master new)
|
||||
Marking dev/pkg (1.0.x-dev old) as uninstalled, alias of dev/pkg (dev-master old)
|
||||
|
|
|
@ -36,5 +36,5 @@ Updates packages to their lowest stable version
|
|||
--RUN--
|
||||
update --prefer-lowest --prefer-stable
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0-rc1) to a/a (1.0.1)
|
||||
Updating a/b (1.0.1) to a/b (1.0.0)
|
||||
Updating a/a (1.0.0-rc1 => 1.0.1)
|
||||
Updating a/b (1.0.1 => 1.0.0)
|
||||
|
|
|
@ -27,4 +27,4 @@ Updates a dev package forcing it's reference
|
|||
--RUN--
|
||||
install
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master abc123) to a/a (dev-master def000)
|
||||
Updating a/a (dev-master abc123 => dev-master def000)
|
||||
|
|
|
@ -49,5 +49,5 @@ Update with a package whitelist only updates those packages if they are not pres
|
|||
--RUN--
|
||||
update whitelisted dependency
|
||||
--EXPECT--
|
||||
Updating dependency (1.0.0) to dependency (1.1.0)
|
||||
Updating whitelisted (1.0.0) to whitelisted (1.1.0)
|
||||
Updating dependency (1.0.0 => 1.1.0)
|
||||
Updating whitelisted (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -60,6 +60,6 @@ Update with a package whitelist pattern and all-dependencies flag updates packag
|
|||
--RUN--
|
||||
update whitelisted-* --with-all-dependencies
|
||||
--EXPECT--
|
||||
Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
|
||||
Updating dependency (1.0.0) to dependency (1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)
|
||||
Updating whitelisted-component1 (1.0.0 => 1.1.0)
|
||||
Updating dependency (1.0.0 => 1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -62,6 +62,6 @@ Update with a package whitelist only updates those packages and their dependenci
|
|||
--RUN--
|
||||
update whitelisted-* --with-dependencies
|
||||
--EXPECT--
|
||||
Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
|
||||
Updating dependency (1.0.0) to dependency (1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)
|
||||
Updating whitelisted-component1 (1.0.0 => 1.1.0)
|
||||
Updating dependency (1.0.0 => 1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -72,6 +72,6 @@ Update with a package whitelist only updates those packages and their dependenci
|
|||
--RUN--
|
||||
update whitelisted-* --with-dependencies
|
||||
--EXPECT--
|
||||
Updating dependency (1.0.0) to dependency (1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)
|
||||
Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
|
||||
Updating dependency (1.0.0 => 1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0 => 1.1.0)
|
||||
Updating whitelisted-component1 (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -57,5 +57,5 @@ Update with a package whitelist only updates those packages matching the pattern
|
|||
--RUN--
|
||||
update whitelisted-*
|
||||
--EXPECT--
|
||||
Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)
|
||||
Updating whitelisted-component1 (1.0.0 => 1.1.0)
|
||||
Updating whitelisted-component2 (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -63,7 +63,7 @@ Update with a package whitelist only updates those corresponding to the pattern
|
|||
--RUN--
|
||||
update vendor/Test* exact/Test-Package notexact/Test all/* no/reg?xp
|
||||
--EXPECT--
|
||||
Updating all/Package1 (1.0) to all/Package1 (2.0)
|
||||
Updating all/Package2 (1.0) to all/Package2 (2.0)
|
||||
Updating exact/Test-Package (1.0) to exact/Test-Package (2.0)
|
||||
Updating vendor/Test-Package (1.0) to vendor/Test-Package (2.0)
|
||||
Updating all/Package1 (1.0 => 2.0)
|
||||
Updating all/Package2 (1.0 => 2.0)
|
||||
Updating exact/Test-Package (1.0 => 2.0)
|
||||
Updating vendor/Test-Package (1.0 => 2.0)
|
||||
|
|
|
@ -43,6 +43,6 @@ Limited update takes rules from lock if available, and not from the installed re
|
|||
--RUN--
|
||||
update toupdate/installed
|
||||
--EXPECT--
|
||||
Updating old/installed (0.9.0) to old/installed (1.0.0)
|
||||
Updating toupdate/installed (1.0.0) to toupdate/installed (1.1.0)
|
||||
Updating old/installed (0.9.0 => 1.0.0)
|
||||
Updating toupdate/installed (1.0.0 => 1.1.0)
|
||||
Installing toupdate/notinstalled (1.0.0)
|
||||
|
|
|
@ -45,4 +45,4 @@ Update with a package whitelist removes unused packages
|
|||
update --with-dependencies whitelisted
|
||||
--EXPECT--
|
||||
Uninstalling old-dependency (1.0.0)
|
||||
Updating whitelisted (1.0.0) to whitelisted (1.1.0)
|
||||
Updating whitelisted (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -52,5 +52,5 @@ Update with a package whitelist only updates those packages and their dependenci
|
|||
--RUN--
|
||||
update whitelisted --with-dependencies
|
||||
--EXPECT--
|
||||
Updating dependency (1.0.0) to dependency (1.1.0)
|
||||
Updating whitelisted (1.0.0) to whitelisted (1.1.0)
|
||||
Updating dependency (1.0.0 => 1.1.0)
|
||||
Updating whitelisted (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -54,4 +54,4 @@ Update with a package whitelist only updates those packages listed as command ar
|
|||
--RUN--
|
||||
update whitelisted
|
||||
--EXPECT--
|
||||
Updating whitelisted (1.0.0) to whitelisted (1.1.0)
|
||||
Updating whitelisted (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -50,13 +50,13 @@ update b/b --with-all-dependencies
|
|||
Loading composer repositories with package information
|
||||
Updating dependencies
|
||||
Lock file operations: 0 installs, 2 updates, 0 removals
|
||||
- Updating a/a (1.0.0) to a/a (1.1.0)
|
||||
- Updating b/b (1.0.0) to b/b (1.1.0)
|
||||
- Updating a/a (1.0.0 => 1.1.0)
|
||||
- Updating b/b (1.0.0 => 1.1.0)
|
||||
Writing lock file
|
||||
Installing dependencies from lock file (including require-dev)
|
||||
Package operations: 0 installs, 2 updates, 0 removals
|
||||
Generating autoload files
|
||||
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.1.0)
|
||||
Updating b/b (1.0.0) to b/b (1.1.0)
|
||||
Updating a/a (1.0.0 => 1.1.0)
|
||||
Updating b/b (1.0.0 => 1.1.0)
|
||||
|
|
|
@ -42,4 +42,4 @@ Installing locked dev packages should remove old dependencies
|
|||
install
|
||||
--EXPECT--
|
||||
Uninstalling a/dependency (dev-master ref)
|
||||
Updating a/devpackage (dev-master oldref) to a/devpackage (dev-master newref)
|
||||
Updating a/devpackage (dev-master oldref => dev-master newref)
|
||||
|
|
|
@ -65,4 +65,4 @@ update
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating a/a (dev-master oldref) to a/a (dev-master newref)
|
||||
Updating a/a (dev-master oldref => dev-master newref)
|
||||
|
|
Loading…
Reference in New Issue