Closed Chewbaka69 closed 5 years ago
The issue is caused by using a case insensitive OS during development. Windows and OSX (unless properly configured) do not care about using lowercase folders or files when actually uppercase letters are used. The issue at hand is:
PSR-4 namespace in composer.json points to src as michaelbelgium\mybbtoflarumr
which is fine. Then it will load controllers
, but the directory is actually named Controllers
. This will break in a case sensitive OS.
Oh yeah, i will wait for the fix.
Thanks you @luceos
Can you update and try again? 😛
The problem is not fix:
[2019-01-09 21:08:11] production.ERROR: ReflectionException: Class michaelbelgium\mybbtoflarum\controllers\MybbToFlarumController does not exist in /flarum/app/vendor/illuminate/container/Container.php:752
Stack trace:
#0 /flarum/app/vendor/illuminate/container/Container.php(752): ReflectionClass->__construct('michaelbelgium\\...')
#1 /flarum/app/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build('michaelbelgium\\...')
#2 /flarum/app/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('michaelbelgium\\...', Array)
#3 /flarum/app/vendor/flarum/core/src/Foundation/Application.php(491): Illuminate\Container\Container->make('michaelbelgium\\...', Array)
#4 /flarum/app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(76): Flarum\Foundation\Application->make('michaelbelgium\\...')
#5 /flarum/app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(36): Flarum\Http\RouteHandlerFactory->resolveController('michaelbelgium\\...')
#6 /flarum/app/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
#7 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
#8 /flarum/app/vendor/flagrow/terms/src/Middlewares/RegisterMiddleware.php(59): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#9 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flagrow\Terms\Middlewares\RegisterMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#10 /flarum/app/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#11 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#12 /flarum/app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#13 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#14 /flarum/app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#15 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#16 /flarum/app/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#17 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#18 /flarum/app/vendor/flarum/core/src/Http/Middleware/StartSession.php(62): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#19 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#20 /flarum/app/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#21 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#22 /flarum/app/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(29): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#23 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#24 /flarum/app/vendor/flarum/core/src/Api/Middleware/HandleErrors.php(42): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#25 /flarum/app/vendor/zendframework/zend-stratigility/src/Next.php(52): Flarum\Api\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
#26 /flarum/app/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(91): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
#27 /flarum/app/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\MiddlewarePipe))
#28 /flarum/app/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(78): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\MiddlewarePipe))
#29 /flarum/app/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
#30 /flarum/app/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(78): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\MiddlewarePipe))
#31 /flarum/app/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
#32 /flarum/app/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(78): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\MiddlewarePipe))
#33 /flarum/app/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
#34 /flarum/app/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
#35 /flarum/app/public/index.php(22): Flarum\Http\Server->listen()
#36 {main}
Are u sure you updated? Its not using the updated namespaces
Yes i have update, and i have see composer to do the update. I have remove and reinstall the extension to be sure.
Can share the output of the command php flarum info
?
Flarum core 0.1.0-beta.8.1
PHP version: 7.2.10
Loaded extensions: Core, date, libxml, pcre, zlib, filter, hash, readline, Refle ction, SPL, session, ctype, curl, dom, fileinfo, gd, json, mbstring, openssl, PD O, standard, tokenizer, xmlwriter, zip, mysqlnd, Phar, pdo_mysql, Zend OPcache
+---------------------------------+-----------------+--------+
| Flarum Extensions | | |
+---------------------------------+-----------------+--------+
| ID | Version | Commit |
+---------------------------------+-----------------+--------+
| flarum-approval | v0.1.0-beta.8 | |
| flarum-bbcode | v0.1.0-beta.8 | |
| flarum-emoji | v0.1.0-beta.8 | |
| flarum-lang-english | v0.1.0-beta.8 | |
| flarum-flags | v0.1.0-beta.8.1 | |
| flarum-lock | v0.1.0-beta.8 | |
| flarum-markdown | v0.1.0-beta.8 | |
| flarum-mentions | v0.1.0-beta.8.1 | |
| flarum-statistics | v0.1.0-beta.8 | |
| flarum-sticky | v0.1.0-beta.8 | |
| flarum-subscriptions | v0.1.0-beta.8 | |
| flarum-suspend | v0.1.0-beta.8 | |
| flarum-tags | v0.1.0-beta.8.2 | |
| flagrow-bazaar | 0.3.9 | |
| wiwatsrt-best-answer | v0.2.0 | |
| reflar-gamification | 3.1.1 | |
| michaelbelgium-discussion-views | v0.1.0-beta.8 | |
| reflar-polls | 1.3.2 | |
| flagrow-terms | 0.3.1 | |
| clarkwinkelmann-circle-groups | 0.1.0-beta.2 | |
| flagrow-byobu | 0.2.2 | |
| michaelbelgium-mybb-to-flarum | v3.0-beta.1 | |
+---------------------------------+-----------------+--------+
Base URL: http://XXXXXXXXXXXXXX
Installation path: /flarum/app
Debug mode: off
Ok, i forgot to change a use statement. Update it and tell me if it (still doesn't) work!
My flarum is dockerised and when i want to use your extension i have this error on my logs: