Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Serializer #3

Closed
wants to merge 5 commits into from
Closed

Serializer #3

wants to merge 5 commits into from

Conversation

marc-mabe
Copy link
Member

  • PHPSerialize -> PhpSerialize
  • fixed wrong namespace on serializer adapter loader
  • tests check exception on missing php extension

all tests of Zend/Serializer passed

@weierophinney
Copy link
Member

Merged into zf2 master -- thanks!

ezimuel referenced this pull request in ezimuel/zf2 Dec 14, 2011
ezimuel referenced this pull request in ezimuel/zf2 Mar 2, 2012
- Tested Zend\Db\ResultSet\ResultSet, and fixed several logic errors, as
  well as completed implementation
ezimuel added a commit that referenced this pull request May 18, 2012
padraic added a commit that referenced this pull request Jul 5, 2012
Feature: Use new escape view helpers in Zend\Form\View\Helper
@diemuzi diemuzi mentioned this pull request Jun 26, 2013
ezimuel added a commit to zendframework/zend-math that referenced this pull request May 15, 2015
ezimuel added a commit to zendframework/zend-crypt that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
isisis added a commit to isisis/zf2 that referenced this pull request May 28, 2015
I think it's a common use case for the default navigation, to add pages and sub pages across many modules.
There's currently an issue when adding sub pages to another page that you expect to be in configuration already.
The main page could be changed to another name, could be removed or the module could be disabled inside an application architecture that uses ZF2 modules like plug-ins.

What happens in this case?

-------------------------------------------------------------
Fatal error: Uncaught exception 'Zend\Navigation\Exception\InvalidArgumentException' with message 'Invalid argument: Unable to determine class to instantiate' in /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Page/AbstractPage.php:254 Stack trace: #0 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php(114): Zend\Navigation\Page\AbstractPage::factory(Array) zendframework#1 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php(165): Zend\Navigation\AbstractContainer->addPage(Array) zendframework#2 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Navigation.php(35): Zend\Navigation\AbstractContainer->addPages(Array) zendframework#3 /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/Navigation/Service/AbstractNavigationFactory.php(38): Zend\Navigation\Navigation->__construct(Array) zendframework#4 [internal function]: Zend\Navigation\Service\AbstractNavigationFactory->createService(Obj in /var/www/html/ebonikerp/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 946
-------------------------------------------------------------

This fix solves the problem, by ignoring a main page, when it's missing uri or mvc values, and could be used as quick fix.

For future I would like to see a validation for the pages configs, before they're being injected to navigation.
Another approach could be to add a separate "navigation-extension" configuration beside the "navigation" configuration. The "navigation-extension" configuration could be used to extend the navigation safely. The NavigationFactory would then use only the configuration parts that already have a valid existing navigation entry inside "navigation" key.
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants