-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to version 2.0.0, add reflection types
In php 8, many remaining functions started adding reflection types (e.g. json_decode started typing `json` as string in 8.0) Also add return types, accounting for functions currently emitting notices and returning null. Change the version to 2.0.0 to avoid confusion with installations of older 1.0.0 commits of this repo when a PECL release gets created.
- Loading branch information
1 parent
5b01510
commit d5a201f
Showing
9 changed files
with
64 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
simdjson_decode uses strict types | ||
--FILE-- | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
try { | ||
var_dump(simdjson_decode(null)); | ||
} catch (Error $e) { | ||
printf("Caught %s: %s\n", get_class($e), $e->getMessage()); | ||
} | ||
try { | ||
var_dump(simdjson_key_exists('{}', null)); | ||
} catch (Error $e) { | ||
printf("Caught %s: %s\n", get_class($e), $e->getMessage()); | ||
} | ||
?> | ||
--EXPECTF-- | ||
Caught TypeError: %Ssimdjson_decode()%S must be of %Stype string, null given | ||
Caught TypeError: %Ssimdjson_key_exists()%S must be of %Stype string, null given |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters