I renamed my working trunk to trunk-alldone, checked out a fresh copy of trunk, ran some symfony commands (like unit tests) on trunk, then deleted trunk and renamed trunk-alldone back to trunk.
Now when I try to run any symfony commands, I get:
sym cc
PHP Warning: require(/home/kiwi/checkouts/trunk-alldone/kiwi- web/plugins/kcEmailPlugin/l pleAutoload.class.php on line 123
PHP Stack trace:
PHP 1. {main}() /home/kiwi/checkouts/trunk/kiwi-web/symfony:0
PHP 2. include() /home/kiwi/checkouts/trunk/kiwi-web/symfony:37
PHP 3. sfCommandApplication->__construct() /home/kiwi/checkouts/trunk/kiwi-web/lib/vend
PHP 4. sfSymfonyCommandApplication->configure() /home/kiwi/checkouts/trunk/kiwi-web/lib
PHP 5. sfSymfonyCommandApplication->loadTasks() /home/kiwi/checkouts/trunk/kiwi-web/lib
PHP 6. class_exists() /home/kiwi/checkouts/trunk/kiwi-web/lib/vendor/symfony/lib/comman
PHP 7. sfSimpleAutoload->autoload() /home/kiwi/checkouts/trunk/kiwi-web/lib/vendor/symf
It's still looking for things in trunk-alldone!
How do I reset this to get it to look in the right place again?
Related
I execute this commande line to run a unit tests :
hatem.hadrich#pc_Hatem_Hadrich:/projet/tools$ php /scripts/phpunit CRM_AllTests
I have this error when i run a unit test from my local instance and i can not find a way to resolve it anyone can help me to fix this bug.
PHP Fatal error: Class 'CiviTestSuite' not found in /projet/../civicrm/tests/phpunit/CRM/AllTests.php on line 39
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:569
PHP 3. PHPUnit_TextUI_Command->run()
phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:115
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest()
phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:137
PHP 5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass()
phar:///usr/local/bin/phpunit/phpunit/Runner/BaseTestRunner.php:65
PHP 6. PHPUnit_Runner_StandardTestSuiteLoader->load()
phar:///usr/local/bin/phpunit/phpunit/Runner/BaseTestRunner.php:124
PHP 7. PHPUnit_Util_Fileloader::checkAndLoad() phar:///usr/local/bin/phpunit/phpunit/Runner/StandardTestSuiteLoader.php:39
PHP 8. PHPUnit_Util_Fileloader::load() phar:///usr/local/bin/phpunit/phpunit/Util/Fileloader.php:38
PHP 9. include_once() phar:///usr/local/bin/phpunit/phpunit/Util/Fileloader.php:56
i have find a way to fix this bug, you must require_one for the bootstrap file inside CiviTest :
define('DRUPAL_ROOT', '/path_to_project');
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
Am new to symfony and from last month am continuously installing new symfony project using following command on ubuntu from the terminal
# Linux, Mac OS X
$ symfony new my_project_name
and it was working perfectly until today, but than just checked the new version release, but now it started giving me following error
Downloading Symfony...
4.93 MB/4.93 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Preparing project...
PHP Warning: require(/var/www/projectname/app/SymfonyRequirements.php): failed to open stream: No such file or directory in phar:///usr/local/bin/symfony/src/Symfony/Installer/DownloadCommand.php on line 265
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/symfony:0
PHP 2. require() /usr/local/bin/symfony:10
PHP 3. Symfony\Component\Console\Application->run() phar:///usr/local/bin/symfony/symfony:35
PHP 4. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP 6. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP 7. Symfony\Installer\NewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP 8. Symfony\Installer\DownloadCommand->checkSymfonyRequirements() phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php:65
PHP Fatal error: require(): Failed opening required '/var/www/projectname/app/SymfonyRequirements.php' (include_path='.:/usr/share/php:/usr/share/pear') in phar:///usr/local/bin/symfony/src/Symfony/Installer/DownloadCommand.php on line 265
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/symfony:0
PHP 2. require() /usr/local/bin/symfony:10
PHP 3. Symfony\Component\Console\Application->run() phar:///usr/local/bin/symfony/symfony:35
PHP 4. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:126
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:195
PHP 6. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/symfony/vendor/symfony/console/Application.php:878
PHP 7. Symfony\Installer\NewCommand->execute() phar:///usr/local/bin/symfony/vendor/symfony/console/Command/Command.php:259
PHP 8. Symfony\Installer\DownloadCommand->checkSymfonyRequirements() phar:///usr/local/bin/symfony/src/Symfony/Installer/NewCommand.php:65
I have even check the symfony at location usr/local/bin/symfony and it was there.
It is a resolved issue that you need to specify the version you want to install. As described here and here, you need to:
Update your installer
>symfony self-update
or with sudo, depending on how you install it:
>sudo symfony self-update
Specify the version:
>symfony new my_project_name 3.0
Hope this helps.
UPDATE
With the correct resolutions of the bug on the Symfony installer, now the 3.0 is the default version. In other case, you can specify the complete version (with minor and major) as follows:
>symfony new my_project_name 3.0.0
Since upgrading to Symfony 2.8, I get the following error when I run phpunit in the Symfony root:
PHP Fatal error: Class 'PHPUnit_Util_ErrorHandler' not found in /var/www/foo/symfony/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php on line 40
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/php/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments() /usr/share/php/PHPUnit/TextUI/Command.php:138
PHP 5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/share/php/PHPUnit/TextUI/Command.php:657
PHP 6. PHPUnit_Util_Configuration->getTestSuite() /usr/share/php/PHPUnit/Util/Configuration.php:789
PHP 7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/php/PHPUnit/Util/Configuration.php:873
PHP 8. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/php/PHPUnit/Framework/TestSuite.php:416
PHP 9. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/php/PHPUnit/Framework/TestSuite.php:355
PHP 10. PHPUnit_Util_Fileloader::load() /usr/share/php/PHPUnit/Util/Fileloader.php:76
PHP 11. Symfony\Bridge\PhpUnit\DeprecationErrorHandler::Symfony\Bridge\PhpUnit\{closure}() /usr/share/php/PHPUnit/Util/Fileloader.php:92
THE ERROR HANDLER HAS CHANGED!
This also occurs under Symfony 3.0. Should I now be running phpunit in a different manner?
I just ran into this problem using Symfony 2.8.
Just update your local install of phpunit.
Run this.
phpunit --self-update
That should do it.
I was running phpunit version 4.7.*, but Symfony wanted to see phpunit 5.1.3.
You should clear the app/cache/test directory.
You could also make your global phpunit symlink to the one provided by Symfony located in vendor/phpunit/phpunit/phpunit
Update: I'm not sure what this error is referring to, I still get it, but seems to occur when I have a problem with a test. At the least, it's a confusing message.
I get an error when I try to run a test in PHPUnit. Even if I type phpunit by itself, I still get an error. It works fine when I call it outside the Bootstrap folder.
Configuration read from /home/milen/Documents/codific/icho/module/Application/tests/phpunit.xml
PHP Fatal error: Call to a member function getId() on a non-object in /home/milen/Documents/codific/icho/module/Application/tests/ApplicationTest/Controller/PoCourseTest.php on line 268
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/php/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:176
PHP 5. PHPUnit_Framework_TestSuite->run() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:426
PHP 6. PHPUnit_Extensions_SeleniumTestCase->run() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit/src/Framework/TestSuite.php:699
PHP 7. PHPUnit_Framework_TestCase->run() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumTestCase.php:648
PHP 8. PHPUnit_Framework_TestResult->run() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit/src/Framework/TestCase.php:760
PHP 9. PHPUnit_Framework_TestCase->runBare() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit/src/Framework/TestResult.php:686
PHP 10. PoCourseTest->tearDown() /home/milen/Documents/codific/icho/vendor/phpunit/phpunit/src/Framework/TestCase.php:852
I tried reinstalling it, no luck.
I usually see an error along these lines when I have defined a bootstap.php file to run for PHPUnit which gets specified in the phpunit.xml file. With this setup, you need to be careful from where you run your tests so that the bootstrap file is run properly. This isn't a problem of PHPUnit per se, but a side effect from the phpunit.xml file.
This would appear to be the case because you stated that when you are not in the folder called "Bootstrap" (what / where ever that is), PHPUnit works fine. But without more information aside from the error dump this would be difficult to ascertain.
I think this question could be fixed with this answer.
I don't think its a problem with configuration, but rather a code execution in the setUp and tearDown method.
I'm getting the following error when attempting to run my own Symfony unit tests in PhpStorm:
/usr/bin/php /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php
PHP Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php on line 8
PHP Stack trace:
PHP 1. {main}() /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php:0
Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php on line 8
Call Stack:
0.0002 234112 1. {main}() /home/kevin/www/src/Blah/MyBundle/Tests/Controller/HomeControllerTest.php:0
Process finished with exit code 255
Some research has informed me that I may have to point PhpStorm/Xdebug to Symfony's bootstrap and/or test suite XML file, but I'm not sure how to do that in PhpStorm. Nothing is jumping out at me in the various config screens. Please help.
Although I'm using IntelliJ IDEA, the configuration is the same, so:
Settings -> PHP -> PHPUnit - there are inputs for bootstrap and config