CI4 - problems |
I have declared(strict_types=1); in nearly all the CI4 files and the following errors were showing but have now been fixed and can be seen here
https://ci4-strict.tk folder: /app Code: CRITICAL - 2019-09-17 03:36:12 --> ini_set() expects parameter 2 to be string, integer given // folder system Code: CRITICAL - 2019-09-17 03:02:29 --> DateTime::createFromFormat() expects parameter 2 to be string, integer given Source files are available to download along with installation instructions.
I don't see a problem statement??
It sounds like you have made a workaround for CI4 not having strict typing?? You have raised this issue before - several threads, in CI4 feature requests, CI4 discussion and CI4 support. How is not having strict typing a problem? There was a PR submitted(https://github.com/codeigniter4/CodeIgniter4/pull/1493), which was not accepted because there are a number of places where we want flexible typing.
(09-17-2019, 11:42 AM)ciadmin Wrote: I don't see a problem statement?? > I don't see a problem statement?? There are two logs files showing three CRITICAL errors. > It sounds like you have made a workaround for CI4 not having strict typing?? I changed the incorrect function parameter types in accordance with the PHP manual's specifications. > You have raised this issue before - several threads, in CI4 feature requests, CI4 discussion and CI4 support. I have just checked the latest CI4 source files and the functions parameters have not been rectified? How can I request these errors to be modified because every time a new version is released it is necessary to manually make the changes. > How is not having strict typing a problem? When not having strict typing it is possible that the function parameter type is incorrect and PHP type juggling will not guess the desired value. > There was a PR submitted(https://github.com/codeigniter4/CodeIgniter4/pull/1493), which was not accepted because there are a number of places where we want flexible typing. I will reply later because I have guests arriving very shortly.
Those CRITICAL errors only show with strict typing, right?
And CI4 does not use strict typing. You have posted this in the CI4 support forum, suggesting there is a problem with the framework, but it is instead with your changes to it, isn't it? That doesn't make these an error in the framework, but rather a feature request on your part, which not everyone agrees with.
OK, point taken and accept that CI4 does not use strict_types.
The first CRITERIA states that the PHP function: "ini_set() expects parameter 2 to be string, integer given" Is it acceptable to request changes that conform to the PHP Standards?
You are free to submit a PR for that, of course. However the integer '1' is typecast to the string '1' when strict is not defined so it's not strictly necessary, but no harm being proper on that.
|
Welcome Guest, Not a member yet? Register Sign In |