classParserException
final class ParserException
extends RuntimeException
Public API: explicitly declared with
@visibility public.A source could not be parsed using the requested PHP grammar.
(new \Deriver\Exception\ParserException('Unexpected token', 'app.php', 3))->path // => 'app.php'Properties§
public string $pathpublic int $sourceLine = 1Methods§
public function __construct(
string $message,
public string $path,
public int $sourceLine = 1,
Throwable|null $previous = null,
)Parameters
$message | string | Parser diagnostic |
$path | string | Path of the source being parsed |
$sourceLine | int | One-based line in that source |
$previous | Throwable|null | Original parser error |
Calls 1
- static-call
RuntimeException::__construct()line 26
Test cases 182§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 181
SessionContractTest::testMalformedSourceRaisesParserExceptioncallsResultRefTestcallsSnapshotTestcallsStatisticsTestcallsDeriverConfigTestcallsArrayFunctionsTestcallsFunctionEvaluatorTestcallsLibraryTestcallsScalarFunctionsTestcallsTypePredicatesTestcallsCallDecisionTestcallsCallDescriptionTestcallsCallDescriptorTestcallsEvaluatorsTestcallsActionTestcallsExpressionTestcallsPlanCompilerTestcallsSemanticPlanTestcallsParameterTestcallsSignatureTestcallsLatticeTestcallsFrontierTestcallsAllocationTestcallsArgumentBindingTestcallsArgumentOrderTestcallsCallableCheckTestcallsCallExecutorTestcallsCallResolutionTestcallsBindingTestcallsCaptureTestcallsEffectsTestcallsExternalBodyTestcallsNativeArgumentsTestcallsAccessTestcallsConstantsTestcallsInvocationTestcallsMethodInvocationTestcallsInvocationTestcallsPropertiesTestcallsSignaturesTestcallsParameterBindingTestcallsPassedArgumentTestcallsArgumentsTestcallsCreationTestcallsEntryPropertiesTestcallsMethodsTestcallsModesTestcallsResolutionTestcallsTransferTestcallsUnpackTestcallsProviderDispatchTestcallsTypeBindingTestcallsTypeCheckTestcallsUnknownCallTestcallsAlternativeTestcallsAssessmentTestcallsCompletionTestcallsExceptionalTestcallsClassNamesTestcallsConstraintsTestcallsContextTestcallsCollectionCallsTestcallsExceptionChainTestcallsExceptionMatchTestcallsHandlerTestcallsIterationStepTestcallsIteratorCursorTestcallsLoopConvergenceTestcallsObservationLimitTestcallsPathJoinTestcallsResidualPathsTestcallsStateJoinTestcallsUnwindingTestcallsCellTestcallsComponentsTestcallsDiscoveryTestcallsTableTestcallsDependenciesTestcallsEvaluatorTestcallsHavocTestcallsInstructionTransferTestcallsLocationTestcallsMemoryTestcallsSlotReferenceTestcallsStateStorageTestcallsObservationCollectorTestcallsPathTestcallsProtocolTestcallsReaderTestcallsStringsTestcallsTransferTestcallsCallablePredicateTestcallsConversionsTestcallsCountableCallsTestcallsScalarErrorsTestcallsStateTestcallsEvaluationTestcallsInvocationTestcallsIsolationTestcallsDerivationTestcallsExplanationTestcallsCallableTransferTestcallsCompoundAssignmentTestcallsConstantTransferTestcallsExternalTransferTestcallsIntrinsicTransferTestcallsMemoryStepTestcallsObjectAccessTestcallsPropertyAccessCheckTestcallsPropertyLookupTestcallsPropertyMagicTestcallsPropertyReferenceTestcallsPropertyTransferTestcallsPureStepTestcallsReferenceAssignmentTestcallsProjectionTestcallsBudgetTestcallsEntryPointTestcallsObservationTestcallsQueryScopeTestcallsReturnQueryTestcallsStateQueryTestcallsTupleQueryTestcallsValueQueryTestcallsArithmeticTestcallsArraysTestcallsComparisonTestcallsOperationsTestcallsTargetProfileTestcallsTermTestcallsDerivationResultTestcallsQueryExecutionTestcallsResultAssessmentTestcallsValueGraphTestcallsAggregateLoweringTestcallsAssignmentLoweringTestcallsCallLoweringTestcallsConditionalLoweringTestcallsDestructuringLoweringTestcallsExceptionLoweringTestcallsGotoLoweringTestcallsLoopLoweringTestcallsMatchLoweringTestcallsStaticLoweringTestcallsSwitchLoweringTestcallsCallableSourceTestcallsCallSiteIndexTestcallsConstantSignaturesTestcallsIndexerTestcallsIndexTestcallsClassDeclarationTestcallsPropertyDeclarationTestcallsSymbolRefTestcallsCompositionTestcallsMembersTestcallsPropertyScopeTestcallsEffectInspectionTestcallsExpressionLoweringTestcallsArgumentTestcallsBasicBlockTestcallsCallableGraphTestcallsCatchTargetTestcallsExceptionRegionTestcallsExpressionRefTestcallsInstructionTestcallsParameterTestcallsPointRefTestcallsTerminatorTestcallsAccessTestcallsDispatchTestcallsInstructionEmitterTestcallsLowererTestcallsLoweringScopeTestcallsStatementLoweringTestcallsParserTest::testParseRejectsSyntaxNewerThanTheConfiguredVersioncallsParserTest::testParseThrowsWithTheSourcePathAndLineOnMalformedSyntaxcallsTargetSyntaxTest::testUnparenthesizedNewAndOtherUnsupportedSyntaxRaiseParserExceptionscallsCallObservationsTestcallsQueryValidationTestcallsDeriverTest::testPrepareRejectsMalformedSourceWithoutAQuerycallsDeriverTest::testPrepareTranslatesThePhpVersionIntoParserConfigurationcalls