Skip to content

rule collection generic controller#18999

Draft
SebSept wants to merge 20 commits intoglpi-project:mainfrom
SebSept:rule-collection-generic-controller
Draft

rule collection generic controller#18999
SebSept wants to merge 20 commits intoglpi-project:mainfrom
SebSept:rule-collection-generic-controller

Conversation

@SebSept
Copy link
Contributor

@SebSept SebSept commented Feb 17, 2025

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works. (not yet)

@SebSept SebSept force-pushed the rule-collection-generic-controller branch from 5fdc7dc to 6c2adeb Compare February 17, 2025 14:20
Comment on lines 36 to 40
/**
* Following variables have to be defined before inclusion of this file:
* @var RuleCollection $rulecollection
* @var LegacyFileLoadController $this
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove this. It will prevent PHPStan to rely on the declared types and will fixes the errors that were added to the baseline.

Suggested change
/**
* Following variables have to be defined before inclusion of this file:
* @var RuleCollection $rulecollection
* @var LegacyFileLoadController $this
*/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it to be consistent with front/dropdown.common.form.php which also has it's error in the baseline.
It's a useful documentation imo,

  • gives autocompletion
  • there is new errors that needs to be ignored if we remove this annotations .
 ------ ----------------------------------------------------------------------
  Line   rule.common.form.php
 ------ ----------------------------------------------------------------------
   40     Variable $rulecollection might not be defined.
         🪪  variable.undefined
  40     Variable $this might not be defined.
         🪪  variable.undefined
 ------ ----------------------------------------------------------------------

@SebSept SebSept marked this pull request as ready for review February 20, 2025 17:58
@cedric-anne cedric-anne marked this pull request as draft April 15, 2025 08:05
@cedric-anne cedric-anne added this to the 11.1.0 milestone Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants