# |
Apr 26th 2017, 13:05 |
dereuromark |
well, adding a test and running php phpunit.phar on the plugin after composer udpate |
# |
Apr 26th 2017, 13:05 |
inoas |
mom |
# |
Apr 26th 2017, 13:05 |
inoas |
I have your plugin cloned, is there a very fast way to do it? |
# |
Apr 26th 2017, 13:05 |
dereuromark |
I will take care then otherwise |
# |
Apr 26th 2017, 13:04 |
inoas |
and I don't have a dev setup here... |
# |
Apr 26th 2017, 13:04 |
dereuromark |
thx, now I understand ;) |
# |
Apr 26th 2017, 13:04 |
cjohnson |
I forced the version number |
# |
Apr 26th 2017, 13:04 |
cjohnson |
one of my deps pulled a newer PHPUnit |
# |
Apr 26th 2017, 13:04 |
inoas |
should just be $languages[$match[2]][] = $match[1]; |
# |
Apr 26th 2017, 13:04 |
cjohnson |
got it |
# |
Apr 26th 2017, 13:04 |
inoas |
but because of BC ... |
# |
Apr 26th 2017, 13:04 |
inoas |
strtolower($match[1]); shouldn't be there in the first place |
# |
Apr 26th 2017, 13:03 |
inoas |
yes |
# |
Apr 26th 2017, 13:03 |
dereuromark |
I thought de_DE is the standard, uppercase for the country part. |
# |
Apr 26th 2017, 13:02 |
dereuromark |
inoas: would you mind adding a small test case for the lowercasing? why do you need it? |
# |
Apr 26th 2017, 12:59 |
cjohnson |
I clobbered it into the dir structure it expects but now I have incompatible declarations of CakeTestRunner::doRun with PHPUnit_TextUI_TestRunner::doRun |
# |
Apr 26th 2017, 12:57 |
cjohnson |
I think I see the problem, cake is looking for PHPUnit but composer installed it as phpunit |
# |
Apr 26th 2017, 12:55 |
cjohnson |
with phar, or with composer install |
# |
Apr 26th 2017, 12:55 |
cjohnson |
require_once(PHPUnit/TextUI/Command.php): failed to open stream: No such file or directory i…. |
# |
Apr 26th 2017, 12:55 |
cjohnson |
I’m reading here (https://book.cakephp.org/2.0/en/development/testing.html) and it suggests that I can just put the phar file from phpunit’s site into the vendor dir but I still get complaints |
# |
Apr 26th 2017, 12:54 |
cjohnson |
but I’m having trouble getting cake Test to find the phpunit files |
# |
Apr 26th 2017, 12:54 |
cjohnson |
I’m using 2.x and just started a fresh 2.9 project, and I added phpunit to my composer file and installed it |
# |
Apr 26th 2017, 12:51 |
inoas |
hm is it on purpose that the locales returned are actually lower case? |
# |
Apr 26th 2017, 12:47 |
inoas |
https://gist.github.com/inoas/69eccace624492814de7f7931e95095c does actually work <3 |
# |
Apr 26th 2017, 12:35 |
dereuromark |
yeah PhpQuery is probably the cooler way nowaways :slightly_smiling_face: if you dont have APIs you can rely on :P |
# |
Apr 26th 2017, 12:33 |
inoas |
but okay got it |
# |
Apr 26th 2017, 12:33 |
inoas |
I know PhpQuery - much like jQuery in the way it works |
# |
Apr 26th 2017, 12:27 |
dereuromark |
An alternative would PhpQueryLib be for example. |
# |
Apr 26th 2017, 12:26 |
dereuromark |
its only suggest, afaik ;) |
# |
Apr 26th 2017, 12:26 |
dereuromark |
parsing some htmldom |
# |
Apr 26th 2017, 12:25 |
inoas |
may I ask what you are using yangqi/htmldom for primarily? |
# |
Apr 26th 2017, 12:25 |
dereuromark |
your welcome |
# |
Apr 26th 2017, 12:25 |
inoas |
why reinvent the wheel, I am going to use the plugin :) |
# |
Apr 26th 2017, 12:09 |
inoas |
thanks |
# |
Apr 26th 2017, 12:09 |
inoas |
https://github.com/dereuromark/cakephp-tools/blob/master/src/Utility/Language.php#L72 |
# |
Apr 26th 2017, 12:02 |
inoas |
fetch the most appropiate thing |
# |
Apr 26th 2017, 12:02 |
inoas |
heh |
# |
Apr 26th 2017, 12:02 |
inoas |
I need to get a ranked list and then run that ranked list against a ranked sql query |
# |
Apr 26th 2017, 12:01 |
dereuromark |
inoas: I use my own Language::findFirstMatch(['de', 'en']); from Tools, in my apps. |
# |
Apr 26th 2017, 12:00 |
awi |
and then mysql tells you SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens |
# |
Apr 26th 2017, 12:00 |
dereuromark |
you might have to enhance it a bit |