diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index a05723d92..1a2f5515f 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -518,6 +518,9 @@ class Functions //gettext 'bindtextdomain', + + // serialize + 'serialize', 'unserialize' ]; if (in_array(strtolower($function_id), $impure_functions, true)) { diff --git a/tests/UnusedCodeTest.php b/tests/UnusedCodeTest.php index 341de7fe6..373ad1cf7 100644 --- a/tests/UnusedCodeTest.php +++ b/tests/UnusedCodeTest.php @@ -737,6 +737,31 @@ class UnusedCodeTest extends TestCase new Foo();' ], + 'ignoreSerializeAndUnserialize' => [ + ' [ '