in /core/tests/Drupal/Tests/Core/DependencyInjection/DependencySerializationTest.php , I think I see an unused variable.
The code block is
$string = serialize($dependencySerialization);
$object = unserialize($string);
$string = serialize($dependencySerialization);
/** @var \Drupal\Tests\Core\DependencyInjection\DependencySerializationTestDummy $object */
$dependencySerialization = unserialize($string);
$this->assertSame($service, $dependencySerialization->service);
$this->assertSame($container, $dependencySerialization->container);
$this->assertEmpty($dependencySerialization->getServiceIds());
Here you can see that $object is defined but never used. Futhermore the same operatation unserialize($string) is stored into $dependencySerialization so it's also redundant. Which makes the typing above $dependencySerialization weird. Oh I just noticed that $string is reset too. So I guess this can be removed:
$string = serialize($dependencySerialization);
$object = unserialize($string);
and we should fix the object typing.
Comments
Comment #2
cosmicdreams commentedHere's a patch:
Comment #3
cosmicdreams commentedComment #4
wim leersComment #6
wim leersWas a testbot fluke.
Comment #7
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!