joomlatools: howto preset options persistently?

30 views
Skip to first unread message

Gorgonz ola

unread,
Jan 4, 2018, 4:08:22 PM1/4/18
to Joomlatools Developers
I'm just starting with composer and joomlatools and have some beginners question.

The default www-root is /var/www. This is wrong for my linux distribution. Since I don't want to write the option --www in any command again, I would like to preset it persistently.

Well, I found a solution by replacing the default in AbstractSite.php.

Question: Is this the recommended way? I do not appreciate it, thinking of joomlatools updates ;-)

Thxalot in advance :-)

Steven Rombauts

unread,
Jan 5, 2018, 4:20:24 AM1/5/18
to Joomlatools Developers
Hi!

We don't have a solution for this yet: ideally it should be possible to override default settings using a global configuration file. As you suggested it's not a good idea to make changes in the code itself because the change will get lost on a future update. 

We have a ticket for this in the backlog: https://github.com/joomlatools/joomlatools-console/issues/12 but no work has been done on it yet. Feel free to give it a try yourself and submit a pull request!

Finally, a simple symlink could be a temporary workaround? Create a symlink /var/www that points to your actual www root, that should work.

Cheers,
Steven

--

---
You received this message because you are subscribed to the Google Groups "Joomlatools Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomlatools-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gorgonz ola

unread,
Jan 5, 2018, 5:57:04 PM1/5/18
to Joomlatools Developers
Hi Steven,

thxalot for pointing this out. Well, I fear, that I'm not ready yet for my first pull request, because I do not know enough about the structure and philosophy of the code resp. the tool.

But ok lets give it a try. I would not know, which solution to prefer:
- one could add the options to the main composer.json
- one could add the options to the platform params
- one could create an extra options file, as suggested in the issue

On the other hand I found some bugs and will add those to the issues first of all ;-)

Gorgonz ola

unread,
Jan 5, 2018, 6:56:55 PM1/5/18
to Joomlatools Developers
I created an issue about the option "mysql_db_prefix" (https://github.com/joomlatools/joomlatools-console/issues/84).

Again some beginners question:

This issue holds a suggestion, that i could implement. How will i find out, if others, beeing more experienced, will accept the idea, so that my work is not useless from the beginning?

Thx again for suggestions

Steven Rombauts

unread,
Jan 12, 2018, 7:58:31 AM1/12/18
to joomlat...@googlegroups.com
Hi!

Thanks for creating the issues!

If you have an idea and want to discuss it first, this mailing list is the place to be! We also have a Gitter chat at https://gitter.im/joomlatools/dev you can join. But most importantly, scratch your own itch! Solve the problems you have.

Should we decide not to merge your changes (because they might be too specific for our use-case, or we can't commit to maintaining them ourself), you can still use your own solution on your machines!

About code structure, each command is mostly contained in a single class. We built this tool on top of the symfony/console package so it's very easy to get started with. A great introduction is here: http://symfony.com/doc/current/components/console.html

Finally, I suggest the use a default options file stored at ~/.joomlatools/config.yaml. We do a similar thing to override Joomla's configuration.php options here: https://github.com/joomlatools/joomlatools-console/blob/master/src/Joomlatools/Console/Command/Site/Configure.php#L99-L114 

Hope that helps!

Cheers,
Steven
Reply all
Reply to author
Forward
0 new messages