- Issue created by @jonathan1055
- last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago CI aborted - last update
over 1 year ago Build Successful - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 10.2.x + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago Build Successful -
jonathan1055 →
committed 88a5eb91 on 2.x
Issue #3400631 by jonathan1055: Add phpstan.neon and two baseline files
-
jonathan1055 →
committed 88a5eb91 on 2.x
-
jonathan1055 →
committed 34773549 on 2.x
Issue #3400631 by jonathan1055: Do the easy PHPStan fixes
-
jonathan1055 →
committed 34773549 on 2.x
- last update
over 1 year ago Build Successful - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass - last update
over 1 year ago 227 pass -
jonathan1055 →
committed ef25ca68 on 2.x
Issue #3400631 by jonathan1055: Add the workbench_moderation modules to...
-
jonathan1055 →
committed ef25ca68 on 2.x
-
jonathan1055 →
committed 8795eaed on 2.x
Issue #3400631 by jonathan1055: Add dependency injection to...
-
jonathan1055 →
committed 8795eaed on 2.x
- last update
over 1 year ago Build Successful -
jonathan1055 →
committed d683fde5 on 2.x
Issue #3400631 by jonathan1055: Fix prettier standard - empty line in...
-
jonathan1055 →
committed d683fde5 on 2.x
- last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful -
jonathan1055 →
committed 0c8f8613 on 2.x
Issue #3400631 by jonathan1055: PHPStan: Add missing Drupal\scheduler\...
-
jonathan1055 →
committed 0c8f8613 on 2.x
- last update
over 1 year ago Build Successful - 🇬🇧United Kingdom jonathan1055
I wrote a script to summarise PHPstan messages in a baseline file. Right at the start we had:
--------------------------------------------------------------- Number of messages by file 34 in src/SchedulerManager.php 30 in tests/modules/scheduler_api_test/src/EventSubscriber.php 9 in tests/src/Functional/SchedulerDrushTest.php 8 in scheduler_rules_integration/scheduler_rules_integration.rules_defaults.inc 4 in src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php 3 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php 3 in src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php 3 in src/Theme/SchedulerThemeNegotiator.php 2 in scheduler.module 2 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionDeriver.php 1 in plugins/content_types/scheduler_form_pane.inc 1 in scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php 1 in src/Access/SchedulerRouteAccess.php 1 in src/Plugin/Field/FieldWidget/TimestampDatetimeNoDefaultWidget.php 1 in src/Plugin/views/access/Scheduler.php 1 in src/Routing/SchedulerRouteSubscriber.php 1 in tests/src/Functional/SchedulerBasicNodeTest.php --------------------------------------------------------------- Different types of message: 58 Total number of messages: 110 ---------------------------------------------------------------
After splitting out the first set of legacy messages and following Core's ignore of
Unsafe usage of new static()
the result was:--------------------------------------------------------------- Number of messages by file 30 in tests/modules/scheduler_api_test/src/EventSubscriber.php 25 in src/SchedulerManager.php 8 in scheduler_rules_integration/scheduler_rules_integration.rules_defaults.inc 4 in scheduler.module 4 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php 4 in src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php 3 in src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php 3 in src/Theme/SchedulerThemeNegotiator.php 1 in plugins/content_types/scheduler_form_pane.inc 1 in scheduler_rules_integration/src/Event/EventDeriver.php 1 in scheduler_rules_integration/src/Plugin/Condition/ConditionDeriver.php 1 in scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionDeriver.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php 1 in src/Access/SchedulerRouteAccess.php 1 in src/Controller/LightweightCronController.php 1 in src/Form/SchedulerCronForm.php 1 in src/Plugin/Derivative/DynamicLocalTasks.php 1 in src/Plugin/Field/FieldWidget/TimestampDatetimeNoDefaultWidget.php 1 in src/Plugin/views/access/Scheduler.php 1 in src/Routing/SchedulerRouteSubscriber.php 1 in src/SchedulerPermissions.php 1 in src/SchedulerPluginBase.php --------------------------------------------------------------- Different types of message: 46 Total number of messages: 100 ---------------------------------------------------------------
Then after doing all the easy fixes we had
Summary of PHPStan messages 'Drupal calls should be avoided in classes, use dependency injection instead' 38 occurrence in 14 file(s) scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php src/Access/SchedulerRouteAccess.php src/Plugin/Field/FieldWidget/TimestampDatetimeNoDefaultWidget.php src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php src/Routing/SchedulerRouteSubscriber.php src/SchedulerManager.php src/Theme/SchedulerThemeNegotiator.php 'Parameter \$event of method Drupal\scheduler_api_test\EventSubscriber\:\:apiTest(|Node|Media|Product|TaxonomyTerm)(PrePublish|Publish|PrePublishImmediately|PublishImmediately|PreUnpublish|Unpublish)\(\) has invalid type Drupal\scheduler\SchedulerEvent\.' 30 occurrence in 1 file(s) tests/modules/scheduler_api_test/src/EventSubscriber.php 'Parameter \$container of method Drupal\scheduler_rules_integration\Plugin\RulesAction\SchedulerRulesActionBase\:\:create\(\) has invalid type Drupal\scheduler_rules_integration\Plugin\RulesAction\ContainerInterface\.' 1 occurrence in 1 file(s) scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php 'Call to deprecated method loadRevision\(\) of class Drupal\\Core\\Entity\\EntityStorageInterface\:' 1 occurrence in 1 file(s) src/SchedulerManager.php 'Instantiated class Drupal\scheduler\SchedulerEvent not found\.' 1 occurrence in 1 file(s) src/SchedulerManager.php --------------------------------------------------------------- Number of messages by file 30 in tests/modules/scheduler_api_test/src/EventSubscriber.php 19 in src/SchedulerManager.php 4 in src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php 3 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php 3 in src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php 3 in src/Theme/SchedulerThemeNegotiator.php 1 in scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php 1 in scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php 1 in src/Access/SchedulerRouteAccess.php 1 in src/Plugin/Field/FieldWidget/TimestampDatetimeNoDefaultWidget.php 1 in src/Routing/SchedulerRouteSubscriber.php --------------------------------------------------------------- Different types of message: 5 Total number of messages: 71 ---------------------------------------------------------------
- last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful -
jonathan1055 →
committed 1a869172 on 2.x
Issue #3400631 by jonathan1055: PHPStan: Add ContainerInterface to...
-
jonathan1055 →
committed 1a869172 on 2.x
- last update
over 1 year ago Build Successful - last update
over 1 year ago Build Successful -
jonathan1055 →
committed cd1db37f on 2.x
Issue #3400631 by jonathan1055: Use dependency injection for scheduler....
-
jonathan1055 →
committed cd1db37f on 2.x
- 🇬🇧United Kingdom jonathan1055
Current 8.x-1.x branch PHPStan job shows 46 errors
https://git.drupalcode.org/project/scheduler/-/jobs/687380Using the three initial files, taken directly from 2.x with no changes, we get 41 errors
https://git.drupalcode.org/project/scheduler/-/jobs/695715
Many of these are because there are more messages in the 'ignore' files than are actuallly found in the code. - 🇬🇧United Kingdom jonathan1055
After removing the extra ignored messages, we are left with 15 that need to be fixed.
- last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago Build Successful - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail -
jonathan1055 →
committed 9f332e45 on 2.x
Issue #3400631 by jonathan1055: Add .scheduler-matrix and .scheduler-...
-
jonathan1055 →
committed 9f332e45 on 2.x
- last update
about 1 year ago Build Successful - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago Build Successful - last update
about 1 year ago 64 pass, 6 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago CI error -
jonathan1055 →
committed 3dd4fde1 on 8.x-1.x
Issue #3400631 by jonathan1055: Add phpstan baseline files. Add manual...
-
jonathan1055 →
committed 3dd4fde1 on 8.x-1.x
- last update
about 1 year ago 65 pass, 4 fail - last update
about 1 year ago 65 pass, 4 fail -
jonathan1055 →
committed af1a9c1d on 8.x-1.x
Issue #3400631 by jonathan1055: Fix 16 PHPStan errors
-
jonathan1055 →
committed af1a9c1d on 8.x-1.x
- last update
about 1 year ago 227 pass - last update
about 1 year ago 227 pass - last update
about 1 year ago 227 pass - last update
about 1 year ago 75 pass - last update
about 1 year ago 227 pass -
jonathan1055 →
committed a574fcf0 on 2.x
Issue #3400631 by jonathan1055: Run phpunit at "next minor" and show...
-
jonathan1055 →
committed a574fcf0 on 2.x
- Status changed to Fixed
about 1 year ago 3:52pm 30 January 2024 - 🇬🇧United Kingdom jonathan1055
PHPStan is now running on 2.x and 8.x-1.x and all the easy fixes have been done.
Each branch has legacy code messages permanently ignored in thephpstan-baseline-ok.neon
file, and the remainder are "temporarily" ignored in thephpstan-baseline-to-fix.neon
. These can/should be fixed in due course.2.x
--------------------------------------------------------------------------------------------------------------
Summary of PHPStan messages in phpstan-baseline-to-fix.neon
--------------------------------------------------------------------------------------------------------------
Drupal calls should be avoided in classes, use dependency injection instead'
36 occurrence(s) in 12 file(s)
scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php
scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php
scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php
scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php
src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php
src/Routing/SchedulerRouteSubscriber.php
src/SchedulerManager.php
src/Theme/SchedulerThemeNegotiator.php
--------------------------------------------------------------------------------------------------------------
Call to deprecated method loadRevision\(\) of class Drupal\Core\Entity\EntityStorageInterface\:'
1 occurrence(s) in 1 file(s)
src/SchedulerManager.php
--------------------------------------------------------------------------------------------------------------
Number of messages by file
18 in src/SchedulerManager.php
4 in src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php
3 in src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
3 in src/Theme/SchedulerThemeNegotiator.php
2 in scheduler_rules_integration/src/Plugin/RulesAction/SchedulerRulesActionBase.php
1 in scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php
1 in scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php
1 in scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php
1 in scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php
1 in scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php
1 in scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php
1 in src/Routing/SchedulerRouteSubscriber.php
--------------------------------------------------------------------------------------------------------------
Different types of message: 2
Total number of messages: 37
--------------------------------------------------------------------------------------------------------------8.x-1.x
--------------------------------------------------------------------------------------------------------------
Summary of PHPStan messages in phpstan-baseline-to-fix.neon
--------------------------------------------------------------------------------------------------------------
Drupal calls should be avoided in classes, use dependency injection instead
23 occurrence(s) in 11 file(s)
scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php
scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php
scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php
scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php
src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php
src/Plugin/views/access/Scheduler.php
src/SchedulerManager.php
src/Theme/SchedulerThemeNegotiator.php
--------------------------------------------------------------------------------------------------------------
Variable \$unpublish_on in empty\(\) always exists and is not falsy\.
1 occurrence(s) in 1 file(s)
src/SchedulerManager.php
--------------------------------------------------------------------------------------------------------------
Number of messages by file
3 in scheduler_rules_integration/src/Plugin/RulesAction/RemovePublishingDate.php
3 in scheduler_rules_integration/src/Plugin/RulesAction/RemoveUnpublishingDate.php
3 in scheduler_rules_integration/src/Plugin/RulesAction/SetPublishingDate.php
3 in scheduler_rules_integration/src/Plugin/RulesAction/SetUnpublishingDate.php
3 in src/SchedulerManager.php
2 in src/Plugin/Validation/Constraint/SchedulerPublishOnConstraintValidator.php
2 in src/Plugin/Validation/Constraint/SchedulerUnpublishOnConstraintValidator.php
2 in src/Theme/SchedulerThemeNegotiator.php
1 in scheduler_rules_integration/src/Plugin/Condition/PublishingIsEnabled.php
1 in scheduler_rules_integration/src/Plugin/Condition/UnpublishingIsEnabled.php
1 in src/Plugin/views/access/Scheduler.php
--------------------------------------------------------------------------------------------------------------
Different types of message: 2
Total number of messages: 24
-------------------------------------------------------------------------------------------------------------- -
jonathan1055 →
committed 1ef4d95b on 2.x
Issue #3400631 by jonathan1055: Put back ref: $_GITLAB_TEMPLATES_REF to...
-
jonathan1055 →
committed 1ef4d95b on 2.x
Automatically closed - issue fixed for 2 weeks with no activity.