-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add PHPStan check #1409
Merged
Merged
ci: Add PHPStan check #1409
Commits on Feb 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for db92814 - Browse repository at this point
Copy the full SHA db92814View commit details -
Had to disable php-cs-fixer phpdoc rules since it would try to add invalid typehints.
Configuration menu - View commit details
-
Copy full SHA for 271577a - Browse repository at this point
Copy the full SHA 271577aView commit details
Commits on Feb 9, 2023
-
daos: Make nullability explicit
All three supported database engines will return `null` PHP value for a `NULL` value in database. Previously all ensured values would be cast to the expected type (except for `DateTime` which had a special case for `NULL`), possibly replacing `NULL` value with 0 or other incorrect value. Let’s make the `null` part of the “type system” using binary or. It will also be useful once we start adding return type hints for daos methods. ---- ```php $c = $dice->create(helpers\DatabaseConnection::class); $v = $c->exec('select NULL as "null", 42 as "int", 3.14 as "decimal", CURRENT_TIMESTAMP as "timestamp", \'test\' as "string", true as "true", false as "false";'); var_dump($v); ``` ## PHP 8.2 ### SQLite ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> int(42) ["decimal"]=> float(3.14) ["timestamp"]=> string(19) "2023-02-08 23:07:00" ["string"]=> string(4) "test" ["true"]=> int(1) ["false"]=> int(0) } } ``` ### MariaDB 10.6.11 ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> int(42) ["decimal"]=> string(4) "3.14" ["timestamp"]=> string(19) "2023-02-09 00:06:47" ["string"]=> string(4) "test" ["true"]=> int(1) ["false"]=> int(0) } } ``` ### PostgreSQL 14.6 ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> int(42) ["decimal"]=> string(4) "3.14" ["timestamp"]=> string(29) "2023-02-08 23:06:57.433412+00" ["string"]=> string(4) "test" ["true"]=> bool(true) ["false"]=> bool(false) } } ``` ## PHP 7.2 ### SQLite ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> string(2) "42" ["decimal"]=> string(4) "3.14" ["timestamp"]=> string(19) "2023-02-08 23:23:54" ["string"]=> string(4) "test" ["true"]=> string(1) "1" ["false"]=> string(1) "0" } } ``` ### MariaDB 10.6.11 ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> string(2) "42" ["decimal"]=> string(4) "3.14" ["timestamp"]=> string(19) "2023-02-09 00:24:33" ["string"]=> string(4) "test" ["true"]=> string(1) "1" ["false"]=> string(1) "0" } } ``` ### PostgreSQL 14.6 ```php array(1) { [0]=> array(7) { ["null"]=> NULL ["int"]=> int(42) ["decimal"]=> string(4) "3.14" ["timestamp"]=> string(29) "2023-02-08 23:24:30.032842+00" ["string"]=> string(4) "test" ["true"]=> bool(true) ["false"]=> bool(false) } } ```
Configuration menu - View commit details
-
Copy full SHA for 57bf6e8 - Browse repository at this point
Copy the full SHA 57bf6e8View commit details -
Avoid auxiliary static::$stmt variable
It is not needed since PHP 7.0.
Configuration menu - View commit details
-
Copy full SHA for ec53c94 - Browse repository at this point
Copy the full SHA ec53c94View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9d6b37 - Browse repository at this point
Copy the full SHA d9d6b37View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2f2a18 - Browse repository at this point
Copy the full SHA b2f2a18View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6c3f08 - Browse repository at this point
Copy the full SHA e6c3f08View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbba90d - Browse repository at this point
Copy the full SHA cbba90dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 17ecff9 - Browse repository at this point
Copy the full SHA 17ecff9View commit details -
Initial fixes for raising PHPStan level to 6
Will still require more work on filling in array item types.
Configuration menu - View commit details
-
Copy full SHA for e88cb72 - Browse repository at this point
Copy the full SHA e88cb72View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.