These are chat archives for eventum/eventum

2nd
Dec 2015
Bryan Alsdorf
@balsdorf
Dec 02 2015 19:49 UTC
@glensc FYI, I'm reworking the CLI Auth stuff based on your suggestions. Simplifying things way down, removing expiration date, removing JWT (though I like the idea it is overkill for this). And I'm changing it where you always pass your email in but can then either use your password or your API key
Elan Ruusamäe
@glensc
Dec 02 2015 19:56 UTC
we can later disable password auth completely. btw, would be best to keep communication in one place. that is the github
also, while at it, you could rename the patch as well, as in master that patch number has been already in use
i don't plan to add any new sql updates, so you should be safe. even if i do, i will wait for that rpc stuff merged
btw, i was thinking eventum could have also something like SymfonyBundle
as i moved my workflow code to git, and now i would see all workflow/custom field related things as one unit
and that unit also has it's own autoloader (i setup composer there) and dependencies
so, would be nice to somehow integrate whole unit with eventum, i'm not sure how to do that
with symfony it's simple, you just add your own bundle as composer dependency, and it will just work
so i was thinking maybe a config array where you pass path to the extra project
it could be path to that project autoloader (for example project/vendor/autoload.php)
but then there's not much info what that project includes, does it have workflow, does it have custom fields, does it have templates
so some kind of "main" class would be neccessary that could have methods telling what it has
or maybe just have some plugin.php which returns array? or json?
Elan Ruusamäe
@glensc
Dec 02 2015 20:01 UTC
any thoughts here?
Elan Ruusamäe
@glensc
Dec 02 2015 20:20 UTC
i wonder how you are using cli? you not using it with composer?
as i get such errors when invoking it from git checkout:
➔ ./cli/eventum.php
PHP Notice:  Use of undefined constant APP_CHARSET - assumed 'APP_CHARSET' in /home/glen/scm/eventum/eventum/lib/eventum/gettext.php on line 100
Bryan Alsdorf
@balsdorf
Dec 02 2015 20:21 UTC
I would have to think about that. It sounds nice to be able to load all external things in one shot though I wouldn't want to make it mandatory as for simple things just loading from the local directory works
I was getting those errors from git checkout as well. Trying to track down cause of it
Elan Ruusamäe
@glensc
Dec 02 2015 21:12 UTC
and regarding workflow. our class has became nightmare, so i was thinking maybe whole workflow stuff should be based on subscriptions
so workflow class is called only once, and it will itself subscribe to events it wishes to listen
those APP_CHARSET errors are because i moved gettext.php loading to composer. i guess i can add just APP_DISABLE_I18N constant and skip gettext loading for now as cli doesn't need I18N afaik
regarding those events and subscriptions, probably can make better extendable and preserving compatibilitites
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:17 UTC
For workflow, yeah using subscriptions would be great. Something similar to how django works (I'm sure there is something in PHP that works that way as well)
Elan Ruusamäe
@glensc
Dec 02 2015 21:18 UTC
i've never used anything like that, just i've been reading about about it in symfony2
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:19 UTC
Hmmm, my new eventum.phar is failing
PHP Warning: include(phar:///media/data/work/eventum/master/cli/eventum.phar/lib/eventum/class.date_helper.php): failed to open stream: phar error: "lib/eventum/class.date_helper.php" is not a file in phar "/media/data/work/eventum/master/cli/eventum.phar" in phar:///media/data/work/eventum/master/cli/eventum.phar/vendor/composer/ClassLoader.php on line 412
Elan Ruusamäe
@glensc
Dec 02 2015 21:20 UTC
check box.json or composer.json
likely need to add new files that you use
Elan Ruusamäe
@glensc
Dec 02 2015 21:26 UTC
but how would you call such addon package in eventum? symfony calls it bundle
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:29 UTC
Date_Helper is an old class though, not newly used here.
I'd be fine with using the same terminology as symfony here
Elan Ruusamäe
@glensc
Dec 02 2015 21:30 UTC
but then they get confused with symfony bundles, eventum bundle wouldn't be even compatible i guess
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:35 UTC
Do you have a box.json file? I just have box.json.dist
And it seems a ton of files are missing
Elan Ruusamäe
@glensc
Dec 02 2015 21:35 UTC
yes, the same file, was lazy to check was there .dist ext or not, just typed from head
but don't bother too much with it, i will have look at it later, definitely before next release
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:42 UTC
Also looks like there are other missing constants after building the CLI. APP_COOKIE and APP_DEFAULT_TIMEZONE
Elan Ruusamäe
@glensc
Dec 02 2015 21:43 UTC
yes, because cli does not load init.php where those are declared
afaik it never needed those
and loading init.php seems wrong, it's config for eventum core. cli should be standalone not read eventum own config
but probably shouldn't bother too much with the old cli, rather finish new cli app :)
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:48 UTC
Yeah I just need to get it partially working because internally we will need to use the auth key
Elan Ruusamäe
@glensc
Dec 02 2015 21:48 UTC
just define them in cli main script perhaps?
Bryan Alsdorf
@balsdorf
Dec 02 2015 21:48 UTC
yeah I will.
BTW, I've made the cleanup to my branch. Should I do another rebase (since my 2nd commit undoes a lot of the changes I made in the first)
Elan Ruusamäe
@glensc
Dec 02 2015 21:51 UTC
nah. let it be. or if you want
i was just against the "merge with master" merge commit
btw, with "subscription/publish" logic, i could have multiple handlers for same event, making code more maintenable. for example i could have just irc related stuff in separate class
i.ve rigjt now just added irc class, but calling it's methods from main workflow class