{"id":46519335,"url":"https://github.com/davidlienhard/database-query-validator","last_synced_at":"2026-03-06T19:09:10.814Z","repository":{"id":36968981,"uuid":"355105061","full_name":"davidlienhard/database-query-validator","owner":"davidlienhard","description":"🐘 php tool to validate database queries written using davidlienhard/database","archived":false,"fork":false,"pushed_at":"2025-12-13T08:01:38.000Z","size":318,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T22:12:50.399Z","etag":null,"topics":["database","library","mysql","php"],"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/davidlienhard.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-06T07:55:22.000Z","updated_at":"2025-12-13T08:01:40.000Z","dependencies_parsed_at":"2025-08-13T08:17:59.046Z","dependency_job_id":"5398981e-e29c-4f47-bc3e-405377a876fb","html_url":"https://github.com/davidlienhard/database-query-validator","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/davidlienhard/database-query-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlienhard%2Fdatabase-query-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlienhard%2Fdatabase-query-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlienhard%2Fdatabase-query-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlienhard%2Fdatabase-query-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidlienhard","download_url":"https://codeload.github.com/davidlienhard/database-query-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidlienhard%2Fdatabase-query-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30192445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T18:54:55.862Z","status":"ssl_error","status_checked_at":"2026-03-06T18:53:04.013Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["database","library","mysql","php"],"created_at":"2026-03-06T19:09:10.131Z","updated_at":"2026-03-06T19:09:10.801Z","avatar_url":"https://github.com/davidlienhard.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# davidlienhard/database-query-validator\n🐘 php tool to validate database queries written using [`davidlienhard/database`](https://github.com/davidlienhard/database)\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/davidlienhard/database-query-validator.svg?style=flat-square)](https://packagist.org/packages/davidlienhard/database-query-validator)\n[![Source Code](https://img.shields.io/badge/source-davidlienhard/database--query--validator-blue.svg?style=flat-square)](https://github.com/davidlienhard/database-query-validator)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/davidlienhard/database-query-validator/blob/master/LICENSE)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF.svg?style=flat-square)](https://php.net/)\n[![CI Status](https://github.com/davidlienhard/database-query-validator/actions/workflows/check.yml/badge.svg)](https://github.com/davidlienhard/database-query-validator/actions/workflows/check.yml)\n\n## Configuration\nThis tool requires a file named `query-validator.json` in your main project directory. CLI arguments are not supported at the moment.\nThe following configuration options are possible:\n - **`paths`** (`array`): list of paths (folders or files) to scan.\n - **`exclusions`** (`array`): list of paths to exclude from the scans\n - **`dumpfile`** (`string`): path to a mysql dump file to use for type-checks\n - **`parameters`** (`object`):\n   - `ignoresyntax` (`bool`): whether or not to ignore syntax-errors in the queries\n   - `strictinserts` (`bool`): checks if inserts contains all text-colums of table that are set to not null\n   - `strictinsertsignoremissingtablenames` (`bool`): whether to ignore queries where the tablename could not be extracted on strict imports\n\nAll paths are relative to the path of the configuration file. If no configuration file can be found all the files in your currect folder will be scanned.\n\n### Example Configuration-File\n\n#### JSON\n```json\n{\n    \"paths\": [\n        \"src\"\n    ],\n    \"exclusions\": [\n        \"**/exclude.php\"\n    ],\n    \"dumpfile\": \"dump.sql\",\n    \"parameters\": {\n        \"ignoresyntax\": false,\n        \"strictinserts\": false\n    }\n}\n```\n\n#### YAML\n```yml\npaths:\n  - src\nexclusions:\n  - \"**/exclude.php\"\ndumpfile: dump.sql\nparameters:\n  ignoresyntax: false\n  strictinserts: false\n```\n\n## Todo\nThis project is still work in progress and there is a lot of work todo.\n - improve validation of queries\n - improve documentation (of course)\n - add unit tests\n - improve recognition of database-queries\n - improve config\n   - add support of CLI arguments\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE](https://github.com/davidlienhard/httpclient/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidlienhard%2Fdatabase-query-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidlienhard%2Fdatabase-query-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidlienhard%2Fdatabase-query-validator/lists"}