Bug #47282

Broken inheritance on AbstractNode (with PHP ~5.3.5)

Added by Karsten Dambekalns over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2013-04-16
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:-
Target version:-

Description

When running unit tests on PHP 5.3.5 (our Jenkins right now), there is a fatal error:

Apr 16 13:21:10 17604 php: PHP Fatal error:  Can't inherit abstract function TYPO3\TYPO3CR\Domain\Model\NodeInterface::setName() (previously declared abstract in TYPO3\TYPO3CR\Domain\Model\AbstractNode) in /…/TYPO3CR/Domain/Model/AbstractNode.php on line 31
Apr 16 13:21:10 17604 php: PHP Stack trace:
Apr 16 13:21:10 17604 php: PHP   1. {main}() /usr/bin/phpunit:0
Apr 16 13:21:10 17604 php: PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
Apr 16 13:21:10 17604 php: PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
Apr 16 13:21:10 17604 php: PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
Apr 16 13:21:10 17604 php: PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
Apr 16 13:21:10 17604 php: PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
Apr 16 13:21:10 17604 php: PHP   7. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745
Apr 16 13:21:10 17604 php: PHP   8. PHPUnit_Framework_TestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772
Apr 16 13:21:10 17604 php: PHP   9. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751
Apr 16 13:21:10 17604 php: PHP  10. TYPO3\Flow\Tests\BaseTestCase->runBare() /usr/share/php/PHPUnit/Framework/TestResult.php:649
Apr 16 13:21:10 17604 php: PHP  11. PHPUnit_Framework_TestCase->runBare() /…/Framework/TYPO3.Flow/Tests/BaseTestCase.php:41
Apr 16 13:21:10 17604 php: PHP  12. TYPO3\TYPO3CR\Tests\Unit\Domain\Model\NodeTest->setUp() /…/TestCase.php:801
Apr 16 13:21:10 17604 php: PHP  13. TYPO3\Flow\Tests\BaseTestCase->getAccessibleMock() /…/Application/TYPO3.TYPO3CR/Tests/Unit/Domain/Model/NodeTest.php:28
Apr 16 13:21:10 17604 php: PHP  14. TYPO3\Flow\Tests\BaseTestCase->buildAccessibleProxy() /…/Framework/TYPO3.Flow/Tests/BaseTestCase.php:59
Apr 16 13:21:10 17604 php: PHP  15. ReflectionClass->__construct() /…/Tests/BaseTestCase.php:89
Apr 16 13:21:10 17604 php: PHP  16. Composer\Autoload\ClassLoader->loadClass() /…/Libraries/composer/ClassLoader.php:0
Apr 16 13:21:10 17604 php: PHP  17. include() /…/Libraries/composer/ClassLoader.php:183
Apr 16 13:21:10 17604 php: PHP  18. Composer\Autoload\ClassLoader->loadClass() /…/Libraries/composer/ClassLoader.php:0
Apr 16 13:21:10 17604 php: PHP  19. include() /…/Libraries/composer/ClassLoader.php:183

The tests pass with PHP 5.4.12 and 5.3.22, so this seems to be some weird old issue. Anyway, since the methods getName() and setName() are in the NodeInterface, there is no need for them to be in AbstractNode as abstract methods.

Associated revisions

Revision 4cf06169
Added by Karsten Dambekalns over 2 years ago

[BUGFIX] Remove setName() and getName() from AbstractNode

Since the methods getName() and setName() are in the NodeInterface,
there is no need for them to be in AbstractNode as abstract methods.

Change-Id: I0f4a2b8783332733dfc93c7dd6284b38a50c310f
Fixes: #47282

History

#1 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20001

#2 Updated by Karsten Dambekalns over 2 years ago

  • Status changed from Accepted to Under Review

#3 Updated by Karsten Dambekalns over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF