Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zend\View\Helper\FlashMessenger isn't compatible with Expressive #8

Closed
weierophinney opened this issue Dec 31, 2019 · 7 comments · Fixed by #135
Closed

Zend\View\Helper\FlashMessenger isn't compatible with Expressive #8

weierophinney opened this issue Dec 31, 2019 · 7 comments · Fixed by #135

Comments

@weierophinney
Copy link
Member

In our project, we use Zend\Expressive as core and Zend\View as template engine. And we come across with an issue that FlashMessenger only works with Zend\Mvc\Controller\Plugin\FlashMessenger or Zend\Mvc\Plugin\FlashMessenger\FlashMessenger. None of them is available in Expressive and add dependencies on Zend\Mvc isn't a good idea.

There are different Flash implementations and will be great that Zend\View\Helper\FlashMessenger depend on some FlashInterface instead of Zend\Mvc\Plugin\FlashMessenger\FlashMessenger. This feature will allow integrating Zend\View\Helper\FlashMessenger with many Flash Messanger libraries.

I've written a module for this but for now FlashInterface is dirty and require improvement.


Originally posted by @popovserhii at zendframework/zend-view#151

@weierophinney
Copy link
Member Author

@weierophinney
Copy link
Member Author

@webimpress Yes, but this module isn't working correctly.
The problem is not in zend-expressive-flash but in zend-expressive-session-ext.

Аfter composer require zendframework/zend-expressive-flash and modifying config/pipeline.php, authorization to my admin stops working. I was trying to understand but everything is very confusing. That why I've created a custom module.

But even if zend-expressive-flash will work I will not be able to use a flashMessanger helper which helps renders html markup.


Originally posted by @popovserhii at zendframework/zend-view#151 (comment)

@weierophinney
Copy link
Member Author

the zend-expressive-flash should work, I created a blog post about it some time ago https://samsonasik.wordpress.com/2018/02/11/using-view-helper-for-accessing-zend-expressive-flash-messages-in-expressive-3/


Originally posted by @samsonasik at zendframework/zend-view#151 (comment)

@samsonasik
Copy link
Member

There is mezzio-flash for that https://github.com/mezzio/mezzio-flash . You can create a view helper to retrieve it. I'm closing it.

@froschdesign
Copy link
Member

froschdesign commented Jul 16, 2020

@samsonasik

You can create a view helper to retrieve it.

I think you missed the reason of this feature request: the view helper should come from the framework. It is very annoying that I have to create it myself in every application.

I'm closing it.

Please do not close issue reports if there are added to active projects. Thanks!

@froschdesign froschdesign reopened this Jul 16, 2020
@samsonasik
Copy link
Member

@froschdesign ah, ok, just see the label, thank you ;)

@froschdesign
Copy link
Member

froschdesign commented Jul 16, 2020

@samsonasik
No problem, here are so many labels and other linked objects. 😃

There is a good chance that the helper is not added to this component but the basic problem must be tracked and solved. The same problem affects the Identity helper because the helper also does not work in a Mezzio application and there is no alternative helper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants