Merged
Conversation
staabm
commented
Feb 18, 2026
| @@ -467,6 +473,8 @@ private static function isFileLintSkipped(string $file): bool | |||
|
|
|||
| if (preg_match('~<?php\\s*\\/\\/\s*lint\s*([^\d\s]+)\s*([^\s]+)\s*~i', $firstLine, $m) === 1) { | |||
Contributor
Author
There was a problem hiding this comment.
here we can see that for TypeInferenceTestCase to work properly, we expect <?php // lint at the very start
staabm
commented
Feb 18, 2026
Comment on lines
+3
to
+16
| exec('php vendor/bin/phpunit --group levels --list-tests-xml test-list.xml', $output, $return); | ||
| if ($return !== 0) { | ||
| throw new RuntimeException(implode("\n", $output)); | ||
| } | ||
|
|
||
| libxml_use_internal_errors(true); | ||
| $simpleXml = simplexml_load_file('test-list.xml'); | ||
| if ($simpleXml === false) { | ||
| throw new RuntimeException('Error loading test-list.xml'); | ||
| $errors = []; | ||
| foreach (libxml_get_errors() as $error) { | ||
| $errors[] = $error->message; | ||
| } | ||
|
|
||
| throw new RuntimeException('Error loading test-list.xml: ' . implode(', ', $errors)); |
Contributor
Author
There was a problem hiding this comment.
make sure when a underlying error occurs we see a meaningful error with hints for the root-cause
staabm
commented
Feb 18, 2026
Comment on lines
+476
to
+477
| } elseif (str_contains($firstLine, 'lint')) { | ||
| throw new LogicException(sprintf('// lint comment must immediately follow the php starting tag in %s', $file)); |
Contributor
Author
There was a problem hiding this comment.
the new error which will be triggered
Collaborator
|
This pull request has been marked as ready for review. |
VincentLanglet
approved these changes
Feb 18, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix existing tests and claude instructions.
added a exception when the first line contains the
lint-substring but at the wrong position