- Issue created by @MegaChriz
The parameter $file_system
in \Drupal\feeds\Result\RawFetcherResult::__construct()
is optional. To fix dependency injection in the future, we should make it required in the future. Deprecate that the parameter is optional.
It looks like there is no code in the Feeds code base that doesn't pass a value for the $file_system
parameter already, so probably no calling code needs to be fixed.
Add a deprecation warning in \Drupal\feeds\Result\RawFetcherResult::__construct()
for if the $file_system
parameter is not set. Write a change record.
Code:
if (!isset($file_system)) {
@trigger_error('Calling ' . __METHOD__ . '() without the $file_system argument is deprecated in feeds:3.0.0-rc1 and will be required in feeds:4.0.0. See https://www.drupal.org/node/xxx', E_USER_DEPRECATED);
$entity_type_manager = \Drupal::service('entity_type.manager');
}
'xxx' should be the node ID of the change record.
$file_system
in \Drupal\feeds\Result\RawFetcherResult::__construct()
is not set.None.
\Drupal\feeds\Result\RawFetcherResult::__construct()
will trigger an error with a deprecation message when the parameter $file_system
is not set.
None.
Active
3.0
Code