-
Notifications
You must be signed in to change notification settings - Fork 0
feat: handle invalid PHP files with InvalidPHPFileException #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 19060446442Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces error handling for invalid PHP files by adding a new exception class and updating the PHPFileBuilder to catch parsing errors.
Key changes:
- Added InvalidPHPFileException to handle PHP syntax errors
- Updated PHPFileBuilder constructor to catch and re-throw parsing exceptions
- Added test coverage for invalid PHP file handling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Exceptions/InvalidPHPFileException.php | New exception class for invalid PHP files |
| src/PHPFileBuilder.php | Added exception handling in constructor and initialized syntaxTree property |
| tests/PHPFileBuilderTest.php | Added test case for invalid PHP file exception handling |
| tests/fixtures/PHPFileBuilderTest/original/invalid_file.php | Test fixture with invalid PHP syntax |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Refs: #1 (comment)