# |
Nov 19th 2019, 12:04 |
mocelle |
*how |
# |
Nov 19th 2019, 12:03 |
mocelle |
Hier to add Authorisation to Header with content type |
# |
Nov 19th 2019, 11:54 |
ndm |
Obviously, but what can you do... 5.6 would have been fine, the test suite was already using 5.6 because there was no 5.5 CLI version at the time, 5.5 was only available to Apache :) |
# |
Nov 19th 2019, 11:47 |
dereuromark |
ideally through staging phase instead of testing stuff on prod^^ |
# |
Nov 19th 2019, 11:46 |
dereuromark |
ndm: sounds like screwups. taking it from 5.5 to 5.6 should be easy doable within config params. |
# |
Nov 19th 2019, 11:45 |
pieceof |
wanted a project and for your sins they gave you one ; |
# |
Nov 19th 2019, 11:42 |
ndm |
They should, but the then there's reality where people do all sorts of crazy stuff. I'm just upgrading an app that was running on PHP 5.5 and CakePHP 3.2 for some years. Their server environment was finally upgraded, and of course PHP went straight to 7.3 to introduce as many incompatibilities at once as possible - all while the app is used in production of course :) |
# |
Nov 19th 2019, 11:25 |
dereuromark |
even that one is already EOL for some time. |
# |
Nov 19th 2019, 11:25 |
dereuromark |
everyone should already be on php5.6+ for years now. |
# |
Nov 19th 2019, 11:25 |
dereuromark |
oh, that dangerously outdated? |
# |
Nov 19th 2019, 11:18 |
k4t |
bloeck by PHP ver |
# |
Nov 19th 2019, 11:14 |
dereuromark |
always use latest minor |
# |
Nov 19th 2019, 11:12 |
k4t |
thank you |
# |
Nov 19th 2019, 11:11 |
k4t |
I use 3.1.14... you are probably right |
# |
Nov 19th 2019, 11:10 |
dereuromark |
mine isnt anymore I think. |
# |
Nov 19th 2019, 11:10 |
dereuromark |
well, yours might still be scope issue from early 3.x days ( https://sandbox.dereuromark.de/pages/best-practices#logging ) |
# |
Nov 19th 2019, 11:09 |
k4t |
not scopes |
# |
Nov 19th 2019, 11:09 |
k4t |
it is logged twice becuase of levels |
# |
Nov 19th 2019, 11:08 |
k4t |
yes... |
# |
Nov 19th 2019, 11:06 |
dereuromark |
The part I find annoying is that certain levels, e.g. "info" gets always logged in twice ("debug" + "info" stream/file etc).. Not sure what i need to fix here. |
# |
Nov 19th 2019, 11:05 |
ndm |
@k4t Your error log config probably catches all scopes, see https://book.cakephp.org/3/en/core-libraries/logging.html#logging-scopes |
# |
Nov 19th 2019, 11:02 |
maymeow |
one question |
# |
Nov 19th 2019, 11:01 |
k4t |
instead of only sso.log file |
# |
Nov 19th 2019, 11:01 |
k4t |
it will write to sso.log and error.log files |
# |
Nov 19th 2019, 11:01 |
k4t |
Log::warning('test', ['scope' => ['sso']]); |
# |
Nov 19th 2019, 11:01 |
k4t |
so both logs are written instead of only one (to sso.log file) |
# |
Nov 19th 2019, 11:00 |
k4t |
but when I write log to that scope than my log is also created in error.log not only in sso.log |
# |
Nov 19th 2019, 11:00 |
k4t |
I created following log config: Log::config('sso', ['className' => 'File', 'path' => LOGS, 'levels' => [], 'scopes' => ['sso'], 'file' => 'sso.log']); |
# |
Nov 19th 2019, 10:59 |
k4t |
Hi |
# |
Nov 19th 2019, 10:37 |
ndm |
Look at the stacktrace, the error might not stem from where you think it does. |
# |
Nov 19th 2019, 10:35 |
noel |
Seems that as soon as I add in a self-referencing association to my model the route breaks. Which doesn't make any sense. |
# |
Nov 19th 2019, 10:34 |
noel |
same error |
# |
Nov 19th 2019, 10:34 |
pieceof |
; |
# |
Nov 19th 2019, 10:34 |
noel |
how? |
# |
Nov 19th 2019, 10:34 |
pieceof |
bin/cake orm_cache clear |
# |
Nov 19th 2019, 10:33 |
pieceof |
delete orm cache from time to time |
# |
Nov 19th 2019, 10:33 |
noel |
My route hasn't changed. I'm using Postman to access: `/api/users` but when I add my association in then that same route gives me a 500 internal server error with the message I showed. |
# |
Nov 19th 2019, 10:32 |
pieceof |
that link looks bad formed :? |
# |
Nov 19th 2019, 10:32 |
pieceof |
what route ?, controller null, action, null ? |
# |
Nov 19th 2019, 10:31 |
noel |
Mysteriously that error vanished. Now instead I'm getting: ```"A route matching \"array (\n 'controller' => '',\n 'plugin' => '',\n 0 => 1,\n '_method' => 'GET',\n 'action' => 'view',\n 'prefix' => 'api',\n '_ext' => NULL,\n)\" could not be found."``` ... just by adding in an association.. why would my route suddenly not be found? |
# |
Nov 19th 2019, 10:29 |
kgb.acct.personal |
Thanks. I'll keep that in mind |