mirror of
https://github.com/deployphp/deployer.git
synced 2025-01-29 19:27:52 +01:00
Fix fail() signature (#2261)
* added phpstan callable types * Update src/Task/Task.php * regenerated docs * Update CHANGELOG.md * update phpstan * Restore Collection.php * Restore Master.php * Restore helpers.php * Restore Task.php * Update functions.php * Update functions.php * Update CHANGELOG.md * regenerate docs
This commit is contained in:
parent
f0aeb8c83a
commit
55177c5b18
@ -32,6 +32,7 @@
|
||||
### Fixed
|
||||
- Lots, and lots of long-standing bugs.
|
||||
- Fixed bin/docgen on windows. [#2253]
|
||||
- Fixed type signature of fail(). [#2261]
|
||||
- Typo in rabbit recipe, regarding hostname. [#2260]
|
||||
|
||||
|
||||
@ -599,6 +600,7 @@
|
||||
- Fixed remove of shared dir on first deploy.
|
||||
|
||||
|
||||
[#2261]: https://github.com/deployphp/deployer/pull/2261
|
||||
[#2260]: https://github.com/deployphp/deployer/pull/2260
|
||||
[#2253]: https://github.com/deployphp/deployer/issues/2253
|
||||
[#2197]: https://github.com/deployphp/deployer/issues/2197
|
||||
|
@ -54,7 +54,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"pestphp/pest": "^0.3",
|
||||
"phpstan/phpstan": "^0.12.52",
|
||||
"phpstan/phpstan": "^0.12.53",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"slevomat/coding-standard": "^6.4",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
|
138
composer.lock
generated
138
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a6156f7a2683fd0106ac3600f79f9d2f",
|
||||
"content-hash": "f52b7a7171aa293182e88496ee92cfea",
|
||||
"packages": [
|
||||
{
|
||||
"name": "evenement/evenement",
|
||||
@ -819,16 +819,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v5.1.7",
|
||||
"version": "v5.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8"
|
||||
"reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
|
||||
"reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e",
|
||||
"reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -865,11 +865,6 @@
|
||||
"symfony/process": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Console\\": ""
|
||||
@ -908,7 +903,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-07T15:23:00+00:00"
|
||||
"time": "2020-10-24T12:01:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
@ -1444,16 +1439,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v5.1.7",
|
||||
"version": "v5.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "d3a2e64866169586502f0cd9cab69135ad12cee9"
|
||||
"reference": "f00872c3f6804150d6a0f73b4151daab96248101"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/d3a2e64866169586502f0cd9cab69135ad12cee9",
|
||||
"reference": "d3a2e64866169586502f0cd9cab69135ad12cee9",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/f00872c3f6804150d6a0f73b4151daab96248101",
|
||||
"reference": "f00872c3f6804150d6a0f73b4151daab96248101",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1461,11 +1456,6 @@
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Process\\": ""
|
||||
@ -1504,7 +1494,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-02T16:23:27+00:00"
|
||||
"time": "2020-10-24T12:01:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
@ -1584,16 +1574,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/string",
|
||||
"version": "v5.1.7",
|
||||
"version": "v5.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/string.git",
|
||||
"reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e"
|
||||
"reference": "a97573e960303db71be0dd8fda9be3bca5e0feea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
|
||||
"reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/a97573e960303db71be0dd8fda9be3bca5e0feea",
|
||||
"reference": "a97573e960303db71be0dd8fda9be3bca5e0feea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1611,11 +1601,6 @@
|
||||
"symfony/var-exporter": "^4.4|^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\String\\": ""
|
||||
@ -1665,20 +1650,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-15T12:23:47+00:00"
|
||||
"time": "2020-10-24T12:01:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v5.1.7",
|
||||
"version": "v5.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a"
|
||||
"reference": "f284e032c3cefefb9943792132251b79a6127ca6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a",
|
||||
"reference": "e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/f284e032c3cefefb9943792132251b79a6127ca6",
|
||||
"reference": "f284e032c3cefefb9943792132251b79a6127ca6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1699,11 +1684,6 @@
|
||||
"Resources/bin/yaml-lint"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
@ -1742,7 +1722,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-27T03:44:28+00:00"
|
||||
"time": "2020-10-24T12:03:25+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@ -1933,16 +1913,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.9.0",
|
||||
"version": "2.9.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8"
|
||||
"reference": "307fb34a5ab697461ec4c9db865b20ff2fd40771"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
|
||||
"reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/307fb34a5ab697461ec4c9db865b20ff2fd40771",
|
||||
"reference": "307fb34a5ab697461ec4c9db865b20ff2fd40771",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1990,7 +1970,7 @@
|
||||
"throwable",
|
||||
"whoops"
|
||||
],
|
||||
"time": "2020-10-20T12:00:00+00:00"
|
||||
"time": "2020-11-01T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
@ -2100,22 +2080,22 @@
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/collision",
|
||||
"version": "v5.0.2",
|
||||
"version": "v5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/collision.git",
|
||||
"reference": "4a343299054e9368d0db4a982a780cc4ffa12707"
|
||||
"reference": "7c2b95589bf81e274e61e47f7672a1b2c3e06eaa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/4a343299054e9368d0db4a982a780cc4ffa12707",
|
||||
"reference": "4a343299054e9368d0db4a982a780cc4ffa12707",
|
||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/7c2b95589bf81e274e61e47f7672a1b2c3e06eaa",
|
||||
"reference": "7c2b95589bf81e274e61e47f7672a1b2c3e06eaa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"facade/ignition-contracts": "^1.0",
|
||||
"filp/whoops": "^2.7.2",
|
||||
"php": "^7.3",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"symfony/console": "^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -2180,20 +2160,20 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2020-08-27T18:58:22+00:00"
|
||||
"time": "2020-10-29T14:50:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pestphp/pest",
|
||||
"version": "v0.3.9",
|
||||
"version": "v0.3.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pestphp/pest.git",
|
||||
"reference": "c3616edbc876df024e8cc9fc7f2a421802a185d3"
|
||||
"reference": "3fbec70ed3da881e13b38f7ed70690d6bde84b42"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pestphp/pest/zipball/c3616edbc876df024e8cc9fc7f2a421802a185d3",
|
||||
"reference": "c3616edbc876df024e8cc9fc7f2a421802a185d3",
|
||||
"url": "https://api.github.com/repos/pestphp/pest/zipball/3fbec70ed3da881e13b38f7ed70690d6bde84b42",
|
||||
"reference": "3fbec70ed3da881e13b38f7ed70690d6bde84b42",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2202,7 +2182,7 @@
|
||||
"pestphp/pest-plugin-coverage": "^0.3",
|
||||
"pestphp/pest-plugin-init": "^0.3",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"phpunit/phpunit": ">= 9.3.7 <= 9.4.1"
|
||||
"phpunit/phpunit": ">= 9.3.7 <= 9.4.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/console": "^7.16.1",
|
||||
@ -2271,7 +2251,7 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-13T09:56:33+00:00"
|
||||
"time": "2020-11-01T22:22:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pestphp/pest-plugin",
|
||||
@ -2850,16 +2830,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.12.52",
|
||||
"version": "0.12.53",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "e96dd5e7ae9aefed663bc7e285ad96792b67eadc"
|
||||
"reference": "dbbdb0d7c2434ecd5289f6114d16473e694caa67"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e96dd5e7ae9aefed663bc7e285ad96792b67eadc",
|
||||
"reference": "e96dd5e7ae9aefed663bc7e285ad96792b67eadc",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/dbbdb0d7c2434ecd5289f6114d16473e694caa67",
|
||||
"reference": "dbbdb0d7c2434ecd5289f6114d16473e694caa67",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2902,27 +2882,27 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-25T07:23:44+00:00"
|
||||
"time": "2020-11-01T14:51:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "9.2.1",
|
||||
"version": "9.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "ed363c3ce393560a1c300dce0298bbf0f0528b13"
|
||||
"reference": "6b20e2055f7c29b56cb3870b3de7cc463d7add41"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ed363c3ce393560a1c300dce0298bbf0f0528b13",
|
||||
"reference": "ed363c3ce393560a1c300dce0298bbf0f0528b13",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6b20e2055f7c29b56cb3870b3de7cc463d7add41",
|
||||
"reference": "6b20e2055f7c29b56cb3870b3de7cc463d7add41",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"nikic/php-parser": "^4.8",
|
||||
"nikic/php-parser": "^4.10.2",
|
||||
"php": ">=7.3",
|
||||
"phpunit/php-file-iterator": "^3.0.3",
|
||||
"phpunit/php-text-template": "^2.0.2",
|
||||
@ -2975,7 +2955,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-26T15:46:21+00:00"
|
||||
"time": "2020-10-30T10:46:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@ -3204,16 +3184,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.4.1",
|
||||
"version": "9.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "1f09a12726593737e8a228ebb1c8647305d07c41"
|
||||
"reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1f09a12726593737e8a228ebb1c8647305d07c41",
|
||||
"reference": "1f09a12726593737e8a228ebb1c8647305d07c41",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
|
||||
"reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3299,7 +3279,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-11T07:41:19+00:00"
|
||||
"time": "2020-10-19T09:23:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@ -3882,16 +3862,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/lines-of-code",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
|
||||
"reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54"
|
||||
"reference": "acf76492a65401babcf5283296fa510782783a7a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/6514b8f21906b8b46f520d1fbd17a4523fa59a54",
|
||||
"reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/acf76492a65401babcf5283296fa510782783a7a",
|
||||
"reference": "acf76492a65401babcf5283296fa510782783a7a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3931,7 +3911,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-09-28T06:07:27+00:00"
|
||||
"time": "2020-10-26T17:03:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-enumerator",
|
||||
|
@ -127,7 +127,6 @@ Define a new task and save to tasks list.
|
||||
Alternatively get a defined task.
|
||||
|
||||
|
||||
|
||||
## before()
|
||||
|
||||
```php
|
||||
@ -151,7 +150,7 @@ Call that task after specified task runs.
|
||||
## fail()
|
||||
|
||||
```php
|
||||
fail(string $task, string $do)
|
||||
fail(string $task, $do)
|
||||
```
|
||||
|
||||
Setup which task run on failure of $task.
|
||||
|
@ -193,7 +193,7 @@ class Deployer extends Container
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Deployer
|
||||
* @return self
|
||||
*/
|
||||
public static function get()
|
||||
{
|
||||
|
@ -157,7 +157,6 @@ function desc(?string $title = null): ?string
|
||||
*
|
||||
* @param string $name Name of current task.
|
||||
* @param callable|array|string|null $body Callable task, array of other tasks names or nothing to get a defined tasks
|
||||
*
|
||||
*/
|
||||
function task(string $name, $body = null): Task
|
||||
{
|
||||
@ -231,11 +230,11 @@ function after(string $task, $do)
|
||||
* When called multiple times for a task, previous fail() definitions will be overridden.
|
||||
*
|
||||
* @param string $task The task which need to fail so $that should be run.
|
||||
* @param string $do The task to be run.
|
||||
* @param string|callable $do The task to be run.
|
||||
*
|
||||
* @return Task|null
|
||||
*/
|
||||
function fail(string $task, string $do)
|
||||
function fail(string $task, $do)
|
||||
{
|
||||
if (is_callable($do)) {
|
||||
$newTask = task("fail:$task", $do);
|
||||
|
Loading…
x
Reference in New Issue
Block a user