With the next major release, would you consider some of these?
Update documentation to PHP 8 / Symfony 6.4+. That is, drop annotations, inject services via dependency injection only. The documentation reflects old versions that are no longer supported.
refactor source directories and class names to Symfony Best Practices (bundle source is in /src instead of the base directory, interface classes end with Interface, etc.
in particular, "viewcounter" is confusing, $this->viewcounter and $viewcounter are different objects, making this code somewhat complicated for newcomers. "views" could be "viewCount", making it clear that it's an integer and not the viewCount records.
// Viewcounter
$viewcounter = $this->get('tchoulom.viewcounter')->getViewCounter($article);
// For Symfony version >= 4
$viewcounter = $this->viewcounter->getViewCounter($article);
$em = $this->getDoctrine()->getEntityManager();
if ($this->viewcounter->isNewView($viewcounter)) {
$views = $this->viewcounter->getViews($article);
$viewcounter->setIp($request->getClientIp());
$viewcounter->setArticle($article);
$viewcounter->setViewDate(new \DateTime('now'));
Cool bundle, thanks for releasing it.
With the next major release, would you consider some of these?