Problem/Motivation
\Drupal\migrate\MigrateExecutable constructor says that it might throw \Drupal\migrate\MigrateException, but it's not true anymore.
It was introduced back in 2013 in the first migration commit when exception could be thrown in case of invalid memory limit.
See: https://git.drupalcode.org/project/drupal/-/commit/67f30bc0a1f0007f4725a...
Looking at the current state, it's not the case anymore: https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/modules/migr...
Proposed resolution
Remove @throws \Drupal\migrate\MigrateException line from the constructor.
Issue fork drupal-3189054
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3189054-exception-migrate-executable
changes, plain diff MR !171
Comments
Comment #3
matroskeenComment #4
matroskeenI checked all occurences of
new MigrateExecutablein 9.2.x branch and didn't find any try-catch constructions.I think it also proves the fact that this "throw" doc line is not necessary.
Comment #5
quietone commentedI reviewed the patch, all one line of it!
I checked the methods called in the constructor and I agree with Matroskeen there is nothing that will throw a MigrateException. Did some research and the throw was removed from MigrateExecutable in this commit and the docs was not updated.
Off we go!
Comment #7
catchCommitted 6503169 and pushed to 9.2.x. Thanks!