luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

luya console doesn't show commands if called outside project folder #1799

Closed makroxyz closed 5 years ago

makroxyz commented 6 years ago

in vendor/luyadev/luya-core/bin/luya row 20 should be

$boot->configFile = __DIR__ . '/../../../../configs/env.php';

otherwise it doesn't load configured modules with relative commands

nadar commented 6 years ago

@makroxyz could you make an example where the current defintion does not work? We could also make an array of defintions in order to check if any of the files are available (https://github.com/luyadev/luya/blob/master/core/bin/luya#L5-L10) like we did for the autoload.php

makroxyz commented 6 years ago

Add a module with console commands. Call ./luya (inside project folder) --> shows all commands Call /var/www/project/luya (outside project folder) --> shows only luya commands

makroxyz commented 6 years ago

Hi any news about this issue?

nadar commented 6 years ago

Hi @makroxyz We could make an array of configs to check, maybe you like to send a PR? But in general its not recommend to call the bin file from the vendor folder, its always meant to be called from project folder or do you have a concrete use case?

makroxyz commented 6 years ago

I'm not calling bin from the vendor folder... try this create a console command in a custom module.

Call ./luya (inside project folder) --> shows all commands (included your module) Call /var/www/project/luya (outside project folder) --> shows only luya commands

nadar commented 6 years ago

What would happen if you would call /var/www/project/vendor/bin/luya?

makroxyz commented 6 years ago

have a look at the commands available outside project folder you can't see your module commands

nadar commented 5 years ago

@makroxyz sorry for being very (very very) late, but yes indeed i see the problem.