From fd3267c6b3897cac2ca2aad6e43fbb55a5e6580d Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Fri, 5 Jul 2024 09:57:02 +0200 Subject: [PATCH] Tasks are now called hooks --- docs/php/symfony/hosting/index.mdx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/php/symfony/hosting/index.mdx b/docs/php/symfony/hosting/index.mdx index 2a04f17..fbb5ee0 100644 --- a/docs/php/symfony/hosting/index.mdx +++ b/docs/php/symfony/hosting/index.mdx @@ -110,30 +110,27 @@ There are automatic build info integrations for the following info: +### Hooks - -### Tasks - -This bundle provides infrastructure for your app to run one-time tasks after build or deployment. +This bundle provides infrastructure for your app to run one-time hooks after build or deployment. These are called using the console commands: ```shell -bin/console hosting:run-tasks:post-build -bin/console hosting:run-tasks:post-deploy +bin/console hosting:hook:build +bin/console hosting:hook:deploy ``` -You can integrate into them by implementing the `PostBuildTaskInterface` or `PostDeploymentTaskInterface` interfaces respectively. Use autoconfiguration, then everything works out-of-the-box. +You can integrate into them by implementing the `BuildHookInterface` or `DeployHookInterface` interfaces respectively. Use autoconfiguration, then everything works out-of-the-box. Every task has basically a label and a callback that can perform certain tasks: ```php -use Torr\Hosting\Deployment\PostBuildTaskInterface; +use Torr\Hosting\Deployment\BuildHookInterface; -class MyBuildTask implements PostBuildTaskInterface +class MyBuildTask implements BuildHookInterface { /** - * @inheritDoc */ public function getLabel () : string { @@ -141,7 +138,6 @@ class MyBuildTask implements PostBuildTaskInterface } /** - * @inheritDoc */ public function runPostBuild (TaskCli $io) : void {