WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
Showing only changes of commit 77fa05f457 - Show all commits

View file

@ -1,17 +1,18 @@
<?php <?php
declare(strict_types=1);
namespace src\PointToolsBundle\Controller; namespace App\Controller;
use Knp\Component\Pager\PaginatorInterface; use Knp\Component\Pager\PaginatorInterface;
use src\PointToolsBundle\Repository\Blogs\PostRepository; use App\Repository\Blog\PostRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\{Request, Response};
class PublicFeedController extends AbstractController class PublicFeedController extends AbstractController
{ {
private const POSTS_PER_PAGE = 20; private const POSTS_PER_PAGE = 20;
public function indexAction(Request $request, PostRepository $postRepository, PaginatorInterface $paginator) public function indexAction(Request $request, PostRepository $postRepository, PaginatorInterface $paginator): Response
{ {
$postsPagination = $paginator->paginate( $postsPagination = $paginator->paginate(
$postRepository->createPublicFeedPostsQuery(), $postRepository->createPublicFeedPostsQuery(),