zendframework / zend-expressive

PSR-15 middleware in minutes!
BSD 3-Clause "New" or "Revised" License
711 stars 197 forks source link

[Cookbook] Zend\Form view helpers #335

Closed RalfEggert closed 7 years ago

RalfEggert commented 8 years ago

Since the Zend\Form\View\HelperConfig is deprecated with release 2.8.0 of Zend\Form, how could this recipe be updated? I guess the new Config-Provider should be used, but how?

https://zendframework.github.io/zend-expressive/cookbook/using-zend-form-view-helpers/

weierophinney commented 8 years ago

@RalfEggert for the 1.1 release of the skeleton, we'll be baking in the expressive-config-manager (likely as zend-config-manager or similar), and zend-component-installer. Once that's done, the recipe becomes "install zendframework/zend-form", and it's taken care of.

Until then, we can recommend creating a file config/autoload/zend-form.global.php with the contents:

<?php
use Zend\Form\ConfigProvider;

$provider = new ConfigProvider();
return $provider();

and that will essentially do everything needed.