laravel artisan route:list causes FatalErrorException - php

I'm having a bit of a problem with Laravel's artisan commands and more specifically with artisan route:list. When I execute this command, the result is the following :
PHP Fatal error: Maximum function nesting level of '256' reached, aborting! in /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 950
PHP Stack trace:
PHP 1. {main}() /Users/sa7bi/Code/smartly/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /Users/sa7bi/Code/smartly/artisan:35
PHP 3. Symfony\Component\Console\Application->run() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:123
PHP 4. Symfony\Component\Console\Application->doRun() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:120
PHP 5. Symfony\Component\Console\Application->doRunCommand() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:189
PHP 6. Illuminate\Console\Command->run() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:826
PHP 7. Symfony\Component\Console\Command\Command->run() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
PHP 8. Illuminate\Console\Command->execute() /Users/sa7bi/Code/smartly/vendor/symfony/console/Command/Command.php:262
PHP 9. Illuminate\Container\Container->call() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
PHP 10. Illuminate\Container\BoundMethod::call() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/Container.php:524
PHP 11. Illuminate\Container\BoundMethod::callBoundMethod() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:30
PHP 12. value() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:86
PHP 13. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/helpers.php:912
PHP 14. call_user_func_array:{/Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28
PHP 15. Illuminate\Foundation\Console\RouteListCommand->fire() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28
PHP 16. Illuminate\Foundation\Console\RouteListCommand->getRoutes() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:75
PHP 17. Illuminate\Support\Collection->map() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:87
PHP 18. array_map() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/Collection.php:636
PHP 19. Illuminate\Foundation\Console\RouteListCommand->Illuminate\Foundation\Console\{closure}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/Collection.php:636
PHP 20. Illuminate\Foundation\Console\RouteListCommand->getRouteInformation() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:86
PHP 21. Illuminate\Foundation\Console\RouteListCommand->getMiddleware() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:114
I've tried bumping up the number of nested level with xdebug.max_nesting_level but without success.
The link to my repo is here if anyone is intested.

This might help: https://stackoverflow.com/a/30839127/4617687
Apparently changing this value at runtime also helps.

Related

Laravel: Call to a member function make() on null

For complicated reasons, I'm trying to get a Laravel project running that I did not develop. I'm using a Vagrant/Homestead combination (Host Windows 10, VM Homestead v2.1.8 (Ubuntu 18.04.1) with Laravel 5.0.35, PHP 5.6 - that's what it was created in) and after putting the project there and running composer install, I just tried to have a look at the routes via
php artisan route:list
which gave me the error
PHP Fatal error: Call to a member function make() on null in /home/vagrant/code/newbackend/vendor/compiled.php on line 4823
PHP Stack trace:
PHP 1. {main}() /home/vagrant/code/newbackend/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/code/newbackend/artisan:36
PHP 3. Symfony\Component\Console\Application->run() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:94
PHP 4. Symfony\Component\Console\Application->doRun() /home/vagrant/code/newbackend/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP 5. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/code/newbackend/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP 6. Illuminate\Console\Command->run() /home/vagrant/code/newbackend/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP 7. Symfony\Component\Console\Command\Command->run() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Console/Command.php:101
PHP 8. Illuminate\Console\Command->execute() /home/vagrant/code/newbackend/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP 9. Illuminate\Container\Container->call() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Console/Command.php:115
PHP 10. call_user_func_array:{/home/vagrant/code/newbackend/vendor/compiled.php:964}() /home/vagrant/code/newbackend/vendor/compiled.php:964
PHP 11. Illuminate\Foundation\Console\RouteListCommand->fire() /home/vagrant/code/newbackend/vendor/compiled.php:964
PHP 12. Illuminate\Foundation\Console\RouteListCommand->getRoutes() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:75
PHP 13. Illuminate\Foundation\Console\RouteListCommand->getRouteInformation() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:89
PHP 14. Illuminate\Foundation\Console\RouteListCommand->getMiddleware() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:109
PHP 15. Illuminate\Foundation\Console\RouteListCommand->getControllerMiddleware() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:142
PHP 16. Illuminate\Foundation\Application->make() /home/vagrant/code/newbackend/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:161
PHP 17. Illuminate\Container\Container->make() /home/vagrant/code/newbackend/vendor/compiled.php:1543
PHP 18. Illuminate\Container\Container->build() /home/vagrant/code/newbackend/vendor/compiled.php:1019
PHP 19. Illuminate\Container\Container->getDependencies() /home/vagrant/code/newbackend/vendor/compiled.php:1081
PHP 20. Illuminate\Container\Container->resolveClass() /home/vagrant/code/newbackend/vendor/compiled.php:1095
PHP 21. Illuminate\Foundation\Application->make() /home/vagrant/code/newbackend/vendor/compiled.php:1111
PHP 22. Illuminate\Container\Container->make() /home/vagrant/code/newbackend/vendor/compiled.php:1543
PHP 23. Illuminate\Container\Container->fireResolvingCallbacks() /home/vagrant/code/newbackend/vendor/compiled.php:1029
PHP 24. Illuminate\Container\Container->fireCallbackArray() /home/vagrant/code/newbackend/vendor/compiled.php:1180
PHP 25. Illuminate\Validation\ValidationServiceProvider->Illuminate\Validation\{closure}() /home/vagrant/code/newbackend/vendor/compiled.php:1195
PHP 26. Illuminate\Foundation\Http\FormRequest->validate() /home/vagrant/code/newbackend/vendor/compiled.php:4699
PHP 27. Illuminate\Foundation\Http\FormRequest->getValidatorInstance() /home/vagrant/code/newbackend/vendor/compiled.php:4772
The error leads me to
$factory = $this->container->make('Illuminate\\Validation\\Factory');
in class FormRequest (extends Request implements ValidatesWhenResolved) on line 4823 in vendor/compiled.php - but that's not telling me much.
As I'm new to Php/laravel and don't quite have a handle on the intricacies of this project, my googling efforts left me more confused than ever. Does anyone have at least a starting point for me on how to resolve this?

Custom php functions in Laravel Queues

I am using Laravel Queues with beanstalkd. I have following code:
$user_id = Auth::user()->id;
Queue::push(function($job)
{
solve_simplex();
$job->delete();
});
where solve_simplex() is my custom function in php added as extension.
The job is queued all right but when I want to run php artisan queue:work it ends up with:
php artisan queue:work
PHP Fatal error: Call to undefined function solve_simplex() in /var/www/my_site/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(99) : eval()'d code on line 2
PHP Stack trace:
PHP 1. {main}() /var/www/my_site/artisan:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/my_site/artisan:59
PHP 3. Symfony\Component\Console\Application->doRun() /var/www/my_site/vendor/symfony/console/Symfony/Component/Console/Application.php:121
PHP 4. Symfony\Component\Console\Application->doRunCommand() /var/www/my_site/vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP 5. Illuminate\Console\Command->run() /var/www/my_site/vendor/symfony/console/Symfony/Component/Console/Application.php:887
PHP 6. Symfony\Component\Console\Command\Command->run() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Console/Command.php:96
PHP 7. Illuminate\Console\Command->execute() /var/www/my_site/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
PHP 8. Illuminate\Queue\Console\WorkCommand->fire() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Console/Command.php:108
PHP 9. Illuminate\Queue\Worker->pop() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php:64
PHP 10. Illuminate\Queue\Worker->process() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:71
PHP 11. Illuminate\Queue\Jobs\BeanstalkdJob->fire() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:119
PHP 12. Illuminate\Queue\Jobs\Job->resolveAndFire() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php:50
PHP 13. IlluminateQueueClosure->fire() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php:96
PHP 14. Jeremeamia\SuperClosure\SerializableClosure->__invoke() /var/www/my_site/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php:16
PHP 15. ReflectionFunction->invokeArgs() /var/www/my_site/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php:64
PHP 16. Jeremeamia\SuperClosure\SerializableClosure::{closure:/var/www/my_site/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(99) : eval()'d code:1-4}() / var/www/my_site/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php:64
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Call to undefined function solve_simplex()","file":"\/var\/www\/my_site\/vendor\/jeremeamia\/ SuperClosure\/src\/Jeremeamia\/SuperClosure\/SerializableClosure.php(99) : eval()'d code","line":2}}
UPDATE
it looks like my extension is not loaded. But it does not load only in that closure. If I run the function solve_simpex() in normal laravel code (eg in controller then it works and extension is loaded....
I found a solution. The problem is that superclosure is invoked throught command:
php artisan queue:work
it is invoked through CLI and idk why it does not load extension.
Solution is run artisan with -d parameter:
php -dextension=solveSimplex.so artisan queue:work
So I had to tell php CLI to load that extension...

Tracing a PHPUnit Error

I'm having issues finding the source of an error I'm receiving in PHPUnit. If I run phpunit with no filter I will receive the "bytes exhausted" error.
however if I run my tests one at a time with phpunit --filter test_name - all of my test will pass.
The stack trace posted below indicates a problem with one of my tests called KInit however if run that test by itself everything passes.
I have also tried to move the test out of the directory but the error will simply point to the next test that is run. I have also tried running with sudo which did not work any better.
How can I get more information on whats happening here?
I'm running PHPUint to test a laravel 4.2 app.
versions of stuff
PHPUnit 4.1.4
PHP 5.5.18
Ubuntu 12.04 64-bit
The stack trace below says the error is in:
laravel/framework/src/Illuminate/Filesystem/Filesystem.php
however sometimes it reads
/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
Full stack trace:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 15886 bytes) in /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 31
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:586
PHP 3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:132
PHP 4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:179
PHP 5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:426
PHP 6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:675
PHP 7. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:675
PHP 8. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:675
PHP 9. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:758
PHP 10. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:686
PHP 11. KInitTest->setUp() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:818
PHP 12. TestCase->setUp() /opt/pplus/laravel/app/tests/unit/classes/KInit/KInitTest.php:16
PHP 13. Illuminate\Foundation\Testing\TestCase->setUp() /opt/pplus/laravel/app/tests/TestCase.php:35
PHP 14. Illuminate\Foundation\Testing\TestCase->refreshApplication() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:31
PHP 15. TestCase->createApplication() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:42
PHP 16. require() /opt/pplus/laravel/app/tests/TestCase.php:17
PHP 17. require() /opt/pplus/laravel/bootstrap/start.php:60
PHP 18. Illuminate\Foundation\ProviderRepository->load() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Foundation/start.php:210
PHP 19. Illuminate\Foundation\ProviderRepository->loadManifest() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:51
PHP 20. Illuminate\Filesystem\Filesystem->get() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:187
PHP 21. file_get_contents() /opt/pplus/laravel/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:31
I found the answer. I had to increase the memory_limit in /etc/php5/cli/php.ini. I always forget the phpunit uses a different ini file than apache.

Mockery and Laravel testing: Call to a member function __call() on a non-object

i am trying to run tests in laravel generated with https://github.com/JeffreyWay/Laravel-4-Generators
My testcase file is like this: http://pastebin.com/U9zfmyM6
The controller file: http://pastebin.com/aiYZa6dA
The controller generated test file is like this: http://pastebin.com/nh9Bv9ht
I run phpunit with vendor/bin/phpunit and i get this:
tom#debian:~/public_html/madserver-laravel$ vendor/bin/phpunit
PHPUnit 3.7.29 by Sebastian Bergmann.
Configuration read from /home/tom/public_html/madserver-laravel/phpunit.xml
...PHP Fatal error: Call to a member function __call() on a non-object in /home/tom/public_html/madserver-laravel/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php(16) : eval()'d code on line 350
PHP Stack trace:
PHP 1. {main}() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/composer/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/composer/bin/phpunit:63
PHP 3. PHPUnit_TextUI_Command->run() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:176
PHP 5. PHPUnit_Framework_TestSuite->run() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349
PHP 6. PHPUnit_Framework_TestSuite->run() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705
PHP 7. PHPUnit_Framework_TestSuite->runTest() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745
PHP 8. PHPUnit_Framework_TestCase->run() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775
PHP 9. PHPUnit_Framework_TestResult->run() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783
PHP 10. PHPUnit_Framework_TestCase->runBare() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648
PHP 11. PHPUnit_Framework_TestCase->runTest() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:838
PHP 12. ReflectionMethod->invokeArgs() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983
PHP 13. BannersTest->testStore() /home/tom/public_html/madserver-laravel/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983
PHP 14. Illuminate\Foundation\Testing\TestCase->call() /home/tom/public_html/madserver-laravel/app/tests/controllers/BannersTest.php:47
PHP 15. call_user_func_array() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:74
PHP 16. Symfony\Component\BrowserKit\Client->request() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:74
PHP 17. Symfony\Component\HttpKernel\Client->doRequest() /home/tom/public_html/madserver-laravel/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php:319
PHP 18. Illuminate\Foundation\Application->handle() /home/tom/public_html/madserver-laravel/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php:81
PHP 19. Illuminate\Foundation\Application->dispatch() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:691
PHP 20. Illuminate\Routing\Router->dispatch() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:716
PHP 21. Illuminate\Routing\Router->dispatchToRoute() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:939
PHP 22. Illuminate\Routing\Route->run() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:969
PHP 23. call_user_func_array() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:105
PHP 24. Illuminate\Routing\Router->Illuminate\Routing\{closure}() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:105
PHP 25. Illuminate\Routing\ControllerDispatcher->dispatch() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:905
PHP 26. Illuminate\Routing\ControllerDispatcher->call() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:62
PHP 27. Illuminate\Routing\Controller->callAction() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:93
PHP 28. call_user_func_array() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:194
PHP 29. BannersController->store() /home/tom/public_html/madserver-laravel/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:194
PHP 30. Mockery_0_Banner::create() /home/tom/public_html/madserver-laravel/app/controllers/BannersController.php:65
PHP 31. Mockery_0_Banner::__callStatic() /home/tom/public_html/madserver-laravel/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php(16) : eval()'d code:946
tom#debian:~/public_html/madserver-laravel$
I have been serching so much and tested a lot of things to get this to work, but same result :(
What am I doing wrong?
Thanks in advance!
For me this was resolved by moving
$this->mock = m::mock('Eloquent', 'Models\Broadcasts\Voice\VoiceBroadcast')->shouldDeferMissing();
$this->collection = m::mock('Illuminate\Database\Eloquent\Collection')->shouldDeferMissing();
from __construct() to setUp()
I was having this same problem. I got the test to pass by changing $this->mock = m::mock('Eloquent', 'Banner'); to $this->mock = m::mock('Banner');.
I'm not sure the issue or what I'm missing out on by taking out the Eloquent param, though.

Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression()

I updated my vendors on symfony2, and after I began to got this error, I have no idea why it appears
uan#juan-VirtualBox:/var/www/msw-web$ php app/console doctrine:migrations:diff
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /var/www/msw-web/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85
PHP Stack trace:
PHP 1. {main}() /var/www/msw-web/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/msw-web/app/console:22
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:118
PHP 4. Symfony\Component\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75
PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:194
PHP 6. Symfony\Bundle\DoctrineMigrationsBundle\Command\MigrationsDiffDoctrineCommand->execute() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:224
PHP 7. Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand->execute() /var/www/msw-web/vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle/Command/MigrationsDiffDoctrineCommand.php:46
Fatal error: Call to undefined method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression() in /var/www/msw-web/vendor/doctrine-migrations/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php on line 85
Call Stack:
0.0003 328524 1. {main}() /var/www/msw-web/app/console:0
0.0210 1930264 2. Symfony\Component\Console\Application->run() /var/www/msw-web/app/console:22
0.0289 2110852 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:118
0.1349 7697284 4. Symfony\Component\Console\Application->doRun() /var/www/msw-web/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75
0.1422 7697284 5. Symfony\Component\Console\Command\Command->run() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Application.php:194
0.1432 7697828 6. Symfony\Bundle\DoctrineMigrationsBundle\Command\MigrationsDiffDoctrineCommand->execute() /var/www/msw-web/vendor/symfony/src/Symfony/Component/Console/Command/Command.php:224
0.1767 11022484 7. Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand->execute() /var/www/msw-web/vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle/Command/MigrationsDiffDoctrineCommand.php:46
juan#juan-VirtualBox:/var/www/msw-web$
I am not sure if the problem came from Doctrine.
I tryed to update doctrine dbal, I used on mi file deps
doctrine-common
git=http://github.com/doctrine/common.git
version=2.2.1
doctrine-dbal
git=http://github.com/doctrine/dbal.git
version=2.2.1
doctrine
git=http://github.com/doctrine/doctrine2.git
version=2.2.1
But I get the same error because when I reinstall vendor it download the version 2.1.X
What can I do?
Regards.
set commit version value in deps file
[doctrine-migrations]
git=http://github.com/doctrine/migrations.git
version=b86b4cc0a39714f0aa53b908d495beacfa0e4011
You should check which version of Doctrine/DBAL do you have. Probably you have incompatibile versions of DoctrineMigrations and DoctrineDBAL.
Method 'getFilterSchemaAssetsExpression` was added in 2.2 IIRC.
See that commit

Categories