Encountering RuntimeException: 'Puli Factory is not available' When Using Mailgun for Email Dispatch

I attempt sending email through a modified MailClient implementation and encounter a RuntimeException: ‘Puli Factory is not available’. Below is a code snippet illustrating my approach.

require 'lib/bootstrap.php';
use MailDispatcher
otifyService;

$service = new notifyService('new-api-key');
$senderDomain = 'exampledomain';

$response = $service->sendMail($senderDomain, [
    'sender' => 'Alert <[email protected]>',
    'receiver' => 'Alice <[email protected]>',
    'subject' => 'Test Notification',
    'message' => 'This is a sample email body.'
]);

After spending several hours reviewing my project’s dependency configurations, I discovered that the problem was rooted in a reusable component that had been updated without my noticing. I was using a version of a package that attempted to launch the Puli Factory unexpectedly. By carefully revisiting my composer settings and aligning my package versions, I managed to resolve the conflict. It helped to compare the working state of similar projects, which pointed out that a deprecated dependency was still lurking in my codebase.