Closed LukasReschke closed 9 years ago
… that explains why I am not able to execute the unit tests on my machine :see_no_evil: …
Preparing a PR…
@DeepDiver1975 Can we please get some static code checking for such stuff?
scrutinizer might catch this?
Not sure if Scrutinizer can do that. Anyways, I'm letting IntelliJ Idea running a complete inspection of our code and will check if we have other incompatible constructs as well. :(
we have this on jenkins as well:
07:07:26 PHPUnit 4.4.0 by Sebastian Bergmann.
07:07:26
07:07:26 Configuration read from /var/lib/jenkins/jobs/server-master-linux-externals-smb-windows/workspace/database/sqlite/external/smb-windows/label/master/tests/phpunit-autotest-external.xml
07:07:26
07:07:31 ..PHP Fatal error: Can't use method return value in write context in /var/lib/jenkins/jobs/server-master-linux-externals-smb-windows/workspace/database/sqlite/external/smb-windows/label/master/apps/files_external/service/globalstoragesservice.php on line 153
07:07:32 PHP Stack trace:
07:07:32 PHP 1. {main}() /usr/local/bin/phpunit:0
07:07:32 PHP 2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:612
07:07:32 PHP 3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:138
07:07:32 PHP 4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:186
07:07:32 PHP 5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:423
07:07:32 PHP 6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:751
07:07:32 PHP 7. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:751
07:07:32 PHP 8. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:722
07:07:32 PHP 9. PHP_Invoker->invoke() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:641
07:07:32 PHP 10. call_user_func_array() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
07:07:32 PHP 11. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
07:07:32 PHP 12. OCA\Files_external\Tests\Controller\GlobalStoragesControllerTest->setUp() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:762
07:07:32 PHP 13. PHPUnit_Framework_TestCase->getMock() /var/lib/jenkins/jobs/server-master-linux-externals-smb-windows/workspace/database/sqlite/external/smb-windows/label/master/apps/files_external/tests/controller/globalstoragescontrollertest.php:31
07:07:32 PHP 14. PHPUnit_Framework_MockObject_Generator->getMock() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:1255
07:07:32 PHP 15. PHPUnit_Framework_MockObject_Generator->generate() phar:///usr/local/bin/phpunit/phpunit-mock-objects/Framework/MockObject/Generator.php:255
07:07:32 PHP 16. PHPUnit_Framework_MockObject_Generator->generateMock() phar:///usr/local/bin/phpunit/phpunit-mock-objects/Framework/MockObject/Generator.php:557
07:07:32 PHP 17. class_exists() phar:///usr/local/bin/phpunit/phpunit-mock-objects/Framework/MockObject/Generator.php:719
07:07:32 PHP 18. OC\Autoloader->load() phar:///usr/local/bin/phpunit/phpunit-mock-objects/Framework/MockObject/Generator.php:0
Meanwhile the full inspection finished. It found 7 language level incompatibilities for 5.4, patch is at https://github.com/owncloud/core/pull/15469
@PVince81 IDE helps :see_no_evil: @DeepDiver1975 Can we please get some static code checking for such stuff?