# |
Apr 25th 2019, 06:16 |
kuokkanen_sampo_aleks |
@admad Just opened an issue there: https://github.com/cakephp/cakephp.org/issues/125 |
# |
Apr 25th 2019, 05:33 |
admad |
@kuokkanen_sampo_aleks could you please open an issue here https://github.com/cakephp/cakephp.org |
# |
Apr 25th 2019, 05:33 |
admad |
@megan ^ |
# |
Apr 25th 2019, 05:19 |
kuokkanen_sampo_aleks |
This is not really that important, but does anyone know why the CakePHP site has light grey text on white? It's pretty hard to read. |
# |
Apr 25th 2019, 02:42 |
testdarl |
hahah |
# |
Apr 25th 2019, 02:42 |
Ramram |
kalibangon ka? |
# |
Apr 25th 2019, 02:42 |
Ramram |
hi testdarl |
# |
Apr 25th 2019, 02:42 |
testdarl |
test only by darl |
# |
Apr 25th 2019, 02:36 |
Ramil |
hi all |
# |
Apr 25th 2019, 02:23 |
voycey |
We just pass in the config when running with: `vendor/bin/phpunit -c phpunit.xml.dist --verbose --coverage-html webroot/coverage` |
# |
Apr 25th 2019, 02:22 |
voycey |
@cnizzardini You shoudlnt have to - what is your phpunit command? |
# |
Apr 25th 2019, 00:11 |
cnizzardini |
i guess the simple answer is just add a step to the build to copy the file, seems jenky x) but okay |
# |
Apr 25th 2019, 00:05 |
cnizzardini |
I see this on console ouput App\Console\Installer::postInstall, maybe I need to hook into this and tell it to copy? |
# |
Apr 25th 2019, 00:03 |
cnizzardini |
This is a custom config file, how do I make this get copied from rootrez.default.php? |
# |
Apr 25th 2019, 00:03 |
cnizzardini |
Anyone have experience with jenkins + phpunit. Am getting this error during unit tests "Could not load configuration file: /var/lib/jenkins/workspace/rootrez-phpunit-test/config/rootrez.php" |
# |
Apr 24th 2019, 21:02 |
admad |
@mrgrimpy don't blame my I18n plugin for your problems :slightly_smiling_face: |
# |
Apr 24th 2019, 20:06 |
jeremyharris |
no problem :slightly_smiling_face: |
# |
Apr 24th 2019, 20:02 |
mrgrimpy |
I thank you very much for your time and answers |
# |
Apr 24th 2019, 20:02 |
mrgrimpy |
I will try that implementation tomorrow |
# |
Apr 24th 2019, 20:00 |
jeremyharris |
it reflects the truth the best - you don’t have a route for non-json exts there, so let the framework do what it does with a missing route exception |
# |
Apr 24th 2019, 20:00 |
jeremyharris |
yeah that feels the best |
# |
Apr 24th 2019, 20:00 |
jeremyharris |
there are a few layers you can handle it at really |
# |
Apr 24th 2019, 19:59 |
mrgrimpy |
The extending the route class looks like the cleanest option |
# |
Apr 24th 2019, 19:59 |
mrgrimpy |
Indeed there are but I was sure there was a "proper" way |
# |
Apr 24th 2019, 19:58 |
mrgrimpy |
I tought about checking url in controller and throwing a 404 if not .json but it felt dirty |
# |
Apr 24th 2019, 19:58 |
jeremyharris |
:) |
# |
Apr 24th 2019, 19:58 |
jeremyharris |
so many options |
# |
Apr 24th 2019, 19:58 |
jeremyharris |
finally, you could overwrite _getViewFileName in your AppView to catch the MissingTemplateException and throw your own (that sets status to 404) |
# |
Apr 24th 2019, 19:58 |
mrgrimpy |
Would probably work, I haven,t played with custom route classes to be honest |
# |
Apr 24th 2019, 19:58 |
jeremyharris |
that would work too I think |
# |
Apr 24th 2019, 19:57 |
jeremyharris |
can you extend that route class and check the ext in your new route class, returning false (no match) if it doesn’t have the json ext? |
# |
Apr 24th 2019, 19:57 |
mrgrimpy |
So if I do like $routes->connect('/niveaux2.json') I believe the plugin doesn't like the extension and throws 404 |
# |
Apr 24th 2019, 19:57 |
mrgrimpy |
My routes are built like this /language/rest |
# |
Apr 24th 2019, 19:57 |
mrgrimpy |
I believe it's because it doesn't play nicely with ADmad/I18n plugin |
# |
Apr 24th 2019, 19:56 |
mrgrimpy |
Ok so it gives me a 404: Controller class En could not be found. |
# |
Apr 24th 2019, 19:55 |
jeremyharris |
another solution would be to add a middleware that checks if the request is within your scope and catch the exception and change the status code there |
# |
Apr 24th 2019, 19:55 |
mrgrimpy |
sec |
# |
Apr 24th 2019, 19:55 |
mrgrimpy |
let me do it to be more specific |
# |
Apr 24th 2019, 19:55 |
mrgrimpy |
I did try but I get a different error |
# |
Apr 24th 2019, 19:55 |
jeremyharris |
I could be wrong, but I think what you would need to do is change your route to have the .json in the path so it only matches with that ext, that would throw a missing route exception instead which is a 404 |
# |
Apr 24th 2019, 19:54 |
mrgrimpy |
I'm on version 3.4.14 |