# |
Mar 18th 2019, 18:28 |
admad |
delete your vendor/cakephp/cakephp folder and run composer update again |
# |
Mar 18th 2019, 18:27 |
admad |
@m you mention `compact('etagMatches', 'timeMatches')` generating errors in Response class. But Response class no longer has any compact() call https://github.com/cakephp/caakephp/blob/3.7.5/src/Http/Response.php |
# |
Mar 18th 2019, 18:27 |
m |
but i can see the fix at github; so ill figure it out myself. Thanks for your time |
# |
Mar 18th 2019, 18:26 |
slackebot2 |
<birdy247> |
# |
Mar 18th 2019, 18:26 |
m |
hm; any idea why i dont have it when i'm at 3.7.5 ? |
# |
Mar 18th 2019, 18:26 |
admad |
@m that fix was done quite a quite ago, it is present in latest release |
# |
Mar 18th 2019, 18:25 |
birdy247 |
if i perform the exact same callback in "name" |
# |
Mar 18th 2019, 18:25 |
slackebot2 |
<birdy247> |
# |
Mar 18th 2019, 18:25 |
chris-andre |
@birdy247 Not sure how/why, but name has to come from somewhere? From the entity being patched? |
# |
Mar 18th 2019, 18:25 |
birdy247 |
if I check the data higher up i.e. name |
# |
Mar 18th 2019, 18:25 |
m |
ive checked github for cakephp/cakephp dev-master and i see a "php7.3" fix. Could it be that dev-master fixes that? instead of ^3.7 ? |
# |
Mar 18th 2019, 18:24 |
birdy247 |
This is odd |
# |
Mar 18th 2019, 18:23 |
m |
It's probably my fault, somewhere, but I can't put my finger on it; it seems to be Cake (to me at the moment) |
# |
Mar 18th 2019, 18:22 |
m |
admad: I am using 3.7.5 (checked the file in vendor and ran composer again given ^3.7 |
# |
Mar 18th 2019, 18:20 |
birdy247 |
yet the entity has "name" set |
# |
Mar 18th 2019, 18:20 |
birdy247 |
data is empty |
# |
Mar 18th 2019, 18:20 |
slackebot2 |
<birdy247> |
# |
Mar 18th 2019, 18:20 |
admad |
@m check vendor/cakephp/cakephp/VERSION.txt |
# |
Mar 18th 2019, 18:19 |
birdy247 |
despite other fields having data |
# |
Mar 18th 2019, 18:19 |
admad |
@m i doubt you are using latest cake 3.7 release |
# |
Mar 18th 2019, 18:19 |
birdy247 |
but the $context['data'] is empty |
# |
Mar 18th 2019, 18:19 |
birdy247 |
I am using a callback |
# |
Mar 18th 2019, 18:19 |
birdy247 |
yes |
# |
Mar 18th 2019, 18:19 |
chris-andre |
`allowEmptyString( string $field , boolean|string|callable $when true , string|null $message null )` |
# |
Mar 18th 2019, 18:16 |
birdy247 |
in allowEmptyString, is the callback only expecting 1 arg? |
# |
Mar 18th 2019, 18:15 |
birdy247 |
In the notEmpty, the callback used to have the data and context |
# |
Mar 18th 2019, 17:07 |
m |
for me the problems start with PHP7.3 and some stuff (probably) in core :P |
# |
Mar 18th 2019, 17:06 |
m |
aro: what is wrong? I've been running cake3 (mostly 3.5+) on PHP7.2 for a while now |
# |
Mar 18th 2019, 17:01 |
aro |
Weird |
# |
Mar 18th 2019, 17:01 |
jeremyharris |
the core testsuite runs on 7.2 so I wouldn’t think it would be an issue with the core |
# |
Mar 18th 2019, 17:01 |
aro |
7.0 is past EOL |
# |
Mar 18th 2019, 17:00 |
aro |
7.0? |
# |
Mar 18th 2019, 17:00 |
jeremyharris |
how so? |
# |
Mar 18th 2019, 17:00 |
alexdd55 |
weird.. but 7.0 is buggy akaik |
# |
Mar 18th 2019, 16:59 |
aro |
Well we upgraded our install of PHP from 7.0 to 7.2, and things went completely south |
# |
Mar 18th 2019, 16:59 |
jeremyharris |
I believe it always supported 7.2, as the requirements are 5.6 or greater for cake 3 |
# |
Mar 18th 2019, 16:47 |
aro |
what version of cakephp 3 added support for php7.2 |
# |
Mar 18th 2019, 16:08 |
m |
for now; I've "fixed" (havent exactly proofed equivalence but still) it by escaping the "invalid range" in the regexp's for "SqlDialectTrait" by escaping the "-" character with "\-" . This seems to work for both line 64 and 75 in that file ( method quoteIdentifier($identifier) ). If i was sure about my fixes, I would have created a pull-request, but I'm not. |
# |
Mar 18th 2019, 15:54 |
slackebot2 |
error/bug in the cake core code (for first problem, second seems a code error to me)? Or did I just mess up my server :P Thanks in advance |
# |
Mar 18th 2019, 15:54 |
slackebot2 |
havent found a solution yet. Problem 2: I get 2 notices for missing/initialized variabels in file "\Cake\Http\Response" at line 2059 and line 2064. It seems that the 2 variables "etagMatches" and "timeMatches" are not set in the main scope and thus i get an error at compact('etagMatches', 'timeMatches'). I fixed this (locally, in cake core.. ) initializing both variables to "false" at the top of the method "checkNotModified". Could this be an |
# |
Mar 18th 2019, 15:54 |
m |
Hey guys. Hope all are well. I've just upgraded my local server to PHP7.3.3 and have composer updated to latest version for CakePHP (3.7.5). I noticed 2 problems (error logs), most sites/code works fine. Problem 1: I get a lot of errors on "preg_match()" in the class "\Cake\Database\SqlDialectTrait" (line 75). That preg_match contains "_\s" in the regex and reading stackoverflow, it seems PHP changed something that does not allow it anymore. I |