Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlobalStorageService.php incompatible with PHP 5.4 #15463

Closed
LukasReschke opened this issue Apr 8, 2015 · 7 comments · Fixed by #15469
Closed

GlobalStorageService.php incompatible with PHP 5.4 #15463

LukasReschke opened this issue Apr 8, 2015 · 7 comments · Fixed by #15469
Assignees
Milestone

Comments

@LukasReschke
Copy link
Member

2015-04-08_12-29-14

@PVince81 IDE helps 🙈
@DeepDiver1975 Can we please get some static code checking for such stuff?

@LukasReschke
Copy link
Member Author

… that explains why I am not able to execute the unit tests on my machine 🙈 …

@LukasReschke LukasReschke added this to the 8.1-current milestone Apr 8, 2015
@LukasReschke LukasReschke self-assigned this Apr 8, 2015
@LukasReschke
Copy link
Member Author

Preparing a PR…

@DeepDiver1975
Copy link
Member

@DeepDiver1975 Can we please get some static code checking for such stuff?

scrutinizer might catch this?

@LukasReschke
Copy link
Member Author

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. :(

@DeepDiver1975
Copy link
Member

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

LukasReschke added a commit that referenced this issue Apr 8, 2015
Arbitrary expressions in empty are allowed in PHP 5.5 ands upwards. Seems to only affect master.

Fixed #15463
@LukasReschke
Copy link
Member Author

Meanwhile the full inspection finished. It found 7 language level incompatibilities for 5.4, patch is at #15469

@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants