Skip to content

Commit fa2356a

Browse files
Fix remaining SplObjectStorage deprecation
1 parent 3c1cf3f commit fa2356a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
984984
$guardsConfiguration[$eventName][] = $configuration;
985985
}
986986
if ($transition['metadata']) {
987-
$transitionsMetadataDefinition->addMethodCall('attach', [
987+
$transitionsMetadataDefinition->addMethodCall('offsetSet', [
988988
new Reference($transitionId),
989989
$transition['metadata'],
990990
]);
@@ -1004,7 +1004,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
10041004
$guardsConfiguration[$eventName][] = $configuration;
10051005
}
10061006
if ($transition['metadata']) {
1007-
$transitionsMetadataDefinition->addMethodCall('attach', [
1007+
$transitionsMetadataDefinition->addMethodCall('offsetSet', [
10081008
new Reference($transitionId),
10091009
$transition['metadata'],
10101010
]);

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public function testWorkflows()
376376
$transitionsMetadata = $metadataStoreDefinition->getArgument(2);
377377
$this->assertSame(\SplObjectStorage::class, $transitionsMetadata->getClass());
378378
$transitionsMetadataCall = $transitionsMetadata->getMethodCalls()[0];
379-
$this->assertSame('attach', $transitionsMetadataCall[0]);
379+
$this->assertSame('offsetSet', $transitionsMetadataCall[0]);
380380
$params = $transitionsMetadataCall[1];
381381
$this->assertCount(2, $params);
382382
$this->assertInstanceOf(Reference::class, $params[0]);

0 commit comments

Comments
 (0)