From 24bfedf3f88762bcd46e6452d6547d838f780e6b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 25 Sep 2025 13:27:28 +0200 Subject: [PATCH] cli/command: deprecate DockerCli.Apply The Apply method was added when CLI options for constructing the CLI were rewritten into functional options in [cli@7f207f3]. There was no mention in the pull request of this method specifically, and this may have been related to work being done elsewhere on compose-on-kubernetes or the compose-cli plugin that may have needed options to modify the CLI config after it was already initialized. The CLI itself no longer depends on this method since [cli@133279f], and the only known consumer (docker compose) no longer needs it since [cli@2711800] and [cli@048e931]. This patch deprecates the method with the intent to remove it in a future release. [cli@7f207f3]: https://github.com/docker/cli/commit/7f207f3f957ed3f5129aeb22bef2a429c14caf22 [cli@133279f]: https://github.com/docker/cli/commit/133279fb0d4adea30d27d27eb8789b79405fc82b [cli@2711800]: https://github.com/docker/cli/commit/271180043066ec1baaa91351a63f1854667171d4 [cli@048e931]: https://github.com/docker/cli/commit/048e931b422a6baa26d12f818bbb14c501164c09 Signed-off-by: Sebastiaan van Stijn --- cli/command/cli.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/command/cli.go b/cli/command/cli.go index 965c410ae9..b649fc101c 100644 --- a/cli/command/cli.go +++ b/cli/command/cli.go @@ -567,6 +567,8 @@ func (cli *DockerCli) initialize() error { } // Apply all the operation on the cli +// +// Deprecated: this method is no longer used and will be removed in the next release if there are no remaining users. func (cli *DockerCli) Apply(ops ...CLIOption) error { for _, op := range ops { if err := op(cli); err != nil {