Log message #4020390

# At Username Text
# 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
# Apr 26th 2017, 11:59 inoas public function acceptLanguage($language = null) in ServerRequest doesnt
# Apr 26th 2017, 11:59 inoas accept language doesnt rate based on browser setting afaik
# Apr 26th 2017, 11:59 awi so like an array [8 => 9, 10 => 11] will end in :c8 and :c10 in the query
# Apr 26th 2017, 11:59 dereuromark @admad Is is possible for this i18n middleware to just detect and set Configure:: lang? Without the redirect? I bet that would be useful for far more projects this way - maybe it can be configurable redirect => true/false ?
# Apr 26th 2017, 11:58 awi hi. i stumbled across a weird problem with the Queries... if you use some sort if $query->where([Entities.id IN => $arraylist]); and the identifiers in the query are mixed up (f.e. you got them from somewhere else) its using those array ids as :c{array-ID}:...
# Apr 26th 2017, 11:58 inoas was just looking for something like this http://php.net/manual/fa/function.http-negotiate-language.php