Download the PHP package davidlienhard/database-query-validator without Composer
On this page you can find all versions of the php package davidlienhard/database-query-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davidlienhard/database-query-validator
More information about davidlienhard/database-query-validator
Files in davidlienhard/database-query-validator
Package database-query-validator
Short Description 🐘 php tool to validate database queries
License MIT
Homepage https://github.com/davidlienhard/database-query-validator/
Informations about the package database-query-validator
davidlienhard/database-query-validator
🐘 php tool to validate database queries written using davidlienhard/database
Configuration
This tool requires a file named query-validator.json
in your main project directory. CLI arguments are not supported at the moment.
The following configuration options are possible:
paths
(array
): list of paths (folders or files) to scan.exclusions
(array
): list of paths to exclude from the scansdumpfile
(string
): path to a mysql dump file to use for type-checksparameters
(object
):ignoresyntax
(bool
): whether or not to ignore syntax-errors in the queriesstrictinserts
(bool
): checks if inserts contains all text-colums of table that are set to not nullstrictinsertsignoremissingtablenames
(bool
): whether to ignore queries where the tablename could not be extracted on strict imports
All 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.
Example Configuration-File
JSON
YAML
Todo
This project is still work in progress and there is a lot of work todo.
- improve validation of queries
- improve documentation (of course)
- add unit tests
- improve recognition of database-queries
- improve config
- add support of CLI arguments
License
The MIT License (MIT). Please see LICENSE for more information.
All versions of database-query-validator with dependencies
league/flysystem Version ^3
nikic/php-parser Version ^4
phpmyadmin/sql-parser Version ^5
symfony/filesystem Version ^6
symfony/yaml Version ^6
webmozart/glob Version ^4