{"id":15028700,"url":"https://github.com/php-polyfills/pdo-mysql-subclass","last_synced_at":"2026-02-06T23:33:52.923Z","repository":{"id":216811832,"uuid":"742370034","full_name":"PHP-Polyfills/PDO-MySQL-Subclass","owner":"PHP-Polyfills","description":"User-land PHP polyfill for PDO MySQL driver subclass","archived":false,"fork":false,"pushed_at":"2024-01-14T17:28:43.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T09:58:32.608Z","etag":null,"topics":["compat","mysql","pdo","php","php8","php84","polyfills"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PHP-Polyfills.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-12T10:20:59.000Z","updated_at":"2024-04-16T04:33:44.000Z","dependencies_parsed_at":"2024-01-13T01:31:46.879Z","dependency_job_id":"d8487978-7aaf-4cfa-ad09-bffc34a3608c","html_url":"https://github.com/PHP-Polyfills/PDO-MySQL-Subclass","commit_stats":null,"previous_names":["php-polyfills/pdo-mysql-subclass"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/PHP-Polyfills/PDO-MySQL-Subclass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-Polyfills%2FPDO-MySQL-Subclass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-Polyfills%2FPDO-MySQL-Subclass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-Polyfills%2FPDO-MySQL-Subclass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-Polyfills%2FPDO-MySQL-Subclass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHP-Polyfills","download_url":"https://codeload.github.com/PHP-Polyfills/PDO-MySQL-Subclass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-Polyfills%2FPDO-MySQL-Subclass/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266673562,"owners_count":23966372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compat","mysql","pdo","php","php8","php84","polyfills"],"created_at":"2024-09-24T20:08:54.798Z","updated_at":"2026-02-06T23:33:52.880Z","avatar_url":"https://github.com/PHP-Polyfills.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDO MySQL Subclass Polyfill\n\n[![Latest Stable Version](https://poser.pugx.org/polyfills/pdo-mysql-subclass/v)](https://packagist.org/packages/polyfills/pdo-mysql-subclass) [![License](https://poser.pugx.org/polyfills/pdo-mysql-subclass/license)](https://packagist.org/packages/polyfills/pdo-mysql-subclass) [![PHP Version Require](https://poser.pugx.org/polyfills/pdo-mysql-subclass/require/php)](https://packagist.org/packages/polyfills/pdo-mysql-subclass) ![CI](https://github.com/PHP-Polyfills/PDO-MySQL-Subclass/actions/workflows/ci.yml/badge.svg)\n\nProvides user-land PHP polyfills for the MySQL subclass provided by PHP 8.4.\n\nSupports PHP 8.1, 8.2, and 8.3. On PHP 8.4 and later, this polyfill is not necessary. Requires `pdo_mysql` extension compiled with `mysqlnd` (which is the default and common approach).\n\nIt is possible and safe to require this polyfill on PHP 8.4 and later. This polyfill class is autoloadable; on PHP 8.4 and later, PHP will _not_ autoload this polyfill because it's declared natively.\n\nFor more information, see [`PdoMysql`](https://php.watch/versions/8.4/pdo-driver-subclasses#PdoMysql) on [`PHP 8.4: PDO Driver-specific sub-classes: MySQL`](https://php.watch/versions/8.4/pdo-driver-subclasses)\n\n## Installation\n\n```bash\ncomposer require polyfills/pdo-mysql-subclass\n```\n\n## Usage\n\nUse the provided `PdoMysql` class to replace `PDO` MySQL connections.\n\n```php\n$mysqlConnection = new PdoMysql(\n    'mysql:host=localhost;dbname=phpwatch;charset=utf8mb4;port=33066',\n    '\u003cusername\u003e',\n    '\u003cpassword\u003e',\n);\n```\n\n```php\n$mysqlConnection = PdoMysql::connect(\n    'mysql:host=localhost;dbname=phpwatch;charset=utf8mb4;port=33066',\n    '\u003cusername\u003e',\n    '\u003cpassword\u003e',\n);\n```\n\nThis polyfill adds class-constants to `PdoMysql` class to match all of the `PDO::MYSQL_` constants. For example, `PDO::MYSQL_ATTR_SSL_CERT` is identical to `PdoMysql::ATTR_SSL_CERT`.\n\n### Features not implemented\n\n - `PDO::connect`: This method cannot be polyfilled because it's an existing PHP class that user-land PHP classes cannot modify.\n - `PdoMysql::getWarningCount`: This method is not implemented in the polfyill.\n\n## Contributions\n\nContributions are welcome either as a GitHub issue or a PR to this repo.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-polyfills%2Fpdo-mysql-subclass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-polyfills%2Fpdo-mysql-subclass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-polyfills%2Fpdo-mysql-subclass/lists"}