Fixed deprecated method calls
minor #9353 [2.3] Removed deprecated calls (WouterJ)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Removed deprecated calls

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

a6562b3 Fixed deprecated method calls