Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strict types in schema.json #129

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ All notable changes to this project will be documented in this file.

## 5.0.0 (WIP)

Breaking changes:

- Added table column validation. GdprDump now throws an exception if a config file contains an undefined column ([#125](https://github.com/Smile-SA/gdpr-dump/pull/125))
- Removed support of the `filters` parameter. Use the `where` parameter instead ([#128](https://github.com/Smile-SA/gdpr-dump/pull/128))
- Removed undefined column customer_address.vat_id from shopware6 template ([#132](https://github.com/Smile-SA/gdpr-dump/pull/132))
- Stricter config file validation: string parameters don't accept integer values anymore ([#129](https://github.com/Smile-SA/gdpr-dump/pull/129))

## [4.2.2] - 2024-03-26
[4.2.2]: https://github.com/Smile-SA/gdpr-dump/compare/4.2.1...4.2.2
Expand Down
35 changes: 17 additions & 18 deletions app/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "boolean"
},
"version": {
"type": ["string", "number"]
"type": "string"
},
"if_version": {
"type": "object",
Expand Down Expand Up @@ -43,14 +43,14 @@
"tables_whitelist": {
"type": "array",
"items": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
},
"tables_blacklist": {
"type": "array",
"items": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
}
Expand Down Expand Up @@ -84,30 +84,29 @@
}
},
"host": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"port": {
"type": ["string", "integer"],
"minLength": 1
"type": "integer"
},
"user": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"password": {
"type": ["string", "number"]
"type": "string"
},
"name": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"charset": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"unix_socket": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
},
Expand All @@ -117,7 +116,7 @@
"type": "object",
"properties": {
"output": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"add_drop_database": {
Expand Down Expand Up @@ -237,16 +236,16 @@
}
},
"skip_conversion_if": {
"type": ["string", "number"]
"type": "string"
},
"where": {
"type": ["string"]
"type": "string"
},
"filters": {
"deprecated": true
},
"order_by": {
"type": ["string", "number"]
"type": "string"
},
"limit": {
"type": ["integer", "null"]
Expand All @@ -255,7 +254,7 @@
"additionalProperties": false
},
"converter": {
"type": ["object"],
"type": "object",
"properties": {
"converter": {
"type": "string",
Expand Down Expand Up @@ -292,13 +291,13 @@
}
},
"condition": {
"type": ["string", "number"]
"type": "string"
},
"unique": {
"type": "boolean"
},
"cache_key": {
"type": ["string", "number"]
"type": "string"
},
"disabled": {
"type": "boolean"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testDatabaseSettings(): void
'user' => 'myuser',
'password' => 'mypassword',
'host' => 'myhost',
'port' => '3306',
'port' => 3306,
'driver' => 'pdo_mysql',
'charset' => 'utf8mb',
'driver_options' => [
Expand Down
Loading