-
-
Notifications
You must be signed in to change notification settings - Fork 477
feat: rise phpstan level 8 and resolve errors #2165
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
feat: rise phpstan level 8 and resolve errors #2165
Conversation
Analysis of Commit Practice:The commit titled "fix: run phpbcf in changes" represents a suboptimal development pattern that should be avoided in your workflow. Root Cause Identification:This type of commit indicates that code formatting corrections (phpbcf) were applied in a subsequent commit rather than being integrated into the original code changes. This approach creates interdependencies between commits that compromise version control integrity. Impact Assessment:
Recommended Resolution Strategy:Implement a pre-commit validation workflow where all automated checks (formatting, linting, type checking) are executed and resolved prior to commit creation. Remedial formatting changes should be squashed or amended into their associated feature commits to maintain a clean, independently-revertable commit history. Expected Outcome:A linear commit history where each individual commit maintains build integrity and can be cherry-picked, reverted, or bisected without dependency conflicts. |
d352a0a to
14a419c
Compare
ok, squashed and removed from history push |
|
Continuous Integration Failure Notification: Resolution Guidance: This guide provides comprehensive instructions on:
Next Steps:
Objective: |
|
Commit Message Convention Violation: 🚫 Additional Issue - Incorrect Prefix Semantics:
Recommended Action: 🎯
Reference Documentation: 📖 Expected Outcome: 🏆 |
|
Continuous Integration Pipeline Failure - Recurrence: 🚨
|
|
Contributing Guidelines Compliance Issue: 📋 Reference Documentation: 📖 Identified Violations: ❌
Recommended Action: 🛠️
Expected Outcome: 🏆 |
eed58af to
33a55f9
Compare
Fixed |
1 similar comment
Fixed |
|
Suggestion: Could you mark as "resolved" in items or conversations that are solved to you? I can do by myself, but I dont know if it ok for you. I have a lot threads in this issue and it is being difficult to follow every reply opened. Thanks |
Sure! Although, are you sure the issue is only the number of threads, and not also maybe how verbose and lengthy they are? Would you agree to say that it might be better if everyone dialed a bit back from delegating so much to AI? |
Actually at some points in the review, your verbose in some replies helps me to understand better the problem because is more detailed and deep. For new contributors as me or people just wacthing and learning, maybe it is even useful In my side, I just use "github summary" button in the description at the moment of open the PR thinking that it was more clear to show the changes, which it seems not very good for the maintaners and generate a kind of conflict, then you want continue with the lesson overreacting with more verbose and lenghty replies to teach me probably about that. And I have patient about that. I see your point since in your side you are having everyday a lot PR to review in a lot projects and probably it is a lot boilerplate to you and extra consuming time, so I will not use the github summary button in generate descriptions for PR for this project and I will try to be more direct. At the end is only "show me the code" who speaks better than descriptions. |
|
A little description doesn't hurt, but if you find yourself (or your LLM) mentioning filenames, it's probably too much detail. I've seen you've updated your commit messages, but as per the guide, please wrap the commit message bodies at 72 chars, so that it looks good when running -Add @var type annotation for stdClass ReflectionClass to satisfy PHPStan level 8. This annotation provides explicit type information, improving static type checking and code quality.
+Add @var type annotation for stdClass ReflectionClass to satisfy PHPStan
+level 8. This annotation provides explicit type information, improving static type
+checking and code quality. |
|
Some of your commit need to be squashed together: nobody needs to know you ordered the |
|
Thank you for going through review loops here @greg0ire, I didn't have energy so soon again. Don't worry about commits though, we squash merge PRs in these cases |
781a419 to
b40b99a
Compare
Done |
Done |
b40b99a to
558a4eb
Compare
Add explicit null check in XMLSchemaTest incorporating PHPBCF changes. This feature enhances test robustness and meets PHPStan level 8 requirements.
Correct the type hint for connection parameters in DropDatabaseDoctrineTest. This test update ensures accurate type checking and complies with PHPStan level 8.
Add explicit null check in XMLSchemaTest and apply code formatting. This feature improves test reliability and code quality for PHPStan level 8.
Specify phpstan-symfony 2.0.9 and phpstan 2.1.13 to support class.NotFound errors. This fix ensures proper error resolution and compatibility with PHPStan level 8.
…der null check in DoctrineExtension.php Add explicit checks for preg_replace_callback return value and PCRE errors, and reorder the null check in DoctrineExtension.php to improve error handling. This change enhances robustness and complies with PHPStan level 8 requirements for type safety.
Add @var type annotation for stdClass ReflectionClass to satisfy PHPStan level 8. This annotation provides explicit type information, improving static type checking and code quality.
Remove ignore directives since phpstan/symfony 2.0.9 resolves class.NotFound errors. This update cleans up the code and aligns with the latest PHPStan capabilities.
Move executionPercent addition to before assigning groupedQueries to ensure the property type matches the expected structure.
558a4eb to
347885a
Compare
cc6f10d to
8e6d182
Compare
8e6d182 to
9e4a6d2
Compare
This pull request introduces several improvements and bug fixes across the codebase, focusing on stricter static analysis, improved null handling, and better type safety. The main changes include raising the PHPStan analysis level, adding type and null checks to prevent runtime errors, and improving documentation for generics-related issues.
Static analysis and type safety improvements:
phpstan.neon.distfor stricter code quality checks.@phpstan-ignore missingType.genericsannotations throughoutsrc/DependencyInjection/Configuration.phpto suppress generics-related warnings and clarify intent.$paramsargument inprovideIncompatibleDriverOptionsto specify expected structure, aiding static analysis tools.Null handling and bug fixes:
DoctrineExtension.phpand when importing DOM nodes inXMLSchemaTest.phpto prevent potential errors.ProfilerController.phpto return a 404 response if not found, avoiding errors on missing profiles.DoctrineBundle.php.DoctrineDataCollector.phpto always provide a validDebugDataHolder, preventing null-related issues.Other improvements:
MiddlewaresPass.phpto avoid callingis_subclass_ofon null.preg_replace_callbackto string inDoctrineExtension.phpfor stricter type safety.