Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/async/coroutines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Let's take a look at the most basic coroutine usage by using an

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -59,7 +59,7 @@ shown in a simple example:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down
2 changes: 1 addition & 1 deletion docs/async/fibers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use function React\Async\await;

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down
4 changes: 2 additions & 2 deletions docs/async/promises.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Let's take a look at the most basic promise usage by using an

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -58,7 +58,7 @@ order to "await" its fulfillment value. This is best shown in a simple example:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down
2 changes: 1 addition & 1 deletion docs/best-practices/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ all uppercase in any factory function like this:
$container = new FrameworkX\Container([
React\MySQL\ConnectionInterface::class => function (string $DB_HOST = 'localhost', string $DB_USER = 'root', string $DB_PASS = '', string $DB_NAME = 'acme') {
// connect to database defined in optional $DB_* environment variables
$uri = 'mysql://' . $DB_USER . ':' . rawurlencode($DB_PASS) . '@' . $DB_HOST . '/' . $DB_NAME . '?idle=0.001';
$uri = 'mysql://' . $DB_USER . ':' . rawurlencode($DB_PASS) . '@' . $DB_HOST . '/' . $DB_NAME;
return (new React\MySQL\Factory())->createLazyConnection($uri);
}
]);
Expand Down
16 changes: 8 additions & 8 deletions docs/integrations/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Let's take a look at the most basic async database integration possible with X:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -44,7 +44,7 @@ Let's take a look at the most basic async database integration possible with X:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -72,7 +72,7 @@ Let's take a look at the most basic async database integration possible with X:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -214,7 +214,7 @@ from a [route placeholder](../api/app.md#routing) like this:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -252,7 +252,7 @@ from a [route placeholder](../api/app.md#routing) like this:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -290,7 +290,7 @@ from a [route placeholder](../api/app.md#routing) like this:

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);

$app = new FrameworkX\App();
Expand Down Expand Up @@ -371,7 +371,7 @@ controller and uses dependency injection (DI) or a

require __DIR__ . '/../vendor/autoload.php';

$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
$db = (new React\MySQL\Factory())->createLazyConnection($credentials);
$repository = new Acme\Todo\BookRepository($db);

Expand All @@ -394,7 +394,7 @@ controller and uses dependency injection (DI) or a

$container = new FrameworkX\Container([
React\MySQL\ConnectionInterface::class => function () {
$credentials = 'alice:secret@localhost/bookstore?idle=0.001';
$credentials = 'alice:secret@localhost/bookstore';
return (new React\MySQL\Factory())->createLazyConnection($credentials);
}
]);
Expand Down