Skip to content

Fix ArgumentCountError in test token_fetcher closures#96

Merged
dan2k3k4 merged 2 commits intoadd-trigger-deploy-and-lagoon-commandfrom
copilot/sub-pr-56
Mar 16, 2026
Merged

Fix ArgumentCountError in test token_fetcher closures#96
dan2k3k4 merged 2 commits intoadd-trigger-deploy-and-lagoon-commandfrom
copilot/sub-pr-56

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

LagoonClientService::getLagoonToken() invokes the polydock.lagoon.token_fetcher callable with the $config array, but tests were binding zero-arg closures — causing an ArgumentCountError at runtime.

Changes

  • tests/Feature/Console/Commands/RunLagoonCommandOnAppInstancesTest.php: Updated both test_it_runs_serially_by_default and test_it_skips_instances_missing_metadata to bind a callable that accepts the config parameter:
// Before
$this->app->instance('polydock.lagoon.token_fetcher', fn () => 'fake-token');

// After
$this->app->instance('polydock.lagoon.token_fetcher', fn (array $config) => 'fake-token');

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…rameter

Co-authored-by: dan2k3k4 <158704+dan2k3k4@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 16, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/amazeeio/laravel_lagoon_logs/zipball/2d25153b36f1de3c4c8ae45c167319c5164f3d83
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/XAzp92 /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [WIP] Address feedback on Lagoon Deployments for App Instances Fix ArgumentCountError in test token_fetcher closures Mar 16, 2026
Copilot AI requested a review from dan2k3k4 March 16, 2026 11:51
@dan2k3k4 dan2k3k4 marked this pull request as ready for review March 16, 2026 12:02
@dan2k3k4 dan2k3k4 merged commit 6438d03 into add-trigger-deploy-and-lagoon-command Mar 16, 2026
@dan2k3k4 dan2k3k4 deleted the copilot/sub-pr-56 branch March 16, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants