LaravelCollective / annotations

Route and Event Annotations for the Laravel Framework
MIT License
365 stars 73 forks source link

Issues with routes when being called from within the framework #11

Closed kirkbushell closed 9 years ago

kirkbushell commented 9 years ago

If I use the framework's test methods to make a call to either a controller action or a route, I see the following error:

PHP Fatal error:  Call to a member function domain() on null in vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 440

This does not happen if I do not use annotations.

kirkbushell commented 9 years ago

Full stack trace:

PHP Stack trace: PHP 1. {main}() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/bin/behat:0 PHP 2. Symfony\Component\Console\Application->run() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/bin/behat:31 PHP 3. Behat\Testwork\Cli\Application->doRun() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/symfony/console/Symfony/Component/Console/Application.php:126 PHP 4. Symfony\Component\Console\Application->doRun() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:102 PHP 5. Symfony\Component\Console\Application->doRunCommand() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/symfony/console/Symfony/Component/Console/Application.php:195 PHP 6. Symfony\Component\Console\Command\Command->run() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/symfony/console/Symfony/Component/Console/Application.php:874 PHP 7. Behat\Testwork\Cli\Command->execute() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253 PHP 8. Behat\Testwork\Tester\Cli\ExerciseController->execute() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php:63 PHP 9. Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:108 PHP 10. Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php:146 PHP 11. Behat\Testwork\Tester\Runtime\RuntimeExercise->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingExercise.php:70 PHP 12. Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeExercise.php:71 PHP 13. Behat\Testwork\Hook\Tester\HookableSuiteTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingSuiteTester.php:72 PHP 14. Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Hook/Tester/HookableSuiteTester.php:73 PHP 15. Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeSuiteTester.php:63 PHP 16. Behat\Behat\Hook\Tester\HookableFeatureTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingFeatureTester.php:71 PHP 17. Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php:72 PHP 18. Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeFeatureTester.php:83 PHP 19. Behat\Behat\Hook\Tester\HookableScenarioTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingScenarioTester.php:103 PHP 20. Behat\Behat\Tester\Runtime\RuntimeScenarioTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableScenarioTester.php:74 PHP 21. Behat\Behat\Tester\StepContainerTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeScenarioTester.php:76 PHP 22. Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php:59 PHP 23. Behat\Behat\Hook\Tester\HookableStepTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingStepTester.php:73 PHP 24. Behat\Behat\Tester\Runtime\RuntimeStepTester->test() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableStepTester.php:74 PHP 25. Behat\Behat\Tester\Runtime\RuntimeStepTester->testDefinition() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php:73 PHP 26. Behat\Testwork\Call\CallCenter->makeCall() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php:125 PHP 27. Behat\Testwork\Call\CallCenter->handleCall() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php:80 PHP 28. Behat\Testwork\Call\Handler\RuntimeCallHandler->handleCall() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php:125 PHP 29. Behat\Testwork\Call\Handler\RuntimeCallHandler->executeCall() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:54 PHP 30. call_user_func_array:{/Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:99}() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:99 PHP 31. FeatureContext->iAmNotCurrentlyLoggedIn() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php:99 PHP 32. FeatureContext->action() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/features/bootstrap/FeatureContext.php:73 PHP 33. Illuminate\Routing\UrlGenerator->action() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/features/bootstrap/FeatureContext.php:44 PHP 34. Illuminate\Routing\UrlGenerator->toRoute() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:533 PHP 35. Illuminate\Routing\UrlGenerator->getRouteDomain() /Users/kirkbushell/Documents/Development/Tectonic/AwardForce/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:267

IonutBajescu commented 9 years ago

Hmm, can you please provide also the code which throwed this error? This happened to me in the past when I misspelled the controller names.