Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Knp/Menu/Twig/MenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public function getTests(): array
];
}

public function getLastModified(): int
{
return max(
(int) filemtime(__FILE__),
(int) filemtime((string) (new \ReflectionClass(MenuRuntimeExtension::class))->getFileName()),
Copy link
Author

Choose a reason for hiding this comment

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

Casts added to keep Phpstan happy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We could simplify this by not using reflection but using __DIR__ . '/MenuRuntimeExtension.php') instead.

);
}

/**
* @param array<int, string> $path
* @param array<string, mixed> $options
Expand Down