codeliner / php-ddd-cargo-sample

PHP 7 Version of the cargo sample used in Eric Evans DDD book
http://codeliner.github.io/php-ddd-cargo-sample/
BSD 3-Clause "New" or "Revised" License
796 stars 151 forks source link

http://0.0.0.0:8080/#booking booking page error #25

Closed joostshao closed 8 years ago

joostshao commented 8 years ago
[Fri Jan 15 10:36:57 2016] 127.0.0.1:50046 [200]: /api/cargos - Uncaught Error: Call to undefined method Psr7Middlewares\Middleware\Payload::associative() in /home/ubt/php-ddd-cargo-sample-master/CargoBackend/src/Container/Application/Action/PayloadParserFactory.php:21
Stack trace:
#0 /home/ubt/php-ddd-cargo-sample-master/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(693): Codeliner\CargoBackend\Container\Application\Action\PayloadParserFactory->__invoke(Object(Zend\ServiceManager\ServiceManager), 'Psr7Middlewares...', NULL)
#1 /home/ubt/php-ddd-cargo-sample-master/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(187): Zend\ServiceManager\ServiceManager->doCreate('Psr7Middlewares...')
#2 /home/ubt/php-ddd-cargo-sample-master/vendor/zendframework/zend-expressive/src/Application.php(581): Zend\ServiceManager\ServiceManager->get('Psr7Middlewares...')
#3 [internal function]: Zend\Expressive\Application->Zend\Expressive\{closure}(Object(Zend\Stratigility\Http\Request), Object(Zend\Stratigility\Http\Response), Object(Zend\Stratigility\Next))
#4  in /home/ubt/php-ddd-cargo-sample-master/CargoBackend/src/Container/Application/Action/PayloadParserFactory.php on line 21
codeliner commented 8 years ago

Did you run composer update or composer install like mentioned in the installation docs? Seems like https://github.com/oscarotero/psr7-middlewares does not follow semver.org. However, the cargo sample ships with a composer.lock file. If you run composer install composer will install the exact versions listed in composer.lock. Can you try it? I try to update the cargo sample at the weekend to work with the latest version of psr-7-middlewares or remove the dependency.

codeliner commented 8 years ago

I reopen due to failing travis-ci build. PayloadParserFactory needs to be updated to work with latest changes of https://github.com/oscarotero/psr7-middlewares

codeliner commented 8 years ago

build is green again. closing now.