Skip to content

Conversation

@BentiGorlich
Copy link
Member

If we're in the test environment we should never load ApHttpClient or ImageManager because these classes actually request things from other servers, which we do not want while testing. Instead we want to automatically get our testing services. This PR autowires the testing services when we're in the test environment

If we're in the test environment we should never load `ApHttpClient` or `ImageManager` because these classes actually request things from other servers, which we do not want while testing.
Instead we want to automatically get our testing services. This PR autowires the testing services when we're in the test environment
@BentiGorlich BentiGorlich self-assigned this Jan 27, 2026
@BentiGorlich BentiGorlich added the DX Impacts developer experience label Jan 27, 2026
@BentiGorlich BentiGorlich marked this pull request as ready for review January 27, 2026 21:26
@melroy89
Copy link
Member

I agree. the test is however now failing:

In DefinitionErrorExceptionPass.php line 48:
                                                                               
  Cannot autowire service "App\Command\ApImportObject": argument "$client" of  
   method "__construct()" references interface "App\Service\ActivityPub\ApHtt  
  pClientInterface" but no such service exists. You should maybe alias this i  
  nterface to the existing "App\Tests\Service\TestingApHttpClient" service.    
                                                                               
@BentiGorlich
Copy link
Member Author

Yeah I know, but I don't know how to fix it. See symfony/symfony#63120
I linked it in the old PR, but forgot to mention it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX Impacts developer experience

3 participants