From 9331afe71e73f84a63d85f2357cbf5b77952797e Mon Sep 17 00:00:00 2001 From: fagai Date: Thu, 9 Nov 2017 15:07:40 +0900 Subject: [PATCH 1/4] Fix inventory method --- src/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/functions.php b/src/functions.php index 413b7fd81..448834dc2 100644 --- a/src/functions.php +++ b/src/functions.php @@ -91,6 +91,7 @@ function localhost(...$hostnames) * Load list of hosts from file * * @param string $file + * @return Proxy */ function inventory($file) { @@ -98,9 +99,12 @@ function inventory($file) $fileLoader = new FileLoader(); $fileLoader->load($file); - foreach ($fileLoader->getHosts() as $host) { + $hosts = $fileLoader->getHosts(); + foreach ($hosts as $host) { $deployer->hosts->set($host->getHostname(), $host); } + + return new Proxy($hosts); } /** From 0d4f2ab30420d6a688197a629523a932f2bd1da4 Mon Sep 17 00:00:00 2001 From: fagai Date: Thu, 9 Nov 2017 16:40:20 +0900 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a568fd4..0261ec0c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Magento2 recipe optimizes the autoloader after the DI compilation [#1365] - Host's `roles()` API now can accept arrays too - Fixed bug where wrong time format is passed to touch when deploying assets [#1390] +- Fixed bug that inventory method does not return Proxy [#1413] ### Fixed - Fixed bug when config:hosts shows more than one table of hosts [#1403] From 3256043eec01504d5b071badef34379a00a64ef3 Mon Sep 17 00:00:00 2001 From: fagai Date: Thu, 9 Nov 2017 16:45:27 +0900 Subject: [PATCH 3/4] Update CHANGELONG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0261ec0c9..f1842369e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,10 @@ - Magento2 recipe optimizes the autoloader after the DI compilation [#1365] - Host's `roles()` API now can accept arrays too - Fixed bug where wrong time format is passed to touch when deploying assets [#1390] -- Fixed bug that inventory method does not return Proxy [#1413] ### Fixed - Fixed bug when config:hosts shows more than one table of hosts [#1403] +- Fixed bug that inventory method does not return Proxy [#1413] ## v6.0.3 [v6.0.2...v6.0.3](https://github.com/deployphp/deployer/compare/v6.0.2...v6.0.3) From 2cd8c3fbbf6db8b429d3c3f6e6e39b36f6bf4d5f Mon Sep 17 00:00:00 2001 From: fagai Date: Thu, 9 Nov 2017 16:58:41 +0900 Subject: [PATCH 4/4] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1842369e..5c02358d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -318,6 +318,7 @@ - Fixed typo3 recipe - Fixed remove of shared dir on first deploy +[#1413]: https://github.com/deployphp/deployer/pull/1413 [#1403]: https://github.com/deployphp/deployer/pull/1403 [#1390]: https://github.com/deployphp/deployer/pull/1390 [#1365]: https://github.com/deployphp/deployer/pull/1365