Today I’ve noticed an error during a test deployment that occurred right after setup:upgrade. Unfortunately it didn’t indicate the affected module.
1 2 3 4 |
Updating modules: Cache cleared successfully Schema creation/updates: Warning: array_replace_recursive(): Expected parameter 2 to be an array, null given in /var/www/html/vendor/magento/framework/Setup/Declaration/Schema/Diff/Diff.php on line 146 |
I took a quick look at the recent changes and noticed a syntax error in db_schema_whitelist.json file. In this particular case it was a comma that shouldn’t be there.
Easy fix!
Before:
1 2 3 |
"constraint": { "PRIMARY": true, } |
After:
1 2 3 |
"constraint": { "PRIMARY": true } |
After removing the comma, the deployment ran through gain.