delboy1978uk /
bone-mail
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Bone\Mail; |
||
| 6 | |||
| 7 | use Barnacle\Container; |
||
| 8 | use Barnacle\RegistrationInterface; |
||
| 9 | use Bone\View\ViewEngine; |
||
| 10 | use Bone\Server\Environment; |
||
| 11 | use Bone\Server\SiteConfig; |
||
| 12 | use Bone\Mail\Service\MailService; |
||
| 13 | use Laminas\Mail\Transport\Sendmail; |
||
|
0 ignored issues
–
show
|
|||
| 14 | use Laminas\Mail\Transport\Smtp; |
||
|
0 ignored issues
–
show
The type
Laminas\Mail\Transport\Smtp was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 15 | use Laminas\Mail\Transport\SmtpOptions; |
||
|
0 ignored issues
–
show
The type
Laminas\Mail\Transport\SmtpOptions was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 16 | use Symfony\Component\Mailer\Mailer; |
||
| 17 | use Symfony\Component\Mailer\Transport; |
||
| 18 | use function getenv; |
||
| 19 | |||
| 20 | class MailPackage implements RegistrationInterface |
||
| 21 | { |
||
| 22 | 1 | public function addToContainer(Container $c) |
|
| 23 | { |
||
| 24 | 1 | $c[MailService::class] = $c->factory(function (Container $c) { |
|
| 25 | 1 | $view = $c->get(ViewEngine::class); |
|
| 26 | 1 | $siteConfig = $c->get(SiteConfig::class); |
|
| 27 | 1 | $dsn = getenv('MAILER_DSN') ?: 'sendmail://default'; |
|
| 28 | 1 | $mailService = new MailService(); |
|
| 29 | $transport = Transport::fromDsn($dsn); |
||
| 30 | 1 | $mailer = new Mailer($transport); |
|
|
0 ignored issues
–
show
|
|||
| 31 | 1 | $mailService->setView($view); |
|
| 32 | $mailService->setSiteConfig($siteConfig); |
||
| 33 | 1 | $mailer = new Mailer($transport); |
|
| 34 | 1 | $mailService->setMailer($mailer); |
|
| 35 | 1 | ||
| 36 | return $mailService; |
||
| 37 | }); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths