Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 41ae670

Browse files
authored
Update the code example
1 parent 2725918 commit 41ae670

File tree

1 file changed

+9
-9
lines changed
  • guides/v2.1/contributor-guide/backward-compatible-development

1 file changed

+9
-9
lines changed

guides/v2.1/contributor-guide/backward-compatible-development/index.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,18 @@ Do not remove or rename {% glossarytooltip c57aef7c-97b4-4b2b-a999-8001accef1fe
189189
Do not change argument types.
190190
Instead of changing argument name or type, introduce new event argument with new name or type and deprecate the old argument by adding `@deprecated` annotation before dispatching the event.
191191

192+
Example code:
192193

193-
{% collapsible Example Code %} {% highlight php startinline %} /**
194-
194+
```php?start_inline=1
195195
$transportObject = new DataObject($transport);
196196
197-
/**
198-
* Event argument `transport` is @deprecated. Use `transportObject` instead.
199-
*/
200-
$this->eventManager->dispatch(
201-
'email_invoice_set_template_vars_before',
202-
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
203-
);
197+
/**
198+
* Event argument `transport` is @deprecated. Use `transport_object` instead.
199+
*/
200+
$this->eventManager->dispatch(
201+
'email_invoice_set_template_vars_before',
202+
['sender' => $this, 'transport' => $transportObject->getData(), 'transport_object' => $transportObject]
203+
);
204204
```
205205

206206
### JS

0 commit comments

Comments
 (0)