Skip to content

[fix] VirtualPage#1602

Merged
ibelar merged 13 commits intodevelopfrom
fix/virtual-page
Feb 3, 2021
Merged

[fix] VirtualPage#1602
ibelar merged 13 commits intodevelopfrom
fix/virtual-page

Conversation

@ibelar
Copy link
Copy Markdown
Contributor

@ibelar ibelar commented Feb 1, 2021

Fix for #1587

The callback Callback::set() method needs to be called prior to VirtualPage::getHtml() method in order for other's callback inside VirtualPage to be execute properly.

BC Break

  • Property $fx was remove and no longer necessary because Callback::set() method is called during VirtualPage::set() and not during VirtualPage::getHtml() as before. This is to ensure that Callback::set() is always run.

    Therefore, using DI to set $fx property viaVirtualPage::addTo($app, ['fx' => function(){}])is no longer supported.

  • Virtual::Page::set() only accept \Closure instead of callable as before. You must convert your callable into Closure via \Closure::fromCallable()

Fix for #1587

Callable for VirtualPage should be called prior to VirtualPage::getHtml() in order to make sure nested callback (Lookup) can be reach.
@ibelar ibelar added the RTM label Feb 1, 2021
@ibelar ibelar requested a review from DarkSide666 February 1, 2021 21:14
@ibelar ibelar added the BC-break label Feb 2, 2021
Copy link
Copy Markdown
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ibelar ibelar merged commit 32f18d7 into develop Feb 3, 2021
@ibelar ibelar deleted the fix/virtual-page branch February 3, 2021 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants