Giter Club home page Giter Club logo

Comments (10)

mip-ro avatar mip-ro commented on May 21, 2024 1

after some time spent on it, only way that seems to work well is:
public function register()
{
if (Config::get('quarx.load-modules', false)) {
$modulePath = base_path(Config::get('quarx.module-directory').'/');
$modules = glob($modulePath.'*');

        foreach ($modules as $module) {                
            if (is_dir($module)) {
                $module = lcfirst(str_replace($modulePath, '', $module));
                
                $module = ucfirst($module);
                $str_module = "\Quarx\Modules\%module\%moduleModuleProvider";
                $str_module = str_replace('%module',$module,$str_module);
                
                $this->app->register($str_module);                    
            }
        }            
    }
}

not sure why escaped backslash not work.
the first backslash is ok to be there.
i hope this will help.
Thanks for your time.

P.S: composer dump is mandatory

from cms.

fwallen avatar fwallen commented on May 21, 2024

I am having the same issue with make:module
Deleting the newly-created folder in quarx\modules will free the app up again, however.

from cms.

mlantz avatar mlantz commented on May 21, 2024

Did you do a composer dump?

It seems like its an issue with composer not being updated thusly missing the provider

from cms.

mlantz avatar mlantz commented on May 21, 2024

I just released some updates to the module builder, please try one more time and see if it works, also please check the composer dump. I appreciate any feedback thanks.

from cms.

fwallen avatar fwallen commented on May 21, 2024

Got the latest and was able to generate a crud module. Executed composer dump followed by artisan module:publish Funnels (using my module name) and received the following error: Class '\Quarx\Modules\Funnels\FunnelsModuleProvider' not found

Namespaces are correct, but in QuarxModuleProvider, this line $this->app->register('\Quarx\Modules\\'.ucfirst($module).'\\'.ucfirst($module).'ModuleProvider'); cannot find it.

from cms.

mlantz avatar mlantz commented on May 21, 2024

Do me a favor and manually edit it to remove the first backslash

from cms.

mip-ro avatar mip-ro commented on May 21, 2024

if you read this, please make same change on /ModuleMake.php. same issue with the "P" letter

from cms.

mip-ro avatar mip-ro commented on May 21, 2024

regarding the backslash, not working.

"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/",
"Quarx\": "quarx/"
}
},

this is the piece from composer.json. but seems to be in right place.

from cms.

mlantz avatar mlantz commented on May 21, 2024

Updated all around, and fixed a small issue with the templates and the dropzone stuff FYI

from cms.

jonasof avatar jonasof commented on May 21, 2024

I am still getting the same problem here (php 5.6, composer 1.4.2, quarx 3.2.25, linux). Changing the composer.json, from:

"psr-4": {
    "App\\": "app/",
    "Quarx\\": "quarx/"
}

to:

"psr-4": {
     "App\\": "app/",
     "Quarx\\": "quarx/",
     "Quarx\\Modules\\": "quarx/modules/"
 }

And running "composer dump" solved the issue. I think the composer autoloader is looking for the folder "quarx/Modules" and then not finding the class, while QuarxModuleProvider find it.

from cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.