-
Notifications
You must be signed in to change notification settings - Fork 227
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
Closes #7123: Rules about get_subscribed_events #7124
Closes #7123: Rules about get_subscribed_events #7124
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
Outdated
Show resolved
Hide resolved
I've treated your feedback @CrochetFeve0251 , Also, you'll notice I've added some I add a screenshot of your test passing as it isn't part of the CI in here. |
…bed-events # Conflicts: # composer.json # phpstan.neon.dist
Description
Fixes #7123
This won't impact users.
Type of change
Detailed scenario
Just run PHPStan
Technical description
Documentation
This pull request introduces several changes related to PHPStan integration and testing in the project. The most significant updates include adding new PHPStan rules and tests, modifying the configuration files, and ensuring callback methods exist in subscribed events.
PHPStan Integration and Configuration:
composer.json
: Added new scripts to run PHPStan with specific options (run-stan-reset-baseline
,run-stan-test
).phpstan.neon.dist
: Updated parameters to include new paths and rules, and modified reporting settings. [1] [2]New PHPStan Rule:
tests/phpstan/Rules/EnsureCallbackMethodsExistsInSubscribedEvents.php
: Implemented a new PHPStan rule to ensure callback methods exist in subscribed events.Tests for New Rule:
tests/phpstan/tests/Rules/EnsureCallbackMethodsExistsInSubscribedEventsTest.php
: Added tests to validate the new PHPStan rule, including tests for valid subscribers, non-existing methods, and complex syntax.tests/phpstan/tests/data/EnsureCallbackMethodsExistsInSubscribedEventsTest/complex-syntax.php
tests/phpstan/tests/data/EnsureCallbackMethodsExistsInSubscribedEventsTest/not-existing.php
tests/phpstan/tests/data/EnsureCallbackMethodsExistsInSubscribedEventsTest/valid.php
PHPUnit Configuration:
tests/phpstan/tests/bootstrap.php
: Added bootstrap file for PHPUnit tests.tests/phpstan/tests/phpunit.xml
: Added PHPUnit configuration file to define test suites and coverage settings.New dependencies
None
Risks
None
Mandatory Checklist
Code validation
Code style