Add the MySQL ReactPHP library. Start the refactor to start using that lib.

This commit is contained in:
Dave Smith-Hayes 2024-06-26 21:17:29 -04:00
parent d05faaead7
commit 128a1e7518
3 changed files with 54 additions and 2 deletions

View File

@ -14,7 +14,8 @@
"odan/session": "^6.1", "odan/session": "^6.1",
"dotenv-org/phpdotenv-vault": "^0.2.4", "dotenv-org/phpdotenv-vault": "^0.2.4",
"react/react": "^1.4", "react/react": "^1.4",
"robmorgan/phinx": "^0.16.1" "robmorgan/phinx": "^0.16.1",
"react/mysql": "^0.6.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^11.1", "phpunit/phpunit": "^11.1",

52
app/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "fd310decd8bf7dbd0708a7fc791f3689", "content-hash": "82f7933269cf85de8e7e915a83d6d715",
"packages": [ "packages": [
{ {
"name": "cakephp/chronos", "name": "cakephp/chronos",
@ -2374,6 +2374,56 @@
], ],
"time": "2024-03-27T17:20:46+00:00" "time": "2024-03-27T17:20:46+00:00"
}, },
{
"name": "react/mysql",
"version": "v0.6.0",
"source": {
"type": "git",
"url": "https://github.com/friends-of-reactphp/mysql.git",
"reference": "914ff50ebc15934a3847a90f032cccaac215146f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/friends-of-reactphp/mysql/zipball/914ff50ebc15934a3847a90f032cccaac215146f",
"reference": "914ff50ebc15934a3847a90f032cccaac215146f",
"shasum": ""
},
"require": {
"evenement/evenement": "^3.0 || ^2.1 || ^1.1",
"php": ">=5.4.0",
"react/event-loop": "^1.2",
"react/promise": "^3 || ^2.7",
"react/promise-stream": "^1.6",
"react/promise-timer": "^1.9",
"react/socket": "^1.12"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/async": "^4 || ^3 || ^2"
},
"type": "library",
"autoload": {
"psr-4": {
"React\\MySQL\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Async MySQL database client for ReactPHP.",
"keywords": [
"async",
"database",
"mysql",
"reactphp"
],
"support": {
"issues": "https://github.com/friends-of-reactphp/mysql/issues",
"source": "https://github.com/friends-of-reactphp/mysql/tree/v0.6.0"
},
"time": "2023-11-10T12:08:50+00:00"
},
{ {
"name": "react/promise", "name": "react/promise",
"version": "v3.2.0", "version": "v3.2.0",

View File

@ -15,6 +15,7 @@ class HealthCheck extends Controller
public function handle(): Response public function handle(): Response
{ {
/** /**
* Check if the Database connections are active
* @var PdoDatabaseConnection $this->connection * @var PdoDatabaseConnection $this->connection
*/ */
$stmt = $this->connection->query("SELECT 1"); $stmt = $this->connection->query("SELECT 1");