SlideShare a Scribd company logo
1 of 67
Download to read offline
NewinSymfony4.xFeatures to take advantage of in eZ Platform v3.x

… and eZ Platform v2.5 for back ported features
André Rømcke
@andrerom
Nicolas Grekas
@nicolasgrekas
Expert Sponsor : Avec le support de :Roadshow Sponsor :
About me
Some Honorable mentions
• Symfony Flex - 3.4/4.0
New, more advance way to handle projects and packages in Symfony.
• Lock Component - 3.4/4.0
Guarantee exclusive access to some shared resource. For example to ensure that a command
is not executed more than once at the same time (on the same or across different servers).
• Messenger Component - 4.1
Provides a message bus with the ability to send messages and then handle them immediately
in your application or send them through transports (e.g. queues) to be handled later on.
Symfony Maker Bundle

Symfony Flex +Auto-wiring + Maker Bundle = ❤
$ composer req maker
$ git diff config/bundles.php
Symfony Maker Bundle
$ ./bin/console list make
Symfony Maker Bundle
$ ./bin/console make:controller DefaultController
Symfony Maker Bundle
$ vim src/Controller/DefaultController.php
Symfony Maker Bundle
src/ is about YOUR code
$ composer req twig
Adding Twig to the controller
Symfony Cache Component

Some of the new features added in Symfony 4.x

… and back ported to eZ Platform 2.5
New in Symfony Cache 4.2
• MarshallerInterface incl igbinary compatibility
• Multi-hosts DSN
• $cache->get($key, $callback, $beta = null)
Backported to eZ
Platform v2.5
4.2: Cache Stampede Protection at Warm-up
4.2: Cache Stampede Protection at expiry
$cache->get($key,	$callback,	$beta	=	null)	
Probabilistic early expiration:
• Between not favor (0), & highly favor (INF) early expiry
•By default 1.0
• This will affect TTL on save
• Protects against lots of cache expiring at same time
New in Symfony Cache 4.3
• Optimized TagAware Redis & FileSystem adapters
• Stores tags as “relation” => Avoids tag lookups on reads
• File => Symlinks for Tags
• Redis => Redis Set datatype for tags
• Memcached? => No control over eviction of tags
Part of eZ Platform v2.5,
contributed to Symfony 4.3
[Digression] New in eZ Platform 2.5: In-Memory cache
๏ Domain specific, so not contributed to Symfony
๏ Content (Content, Location, UrlAlias) is cached for 300ms
๏ Meta data (Type, Section, User, Language) is cached for 3s
๏ In both cases limit of 100 objects & LFU to pick what to clear
In sum 2.5 has greatly improved performance!
Especially	when	using	Redis!
Symfony HttpClient Component

Easy too use http client, web scrapper, api consumer, ..
by @nicolasgrekas & @andrerom
composer require symfony/http-client
use	SymfonyComponentHttpClientHttpClient;



$client	=	HttpClient::create();



$url	=	'https://symfony.com/versions.json';

$response	=	$client->request('GET',	$url);

by @nicolasgrekas & @andrerom
Consume JSON APIs in a snap
$symfonyVersions	=	$response->toArray();



dump($symfonyVersions);

array:23	[

		"lts"	=>	"3.4.23"

		"latest"	=>	"4.2.4"

		"dev"	=>	"4.3.0-DEV"

		"2.0"	=>	"2.0.25"

		"2.1"	=>	"2.1.13"

		"2.2"	=>	"2.2.11"	
		…
by @nicolasgrekas & @andrerom
namespace	SymfonyContractsHttpClient;



//	Some	pieces	removed	to	not	spoil	the	talk



interface	ResponseInterface

{

				public	function	getStatusCode():	int;

				public	function	getHeaders():	array;

				public	function	getContent():	string;

				public	function	toArray():	array;

}

by @nicolasgrekas & @andrerom
The resiliency of the Web relies on redirects, you’re part of it
Robust and failsafe by default
/**

	*	Gets	the	HTTP	headers	of	the	response.

	*

	*	@param	bool	$throw	Whether	an	exception	should	be	thrown	on	3/4/5xx	status	codes

	*

	*	@throws	TransportExceptionInterface			When	a	network	error	occurs

	*	@throws	RedirectionExceptionInterface	On	a	3xx	when	$throw	is	true	and	the	
	*																																									"max_redirects"	option	has	been	reached

	*	@throws	ClientExceptionInterface						On	a	4xx	when	$throw	is	true

	*	@throws	ServerExceptionInterface						On	a	5xx	when	$throw	is	true

	*/

public	function	getHeaders(bool	$throw	=	true):	array;
But what happens when the redirection limit is reached? or on 4xx / 5xx? Yours to decide:
by @nicolasgrekas & @andrerom
Abstraction	is	fully	decoupled	
from	the	component
Stateless	(autowired)	service
by @nicolasgrekas & @andrerom
Headers? Body? Options to the rescue
Options, there are a lot
of them!
by @nicolasgrekas & @andrerom
Bearer? JSON payload? Options to the rescue
by @nicolasgrekas & @andrerom
Optionstotherescue
'auth_basic'	=>	null,			//	array|string	-	an	array	containing	the	username	as	first	value,	and	optionally	the

																								//			password	as	the	second	one;	or	string	like	username:password	-	enabling	HTTP	Basic

																								//			authentication	(RFC	7617)

'auth_bearer'	=>	null,		//	string	-	a	token	enabling	HTTP	Bearer	authorization	(RFC	6750)

'query'	=>	[],										//	string[]	-	associative	array	of	query	string	values	to	merge	with	the	request's	URL

'headers'	=>	[],								//	iterable|string[]|string[][]	-	headers	names	provided	as	keys	or	as	part	of	values

'body'	=>	'',											//	array|string|resource|Traversable|Closure	-	the	callback	SHOULD	yield	a	string

																								//			smaller	than	the	amount	requested	as	argument;	the	empty	string	signals	EOF;	when

																								//			an	array	is	passed,	it	is	meant	as	a	form	payload	of	field	names	and	values

'json'	=>	null,									//	array|JsonSerializable	-	when	set,	implementations	MUST	set	the	"body"	option	to

																								//			the	JSON-encoded	value	and	set	the	"content-type"	headers	to	a	JSON-compatible

																								//			value	it	is	they	are	not	defined	-	typically	"application/json"

'user_data'	=>	null,				//	mixed	-	any	extra	data	to	attach	to	the	request	(scalar,	callable,	object...)	that

																								//			MUST	be	available	via	$response->getInfo('user_data')	-	not	used	internally

'max_redirects'	=>	20,		//	int	-	the	maximum	number	of	redirects	to	follow;	a	value	lower	or	equal	to	0	means

																								//			redirects	should	not	be	followed;	"Authorization"	and	"Cookie"	headers	MUST

																								//			NOT	follow	except	for	the	initial	host	name

'http_version'	=>	null,	//	string	-	defaults	to	the	best	supported	version,	typically	1.1	or	2.0

'base_uri'	=>	null,					//	string	-	the	URI	to	resolve	relative	URLs,	following	rules	in	RFC	3986,	section	2

'buffer'	=>	true,							//	bool	-	whether	the	content	of	the	response	should	be	buffered	or	not

'on_progress'	=>	null,		//	callable(int	$dlNow,	int	$dlSize,	array	$info)	-	throwing	any	exceptions	MUST	abort

																								//			the	request;	it	MUST	be	called	on	DNS	resolution,	on	arrival	of	headers	and	on

																								//			completion;	it	SHOULD	be	called	on	upload/download	of	data	and	at	least	1/s

'resolve'	=>	[],								//	string[]	-	a	map	of	host	to	IP	address	that	SHOULD	replace	DNS	resolution

'proxy'	=>	null,								//	string	-	by	default,	the	proxy-related	env	vars	handled	by	curl	SHOULD	be	honored

'no_proxy'	=>	null,					//	string	-	a	comma	separated	list	of	hosts	that	do	not	require	a	proxy	to	be	reached

'timeout'	=>	null,						//	float	-	the	inactivity	timeout	-	defaults	to	ini_get('default_socket_timeout')

'bindto'	=>	'0',								//	string	-	the	interface	or	the	local	socket	to	bind	to

'verify_peer'	=>	true,		//	see	https://php.net/context.ssl	for	the	following	options

'verify_host'	=>	true,

'cafile'	=>	null,

'capath'	=>	null,

'local_cert'	=>	null,

'local_pk'	=>	null,

'passphrase'	=>	null,

'ciphers'	=>	null,

'peer_fingerprint'	=>	null,

'capture_peer_cert_chain'	=>	false,

'extra'	=>	[],										//	array	-	additional	options	that	can	be	ignored	if	unsupported,	unlike	regular	options

by @nicolasgrekas & @andrerom
• proxy – get through an HTTP proxy	
• on_progress – display a progress bar / abort a request
• base_uri – resolve relative URLs / build a scoped client
• resolve – protect webhooks against calls to internal endpoints
• peer_fingerprint – pin public keys of remote certificates
• max_redirects – disable or limit redirects
Showcase of some options
by @nicolasgrekas & @andrerom
• body – array|string|resource|Traversable|Closure
Options: Streameable uploads using body
$client->request('POST',	'http://upload.example.com',	[

				'body'	=>	$mimeParts->toIterable(),	//	e.g.	symfony/mime	(in	a	bit)

]);

by @nicolasgrekas & @andrerom
Options: Streameable downloads
$url	=	'http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-desktop-amd64.iso';

$response	=	$client->request('GET',	$url,	[

				'on_progress'	=>	'dump',	//	let's	spam	the	console	for	fun

				'buffer'	=>	false,	//	skip	buffering	the	response	in	memory

]);



//	Responses	are	lazy!	This	waits	only	for	the	headers

if	(200	!==	$response->getStatusCode())	{

				throw	new	Exception('...');

}



$h	=	fopen('./ubuntu.iso',	'w');

foreach	($client->stream($response)	as	$chunk)	{

				fwrite($h,	$chunk->getContent());

}

by @nicolasgrekas & @andrerom
Responses are lazy & requests are concurrent
for	($i	=	0;	$i	<	379;	++$i)	{

				$uri	=	"https://http2.akamai.com/demo/tile-$i.png";

				$responses[]	=	$client->request('GET',	$uri);

}



foreach	($responses	as	$response)	{	
				//	block	until	completion	of	$response	
				//	but	monitor	all	other	responses	meanwhile

				$response->getContent();	
}
by @nicolasgrekas & @andrerom
Asynchronous requests
for	($i	=	0;	$i	<	379;	++$i)	{

				$uri	=	"https://http2.akamai.com/demo/tile-$i.png";

				$responses[]	=	$client->request('GET',	$uri);

}



foreach	($client->stream($responses)	as	$response	=>	$chunk)	{

				if	($chunk->isLast())	{

								//	$response	completed

				}	else	{

								//	$response's	got	network	activity	or	timeout

				}

}
• Note: $client->stream($responses,	0.0);
379 requests
completed in
0,4	s!
Max number of
seconds to wait
before yielding a
timeout chunk
by @nicolasgrekas & @andrerom
Symfony Provided Clients
• NativeHttpClient – The	most	portable,	uses	PHP’s	HTTP	stream	wrapper	
•	CurlHttpClient – Multiplexing,	uses	HTTP/2	and	PUSH	when	available
Decorators:
• ScopingHttpClient – Auto-configure	the	options	based	on	the	request	URL	
• MockHttpClient – A	client	that	doesn't	make	actual	HTTP	requests	
• CachingHttpClient – Adds	caching	on	top	of	an	HTTP	client	
• Psr18Client – You	already	know	about	it	
• with	TraceableHttpClient	and	record	&	replay	coming
by @nicolasgrekas & @andrerom
Usage with FrameworkBundle / Autowiring
framework:

				http_client:

								max_host_connections:	4

								default_options:

												#	...

								scoped_clients:

												github_client:

																base_uri:	https://api.github.com

																headers:

																				Authorization:	token	abc123

#	creates	the	HttpClientInterface	$githubClient	autowiring	alias	
#	and	the	HttpClientInterface	$scopingHttpClient	one

by @nicolasgrekas & @andrerom
Usage with WebProfilerBundle
by @nicolasgrekas & @andrerom
Usage with BrowserKitHttpBrowser
use	SymfonyComponentBrowserKitHttpBrowser;

use	SymfonyComponentHttpClientHttpClient;



$client	=	HttpClient::create();

$browser	=	new	HttpBrowser($client);



$browser->request('GET',	'https://example.com/');

$browser->clickLink('Log	In');

$browser->submitForm('Sign	In',	['username'	=>	'me',	'password'	=>	'pass']);

$browser->clickLink('Subscriptions')

				->filter('table	tr:nth-child(2)	td:nth-child(2)')

				->each(function	($node)	{	echo	trim($node->text())."n";	});
by @nicolasgrekas & @andrerom
			R.I.P.	Goutte
HttpClient
+ DomCrawler
+ CssSelector
+ HttpKernel
+ BrowserKit
Symfony Mime Component

Everything you need to create beautiful emails
use SymfonyComponentMimeEmail;
$email = (new Email())
->from('fabien@symfony.com')
->to('fabien@sensiolabs.com')
->subject('Some subject')
->text('Some text message')
->html('<b>Some HTML message</b>')
->attach('doc.txt')
;
The basics
Why is it so different

from Swiftmailer?
$email = (new Email())
->text('Some text message')
->html('<b>Some HTML message</b>')
;
$email = (new Swift_Message())
->setBody('Some text message')
->addPart('<b>Some HTML message</b>', 'text/html')
;
A better data object model
16k serialized
38 objects
complex serialization
"fixed" headers
2k serialized
7 objects
simple serialization
"dynamic" headers
echo $email->toString();
sleep(2);
$email->to('helene@symfony.com');
echo $email->toString();
Fixed vs dynamic headers
Different

set of headers
Date,Boundary,Message-ID
$email = (new Email())
->from('fabien@symfony.com')
->to('fabien@sensiolabs.com')
->subject('Some subject')
->text(fopen('email.txt', 'r'))
->html(fopen('email.html', 'r'))
;
echo $email->toString();
foreach ($email->toIterable() as $chunk) {
echo $chunk;
}
String or resources,your choice
$email
->attach('Some content', 'doc.txt', 'text/plain')
->attachFromPath('/path/to/doc.txt')
->attach(fopen('doc.txt', 'r'), 'doc.txt', 'text/plain')
;
Attachments
$email = (new Email())
->from('fabien@symfony.com')
->to('fabien@sensiolabs.com')
->subject('Some subject')
->text('Some text')
->html('<b>The new logo: <img src="cid:logo.jpg"></b>')
->embedFromPath('logo-small.jpg', 'logo.jpg')
;
Embeds
use SymfonyBridgeTwigMimeBodyRenderer;
use SymfonyBridgeTwigMimeTemplatedEmail;
use TwigEnvironment;
use TwigLoaderFilesystemLoader;
use SymfonyComponentMimeNamedAddress;
$twig = new Environment($loader = new FilesystemLoader(__DIR__.'/templates'));
$loader->addPath(__DIR__.'/images', 'images');
$email = (new TemplatedEmail())
->from('fabien@symfony.com')
->to(new NamedAddress('fabien@sensiolabs.com', 'Fabien'))
->text('Some text content')
->htmlTemplate('simple.html.twig')
->context([
'city' => 'Lille'
])
;
$renderer = new BodyRenderer($twig);
$renderer->render($email);
echo $email->toString();
Native integration with Twig
<p>
Welcome <b>{{ email.toName }}</b> from {{ city }}!
</p>
<p>
<img src="{{ email.image('@images/photo.jpg') }}">
</p>
Native integration with Twig
SymfonyBridgeTwigMime
WrappedTemplatedEmail
Twig template name
Template context
{% do email.attach('@docs/doc.pdf') %}
<p>
Welcome <b>{{ email.toName }}</b>!
</p>
<p>
<img src="{{ email.image('@images/photo.jpg') }}">
</p>
Native integration with Twig
{% do email.priority(5) %}
<p>
Welcome <b>{{ email.toName }}</b>!
</p>
<p>
<img src="{{ email.image('@images/photo.jpg') }}">
</p>
Native integration with Twig
$email = (new TemplatedEmail())
->from('fabien@symfony.com')
->to(new NamedAddress('fabien@sensiolabs.com', 'Fabien'))
->textTemplate('simple.txt.twig')
->htmlTemplate('simple.html.twig')
;
Native integration with Twig
Tip!
If the Text part is empty,
the BodyRenderer automatically generates one
use TwigCssInlinerCssInlinerExtension;
$twig->addExtension(new CssInlinerExtension());
{% apply inline_css %}
<style>
b { color: red }
</style>
<p>
Welcome <b>{{ email.toName }}</b>!
</p>
{% endapply %}
Inlining CSS
{% apply inline_css("@css/email.css") %}
<style>
b { color: red }
</style>
<p>
Welcome <b>{{ email.toName }}</b>!
</p>
{% endapply %}
Inlining CSS
use TwigMarkdownMarkdownExtension;
$twig->addExtension(new MarkdownExtension());
<p>
{% apply markdown %}
| Version | LTS? | Latest |
| ------------- |:-------------:| -------:|
| 1.0 | Yes | 1.0.1 |
| 2.1 | No | 2.1.33 |
{% endapply %}
</p>
Use Markdown to simplify your templates
use TwigInkyInkyExtension;
$twig->addExtension(new InkyExtension());
Use Inky to simplify your HTML
https://foundation.zurb.com/emails.html
{% apply inky|inline_css(source("@zurb/stylesheets/main.css")) %}
<container>
<row class="header">
<columns>
<spacer size="16"></spacer>
<h4 class="text-center">Symfony Connect</h4>
</columns>
</row>
<row>
<columns>
<spacer size="32"></spacer>
<center><img width="100px" src="{{ email.image("@images/symfony.png") }}"></center>
<spacer size="16"></spacer>
<h1 class="text-center">Forgot Your Password?</h1>
<spacer size="16"></spacer>
<p class="text-center">It happens. Click the link below to reset it.</p>
<button class="large expand" href="#">Reset Password</button>
<hr/>
<p><small><center><a href="#">unsubscribe here</a>.</small></center></p>
</columns>
</row>
</container>
{% endapply %}
Use Inky to simplify your HTML
Symfony Mailer Component

Everything you need to send emails
use SymfonyComponentMailerTransportSmtpSmtpTransport;



$transport = new SmtpTransport('localhost');
$transport->send($email);
The basics
Email is sent for
everybody

or not at all
use SymfonyComponentMailerBridgeAmazoneSmtpSesTransport;
use SymfonyComponentMailerBridgeGoogleSmtpGmailTransport;
use SymfonyComponentMailerBridgeMailchimpSmtpMandrillTransport;
use SymfonyComponentMailerBridgeMailgunSmtpMailgunTransport;
use SymfonyComponentMailerBridgePostmarkSmtpPostmarkTransport;
use SymfonyComponentMailerBridgeSendgridSmtpSendgridTransport;
new SesTransport('user', 'pass', 'eu-west-1');
new GmailTransport('user', 'pass');
new MandrillTransport('user', 'pass');
new MailgunTransport('user', 'pass');
new PostmarkTransport(‘key');
new SendgridTransport('key');
SMTP: Shortcuts
use SymfonyComponentMailerBridgeMailgunHttpMailgunTransport;
new MailgunTransport(‘key’, ‘domain');
… also for Amazone SES & Mandrill
HTTP: Raw message
use SymfonyComponentMailerBridgeMailgunHttpApiMailgunTransport;
use SymfonyComponentMailerBridgePostmarkHttpApiPostmarkTransport;
new MailgunTransport(‘key', ‘domain');
new PostmarkTransport(‘key’);
… also for Amazone SES, Mandrill & Sendgrid
HTTP: Via API
SMTP / HTTP / API?
SMTP HTTP API
Offline Yes	via	Mailcatcher No	/	Mock No	/	Mock
Mailcatcher Yes No No
Standard Yes No No
Symfony	generated Yes Yes No
Fast No Yes Yes
Transport::fromDsn('...');
smtp://user:pass@gmail
smtp://key@sendgrid
smtp://null
smtp://user:pass@mailgun
http://key:domain@mailgun
api://id@postmark
Use a DSN
Transport::fromDsn('...');
Failover
api://id@postmark || smtp://key@sendgrid
RoundRobin
api://id@postmark && smtp://key@sendgrid
Failover and RoundRobin transports
public function email(TransportInterface $transport)
{
$email = (new Email())->…;
$transport->send($email);
return new Response('Sent');
}
Sending emails
Go async?
// Under the hood this is done when async
$transport = Transport::fromDsn('smtp://localhost'));
$transport->send($email);


$bus->dispatch($email);
Messages via Messenger
Emails are sent async via AMQP
framework:
messenger:
routing:
'SymfonyComponentMailerEnvelopedMessage': amqp
Emails are sent immediately
framework:
messenger:
routing:
#'SymfonyComponentMailerEnvelopedMessage': amqp
Sync or Async,your choice
Leverages

the Symfony ecosystem
Twig
Encore
Serializer
Messenger
PSR logger
CSS selector
Event Dispatcher
Dependency Injection Container
Symfony Polyfills (punycode, intl, …)
… with all the great features you love in Swiftmailer 6
Symfony Mailer
Thank you! ❤

More Related Content

What's hot

PHP: The Beginning and the Zend
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zenddoublecompile
 
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: MettleStatic PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: MettleBrent Cook
 
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...Nagios
 
Dockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingDockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingAndreas Schmidt
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production OverviewDelve Labs
 
Massive emailing with Linux, Postfix and Ruby on Rails
Massive emailing with Linux, Postfix and Ruby on RailsMassive emailing with Linux, Postfix and Ruby on Rails
Massive emailing with Linux, Postfix and Ruby on Railsibelmonte
 
AWS Update | London - Elastic Beanstalk
AWS Update | London - Elastic BeanstalkAWS Update | London - Elastic Beanstalk
AWS Update | London - Elastic BeanstalkAmazon Web Services
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassRob Fuller
 
Docker in 30 minutes
Docker in 30 minutesDocker in 30 minutes
Docker in 30 minutesSteve Poole
 
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...InfluxData
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHPRafael Dohms
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attackjaredhaight
 
DockerCon 18 docker storage
DockerCon 18 docker storageDockerCon 18 docker storage
DockerCon 18 docker storageDaniel Finneran
 
Hacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtHacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtRaghav Bisht
 
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn RuytenbergPROIDEA
 
Network configuration
Network configurationNetwork configuration
Network configurationengshemachi
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8Marco Massarelli
 
Apache FTP Server Integration
Apache FTP Server IntegrationApache FTP Server Integration
Apache FTP Server IntegrationWO Community
 

What's hot (20)

PHP: The Beginning and the Zend
PHP: The Beginning and the ZendPHP: The Beginning and the Zend
PHP: The Beginning and the Zend
 
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: MettleStatic PIE, How and Why - Metasploit's new POSIX payload: Mettle
Static PIE, How and Why - Metasploit's new POSIX payload: Mettle
 
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...
Nagios Conference 2011 - Mike Weber - Training: Monitoring Linux Mail Servers...
 
Dockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networkingDockerffm meetup 20150113_networking
Dockerffm meetup 20150113_networking
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production Overview
 
Running Symfony
Running SymfonyRunning Symfony
Running Symfony
 
Massive emailing with Linux, Postfix and Ruby on Rails
Massive emailing with Linux, Postfix and Ruby on RailsMassive emailing with Linux, Postfix and Ruby on Rails
Massive emailing with Linux, Postfix and Ruby on Rails
 
AWS Update | London - Elastic Beanstalk
AWS Update | London - Elastic BeanstalkAWS Update | London - Elastic Beanstalk
AWS Update | London - Elastic Beanstalk
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
 
Docker in 30 minutes
Docker in 30 minutesDocker in 30 minutes
Docker in 30 minutes
 
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...
Increasing Reuse and Time to Awesome by Using Flux Packages | Nathaniel Cook ...
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHP
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attack
 
DockerCon 18 docker storage
DockerCon 18 docker storageDockerCon 18 docker storage
DockerCon 18 docker storage
 
Hacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav BishtHacking in shadows By - Raghav Bisht
Hacking in shadows By - Raghav Bisht
 
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg
"Playing in the Sandbox: Adobe Flash Exploitation Tales" - Björn Ruytenberg
 
Network configuration
Network configurationNetwork configuration
Network configuration
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8
 
Apache FTP Server Integration
Apache FTP Server IntegrationApache FTP Server Integration
Apache FTP Server Integration
 

Similar to New Symfony 4.x and eZ Platform Features

Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvarsSam Marley-Jarrett
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiJérémy Derussé
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationKelwin Yang
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogXavier Hausherr
 
Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Fabien Potencier
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725miguel dominguez
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725MortazaJohari
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrbAntonio Peric-Mazar
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam Englander
 
Privilege Escalation with Metasploit
Privilege Escalation with MetasploitPrivilege Escalation with Metasploit
Privilege Escalation with Metasploitegypt
 
Docker storage designing a platform for persistent data
Docker storage designing a platform for persistent dataDocker storage designing a platform for persistent data
Docker storage designing a platform for persistent dataDocker, Inc.
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsMarcelo Pinheiro
 
Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fwdays
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...bobmcwhirter
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriDocker, Inc.
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)Sumant Garg
 

Similar to New Symfony 4.x and eZ Platform Features (20)

Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvars
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
Introduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android ApplicationIntroduction to Dynamic Analysis of Android Application
Introduction to Dynamic Analysis of Android Application
 
The use of Symfony2 @ Overblog
The use of Symfony2 @ OverblogThe use of Symfony2 @ Overblog
The use of Symfony2 @ Overblog
 
Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3Symfony Components 2.0 on PHP 5.3
Symfony Components 2.0 on PHP 5.3
 
1000 to 0
1000 to 01000 to 0
1000 to 0
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Symfony2 revealed
Symfony2 revealedSymfony2 revealed
Symfony2 revealed
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Privilege Escalation with Metasploit
Privilege Escalation with MetasploitPrivilege Escalation with Metasploit
Privilege Escalation with Metasploit
 
New features in Ruby 2.5
New features in Ruby 2.5New features in Ruby 2.5
New features in Ruby 2.5
 
Docker storage designing a platform for persistent data
Docker storage designing a platform for persistent dataDocker storage designing a platform for persistent data
Docker storage designing a platform for persistent data
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability Systems
 
Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron GrattafioriThe Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)
 

More from eZ Systems

A unified platform to build Digital Experience from Content to Commerce to Pe...
A unified platform to build Digital Experience from Content to Commerce to Pe...A unified platform to build Digital Experience from Content to Commerce to Pe...
A unified platform to build Digital Experience from Content to Commerce to Pe...eZ Systems
 
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e..."Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...eZ Systems
 
"How Crédit Agricole and IT-CE managed their digital transformation thanks to...
"How Crédit Agricole and IT-CE managed their digital transformation thanks to..."How Crédit Agricole and IT-CE managed their digital transformation thanks to...
"How Crédit Agricole and IT-CE managed their digital transformation thanks to...eZ Systems
 
The rise of Digital Experience Platforms
The rise of Digital Experience PlatformsThe rise of Digital Experience Platforms
The rise of Digital Experience PlatformseZ Systems
 
"How to deliver remarkable digital experiences to customers?"
"How to deliver remarkable digital experiences to customers?""How to deliver remarkable digital experiences to customers?"
"How to deliver remarkable digital experiences to customers?"eZ Systems
 
Keynote eZ Roadshow & Diginight 2019 - oslo
Keynote eZ Roadshow & Diginight 2019 - osloKeynote eZ Roadshow & Diginight 2019 - oslo
Keynote eZ Roadshow & Diginight 2019 - osloeZ Systems
 
Brochure eZ Platform DXP
Brochure eZ Platform DXPBrochure eZ Platform DXP
Brochure eZ Platform DXPeZ Systems
 
[Webinar] Discover eZ platform v2.4
[Webinar]  Discover eZ platform v2.4[Webinar]  Discover eZ platform v2.4
[Webinar] Discover eZ platform v2.4eZ Systems
 
Community webinar discover e z platform v2.3 (9.10.2018)
Community webinar   discover e z platform v2.3 (9.10.2018)Community webinar   discover e z platform v2.3 (9.10.2018)
Community webinar discover e z platform v2.3 (9.10.2018)eZ Systems
 
Symfony Under the Hood
Symfony Under the HoodSymfony Under the Hood
Symfony Under the HoodeZ Systems
 
eZ in the Year Ahead
eZ in the Year AheadeZ in the Year Ahead
eZ in the Year AheadeZ Systems
 
Personalization on eZ Platform v2
Personalization on eZ Platform v2Personalization on eZ Platform v2
Personalization on eZ Platform v2eZ Systems
 
Choose the eZ Universe for Your Web Galaxy
Choose the eZ Universe for Your Web GalaxyChoose the eZ Universe for Your Web Galaxy
Choose the eZ Universe for Your Web GalaxyeZ Systems
 
Using eZ Platform in an API Era
Using eZ Platform in an API EraUsing eZ Platform in an API Era
Using eZ Platform in an API EraeZ Systems
 
Extending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReactExtending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReacteZ Systems
 
A Roadmap to Becoming Your Customer’s Information Hub
A Roadmap to Becoming Your Customer’s Information HubA Roadmap to Becoming Your Customer’s Information Hub
A Roadmap to Becoming Your Customer’s Information HubeZ Systems
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Systems
 
GDPR in the Digital World
GDPR in the Digital WorldGDPR in the Digital World
GDPR in the Digital WorldeZ Systems
 
When content transforms your customer experience
When content transforms your customer experienceWhen content transforms your customer experience
When content transforms your customer experienceeZ Systems
 
Connectors Panel Discussion
Connectors Panel DiscussionConnectors Panel Discussion
Connectors Panel DiscussioneZ Systems
 

More from eZ Systems (20)

A unified platform to build Digital Experience from Content to Commerce to Pe...
A unified platform to build Digital Experience from Content to Commerce to Pe...A unified platform to build Digital Experience from Content to Commerce to Pe...
A unified platform to build Digital Experience from Content to Commerce to Pe...
 
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e..."Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...
"Reconociendo al cliente personalizando su experiencia" - Andorra Turisme - e...
 
"How Crédit Agricole and IT-CE managed their digital transformation thanks to...
"How Crédit Agricole and IT-CE managed their digital transformation thanks to..."How Crédit Agricole and IT-CE managed their digital transformation thanks to...
"How Crédit Agricole and IT-CE managed their digital transformation thanks to...
 
The rise of Digital Experience Platforms
The rise of Digital Experience PlatformsThe rise of Digital Experience Platforms
The rise of Digital Experience Platforms
 
"How to deliver remarkable digital experiences to customers?"
"How to deliver remarkable digital experiences to customers?""How to deliver remarkable digital experiences to customers?"
"How to deliver remarkable digital experiences to customers?"
 
Keynote eZ Roadshow & Diginight 2019 - oslo
Keynote eZ Roadshow & Diginight 2019 - osloKeynote eZ Roadshow & Diginight 2019 - oslo
Keynote eZ Roadshow & Diginight 2019 - oslo
 
Brochure eZ Platform DXP
Brochure eZ Platform DXPBrochure eZ Platform DXP
Brochure eZ Platform DXP
 
[Webinar] Discover eZ platform v2.4
[Webinar]  Discover eZ platform v2.4[Webinar]  Discover eZ platform v2.4
[Webinar] Discover eZ platform v2.4
 
Community webinar discover e z platform v2.3 (9.10.2018)
Community webinar   discover e z platform v2.3 (9.10.2018)Community webinar   discover e z platform v2.3 (9.10.2018)
Community webinar discover e z platform v2.3 (9.10.2018)
 
Symfony Under the Hood
Symfony Under the HoodSymfony Under the Hood
Symfony Under the Hood
 
eZ in the Year Ahead
eZ in the Year AheadeZ in the Year Ahead
eZ in the Year Ahead
 
Personalization on eZ Platform v2
Personalization on eZ Platform v2Personalization on eZ Platform v2
Personalization on eZ Platform v2
 
Choose the eZ Universe for Your Web Galaxy
Choose the eZ Universe for Your Web GalaxyChoose the eZ Universe for Your Web Galaxy
Choose the eZ Universe for Your Web Galaxy
 
Using eZ Platform in an API Era
Using eZ Platform in an API EraUsing eZ Platform in an API Era
Using eZ Platform in an API Era
 
Extending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and ReactExtending eZ Platform v2 with Symfony and React
Extending eZ Platform v2 with Symfony and React
 
A Roadmap to Becoming Your Customer’s Information Hub
A Roadmap to Becoming Your Customer’s Information HubA Roadmap to Becoming Your Customer’s Information Hub
A Roadmap to Becoming Your Customer’s Information Hub
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
GDPR in the Digital World
GDPR in the Digital WorldGDPR in the Digital World
GDPR in the Digital World
 
When content transforms your customer experience
When content transforms your customer experienceWhen content transforms your customer experience
When content transforms your customer experience
 
Connectors Panel Discussion
Connectors Panel DiscussionConnectors Panel Discussion
Connectors Panel Discussion
 

Recently uploaded

DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 

Recently uploaded (20)

DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 

New Symfony 4.x and eZ Platform Features

  • 1. NewinSymfony4.xFeatures to take advantage of in eZ Platform v3.x
 … and eZ Platform v2.5 for back ported features André Rømcke @andrerom Nicolas Grekas @nicolasgrekas Expert Sponsor : Avec le support de :Roadshow Sponsor :
  • 3. Some Honorable mentions • Symfony Flex - 3.4/4.0 New, more advance way to handle projects and packages in Symfony. • Lock Component - 3.4/4.0 Guarantee exclusive access to some shared resource. For example to ensure that a command is not executed more than once at the same time (on the same or across different servers). • Messenger Component - 4.1 Provides a message bus with the ability to send messages and then handle them immediately in your application or send them through transports (e.g. queues) to be handled later on.
  • 4. Symfony Maker Bundle
 Symfony Flex +Auto-wiring + Maker Bundle = ❤
  • 5. $ composer req maker $ git diff config/bundles.php Symfony Maker Bundle
  • 6. $ ./bin/console list make Symfony Maker Bundle
  • 7. $ ./bin/console make:controller DefaultController Symfony Maker Bundle
  • 8. $ vim src/Controller/DefaultController.php Symfony Maker Bundle src/ is about YOUR code
  • 9. $ composer req twig Adding Twig to the controller
  • 10. Symfony Cache Component
 Some of the new features added in Symfony 4.x
 … and back ported to eZ Platform 2.5
  • 11. New in Symfony Cache 4.2 • MarshallerInterface incl igbinary compatibility • Multi-hosts DSN • $cache->get($key, $callback, $beta = null) Backported to eZ Platform v2.5
  • 12. 4.2: Cache Stampede Protection at Warm-up
  • 13. 4.2: Cache Stampede Protection at expiry $cache->get($key, $callback, $beta = null) Probabilistic early expiration: • Between not favor (0), & highly favor (INF) early expiry •By default 1.0 • This will affect TTL on save • Protects against lots of cache expiring at same time
  • 14. New in Symfony Cache 4.3 • Optimized TagAware Redis & FileSystem adapters • Stores tags as “relation” => Avoids tag lookups on reads • File => Symlinks for Tags • Redis => Redis Set datatype for tags • Memcached? => No control over eviction of tags Part of eZ Platform v2.5, contributed to Symfony 4.3
  • 15. [Digression] New in eZ Platform 2.5: In-Memory cache ๏ Domain specific, so not contributed to Symfony ๏ Content (Content, Location, UrlAlias) is cached for 300ms ๏ Meta data (Type, Section, User, Language) is cached for 3s ๏ In both cases limit of 100 objects & LFU to pick what to clear In sum 2.5 has greatly improved performance! Especially when using Redis!
  • 16. Symfony HttpClient Component
 Easy too use http client, web scrapper, api consumer, ..
  • 17. by @nicolasgrekas & @andrerom composer require symfony/http-client use SymfonyComponentHttpClientHttpClient;
 
 $client = HttpClient::create();
 
 $url = 'https://symfony.com/versions.json';
 $response = $client->request('GET', $url);

  • 18. by @nicolasgrekas & @andrerom Consume JSON APIs in a snap $symfonyVersions = $response->toArray();
 
 dump($symfonyVersions);
 array:23 [
 "lts" => "3.4.23"
 "latest" => "4.2.4"
 "dev" => "4.3.0-DEV"
 "2.0" => "2.0.25"
 "2.1" => "2.1.13"
 "2.2" => "2.2.11" …
  • 19. by @nicolasgrekas & @andrerom namespace SymfonyContractsHttpClient;
 
 // Some pieces removed to not spoil the talk
 
 interface ResponseInterface
 {
 public function getStatusCode(): int;
 public function getHeaders(): array;
 public function getContent(): string;
 public function toArray(): array;
 }

  • 20. by @nicolasgrekas & @andrerom The resiliency of the Web relies on redirects, you’re part of it Robust and failsafe by default /**
 * Gets the HTTP headers of the response.
 *
 * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes
 *
 * @throws TransportExceptionInterface When a network error occurs
 * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the * "max_redirects" option has been reached
 * @throws ClientExceptionInterface On a 4xx when $throw is true
 * @throws ServerExceptionInterface On a 5xx when $throw is true
 */
 public function getHeaders(bool $throw = true): array; But what happens when the redirection limit is reached? or on 4xx / 5xx? Yours to decide:
  • 21. by @nicolasgrekas & @andrerom Abstraction is fully decoupled from the component Stateless (autowired) service
  • 22. by @nicolasgrekas & @andrerom Headers? Body? Options to the rescue Options, there are a lot of them!
  • 23. by @nicolasgrekas & @andrerom Bearer? JSON payload? Options to the rescue
  • 24. by @nicolasgrekas & @andrerom Optionstotherescue 'auth_basic' => null, // array|string - an array containing the username as first value, and optionally the
 // password as the second one; or string like username:password - enabling HTTP Basic
 // authentication (RFC 7617)
 'auth_bearer' => null, // string - a token enabling HTTP Bearer authorization (RFC 6750)
 'query' => [], // string[] - associative array of query string values to merge with the request's URL
 'headers' => [], // iterable|string[]|string[][] - headers names provided as keys or as part of values
 'body' => '', // array|string|resource|Traversable|Closure - the callback SHOULD yield a string
 // smaller than the amount requested as argument; the empty string signals EOF; when
 // an array is passed, it is meant as a form payload of field names and values
 'json' => null, // array|JsonSerializable - when set, implementations MUST set the "body" option to
 // the JSON-encoded value and set the "content-type" headers to a JSON-compatible
 // value it is they are not defined - typically "application/json"
 'user_data' => null, // mixed - any extra data to attach to the request (scalar, callable, object...) that
 // MUST be available via $response->getInfo('user_data') - not used internally
 'max_redirects' => 20, // int - the maximum number of redirects to follow; a value lower or equal to 0 means
 // redirects should not be followed; "Authorization" and "Cookie" headers MUST
 // NOT follow except for the initial host name
 'http_version' => null, // string - defaults to the best supported version, typically 1.1 or 2.0
 'base_uri' => null, // string - the URI to resolve relative URLs, following rules in RFC 3986, section 2
 'buffer' => true, // bool - whether the content of the response should be buffered or not
 'on_progress' => null, // callable(int $dlNow, int $dlSize, array $info) - throwing any exceptions MUST abort
 // the request; it MUST be called on DNS resolution, on arrival of headers and on
 // completion; it SHOULD be called on upload/download of data and at least 1/s
 'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution
 'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored
 'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached
 'timeout' => null, // float - the inactivity timeout - defaults to ini_get('default_socket_timeout')
 'bindto' => '0', // string - the interface or the local socket to bind to
 'verify_peer' => true, // see https://php.net/context.ssl for the following options
 'verify_host' => true,
 'cafile' => null,
 'capath' => null,
 'local_cert' => null,
 'local_pk' => null,
 'passphrase' => null,
 'ciphers' => null,
 'peer_fingerprint' => null,
 'capture_peer_cert_chain' => false,
 'extra' => [], // array - additional options that can be ignored if unsupported, unlike regular options

  • 25. by @nicolasgrekas & @andrerom • proxy – get through an HTTP proxy • on_progress – display a progress bar / abort a request • base_uri – resolve relative URLs / build a scoped client • resolve – protect webhooks against calls to internal endpoints • peer_fingerprint – pin public keys of remote certificates • max_redirects – disable or limit redirects Showcase of some options
  • 26. by @nicolasgrekas & @andrerom • body – array|string|resource|Traversable|Closure Options: Streameable uploads using body $client->request('POST', 'http://upload.example.com', [
 'body' => $mimeParts->toIterable(), // e.g. symfony/mime (in a bit)
 ]);

  • 27. by @nicolasgrekas & @andrerom Options: Streameable downloads $url = 'http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-desktop-amd64.iso';
 $response = $client->request('GET', $url, [
 'on_progress' => 'dump', // let's spam the console for fun
 'buffer' => false, // skip buffering the response in memory
 ]);
 
 // Responses are lazy! This waits only for the headers
 if (200 !== $response->getStatusCode()) {
 throw new Exception('...');
 }
 
 $h = fopen('./ubuntu.iso', 'w');
 foreach ($client->stream($response) as $chunk) {
 fwrite($h, $chunk->getContent());
 }

  • 28. by @nicolasgrekas & @andrerom Responses are lazy & requests are concurrent for ($i = 0; $i < 379; ++$i) {
 $uri = "https://http2.akamai.com/demo/tile-$i.png";
 $responses[] = $client->request('GET', $uri);
 }
 
 foreach ($responses as $response) { // block until completion of $response // but monitor all other responses meanwhile
 $response->getContent(); }
  • 29. by @nicolasgrekas & @andrerom Asynchronous requests for ($i = 0; $i < 379; ++$i) {
 $uri = "https://http2.akamai.com/demo/tile-$i.png";
 $responses[] = $client->request('GET', $uri);
 }
 
 foreach ($client->stream($responses) as $response => $chunk) {
 if ($chunk->isLast()) {
 // $response completed
 } else {
 // $response's got network activity or timeout
 }
 } • Note: $client->stream($responses, 0.0); 379 requests completed in 0,4 s! Max number of seconds to wait before yielding a timeout chunk
  • 30. by @nicolasgrekas & @andrerom Symfony Provided Clients • NativeHttpClient – The most portable, uses PHP’s HTTP stream wrapper • CurlHttpClient – Multiplexing, uses HTTP/2 and PUSH when available Decorators: • ScopingHttpClient – Auto-configure the options based on the request URL • MockHttpClient – A client that doesn't make actual HTTP requests • CachingHttpClient – Adds caching on top of an HTTP client • Psr18Client – You already know about it • with TraceableHttpClient and record & replay coming
  • 31. by @nicolasgrekas & @andrerom Usage with FrameworkBundle / Autowiring framework:
 http_client:
 max_host_connections: 4
 default_options:
 # ...
 scoped_clients:
 github_client:
 base_uri: https://api.github.com
 headers:
 Authorization: token abc123
 # creates the HttpClientInterface $githubClient autowiring alias # and the HttpClientInterface $scopingHttpClient one

  • 32. by @nicolasgrekas & @andrerom Usage with WebProfilerBundle
  • 33. by @nicolasgrekas & @andrerom Usage with BrowserKitHttpBrowser use SymfonyComponentBrowserKitHttpBrowser;
 use SymfonyComponentHttpClientHttpClient;
 
 $client = HttpClient::create();
 $browser = new HttpBrowser($client);
 
 $browser->request('GET', 'https://example.com/');
 $browser->clickLink('Log In');
 $browser->submitForm('Sign In', ['username' => 'me', 'password' => 'pass']);
 $browser->clickLink('Subscriptions')
 ->filter('table tr:nth-child(2) td:nth-child(2)')
 ->each(function ($node) { echo trim($node->text())."n"; });
  • 34. by @nicolasgrekas & @andrerom R.I.P. Goutte HttpClient + DomCrawler + CssSelector + HttpKernel + BrowserKit
  • 35. Symfony Mime Component
 Everything you need to create beautiful emails
  • 36. use SymfonyComponentMimeEmail; $email = (new Email()) ->from('fabien@symfony.com') ->to('fabien@sensiolabs.com') ->subject('Some subject') ->text('Some text message') ->html('<b>Some HTML message</b>') ->attach('doc.txt') ; The basics
  • 37. Why is it so different
 from Swiftmailer?
  • 38. $email = (new Email()) ->text('Some text message') ->html('<b>Some HTML message</b>') ; $email = (new Swift_Message()) ->setBody('Some text message') ->addPart('<b>Some HTML message</b>', 'text/html') ; A better data object model 16k serialized 38 objects complex serialization "fixed" headers 2k serialized 7 objects simple serialization "dynamic" headers
  • 39. echo $email->toString(); sleep(2); $email->to('helene@symfony.com'); echo $email->toString(); Fixed vs dynamic headers Different
 set of headers Date,Boundary,Message-ID
  • 40. $email = (new Email()) ->from('fabien@symfony.com') ->to('fabien@sensiolabs.com') ->subject('Some subject') ->text(fopen('email.txt', 'r')) ->html(fopen('email.html', 'r')) ; echo $email->toString(); foreach ($email->toIterable() as $chunk) { echo $chunk; } String or resources,your choice
  • 41. $email ->attach('Some content', 'doc.txt', 'text/plain') ->attachFromPath('/path/to/doc.txt') ->attach(fopen('doc.txt', 'r'), 'doc.txt', 'text/plain') ; Attachments
  • 42. $email = (new Email()) ->from('fabien@symfony.com') ->to('fabien@sensiolabs.com') ->subject('Some subject') ->text('Some text') ->html('<b>The new logo: <img src="cid:logo.jpg"></b>') ->embedFromPath('logo-small.jpg', 'logo.jpg') ; Embeds
  • 43. use SymfonyBridgeTwigMimeBodyRenderer; use SymfonyBridgeTwigMimeTemplatedEmail; use TwigEnvironment; use TwigLoaderFilesystemLoader; use SymfonyComponentMimeNamedAddress; $twig = new Environment($loader = new FilesystemLoader(__DIR__.'/templates')); $loader->addPath(__DIR__.'/images', 'images'); $email = (new TemplatedEmail()) ->from('fabien@symfony.com') ->to(new NamedAddress('fabien@sensiolabs.com', 'Fabien')) ->text('Some text content') ->htmlTemplate('simple.html.twig') ->context([ 'city' => 'Lille' ]) ; $renderer = new BodyRenderer($twig); $renderer->render($email); echo $email->toString(); Native integration with Twig
  • 44. <p> Welcome <b>{{ email.toName }}</b> from {{ city }}! </p> <p> <img src="{{ email.image('@images/photo.jpg') }}"> </p> Native integration with Twig SymfonyBridgeTwigMime WrappedTemplatedEmail Twig template name Template context
  • 45. {% do email.attach('@docs/doc.pdf') %} <p> Welcome <b>{{ email.toName }}</b>! </p> <p> <img src="{{ email.image('@images/photo.jpg') }}"> </p> Native integration with Twig
  • 46. {% do email.priority(5) %} <p> Welcome <b>{{ email.toName }}</b>! </p> <p> <img src="{{ email.image('@images/photo.jpg') }}"> </p> Native integration with Twig
  • 47. $email = (new TemplatedEmail()) ->from('fabien@symfony.com') ->to(new NamedAddress('fabien@sensiolabs.com', 'Fabien')) ->textTemplate('simple.txt.twig') ->htmlTemplate('simple.html.twig') ; Native integration with Twig
  • 48. Tip! If the Text part is empty, the BodyRenderer automatically generates one
  • 49. use TwigCssInlinerCssInlinerExtension; $twig->addExtension(new CssInlinerExtension()); {% apply inline_css %} <style> b { color: red } </style> <p> Welcome <b>{{ email.toName }}</b>! </p> {% endapply %} Inlining CSS
  • 50. {% apply inline_css("@css/email.css") %} <style> b { color: red } </style> <p> Welcome <b>{{ email.toName }}</b>! </p> {% endapply %} Inlining CSS
  • 51. use TwigMarkdownMarkdownExtension; $twig->addExtension(new MarkdownExtension()); <p> {% apply markdown %} | Version | LTS? | Latest | | ------------- |:-------------:| -------:| | 1.0 | Yes | 1.0.1 | | 2.1 | No | 2.1.33 | {% endapply %} </p> Use Markdown to simplify your templates
  • 52. use TwigInkyInkyExtension; $twig->addExtension(new InkyExtension()); Use Inky to simplify your HTML https://foundation.zurb.com/emails.html
  • 53. {% apply inky|inline_css(source("@zurb/stylesheets/main.css")) %} <container> <row class="header"> <columns> <spacer size="16"></spacer> <h4 class="text-center">Symfony Connect</h4> </columns> </row> <row> <columns> <spacer size="32"></spacer> <center><img width="100px" src="{{ email.image("@images/symfony.png") }}"></center> <spacer size="16"></spacer> <h1 class="text-center">Forgot Your Password?</h1> <spacer size="16"></spacer> <p class="text-center">It happens. Click the link below to reset it.</p> <button class="large expand" href="#">Reset Password</button> <hr/> <p><small><center><a href="#">unsubscribe here</a>.</small></center></p> </columns> </row> </container> {% endapply %} Use Inky to simplify your HTML
  • 54. Symfony Mailer Component
 Everything you need to send emails
  • 55. use SymfonyComponentMailerTransportSmtpSmtpTransport;
 
 $transport = new SmtpTransport('localhost'); $transport->send($email); The basics Email is sent for everybody or not at all
  • 56. use SymfonyComponentMailerBridgeAmazoneSmtpSesTransport; use SymfonyComponentMailerBridgeGoogleSmtpGmailTransport; use SymfonyComponentMailerBridgeMailchimpSmtpMandrillTransport; use SymfonyComponentMailerBridgeMailgunSmtpMailgunTransport; use SymfonyComponentMailerBridgePostmarkSmtpPostmarkTransport; use SymfonyComponentMailerBridgeSendgridSmtpSendgridTransport; new SesTransport('user', 'pass', 'eu-west-1'); new GmailTransport('user', 'pass'); new MandrillTransport('user', 'pass'); new MailgunTransport('user', 'pass'); new PostmarkTransport(‘key'); new SendgridTransport('key'); SMTP: Shortcuts
  • 57. use SymfonyComponentMailerBridgeMailgunHttpMailgunTransport; new MailgunTransport(‘key’, ‘domain'); … also for Amazone SES & Mandrill HTTP: Raw message
  • 58. use SymfonyComponentMailerBridgeMailgunHttpApiMailgunTransport; use SymfonyComponentMailerBridgePostmarkHttpApiPostmarkTransport; new MailgunTransport(‘key', ‘domain'); new PostmarkTransport(‘key’); … also for Amazone SES, Mandrill & Sendgrid HTTP: Via API
  • 59. SMTP / HTTP / API? SMTP HTTP API Offline Yes via Mailcatcher No / Mock No / Mock Mailcatcher Yes No No Standard Yes No No Symfony generated Yes Yes No Fast No Yes Yes
  • 62. public function email(TransportInterface $transport) { $email = (new Email())->…; $transport->send($email); return new Response('Sent'); } Sending emails
  • 64. // Under the hood this is done when async $transport = Transport::fromDsn('smtp://localhost')); $transport->send($email); 
 $bus->dispatch($email); Messages via Messenger
  • 65. Emails are sent async via AMQP framework: messenger: routing: 'SymfonyComponentMailerEnvelopedMessage': amqp Emails are sent immediately framework: messenger: routing: #'SymfonyComponentMailerEnvelopedMessage': amqp Sync or Async,your choice
  • 66. Leverages
 the Symfony ecosystem Twig Encore Serializer Messenger PSR logger CSS selector Event Dispatcher Dependency Injection Container Symfony Polyfills (punycode, intl, …) … with all the great features you love in Swiftmailer 6 Symfony Mailer