ReFlar Dev Log #1: I Got Stuck
Monday, February 26th, 2018 @ 7:57 AM EST
It’s a little after 7 AM and I’ve been woke since 3 AM. I had a little hair up my ass so suddenly to want to finally get around to splitting ReFlar's User Management and Strikes combo extension. Charlie has been busy with aliens and rocket ships and mi amigo David has been dealing with school shenanigan.
I think on average, I spent most of this morning getting WAMP to work properly with SSL certificates (since stupid Mozilla and Google have enforced https on local development domain extensions such as .dev and .test). It was a big hassle and I even ran into issues with my SSH client where I had two different emails, one for GitHub and the other for GitLab and my SSH client wasn't having it. I fixed that with haste by setting up a config file to differentiate GitHub and GitLab RSA keys. Local development is a pain in the ass on Windows if I do say so myself and before you give me sass about using Windows and how I should be using blah blah blah, take note that I do not own any Apple Mac related products and most if not everything I do for work and play resides in a Windows environment. Now, I know that there are better ways to go about development, but I am finding my own ways around these obstacles so hopefully you won't reproduce the same mistakes I have made.
Now then, shall we get down to the nitty-gritty? I basically got stuck while splitting an extension into their individual packages. How? I’m not sure, maybe replacing UserManagement (PHP namespace) with Strikes and user-management (JS equivalent) with strikes was just a bad idea to start off. Possibly because I’m a lazy mothatrucka’ but I got things going for the most part. And then, I tore it all down and decided to start fresh. I spent the latter of the hour understanding how Charlie built User Management and all of it’s funkiness and quirks. I’ll keep this entry nice and short because well, I have to start heading out to go to work soon and my neurons are already firing off with all of this programming going on. I got stuck, yes, I. GOT. STUCK. How? I’m not sure, but later on today I will investigate why and possibly tear out more elegant roots from my wavy mid-young-adult aged hair.
And then it happened...
Fatal error: Uncaught ReflectionException: Class Reflar\Strikes\Listeners\AddApiAttributes does not exist in C:\wamp64\www\reflarext.dev\vendor\illuminate\container\Container.php on line 741
Why, how, who, wat, when?
My composer.json looks good as far as my autoload goes:
"autoload": {
"psr-4": {
"Reflar\\Strikes\\": "src/"
}
}
My bootstrap also looks fine and dandy?
namespace Reflar\Strikes;
use Flarum\Foundation\Application;
use Illuminate\Contracts\Events\Dispatcher;
return function (Dispatcher $events, Application $app) {
$events->subscribe(Listeners\AddApiAttributes::class);
$events->subscribe(Listeners\Assets::class);
$app->register(Providers\StorageServiceProvider::class);
};
I even read through a few guides @luceos created (he’s an amazing developer btw) and still nope.
But there's hope! Stay tuned for more updates!