Abstracting away the deprecatedItems

Closes #4189

* moved `deprecatedItems` from within the function to the default config object
* addes tests
Merge pull request #4269 from javorszky/iss4189

Abstracting away the deprecatedItems