I am trying to execute PHPUNIT command but it give me error.
I am using Laravel and Laragon virtual host.
Cannot load Xdebug - it was already loaded
Warning: is_dir() expects parameter 1 to be a valid path, object given in C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Ru nner\BaseTestRunner.php on line 56
Call Stack:
0.0007 353808 1. {main}() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:0
0.0146 728568 2. PHPUnit\TextUI\Command::main() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:53
0.0146 733128 3. PHPUnit\TextUI\Command->run() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php: 148
0.1731 4128288 4. PHPUnit\TextUI\TestRunner->getTest() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Comma nd.php:169
0.1731 4128288 5. is_dir() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Runner\BaseTestRunner.php:56
Catchable fatal error: Object of class PHPUnit\Framework\TestSuite could not be converted to string in C:\Users\chavoshi\AppData\Roaming\Composer\ vendor\phpunit\phpunit\src\Runner\StandardTestSuiteLoader.php on line 32
Call Stack:
0.0007 353808 1. {main}() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:0
0.0146 728568 2. PHPUnit\TextUI\Command::main() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\phpunit:53
0.0146 733128 3. PHPUnit\TextUI\Command->run() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Command.php: 148
0.1731 4128288 4. PHPUnit\TextUI\TestRunner->getTest() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\TextUI\Comma nd.php:169
0.2650 4128824 5. PHPUnit\TextUI\TestRunner->loadSuiteClass() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Runne r\BaseTestRunner.php:71
0.2690 4143096 6. PHPUnit\Runner\StandardTestSuiteLoader->load() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Ru nner\BaseTestRunner.php:130
0.2690 4143144 7. str_replace() C:\Users\chavoshi\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Runner\StandardTestSuiteLoader.php: 32
can anybody help me?
I execute this line of command and solve my problem?
vendor\bin\phpunit tests\UserTest
Related
i had to change my installation of achievo to a new server
and now ia have a 500 error
I have tried everything chown, chmod ... and nothing work in same server i have glpi and joomla working at 100% but achievo no. Can someone help? Thanks
Warning: require_once(/volume1/web/achievo-145/config.inc.php): failed to open stream: Permission denied in /volume1/web/achievo-145/atk/include/configs.inc on line 28
Call Stack: 0.0004 133864
1. {main}() /volume1/web/achievo-145/index.php:0 0.0005 134240
2. include_once('/volume1/web/achievo-145/atk.inc') /volume1/web/achievo-145/index.php:7 0.0006 134512
3. include_once('/volume1/web/achievo-145/atk/include/initial.inc') /volume1/web/achievo-145/atk.inc:15 0.0007 134768
4. require_once('/volume1/web/achievo-145/atk/include/basics.inc') /volume1/web/achievo-145/atk/include/initial.inc:19 0.0011 136448
5. require_once('/volume1/web/achievo-145/atk/include/configs.inc') /volume1/web/achievo-145/atk/include/basics.inc:22
Fatal error: require_once(): Failed opening required './config.inc.php' (include_path='.') in /volume1/web/achievo-145/atk/include/configs.inc on line 28
Call Stack: 0.0004 133864
1. {main}() /volume1/web/achievo-145/index.php:0 0.0005 134240
2. include_once('/volume1/web/achievo-145/atk.inc') /volume1/web/achievo-145/index.php:7 0.0006 134512
3. include_once('/volume1/web/achievo-145/atk/include/initial.inc') /volume1/web/achievo-145/atk.inc:15 0.0007 134768
4. require_once('/volume1/web/achievo-145/atk/include/basics.inc') /volume1/web/achievo-145/atk/include/initial.inc:19 0.0011 136448
5. require_once('/volume1/web/achievo-145/atk/include/configs.inc') /volume1/web/achievo-145/atk/include/basics.inc:22
first question resolved
i was using mariadb10 ...
intalling mariadb5 the access to login form was restored
but now have another error ..halted
Critical: Unknown error: 2002 (Connection refused).
Halted
error: [+1.31942s / 0.00221s] Unknown error: 2002 (Connection refused)
Halted...
Does anyone could help with this ?
Thanks
I tried updating my code and structure to Symfony 3.0. Doing the usual composer update, I've got this error when composer execute post-update-cmd :
Fatal error: Class 'AppKernel' not found in C:\wamp\www\tharmofos\bin\console on line 20
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
Fatal error: require_once(): Failed opening required 'C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functiona
l/../../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\
Functional\AppKernel.php on line 5
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
0.0249 1144472 2. Symfony\Component\Debug\ErrorHandler::handleFatalError() C:\wamp\www\tharmofos\vendor\symfony\sym
fony\src\Symfony\Component\Debug\ErrorHandler.php:0
0.0263 1162640 3. Symfony\Component\Debug\ErrorHandler->handleException() C:\wamp\www\tharmofos\vendor\symfony\symf
ony\src\Symfony\Component\Debug\ErrorHandler.php:600
0.0292 1260456 4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() C:\wamp\w
ww\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php:530
0.0292 1262144 5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates() C:
\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:
62
2.5849 1595232 6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath() C:\wa
mp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:118
2.6446 1600616 7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass() C:
\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler.php:
143
2.6453 1642120 8. require_once('C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functional\AppKernel.p
hp') C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandl
er.php:188
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated wit
h an exception
[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command:
Fatal error: Class 'AppKernel' not found in C:\wamp\www\tharmofos\bin\console on line 20
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
Fatal error: require_once(): Failed opening required 'C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Func
tional/../../vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp\www\tharmofos\vendor\jms\security-extra-bun
dle\Tests\Functional\AppKernel.php on line 5
Call Stack:
0.0002 235192 1. {main}() C:\wamp\www\tharmofos\bin\console:0
0.0249 1144472 2. Symfony\Component\Debug\ErrorHandler::handleFatalError() C:\wamp\www\tharmofos\vendor\symfon
y\symfony\src\Symfony\Component\Debug\ErrorHandler.php:0
0.0263 1162640 3. Symfony\Component\Debug\ErrorHandler->handleException() C:\wamp\www\tharmofos\vendor\symfony
\symfony\src\Symfony\Component\Debug\ErrorHandler.php:600
0.0292 1260456 4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() C:\w
amp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php:530
0.0292 1262144 5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates
() C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHa
ndler.php:62
2.5849 1595232 6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath()
C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandl
er.php:118
2.6446 1600616 7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass
() C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHa
ndler.php:143
2.6453 1642120 8. require_once('C:\wamp\www\tharmofos\vendor\jms\security-extra-bundle\Tests\Functional\AppKer
nel.php') C:\wamp\www\tharmofos\vendor\symfony\symfony\src\Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatal
ErrorHandler.php:188
As of now, I tried to delete the vendor folder and did a composer install but I keep getting this error.
When I try accessing my website, I get this error :
Fatal error: Class 'Symfony\Bundle\FrameworkBundle\FrameworkBundle' not found in C:\wamp\www\tharmofos\app\AppKernel.php on line 11
I think it's a problem with the structure update.
Do you have any clue ?
I found out how to get rid of this error by autoloading AppKernel.php in composer.json : https://github.com/symfony/symfony-standard/issues/868
If it can help, I often forget to upgrade a Symfony Standard file (like app/console, web/app.php, web/app_dev.php, app/config/routing_dev.yml...) when upgrading a project to 3.0.
It leads to this error.
I'm currently reading the "Easy PHP Websites with the Zend Framework". At some point, it introduces Doctrine and gives a src code along with an text on how to install stuff properly.
I've followed all the steps correctly, but in one you have to use a "seed.php" which reads some ASINs and loads some amazon product details into the databass.
However, executing the script gives me errors, and it seems like it can't locate a file.
PHP Warning: include_once(WJG\Controller\Action\Helper\Initializer.php): failed to
open stream: No such file or directory in
C:\Programming\zend\library\Zend\L oader.php on line 134 PHP Stack
trace: PHP
1. {main}() C:\wamp\www\webclass\application\scripts\seed.php:0 PHP
2. include() C:\wamp\www\webclass\application\scripts\seed.php:9 PHP
3. Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20
4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() C:\Programmin g\zend\library\Zend\Application.php:355 PHP
5. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap()
C:\Programmi
ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586
PHP
6.Zend_Application_Bootstrap_BootstrapAbstract->_executeResource()
C:\Pro
gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622
PHP
7. Bootstrap->_initGlobalVars() C:\Programming\zend\library\Zend\Applicati
on\Bootstrap\BootstrapAbstract.php:669 PHP
8.Zend_Loader_Autoloader::autoload()
C:\Programming\zend\library\Zend\App
lication\Bootstrap\BootstrapAbstract.php:0 PHP
9. call_user_func() C:\Programming\zend\library\Zend\Loader\Autoloader.php :124 PHP
10.Zend_Loader_Autoloader->_autoload()
C:\Programming\zend\library\Zend\Lo ader\Autoloader.php:124 PHP
11. call_user_func()
C:\Programming\zend\library\Zend\Loader\Autoloader.php :479 PHP
12. Zend_Loader::loadClass()
C:\Programming\zend\library\Zend\Loader\Autolo ader.php:479 PHP
13. Zend_Loader::loadFile() C:\Programming\zend\library\Zend\Loader.php:82
Warning: include_once(WJG\Controller\Action\Helper\Initializer.php):
failed to o pen stream: No such file or directory in
C:\Programming\zend\library\Zend\Loader .php on line 134
Call Stack:
0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0
0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam
p\www\webclass\application\scripts\seed.php:9
0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20
0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap()
C:\Programming\zend\library\Zend\Application.php:355
0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p
hp:586
0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst
ract.php:622
0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr
ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669
0.0190 3236432 8. Zend_Loader_Autoloader::autoload() C:\Programming\zen
d\library\Zend\Application\Bootstrap\BootstrapAbstract.php:0
0.0191 3236768 9. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:124
0.0191 3236800 10. Zend_Loader_Autoloader->_autoload() C:\Programming\ze nd\library\Zend\Loader\Autoloader.php:124
0.0191 3236848 11. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:479
0.0191 3236880 12. Zend_Loader::loadClass() C:\Programming\zend\library\ Zend\Loader\Autoloader.php:479
0.0191 3237136 13. Zend_Loader::loadFile() C:\Programming\zend\library\Z end\Loader.php:82
PHP Warning: include_once(): Failed opening
'WJG\Controller\Action\Helper\Initi alizer.php' for inclusion
(include_path='C:\wamp\www\webclass\application/../vie
ws;.;C:\wamp\bin\php\php5.3.13\pear;c:\php\includes;C:\Programming\zend\library;
C:\wamp\bin\php\php5.3.13\pear\PEAR') in
C:\Programming\zend\library\Zend\Loader .php on line 134 PHP Stack
trace: PHP 1. {main}()
C:\wamp\www\webclass\application\scripts\seed.php:0 PHP 2. include()
C:\wamp\www\webclass\application\scripts\seed.php:9 PHP 3.
Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20
PHP 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap()
C:\Programmin g\zend\library\Zend\Application.php:355 PHP 5.
Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap()
C:\Programmi
ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586
PHP 6.
Zend_Application_Bootstrap_BootstrapAbstract->_executeResource()
C:\Pro
gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622
PHP 7. Bootstrap->_initGlobalVars()
C:\Programming\zend\library\Zend\Applicati
on\Bootstrap\BootstrapAbstract.php:669 PHP 8.
Zend_Loader_Autoloader::autoload()
C:\Programming\zend\library\Zend\App
lication\Bootstrap\BootstrapAbstract.php:0 PHP 9. call_user_func()
C:\Programming\zend\library\Zend\Loader\Autoloader.php :124 PHP 10.
Zend_Loader_Autoloader->_autoload()
C:\Programming\zend\library\Zend\Lo ader\Autoloader.php:124 PHP 11.
call_user_func()
C:\Programming\zend\library\Zend\Loader\Autoloader.php :479 PHP 12.
Zend_Loader::loadClass()
C:\Programming\zend\library\Zend\Loader\Autolo ader.php:479 PHP 13.
Zend_Loader::loadFile() C:\Programming\zend\library\Zend\Loader.php:82
Warning: include_once(): Failed opening
'WJG\Controller\Action\Helper\Initialize r.php' for inclusion
(include_path='C:\wamp\www\webclass\application/../views;.;
C:\wamp\bin\php\php5.3.13\pear;c:\php\includes;C:\Programming\zend\library;C:\wa
mp\bin\php\php5.3.13\pear\PEAR') in
C:\Programming\zend\library\Zend\Loader.php on line 134
Call Stack:
0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0
0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam
p\www\webclass\application\scripts\seed.php:9
0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20
0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap()
C:\Programming\zend\library\Zend\Application.php:355
0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p
hp:586
0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst
ract.php:622
0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr
ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669
0.0190 3236432 8. Zend_Loader_Autoloader::autoload() C:\Programming\zen
d\library\Zend\Application\Bootstrap\BootstrapAbstract.php:0
0.0191 3236768 9. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:124
0.0191 3236800 10. Zend_Loader_Autoloader->_autoload() C:\Programming\ze nd\library\Zend\Loader\Autoloader.php:124
0.0191 3236848 11. call_user_func() C:\Programming\zend\library\Zend\Loa der\Autoloader.php:479
0.0191 3236880 12. Zend_Loader::loadClass() C:\Programming\zend\library\ Zend\Loader\Autoloader.php:479
0.0191 3237136 13. Zend_Loader::loadFile() C:\Programming\zend\library\Z end\Loader.php:82
PHP Fatal error: Class 'WJG_Controller_Action_Helper_Initializer' not
found in C:\wamp\www\webclass\application\Bootstrap.php on line 39 PHP
Stack trace: PHP 1. {main}()
C:\wamp\www\webclass\application\scripts\seed.php:0 PHP 2. include()
C:\wamp\www\webclass\application\scripts\seed.php:9 PHP 3.
Zend_Application->bootstrap() C:\wamp\www\webclass\public\cli.php:20
PHP 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap()
C:\Programmin g\zend\library\Zend\Application.php:355 PHP 5.
Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap()
C:\Programmi
ng\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:586
PHP 6.
Zend_Application_Bootstrap_BootstrapAbstract->_executeResource()
C:\Pro
gramming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.php:622
PHP 7. Bootstrap->_initGlobalVars()
C:\Programming\zend\library\Zend\Applicati
on\Bootstrap\BootstrapAbstract.php:669
Fatal error: Class 'WJG_Controller_Action_Helper_Initializer' not
found in C:\wa mp\www\webclass\application\Bootstrap.php on line 39
Call Stack:
0.0004 651544 1. {main}() C:\wamp\www\webclass\application\scripts\see d.php:0
0.0006 661568 2. include('C:\wamp\www\webclass\public\cli.php') C:\wam
p\www\webclass\application\scripts\seed.php:9
0.0121 2052384 3. Zend_Application->bootstrap() C:\wamp\www\webclass\pu blic\cli.php:20
0.0121 2052432 4. Zend_Application_Bootstrap_BootstrapAbstract->bootstr ap()
C:\Programming\zend\library\Zend\Application.php:355
0.0121 2052432 5. Zend_Application_Bootstrap_BootstrapAbstract->_bootst rap()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbstract.p
hp:586
0.0190 3235544 6. Zend_Application_Bootstrap_BootstrapAbstract->_execut eResource()
C:\Programming\zend\library\Zend\Application\Bootstrap\BootstrapAbst
ract.php:622
0.0190 3235768 7. Bootstrap->_initGlobalVars() C:\Programming\zend\libr
ary\Zend\Application\Bootstrap\BootstrapAbstract.php:669
This is the error, and here is the _initGlobalVars()
protected function _initGlobalVars()
{
Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH.'/../library/WJG/Controller/Action/Helper');
$initializer = Zend_Controller_Action_HelperBroker::addHelper(
new WJG_Controller_Action_Helper_Initializer());
}
If you want some more info ask me, please help me because I really want to continue with the flow of the book, thanks!
You need to add prefix to the path:
Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH.'/../library/WJG/Controller/Action/Helper');
add then:
Zend_Controller_Action_HelperBroker::addPrefix("WJG_Controller_Action_Helper_");
Hope this helps :)
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
I have a PHPUnit test suite that is currently causing a fatal error due to a class definition that's not being found. This, ultimately, is a failure of the testing code itself and a failure by the developer to vindicate the test itself before committing code.
However, things like this do happen from time to time, and it would be wonderful if, when a fatal error occurs (regardless of who's ultimately responsible), the test simply be marked as a failure, and the remainder of the test suite still be executed.
I have read about the --process-isolation switch and as far as I can tell, it should take care of this. Since each test runs in a separate process, if the child dies due to a fatal error, the parent can still continue to run. In fact, this is stated explicitly in this answer to a similar question: https://stackoverflow.com/a/5340151/84762 which shows the exact type of output I would like to see myself.
However, I seem to get the exact same output regardless of whether or not I use the --process-isolation flag:
WITHOUT process isolation
[kogi#phagocyte ~]$ /usr/bin/phpunit --colors --verbose --coverage-html "target/coverage" ~/app/zend/tests/application/
PHP Fatal error: Class 'Rmd_Database_OldObject' not found in /home/kogi/app/zend/private/models/translate/Poll.php on line 9
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/pear/PHPUnit/TextUI/Command.php:130
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/pear/PHPUnit/TextUI/Command.php:150
PHP 5. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/pear/PHPUnit/Runner/BaseTestRunner.php:96
PHP 6. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/pear/PHPUnit/Framework/TestSuite.php:419
PHP 7. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/pear/PHPUnit/Framework/TestSuite.php:358
PHP 8. PHPUnit_Util_Fileloader::load() /usr/share/pear/PHPUnit/Util/Fileloader.php:79
PHP 9. include_once() /usr/share/pear/PHPUnit/Util/Fileloader.php:95
PHP 10. require_once() /home/kogi/app/zend/tests/application/translate/PollTest.php:11
Fatal error: Class 'Rmd_Database_OldObject' not found in /home/kogi/app/zend/private/models/translate/Poll.php on line 9
Call Stack:
0.0003 91584 1. {main}() /usr/bin/phpunit:0
0.0076 612672 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
0.0076 613744 3. PHPUnit_TextUI_Command->run() /usr/share/pear/PHPUnit/TextUI/Command.php:130
0.0246 1249464 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/pear/PHPUnit/TextUI/Command.php:150
0.0706 1626680 5. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/pear/PHPUnit/Runner/BaseTestRunner.php:96
0.1691 8053584 6. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/pear/PHPUnit/Framework/TestSuite.php:419
0.1693 8057320 7. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/pear/PHPUnit/Framework/TestSuite.php:358
0.1694 8057664 8. PHPUnit_Util_Fileloader::load() /usr/share/pear/PHPUnit/Util/Fileloader.php:79
0.1711 8240600 9. include_once('/home/kogi/app/zend/tests/application/translate/PollTest.php') /usr/share/pear/PHPUnit/Util/Fileloader.php:95
0.1805 9187768 10. require_once('/home/kogi/app/zend/private/models/translate/Poll.php') /home/kogi/app/zend/tests/application/translate/PollTest.php:11
WITH process isolation
[kogi#phagocyte ~]$ /usr/bin/phpunit --colors --verbose --coverage-html "target/coverage" --process-isolation ~/app/zend/tests/application/
PHP Fatal error: Class 'Rmd_Database_OldObject' not found in /home/kogi/app/zend/private/models/translate/Poll.php on line 9
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/pear/PHPUnit/TextUI/Command.php:130
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/pear/PHPUnit/TextUI/Command.php:150
PHP 5. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/pear/PHPUnit/Runner/BaseTestRunner.php:96
PHP 6. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/pear/PHPUnit/Framework/TestSuite.php:419
PHP 7. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/pear/PHPUnit/Framework/TestSuite.php:358
PHP 8. PHPUnit_Util_Fileloader::load() /usr/share/pear/PHPUnit/Util/Fileloader.php:79
PHP 9. include_once() /usr/share/pear/PHPUnit/Util/Fileloader.php:95
PHP 10. require_once() /home/kogi/app/zend/tests/application/translate/PollTest.php:11
Fatal error: Class 'Rmd_Database_OldObject' not found in /home/kogi/app/zend/private/models/translate/Poll.php on line 9
Call Stack:
0.0003 91752 1. {main}() /usr/bin/phpunit:0
0.0076 612824 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
0.0076 613896 3. PHPUnit_TextUI_Command->run() /usr/share/pear/PHPUnit/TextUI/Command.php:130
0.0246 1250360 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/pear/PHPUnit/TextUI/Command.php:150
0.0708 1627528 5. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/pear/PHPUnit/Runner/BaseTestRunner.php:96
0.1688 8054296 6. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/pear/PHPUnit/Framework/TestSuite.php:419
0.1690 8057992 7. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/pear/PHPUnit/Framework/TestSuite.php:358
0.1691 8058336 8. PHPUnit_Util_Fileloader::load() /usr/share/pear/PHPUnit/Util/Fileloader.php:79
0.1707 8241296 9. include_once('/home/kogi/app/zend/tests/application/translate/PollTest.php') /usr/share/pear/PHPUnit/Util/Fileloader.php:95
0.1801 9188464 10. require_once('/home/kogi/app/zend/private/models/translate/Poll.php') /home/kogi/app/zend/tests/application/translate/PollTest.php:11
For those of us that can't effectively diff in our heads, the two outputs are literally identical (other than the execution time and memory usage which is negligibly different).
In both cases, the fatal error kills the entire test suite. In this particular case, this happens in the 3rd test and the remaining 150 tests (in several other files/suites) are never executed.
What am I doing wrong here? Is there some other way to survive a fatal error (marking the test as failed) in one test and still execute remaining tests?
EDIT
I am using PHPUnit 3.6.10
EDIT
Comments on the answer to this question have inspired a new ticket on PHPUnit's GitHub page: https://github.com/sebastianbergmann/phpunit/issues/545
PHPUnit loads each test file that will be run before running any tests. This causes PHP to parse these files and execute their top-level code. If any class is loaded that, for example, extends a class that doesn't exist, you'll get a fatal error.
I don't see any way around this without enhancing PHPUnit to parse the files without executing their code during the scanning process.