Skip to content

Commit

Permalink
Fix Appool bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Apr 12, 2021
1 parent 955a3af commit 6edbf56
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/test-content.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/src/Component/App/AppPool.php
Expand Up @@ -4,7 +4,7 @@

use Exception;
use Pushword\Core\Entity\PageInterface;
use \Twig\Environment as Twig;
use Twig\Environment as Twig;

final class AppPool
{
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/Controller/PageController.php
Expand Up @@ -13,7 +13,6 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment as Twig;
use Symfony\Component\Translation\DataCollectorTranslator;

final class PageController extends AbstractController
{
Expand Down Expand Up @@ -207,7 +206,7 @@ private function getPage(?string &$slug, string $host = '', bool $throwException
$page->setLocale($this->app->getDefaultLocale());
}

/** @psalm-suppress UndefinedInterfaceMethod */
/* @psalm-suppress UndefinedInterfaceMethod */
$this->translator->setLocale($page->getLocale());

// Check if page is public
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/Twig/AppExtension.php
Expand Up @@ -9,10 +9,10 @@
use Pushword\Core\Component\App\AppConfig;
use Pushword\Core\Component\App\AppPool;
use Pushword\Core\Component\EntityFilter\ManagerPoolInterface;
use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Entity\Media;
use Pushword\Core\Entity\MediaInterface;
use Pushword\Core\Repository\Repository;
use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Service\ImageManager;
use Pushword\Core\Utils\FilesizeFormatter;
use Pushword\Core\Utils\HtmlBeautifer;
Expand Down Expand Up @@ -130,7 +130,6 @@ public static function isInternalImage(string $media): bool
*/
public function transformStringToMedia($src, string $name = ''): MediaInterface
{

if (\is_string($src) && self::isInternalImage($src)) {
$media = Media::loadFromSrc($src);
$media->setName($name);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Twig/LinkTwigTrait.php
Expand Up @@ -4,8 +4,8 @@

use Exception;
use Pushword\Core\Component\App\AppConfig;
use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Entity\PageInterface;
use Pushword\Core\Router\RouterInterface;

trait LinkTwigTrait
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Utils/GenerateLivePathForTrait.php
Expand Up @@ -2,8 +2,8 @@

namespace Pushword\Core\Utils;

use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Entity\PageInterface;
use Pushword\Core\Router\RouterInterface;

trait GenerateLivePathForTrait
{
Expand Down
Expand Up @@ -5,11 +5,9 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Twig\Environment as Twig;

class PageRenderingValidator extends ConstraintValidator
{

public function validate($value, Constraint $constraint)
{
if (! $constraint instanceof PageRendering) {
Expand Down
2 changes: 1 addition & 1 deletion packages/page-scanner/src/Scanner/PageScannerService.php
Expand Up @@ -2,8 +2,8 @@

namespace Pushword\PageScanner\Scanner;

use Pushword\Core\Router\RouterInterface as PwRouter;
use Pushword\Core\Entity\PageInterface;
use Pushword\Core\Router\RouterInterface as PwRouter;
use Pushword\Core\Utils\GenerateLivePathForTrait;
use Pushword\Core\Utils\KernelTrait;
use Symfony\Component\HttpFoundation\Request;
Expand Down
Binary file modified packages/skeleton/var/app.db
Binary file not shown.
Expand Up @@ -4,9 +4,9 @@

use Pushword\Core\Component\App\AppConfig;
use Pushword\Core\Component\App\AppPool;
use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Entity\PageInterface as Page;
use Pushword\Core\Repository\PageRepositoryInterface;
use Pushword\Core\Router\RouterInterface;
use Pushword\Core\Utils\GenerateLivePathForTrait;
use Pushword\Core\Utils\KernelTrait;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
Expand Down

0 comments on commit 6edbf56

Please sign in to comment.