On 12/11/2011 13:52, Jurian Sluiman wrote:
On Saturday 12 November 2011 13:30:46 Dennis Winter wrote:
I assume that this error occurs in the getConfig() method of your
Module.php file. The solution is: return new
Zend\Config\Config(include(__DIR__.'/configs/module.config.php'));
I recently stumbled upon this one.. So maybe Rob should fix this in his
tutorial!
On 2 november the zf2 library changed to return arrays and Traversable
instances as well. You do not need to return a Zend\Config\Config anymore, but
arrays (as the ZendSkeletonApplication uses) are also fine now.
This rather means the library included in the app is outdated and should be
updated to the latest version. If you have a cloned ZendSkeletonApplication
running with zf2 as submodule, just do this:
cd library/ZendFramework&& git pull origin master
This will make your modules work again. This was the commit with the change:
https://github.com/zendframework/zf2/commit/837e347bd432561f05ae7142c5142591950ab1f0#library/Zend/Module/Manager.php
Worked, thanks -- set up a separate Git repo to keep on track with ZF
2.0 development. Then came across the following after an exception
thrown in the tutorial.
Zend\Mvc\Router\Http\TreeRouteStack.php
public function assemble(array $params = array(), array $options =
array()) <<<<<< $options as array
{
if (!isset($options['name'])) {
throw new Exception\InvalidArgumentException('Missing
"name" option');
}
$names = explode('/', $options['name'], 2); <<<<<<
$options['name'] arrives as an array instead of text, from the view
(index.phtml) code...
echo $this->url(array('controller'=>'album', 'action'=>'add'),
array('name' => 'default'));
Can supply more if needed.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]