@@ -143,11 +143,10 @@ public function __construct(LoopInterface $loop = null, ConnectorInterface $conn
143143 * $factory->createConnection('localhost?timeout=0.5');
144144 * ```
145145 *
146- * By default, the connection uses the `utf8` charset encoding. Note that
147- * MySQL's `utf8` encoding (also known as `utf8mb3`) predates what is now
148- * known as UTF-8 and for historical reasons doesn't support emojis and
149- * other characters. If you want full UTF-8 support, you can pass the
150- * charset encoding like this:
146+ * By default, the connection provides full UTF-8 support (using the
147+ * `utf8mb4` charset encoding). This should usually not be changed for most
148+ * applications nowadays, but for legacy reasons you can change this to use
149+ * a different ASCII-compatible charset encoding like this:
151150 *
152151 * ```php
153152 * $factory->createConnection('localhost?charset=utf8mb4');
@@ -183,7 +182,7 @@ public function createConnection(
183182 isset ($ parts ['user ' ]) ? rawurldecode ($ parts ['user ' ]) : 'root ' ,
184183 isset ($ parts ['pass ' ]) ? rawurldecode ($ parts ['pass ' ]) : '' ,
185184 isset ($ parts ['path ' ]) ? rawurldecode (ltrim ($ parts ['path ' ], '/ ' )) : '' ,
186- isset ($ args ['charset ' ]) ? $ args ['charset ' ] : 'utf8 '
185+ isset ($ args ['charset ' ]) ? $ args ['charset ' ] : 'utf8mb4 '
187186 );
188187 } catch (\InvalidArgumentException $ e ) {
189188 return \React \Promise \reject ($ e );
@@ -363,11 +362,10 @@ public function createConnection(
363362 * $factory->createLazyConnection('localhost?idle=0.1');
364363 * ```
365364 *
366- * By default, the connection uses the `utf8` charset encoding. Note that
367- * MySQL's `utf8` encoding (also known as `utf8mb3`) predates what is now
368- * known as UTF-8 and for historical reasons doesn't support emojis and
369- * other characters. If you want full UTF-8 support, you can pass the
370- * charset encoding like this:
365+ * By default, the connection provides full UTF-8 support (using the
366+ * `utf8mb4` charset encoding). This should usually not be changed for most
367+ * applications nowadays, but for legacy reasons you can change this to use
368+ * a different ASCII-compatible charset encoding like this:
371369 *
372370 * ```php
373371 * $factory->createLazyConnection('localhost?charset=utf8mb4');
0 commit comments