-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Hello @jeff-matthews ! Is there any update on this PR ? Thank you! |
Hi @neeta-wagento! Yes, we'll work on this today. @dshevtsov, please work with @neeta-wagento to merge this PR so she can get credit for Squashtoberfest. |
It requires a tech review. |
@@ -189,6 +189,21 @@ Do not remove or rename {% glossarytooltip c57aef7c-97b4-4b2b-a999-8001accef1fe | |||
Do not change argument types. | |||
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. | |||
|
|||
|
|||
{% collapsible Example Code %} {% highlight php startinline %} /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% collapsible Example Code %} {% highlight php startinline %} /** | |
Example: | |
```php?start_inline=1 | |
/** |
guides/v2.1/contributor-guide/backward-compatible-development/index.md
Outdated
Show resolved
Hide resolved
guides/v2.1/contributor-guide/backward-compatible-development/index.md
Outdated
Show resolved
Hide resolved
$transportObject = new DataObject($transport); | ||
|
||
/** | ||
* Event argument `transport` is @deprecated. Use `transportObject` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it makes sense to use backticks in the comments, they have no meaning in PhpStorm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DevDocs team plans to implement a documentation generator for PHP API Reference that supports Markdown in the nearest future.
|
||
$transportObject = new DataObject($transport); | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to move this section to the left to align with the line above?
*/ | ||
$this->eventManager->dispatch( | ||
'email_invoice_set_template_vars_before', | ||
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use underscore for parameter names this is seem to be the convention used in most places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@melnikovi please clarify what do you mean by term parameter. I didn't find this convention in our coding standards. Let me know if we should add one.
FYI Consider to use the Insert a suggestion feature on GitHub (<cmd-g>
) to commit your suggested change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array indexes (transport, transportObject). We can add it as a suggestion
…index.md Co-Authored-By: neeta-wagento <neeta@wagento.com>
…index.md Co-Authored-By: neeta-wagento <neeta@wagento.com>
|
||
$transportObject = new DataObject($transport); | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
/** |
$transportObject = new DataObject($transport); | ||
|
||
/** | ||
* Event argument `transport` is @deprecated. Use `transportObject` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Event argument `transport` is @deprecated. Use `transportObject` instead. | |
* Event argument `transport` is @deprecated. Use `transportObject` instead. |
|
||
/** | ||
* Event argument `transport` is @deprecated. Use `transportObject` instead. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | |
*/ |
*/ | ||
$this->eventManager->dispatch( | ||
'email_invoice_set_template_vars_before', | ||
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@melnikovi please clarify what do you mean by term parameter. I didn't find this convention in our coding standards. Let me know if we should add one.
FYI Consider to use the Insert a suggestion feature on GitHub (<cmd-g>
) to commit your suggested change.
/** | ||
* Event argument `transport` is @deprecated. Use `transportObject` instead. | ||
*/ | ||
$this->eventManager->dispatch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->eventManager->dispatch( | |
$this->eventManager->dispatch( |
* Event argument `transport` is @deprecated. Use `transportObject` instead. | ||
*/ | ||
$this->eventManager->dispatch( | ||
'email_invoice_set_template_vars_before', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'email_invoice_set_template_vars_before', | |
'email_invoice_set_template_vars_before', |
*/ | ||
$this->eventManager->dispatch( | ||
'email_invoice_set_template_vars_before', | ||
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] | |
['sender' => $this, 'transport' => $transportObject->getData(), 'transport_object' => $transportObject] |
$this->eventManager->dispatch( | ||
'email_invoice_set_template_vars_before', | ||
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); | |
); |
@neeta-wagento please review and apply the suggested changes |
[DATA-4181] Added role to ProductViewPrice
This PR is a:
Summary
Add example code to remove event as an event cannot be removed, add a comment near old one that it is deprecated and add one more event dispatching, with corrected name.
Additional information
List all affected URLs