Skip to content

Commit 98df200

Browse files
committed
remove temporary
1 parent 6626cba commit 98df200

2 files changed

Lines changed: 41 additions & 43 deletions

File tree

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
"symfony/error-handler": "~6.4",
3030
"symfony/event-dispatcher": "~6.4",
3131
"symfony/finder": "~6.4",
32-
"symfony/http-client": "^6.4",
3332
"symfony/http-foundation": "~6.4",
3433
"symfony/http-kernel": "~6.4",
3534
"symfony/mailer": "^6.4",
36-
"symfony/mailgun-mailer": "^6.4",
3735
"symfony/mime": "~6.4",
3836
"symfony/process": "~6.4",
3937
"symfony/routing": "~6.4",

src/Illuminate/Mail/MailServiceProvider.php

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
use Illuminate\Mail\Transport\LogTransportV2;
55
use Illuminate\Support\Arr;
66
use Illuminate\Support\ServiceProvider;
7-
use Symfony\Component\HttpClient\HttpClient;
8-
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
7+
//use Symfony\Component\HttpClient\HttpClient;
8+
//use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
99
use Symfony\Component\Mailer\Transport\Dsn;
1010
use Symfony\Component\Mailer\Transport\SendmailTransport;
1111
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
1212
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory;
1313
use Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream;
14-
use Symfony\Contracts\HttpClient\HttpClientInterface;
14+
//use Symfony\Contracts\HttpClient\HttpClientInterface;
1515

1616
class MailServiceProvider extends ServiceProvider {
1717

@@ -102,9 +102,9 @@ public function registerSymfonyMailer(): void
102102
case 'mail':
103103
$this->registerMailTransport($config);
104104
break;
105-
case 'mailgun':
106-
$this->registerMailgunTransport($config);
107-
break;
105+
// case 'mailgun':
106+
// $this->registerMailgunTransport($config);
107+
// break;
108108
// case 'mandrill':
109109
// $this->registerMandrillTransport($config);
110110
// break;
@@ -192,24 +192,24 @@ protected function registerMailTransport(array $config): void
192192
* @param array $config
193193
* @return void
194194
*/
195-
protected function registerMailgunTransport(array $config): void
196-
{
197-
$this->app->bindShared('symfony.transport', function() use ($config)
198-
{
199-
$factory = new MailgunTransportFactory(null, $this->getHttpClient($config));
200-
201-
if (! isset($config['secret'])) {
202-
$config = $this->app['config']->get('services.mailgun', []);
203-
}
204-
205-
return $factory->create(new Dsn(
206-
'mailgun+'.($config['scheme'] ?? 'https'),
207-
$config['endpoint'] ?? 'default',
208-
$config['secret'],
209-
$config['domain']
210-
));
211-
});
212-
}
195+
// protected function registerMailgunTransport(array $config): void
196+
// {
197+
// $this->app->bindShared('symfony.transport', function() use ($config)
198+
// {
199+
// $factory = new MailgunTransportFactory(null, $this->getHttpClient($config));
200+
//
201+
// if (! isset($config['secret'])) {
202+
// $config = $this->app['config']->get('services.mailgun', []);
203+
// }
204+
//
205+
// return $factory->create(new Dsn(
206+
// 'mailgun+'.($config['scheme'] ?? 'https'),
207+
// $config['endpoint'] ?? 'default',
208+
// $config['secret'],
209+
// $config['domain']
210+
// ));
211+
// });
212+
// }
213213

214214
/**
215215
* Register the "Log" Symfony Transport instance.
@@ -222,23 +222,23 @@ protected function registerLogTransport(array $config): void
222222
$this->app->bindShared('symfony.transport', fn($app) => new LogTransportV2($app->make('Psr\Log\LoggerInterface')));
223223
}
224224

225-
/**
226-
* Get a configured Symfony HTTP client instance.
227-
*
228-
* @return \Symfony\Contracts\HttpClient\HttpClientInterface|null
229-
*/
230-
protected function getHttpClient(array $config): ?HttpClientInterface
231-
{
232-
$clientOptions = $config['client'] ?? false;
233-
if ($clientOptions) {
234-
$maxHostConnections = Arr::pull($clientOptions, 'max_host_connections', 6);
235-
$maxPendingPushes = Arr::pull($clientOptions, 'max_pending_pushes', 50);
236-
237-
return HttpClient::create($clientOptions, $maxHostConnections, $maxPendingPushes);
238-
}
239-
240-
return null;
241-
}
225+
// /**
226+
// * Get a configured Symfony HTTP client instance.
227+
// *
228+
// * @return \Symfony\Contracts\HttpClient\HttpClientInterface|null
229+
// */
230+
// protected function getHttpClient(array $config): ?HttpClientInterface
231+
// {
232+
// $clientOptions = $config['client'] ?? false;
233+
// if ($clientOptions) {
234+
// $maxHostConnections = Arr::pull($clientOptions, 'max_host_connections', 6);
235+
// $maxPendingPushes = Arr::pull($clientOptions, 'max_pending_pushes', 50);
236+
//
237+
// return HttpClient::create($clientOptions, $maxHostConnections, $maxPendingPushes);
238+
// }
239+
//
240+
// return null;
241+
// }
242242

243243
/**
244244
* Get the services provided by the provider.

0 commit comments

Comments
 (0)