Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Again: Cannot redeclare class lithium\core\Libraries #936

Closed
ComFreek opened this Issue · 3 comments

2 participants

@ComFreek

What I did

I cloned the latest Lithium core and framework versions. I did not change any file. The resources directory is per Lithium's default home page writable.

git clone git://github.com/UnionOfRAD/framework.git my_app
cd my_app
git submodule init
git submodule update

Submodule version hash:

Submodule path 'libraries/lithium': checked out '974469cf25db5cbab61f3e1ff172405f4635032e

The home page works just fine but when I try to execute all tests (my_app/test/all), PHP outputs the error below:

Fatal error: Cannot redeclare class lithium\core\Libraries in P:\Websites\Apache\my_app\libraries\lithium\core\Libraries.php on line 58

Stack trace:

#     Time      Memory  Function    Location
1     0.0003      143168    {main}( )   ..\index.php:0
2     0.0151     1742904    lithium\action\Dispatcher::run( )   ..\index.php:41
3     0.0151     1744040    lithium\core\StaticObject::_filter( )   ..\Dispatcher.php:155
4     0.0151     1745720    lithium\util\collection\Filters::run( ) ..\StaticObject.php:126
5     0.0152     1747992    {closure:P:\Websites\Apache\my_app\app\config\bootstrap\action.php:41-52}( )    ..\Filters.php:183
6     0.0162     1770496    lithium\util\collection\Filters->next( )    ..\action.php:51
7     0.0163     1770680    {closure:P:\Websites\Apache\my_app\app\config\bootstrap\cache.php:41-57}( ) ..\Filters.php:202
8     0.0163     1770680    lithium\util\collection\Filters->next( )    ..\cache.php:43
9     0.0163     1770768    lithium\action\Dispatcher::lithium\action\{closure}( )  ..\Filters.php:202
10  0.0170   1785976    lithium\core\StaticObject::invokeMethod( )  ..\Dispatcher.php:154
11  0.0170   1786032    lithium\action\Dispatcher::_call( ) ..\StaticObject.php:75
12  0.0170   1787104    lithium\core\StaticObject::_filter( )   ..\Dispatcher.php:265
13  0.0170   1787336    lithium\action\Dispatcher::lithium\action\{closure}( )  ..\StaticObject.php:119
14  0.0170   1787368    lithium\test\Controller->__invoke( )    ..\Dispatcher.php:262
15  0.0170   1790016    lithium\core\Object->_filter( ) ..\Controller.php:59
16  0.0170   1790320    lithium\test\Controller->lithium\test\{closure}( )  ..\Object.php:238
17  0.0916   1856776    lithium\test\Dispatcher::run( ) ..\Controller.php:49
18  0.1336   1950808    lithium\core\StaticObject::_filter( )   ..\Dispatcher.php:73
19  0.1336   1951056    lithium\test\Dispatcher::lithium\test\{closure}( )  ..\StaticObject.php:119
20  0.1336   1951200    lithium\test\Report->run( ) ..\Dispatcher.php:69
21  0.2072  12234496    run ( ) ..\Report.php:146
22  0.2072  12234712    lithium\util\Collection->__call( )  ..\Report.php:146
23  0.2072  12234752    lithium\util\Collection->invoke( )  ..\Collection.php:217
24  154.069 20997248    call_user_func_array ( )    ..\Collection.php:203
25  154.069 20997568    lithium\test\Unit->run( )   ..\Collection.php:203
26  154.195 21036952    lithium\test\Unit->_runTestMethod( )    ..\Unit.php:180
27  154.195 21038040    lithium\core\Object->_filter( ) ..\Unit.php:734
28  154.195 21038288    lithium\test\Unit->lithium\test\{closure}( )    ..\Object.php:238
29  154.195 21038440    lithium\tests\cases\net\http\MediaTest->testCustomAssetUrls( )  ..\Unit.php:730
30  154.195 21038960    lithium\core\Libraries::add( )  ..\MediaTest.php:159
31  154.195 21040784    lithium\core\Libraries::_configure( )   ..\Libraries.php:310
32  154.200 21043680    require( 'P:\Websites\Apache\my_app\app\config\bootstrap.php' ) ..\Libraries.php:332
33  154.203 21057888    require( 'P:\Websites\Apache\my_app\app\config\bootstrap\libraries.php' )   ..\bootstrap.php:32
34  154.302 21226272    include( 'P:\Websites\Apache\my_app\libraries\lithium\core\Libraries.php' ) ..\libraries.php:68

My system

  • Windows 8 Pro 64-bit
  • Apache/2.4.3
  • PHP/5.5.0beta3 (32-bit, Thread safe)

Document root: P:/Websites/Apache
Lithium my_app directory: P:/Websites/Apache/my_app
AllowOverride: All

  • APC is not installed.
  • Any non-standard extensions: X-Debug 2.2.2 PHP 5.5 VC11 TS (32 bit)
@gwoo
Owner

Just updated the lithium submodule. Pull down the latest changes to framework. git submodule update and try again. Thanks.

@ComFreek

Thanks for the fast response. I'm getting more errors now ;)

Fatal error: Uncaught exception 'lithium\core\ClassNotFoundException' with message 'Class TestAll of type controllers not found.' in P:\Websites\Apache\my_app\libraries\lithium\action\Dispatcher.php on line 239

lithium\core\ClassNotFoundException: Class TestAll of type controllers not found. in P:\Websites\Apache\my_app\libraries\lithium\core\Libraries.php on line 693

lithium\action\DispatchException: Controller TestAll not found. in P:\Websites\Apache\my_app\libraries\lithium\action\Dispatcher.php on line 239

@ComFreek

The original error does not occur anymore, but I still get another error when running all tests. See #937.

@ComFreek ComFreek closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.