Problem/Motivation
Adding entity type mappings for log and log_type will make it easier to perform static analysis of code interacting with Log entities. This is a feature provided by the phpstan-drupal extension.
The Log module can provide an entity type mapping via a entity_mapping.neon file mentioned in extra.phpstan.includes section of the composer.json file. For more info see: https://github.com/mglaman/phpstan-drupal?tab=readme-ov-file#providing-e...
Steps to reproduce
N/A
Proposed resolution
Provide entity type mappings for phpstan-drupal
Remaining tasks
Implement
User interface changes
None
API changes
None
Data model changes
None
Issue fork log-3499826
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
paul121 commentedThis is really a simple change that might not necessarily be seen within the Log module/tests here (maybe not until we upgrade to level 2) but this will be useful for contrib, and notably FarmOS: https://github.com/farmOS/farmOS/pull/906
Note that tests are failing on 2.x branch for other reasons, see here: https://www.drupal.org/project/log/issues/3431729#comment-15942301
Comment #6
m.stentaMerged - thanks @paul121!