Skip to content

Commit

Permalink
chore: Bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Sep 24, 2024
1 parent eb05951 commit 6d3b3f4
Show file tree
Hide file tree
Showing 46 changed files with 404 additions and 515 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2024 Ambroise Maupate, Julien Blanchet
Copyright © 2023 Ambroise Maupate, Julien Blanchet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ roadiz_rozier:
open_id:
# Verify User info in JWT at each login
verify_user_info: false
# Force generating redirect uri with https scheme. (required by some OpenID providers)
force_ssl_on_redirect_uri: true
# Standard OpenID autodiscovery URL, required to enable OpenId login in Roadiz CMS.
discovery_url: '%env(string:OPEN_ID_DISCOVERY_URL)%'
# For public identity providers (such as Google), restrict users emails by their domain.
Expand Down
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
}
],
"type": "symfony-bundle",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"symfony/framework-bundle": "6.4.*",
"roadiz/core-bundle": "2.3.*",
"roadiz/rozier": "2.3.*",
"roadiz/compat-bundle": "2.3.*",
"roadiz/openid": "2.3.*"
"symfony/framework-bundle": "5.4.*",
"roadiz/core-bundle": "2.2.*",
"roadiz/rozier": "2.2.*",
"roadiz/compat-bundle": "2.2.*",
"roadiz/openid": "2.2.*"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.4",
Expand Down Expand Up @@ -55,8 +54,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-main": "2.2.x-dev",
"dev-develop": "2.3.x-dev"
}
}
}
1 change: 0 additions & 1 deletion config/packages/roadiz_rozier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ roadiz_rozier:
# OpenID identity provider OAuth2 client secret
oauth_client_secret: '%env(string:OPEN_ID_CLIENT_SECRET)%'
requires_local_user: false
force_ssl_on_redirect_uri: true
# Only when local users are not required, creating virtual users
# with following roles.
granted_roles:
Expand Down
4 changes: 4 additions & 0 deletions config/routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ webhooksRoutes:
# CSS to style with main color
# NOT SECURED ROUTES
#
cssMainColor:
path : /css/main-color.css
controller: Themes\Rozier\RozierApp::cssAction

loginImagePage:
path: /css/login/image
controller: Themes\Rozier\Controllers\LoginController::imageAction
Expand Down
3 changes: 0 additions & 3 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ services:
$addNodeFormTypeClass: '%roadiz_rozier.add_node_form.class%'
$googleServerId: '%roadiz_core.medias.google_server_id%'
$soundcloudClientId: '%roadiz_core.medias.soundcloud_client_id%'
$allowNodeTypeEdition: '%kernel.debug%'
$forceSslOnRedirectUri: '%roadiz_rozier.open_id.force_ssl_on_redirect_uri%'
$useGravatar: '%roadiz_core.use_gravatar%'

RZ\Roadiz\RozierBundle\:
resource: '../src/'
Expand Down
6 changes: 3 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
level: 7
level: 6
paths:
- src
doctrine:
Expand All @@ -9,8 +9,6 @@ parameters:
- */bower_components/*
- */static/*
ignoreErrors:
- identifier: missingType.iterableValue
- identifier: missingType.generics
- '#Call to an undefined method RZ\\Roadiz\\CoreBundle\\Repository#'
- '#Call to an undefined method RZ\\Roadiz\\UserBundle\\Repository#'
- '#Call to an undefined method Doctrine\\Persistence\\ObjectRepository#'
Expand All @@ -34,6 +32,8 @@ parameters:
- '#does not accept Doctrine\\Common\\Collections\\ReadableCollection<int, [^\>]+>#'

reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
includes:
- vendor/phpstan/phpstan-doctrine/extension.neon
- vendor/phpstan/phpstan-doctrine/rules.neon
6 changes: 5 additions & 1 deletion src/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ final class Aliases
*/
public static function getAliases(): array
{
return [];
return [
\RZ\Roadiz\RozierBundle\Form\DocumentTranslationType::class => \Themes\Rozier\Forms\DocumentTranslationType::class,
\RZ\Roadiz\RozierBundle\Form\CustomFormType::class => \Themes\Rozier\Forms\CustomFormType::class,
\RZ\Roadiz\RozierBundle\ListManager\SessionListFilters::class => \Themes\Rozier\Utils\SessionListFilters::class,
];
}
}
17 changes: 10 additions & 7 deletions src/Controller/Document/DocumentArchiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace RZ\Roadiz\RozierBundle\Controller\Document;

use Doctrine\Persistence\ManagerRegistry;
use League\Flysystem\FilesystemException;
use RZ\Roadiz\CoreBundle\Entity\Document;
use RZ\Roadiz\Documents\DocumentArchiver;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
Expand All @@ -17,15 +16,21 @@
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Contracts\Translation\TranslatorInterface;
use Themes\Rozier\RozierApp;
use Twig\Error\RuntimeError;

final class DocumentArchiveController extends RozierApp
{
private ManagerRegistry $managerRegistry;
private TranslatorInterface $translator;
private DocumentArchiver $documentArchiver;

public function __construct(
private readonly ManagerRegistry $managerRegistry,
private readonly TranslatorInterface $translator,
private readonly DocumentArchiver $documentArchiver
ManagerRegistry $managerRegistry,
TranslatorInterface $translator,
DocumentArchiver $documentArchiver
) {
$this->managerRegistry = $managerRegistry;
$this->translator = $translator;
$this->documentArchiver = $documentArchiver;
}

/**
Expand All @@ -34,8 +39,6 @@ public function __construct(
* @param Request $request
*
* @return Response
* @throws FilesystemException
* @throws RuntimeError
*/
public function bulkDownloadAction(Request $request): Response
{
Expand Down
10 changes: 8 additions & 2 deletions src/Controller/Document/DocumentDuplicatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@
use Doctrine\Persistence\ManagerRegistry;
use RZ\Roadiz\CoreBundle\Entity\Document;
use RZ\Roadiz\CoreBundle\ListManager\QueryBuilderListManager;
use RZ\Roadiz\CoreBundle\ListManager\SessionListFilters;
use RZ\Roadiz\CoreBundle\Repository\DocumentRepository;
use RZ\Roadiz\RozierBundle\ListManager\SessionListFilters;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Themes\Rozier\RozierApp;

final class DocumentDuplicatesController extends RozierApp
{
public function __construct(private readonly ManagerRegistry $managerRegistry)
private ManagerRegistry $managerRegistry;

/**
* @param ManagerRegistry $managerRegistry
*/
public function __construct(ManagerRegistry $managerRegistry)
{
$this->managerRegistry = $managerRegistry;
}

/**
Expand Down
10 changes: 9 additions & 1 deletion src/Controller/Document/DocumentLimitationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,28 @@
use RZ\Roadiz\CoreBundle\Entity\Document;
use RZ\Roadiz\Documents\Events\DocumentUpdatedEvent;
use RZ\Roadiz\RozierBundle\Form\DocumentLimitationsType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Themes\Rozier\RozierApp;

final class DocumentLimitationsController extends RozierApp
{
public function __construct(private readonly ManagerRegistry $managerRegistry)
private ManagerRegistry $managerRegistry;

/**
* @param ManagerRegistry $managerRegistry
*/
public function __construct(ManagerRegistry $managerRegistry)
{
$this->managerRegistry = $managerRegistry;
}

public function limitationsAction(Request $request, Document $document): Response
{
$this->denyAccessUnlessGranted('ROLE_ACCESS_DOCUMENTS_LIMITATIONS');

/** @var FormInterface $form */
$form = $this->createForm(DocumentLimitationsType::class, $document, [
'referer' => $request->get('referer'),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Document/DocumentPublicListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use RZ\Roadiz\CoreBundle\Entity\Document;
use RZ\Roadiz\CoreBundle\Entity\Folder;
use RZ\Roadiz\CoreBundle\Entity\Translation;
use RZ\Roadiz\CoreBundle\ListManager\SessionListFilters;
use RZ\Roadiz\Documents\Events\DocumentInFolderEvent;
use RZ\Roadiz\Documents\Events\DocumentOutFolderEvent;
use Symfony\Component\Form\ClickableInterface;
Expand All @@ -20,6 +19,7 @@
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\NotNull;
use Themes\Rozier\RozierApp;
use Themes\Rozier\Utils\SessionListFilters;
use Twig\Error\RuntimeError;

class DocumentPublicListController extends RozierApp
Expand Down
14 changes: 9 additions & 5 deletions src/Controller/Document/DocumentUnusedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@
use Doctrine\Persistence\ManagerRegistry;
use RZ\Roadiz\CoreBundle\Entity\Document;
use RZ\Roadiz\CoreBundle\ListManager\QueryBuilderListManager;
use RZ\Roadiz\CoreBundle\ListManager\SessionListFilters;
use RZ\Roadiz\CoreBundle\Repository\DocumentRepository;
use RZ\Roadiz\RozierBundle\ListManager\SessionListFilters;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Themes\Rozier\RozierApp;
use Twig\Error\RuntimeError;

final class DocumentUnusedController extends RozierApp
{
public function __construct(private readonly ManagerRegistry $managerRegistry)
private ManagerRegistry $managerRegistry;

/**
* @param ManagerRegistry $managerRegistry
*/
public function __construct(ManagerRegistry $managerRegistry)
{
$this->managerRegistry = $managerRegistry;
}

/**
* See unused documents.
*
* @param Request $request
* @param Request $request
* @return Response
* @throws RuntimeError
*/
public function unusedAction(Request $request): Response
{
Expand Down
23 changes: 11 additions & 12 deletions src/Controller/Login/LoginRequestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace RZ\Roadiz\RozierBundle\Controller\Login;

use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;
use Psr\Log\LoggerInterface;
use RZ\Roadiz\CoreBundle\Form\LoginRequestForm;
use RZ\Roadiz\CoreBundle\Security\User\UserViewer;
Expand All @@ -14,17 +12,20 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Themes\Rozier\RozierApp;
use Twig\Error\RuntimeError;

final class LoginRequestController extends RozierApp
{
use LoginRequestTrait;

public function __construct(
private readonly LoggerInterface $logger,
private readonly UrlGeneratorInterface $urlGenerator,
private readonly UserViewer $userViewer
) {
private LoggerInterface $logger;
private UrlGeneratorInterface $urlGenerator;
private UserViewer $userViewer;

public function __construct(LoggerInterface $logger, UrlGeneratorInterface $urlGenerator, UserViewer $userViewer)
{
$this->logger = $logger;
$this->urlGenerator = $urlGenerator;
$this->userViewer = $userViewer;
}

protected function getUserViewer(): UserViewer
Expand All @@ -36,9 +37,8 @@ protected function getUserViewer(): UserViewer
* @param Request $request
*
* @return Response
* @throws RuntimeError
* @throws ORMException
* @throws OptimisticLockException
* @throws \Doctrine\ORM\ORMException
* @throws \Doctrine\ORM\OptimisticLockException
*/
public function indexAction(Request $request): Response
{
Expand Down Expand Up @@ -70,7 +70,6 @@ public function indexAction(Request $request): Response

/**
* @return Response
* @throws RuntimeError
*/
public function confirmAction(): Response
{
Expand Down
21 changes: 16 additions & 5 deletions src/Controller/Node/RealmNodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@

final class RealmNodeController extends RozierApp
{
private ManagerRegistry $managerRegistry;
private TranslatorInterface $translator;
private EventDispatcherInterface $eventDispatcher;

public function __construct(
private readonly ManagerRegistry $managerRegistry,
private readonly TranslatorInterface $translator,
private readonly EventDispatcherInterface $eventDispatcher
ManagerRegistry $managerRegistry,
TranslatorInterface $translator,
EventDispatcherInterface $eventDispatcher
) {
$this->managerRegistry = $managerRegistry;
$this->translator = $translator;
$this->eventDispatcher = $eventDispatcher;
}

public function defaultAction(Request $request, Node $id): Response
Expand Down Expand Up @@ -58,7 +65,9 @@ public function defaultAction(Request $request, Node $id): Response
'node.%node%.joined.%realm%',
[
'%node%' => $nodeSource->getTitle(),
'%realm%' => $realmNode->getRealm()->getName()
'%realm%' => $realmNode->getRealm() ?
$realmNode->getRealm()->getName() :
$this->translator->trans('node.no_realm')
]
);
$this->publishConfirmMessage($request, $msg);
Expand Down Expand Up @@ -109,7 +118,9 @@ public function deleteAction(Request $request, int $id, int $realmNodeId): Respo
'node.%node%.left.%realm%',
[
'%node%' => $nodeSource->getTitle(),
'%realm%' => $realmNode->getRealm()->getName()
'%realm%' => $realmNode->getRealm() ?
$realmNode->getRealm()->getName() :
$this->translator->trans('node.no_realm')
]
);
$this->publishConfirmMessage($request, $msg);
Expand Down
8 changes: 7 additions & 1 deletion src/Controller/Node/SeoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@

final class SeoController extends RozierApp
{
public function __construct(private readonly FormFactoryInterface $formFactory)
private FormFactoryInterface $formFactory;

/**
* @param FormFactoryInterface $formFactory
*/
public function __construct(FormFactoryInterface $formFactory)
{
$this->formFactory = $formFactory;
}

public function editAliasesAction(
Expand Down
8 changes: 7 additions & 1 deletion src/Controller/Node/TranslateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@

final class TranslateController extends RozierApp
{
public function __construct(private readonly NodeTranslator $nodeTranslator)
private NodeTranslator $nodeTranslator;

/**
* @param NodeTranslator $nodeTranslator
*/
public function __construct(NodeTranslator $nodeTranslator)
{
$this->nodeTranslator = $nodeTranslator;
}

public function translateAction(Request $request, Node $nodeId): Response
Expand Down
Loading

0 comments on commit 6d3b3f4

Please sign in to comment.