{"record":{"id":"5aac581423eef617","repo":"pestphp/pest","slug":"the-version-must-start-with-or-a-nu","errorCode":null,"errorMessage":"The version must start with [<, >, <=, >=] or a number.","messagePattern":"The version must start with \\[<, >, <=, >=\\] or a number\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/PendingCalls/TestCall.php","lineNumber":240,"sourceCode":"        return $this;\n    }\n\n    public function skipOnPhp(string $version): self\n    {\n        if (mb_strlen($version) < 2) {\n            throw new InvalidArgumentException('The version must start with [<] or [>].');\n        }\n\n        if (str_starts_with($version, '>=') || str_starts_with($version, '<=')) {\n            $operator = substr($version, 0, 2);\n            $version = substr($version, 2);\n        } elseif (str_starts_with($version, '>') || str_starts_with($version, '<')) {\n            $operator = $version[0];\n            $version = substr($version, 1);\n        } elseif (is_numeric($version[0])) {\n            $operator = '==';\n        } else {\n            throw new InvalidArgumentException('The version must start with [<, >, <=, >=] or a number.');\n        }\n\n        return $this->skip(version_compare(PHP_VERSION, $version, $operator), sprintf('This test is skipped on PHP [%s%s].', $operator, $version));\n    }\n\n    public function skipOnWindows(): self\n    {\n        return $this->skipOnOs('Windows', 'This test is skipped on [Windows].');\n    }\n\n    public function skipOnMac(): self\n    {\n        return $this->skipOnOs('Darwin', 'This test is skipped on [Mac].');\n    }\n\n    public function skipOnLinux(): self\n    {\n        return $this->skipOnOs('Linux', 'This test is skipped on [Linux].');","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/pestphp/pest/blob/1af74a215c3a89bc7a44fc6f9322e369eaad2423/src/PendingCalls/TestCall.php#L222-L258","documentation":"Error \"The version must start with [<, >, <=, >=] or a number.\" thrown in pestphp/pest.","triggerScenarios":"Thrown at src/PendingCalls/TestCall.php:240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1af74a215c3a89bc7a44fc6f9322e369eaad2423","analyzedAt":"2026-08-21T02:16:38.132Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}