CommentFileSizeAuthor
#10 PhpStan.png43.74 KBtechmantejas
Command icon 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

jurgenhaas created an issue. See original summary.

  • jurgenhaas committed f9b05d94 on 3.0.x
    Issue #3472261 by jurgenhaas: Cleanup PhpStan test
    
jurgenhaas’s picture

Assigned: jurgenhaas » Unassigned
Status: Active » Needs review

PHPStan is now green as well. I've added a couple of @todo in the code where the clean-up identified some obviously broken functionality which I wasn't able to resolve right away.

erutan’s picture

This has been committed to the module already, should this just be closed along with https://www.drupal.org/project/fullcalendar/issues/3472260?

dcam’s picture

Status: Needs review » Active

I'm setting this issue back to active because there was a commit for it, but there's more work to do. The PhpStan (next minor) test is failing. It's allowed to fail, which is fine. But someone needs to resolve any problems with it.

dcam’s picture

Version: 3.0.x-dev » 3.1.x-dev

techmantejas made their first commit to this issue’s fork.

techmantejas’s picture

Assigned: Unassigned » techmantejas

techmantejas’s picture

StatusFileSize
new43.74 KB

Hi there, I have solved all the issues with phpstan and phpcs in this project expect one.

```
------ -----------------------------------------------------------------------
Line src/Plugin/fullcalendar/type/FullCalendar.php
------ -----------------------------------------------------------------------
1766 Relying on entity queries to check access by default is deprecated in
drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call
\Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or
FALSE to specify whether access should be checked.
💡 See https://www.drupal.org/node/3201242
------ -----------------------------------------------------------------------
```
we get the above error when `$tids = $query->execute();`

```
------ -----------------------------------------------------------------------
Line src/Plugin/fullcalendar/type/FullCalendar.php
------ -----------------------------------------------------------------------
1766 Call to method Drupal\Core\Entity\Query\QueryInterface::accessCheck()
with true will always evaluate to true.
🪪 method.alreadyNarrowedType
💡 Because the type is coming from a PHPDoc, you can turn off this
check by setting treatPhpDocTypesAsCertain: false in your
phpstan.neon.
------ -----------------------------------------------------------------------
```
and the above when `$tids = $query->accessCheck(TRUE)->execute();`

Phpstan (next minor)

mandclu’s picture

Assigned: techmantejas » Unassigned
Status: Active » Needs review

Sounds like this is ready for review then?

mandclu’s picture

Version: 3.1.x-dev » 3.0.x-dev

mandclu’s picture

Status: Needs review » Fixed

Thanks for the additional work here. Great to have both phpstan tests passing.

techmantejas’s picture

Thanks for solving the phpstan (minor) issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.