- Issue created by @spokje
- @spokje opened merge request.
- 🇬🇧United Kingdom longwave UK
Should we consider adding DiffEngine to excludePaths?
- 🇳🇱Netherlands spokje
Should we consider adding DiffEngine to excludePaths?
Pondered about that myself.
Decided against it, because it's not really "visual" for the average user that the file is excluded.
If only PHPStan had something like@phpstan-ignore-file
...Anyway, that's just my personal opinion, happy to be convinced to go the excludePaths route :)
- 🇮🇹Italy mondrake 🇮🇹
Should we consider adding DiffEngine to excludePaths?
I would suggest no. In D11 the file will be gone, anyway. In the meantime, any refactoring introducing more errors will be at least pointed out. That applies to any deprecated file, imho.
- Assigned to spokje
- Status changed to Needs work
about 2 years ago 9:13pm 12 March 2023 - Merge request !3775Draft: Issue #3347502: Fix PHPStan L1 errors "Access to an undefined property Foo\Bar::$baz" (Low Hanging Fruit Edition) → (Closed) created by spokje
- Issue was unassigned.
- 🇬🇧United Kingdom longwave UK
Lots of places we can drop @var following #3238192: Allow omitting @var for strictly typed class properties →
- 🇮🇳India ankithashetty Karnataka, India
Hello @longwave, noticed in #3238192: Allow omitting @var for strictly typed class properties → that we can omit @var only for strictly typed class properties.
If we look at the Proposed resolution → section, it says "This type can not be represented in the PHP typesystem yet." to variables like@var int|string|NULL
class Foo { /** * Where one can order a soda. */ protected Bar $baz; /** * Some complex type that probably needs cleaning up in a future. * * This type can not be represented in the PHP typesystem yet. * * @var int|string|NULL */ public $someVar; }
So can we really remove
@var
here:- https://git.drupalcode.org/project/drupal/-/merge_requests/3775/diffs#59...
- https://git.drupalcode.org/project/drupal/-/merge_requests/3775/diffs#c6...
- And many more instances in this MR...
- 🇬🇧United Kingdom longwave UK
Anywhere that we do declare the types on the following lines, we can remove @var, for example:
/** * The connection chroot. * * @var string|bool */ private string|bool $chroot;
Not so sure about
protected Connection|false $connection;
as I think
|false
is only valid in PHP 8.2 and we need to support PHP 8.1. - 🇮🇳India ankithashetty Karnataka, India
Can we create a new MR for
11.x
instead of changing the target branch in the existing MR? - 🇳🇱Netherlands spokje
Can we create a new MR for 11.x instead of changing the target branch in the existing MR?
Ah, wasn't aware you were working on this at the moment. Put MR back to 10.1.x.
Feel free to change whatever you need, I'll be leaving this one alone. - 🇮🇳India ankithashetty Karnataka, India
Thanks! 🙂 Was just thinking about working on #14 suggestions.
- 🇮🇳India ankithashetty Karnataka, India
In MR !3775 (against
10.1.x
), if the change is not as expected, we can just revert the latest commit. - Assigned to spokje
- First commit to issue fork.
- Issue was unassigned.
- Status changed to Needs review
24 days ago 5:40pm 9 March 2025 - 🇺🇸United States smustgrave
Believe all feedback for this one has been addressed
Automatically closed - issue fixed for 2 weeks with no activity.