- Issue created by @megachriz
The parameter $file_system
in \Drupal\feeds\Result\HttpFetcherResult::__construct()
is optional. To fix dependency injection in the future, we should make it required in the future. Deprecate that the parameter is optional.
\Drupal\Tests\feeds\Unit\Result\HttpFetcherResultTest::testUnserialize()
looks like to be the only code in the Feeds code base that doesn't pass a value for the $file_system
parameter, so that one would need to be updated.
Add a deprecation warning in \Drupal\feeds\Result\HttpFetcherResult::__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\HttpFetcherResult::__construct()
is not set.\Drupal\Tests\feeds\Unit\Result\HttpFetcherResultTest::testUnserialize()
.None.
\Drupal\feeds\Result\HttpFetcherResult::__construct()
will trigger an error with a deprecation message when the parameter $file_system
is not set.
None.
Active
3.0
Code