{"id":15296451,"url":"https://github.com/filisko/pdo-plus","last_synced_at":"2025-04-07T09:20:02.482Z","repository":{"id":37561802,"uuid":"66983615","full_name":"filisko/pdo-plus","owner":"filisko","description":"PDO plus extends PDO in order to log all your queries. This package also includes a Bar Panel for Tracy.","archived":false,"fork":false,"pushed_at":"2025-02-08T14:51:54.000Z","size":162,"stargazers_count":16,"open_issues_count":1,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T08:08:24.558Z","etag":null,"topics":["legacy","pdo","pdo-logger","profiler","profiling","tracy"],"latest_commit_sha":null,"homepage":"","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/filisko.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":"2016-08-30T22:56:25.000Z","updated_at":"2025-03-29T20:29:19.000Z","dependencies_parsed_at":"2024-09-30T18:10:43.183Z","dependency_job_id":"5913aa11-4b67-4477-8d16-724bfbc19634","html_url":"https://github.com/filisko/pdo-plus","commit_stats":{"total_commits":65,"total_committers":7,"mean_commits":9.285714285714286,"dds":0.4769230769230769,"last_synced_commit":"cd6b629f97bb659aaffb26a12d59794f084c7a52"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filisko%2Fpdo-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filisko%2Fpdo-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filisko%2Fpdo-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filisko%2Fpdo-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filisko","download_url":"https://codeload.github.com/filisko/pdo-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"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","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":["legacy","pdo","pdo-logger","profiler","profiling","tracy"],"created_at":"2024-09-30T18:10:33.230Z","updated_at":"2025-04-07T09:20:02.460Z","avatar_url":"https://github.com/filisko.png","language":"PHP","readme":"# PDO plus\r\n\r\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5216e5b457684f5bb43d727bceb3cc58)](https://www.codacy.com/gh/filisko/pdo-plus/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=filisko/pdo-plus\u0026amp;utm_campaign=Badge_Grade) [![Coverage Status](https://coveralls.io/repos/github/filisko/pdo-plus/badge.svg?branch=github-actions)](https://coveralls.io/github/filisko/pdo-plus?branch=github-actions)\r\n\r\nPDO plus extends PDO in order to log all your queries. This package also includes a Bar Panel for Tracy (useful for legacy projects), see the result below.\r\n\r\n![PDO logger with Tracy](https://i.snag.gy/AbESVC.jpg \"PDO logger with Tracy\")\r\n\r\n## Versions\r\n\r\n| Release | Supported PHP versions  |\r\n| --- |-------------------------|\r\n| 4.x.x / master (here now) | 8.0, 8.1, 8.2, 8.3, 8.4 |\r\n| [3.x.x](https://github.com/filisko/pdo-plus/tree/3.x.x) | 7.2, 7.3, 7.4           |\r\n\r\n\r\n## Installation\r\n\r\nInstall via composer:\r\n\r\n```shell\r\ncomposer require filisko/pdo-plus\r\n```\r\n\r\n## How to use\r\n\r\nIn this example we are using two different PDO instances just to show that it's doable.\r\n\r\n```php\r\n// Create an instance using PDO plus\r\n$pdoConnection1 = new \\Filisko\\PDOplus\\PDO('mysql:host=127.0.0.1;dbname=my_db', 'my_user', 'my_pass');\r\n$pdoConnection2 = new \\Filisko\\PDOplus\\PDO('mysql:host=127.0.0.1;dbname=my_other_db', 'my_user', 'my_pass');\r\n\r\n// ... our SQL queries ...\r\n\r\n// Dump logged queries of PDO connection 1\r\nvar_dump($pdoConnection1-\u003egetLog());\r\n\r\n// --- the following code shows how to integrate with Tracy debugger\r\n\r\n// Instance for Tracy BarPanel for connection 1\r\n$db1Panel = new \\Filisko\\PDOplus\\Tracy\\BarPanel($pdoConnection1);\r\n$db1Panel-\u003etitle = \"DB 1 Panel\";\r\n\r\n// Instance for Tracy BarPanel for connection 2\r\n$db2Panel = new \\Filisko\\PDOplus\\Tracy\\BarPanel($pdoConnection2);\r\n$db2Panel-\u003etitle = \"DB 2 Panel\";\r\n\r\n// Enables Tracy debugger and adds panels for each connection (easy to integrate with legacy apps!)\r\n\\Tracy\\Debugger::enable();\r\n\\Tracy\\Debugger::getBar()-\u003eaddPanel($db1Panel);\r\n\\Tracy\\Debugger::getBar()-\u003eaddPanel($db2Panel);\r\n```\r\n\r\n## Dev environment setup \u0026 tests\r\n\r\nBuild docker image:\r\n\r\n```shell\r\n./dev/build.sh\r\n```\r\n\r\nRun tests for all PHP versions:\r\n\r\n```shell\r\n./run_tests.sh\r\n\r\n# in case of one specific version\r\n./run_tests.sh 8.2\r\n\r\n# simply with composer\r\ncomposer test\r\n```\r\n\r\nShell into the Docker image:\r\n```shell\r\n./dev/shell.sh\r\n\r\n# change PHP version?:\r\n./switch_php.sh 8.1\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilisko%2Fpdo-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilisko%2Fpdo-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilisko%2Fpdo-plus/lists"}