Skip to content

Commit

Permalink
Merge tag v2.4.0 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Dec 6, 2024
1 parent 501f6c4 commit 48d9d51
Show file tree
Hide file tree
Showing 110 changed files with 359 additions and 510 deletions.
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"rezozero/intervention-request-bundle": "~3.0.1",
"rezozero/liform-bundle": "^0.20.1",
"rezozero/tree-walker": "^1.5.0",
"roadiz/doc-generator": "2.4.x-dev",
"roadiz/documents": "2.4.x-dev",
"roadiz/dts-generator": "2.4.x-dev",
"roadiz/entity-generator": "2.4.x-dev",
"roadiz/jwt": "2.4.x-dev",
"roadiz/markdown": "2.4.x-dev",
"roadiz/models": "2.4.x-dev",
"roadiz/doc-generator": "2.4.*",
"roadiz/documents": "2.4.*",
"roadiz/dts-generator": "2.4.*",
"roadiz/entity-generator": "2.4.*",
"roadiz/jwt": "2.4.*",
"roadiz/markdown": "2.4.*",
"roadiz/models": "2.4.*",
"roadiz/nodetype-contracts": "~1.1.2",
"roadiz/random": "2.4.x-dev",
"roadiz/random": "2.4.*",
"rollerworks/password-common-list": "^0.3.0",
"rollerworks/password-strength-bundle": "^3.0",
"scienta/doctrine-json-functions": "^4.2",
Expand Down Expand Up @@ -136,8 +136,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-main": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
2 changes: 1 addition & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
parameters:
roadiz_core.cms_version: '2.4.0'
roadiz_core.cms_version_prefix: 'develop'
roadiz_core.cms_version_prefix: 'main'
env(APP_NAMESPACE): "roadiz"
env(APP_VERSION): "0.1.0"
env(APP_USE_ACCEPT_LANGUAGE_HEADER): 'false'
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Breadcrumbs/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
use RZ\Roadiz\Core\AbstractEntities\PersistableInterface;
use Symfony\Component\Serializer\Annotation as Serializer;

final class Breadcrumbs implements BreadcrumbsInterface
final readonly class Breadcrumbs implements BreadcrumbsInterface
{
/**
* @param PersistableInterface[] $items
*/
public function __construct(
#[Serializer\Groups(['breadcrumbs', 'web_response'])]
#[Serializer\MaxDepth(1)]
private readonly array $items,
private array $items,
) {
}

Expand Down
17 changes: 4 additions & 13 deletions src/Api/Controller/NodesSourcesSearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,12 @@ class NodesSourcesSearchController extends AbstractController
{
use TranslationAwareControllerTrait;

private ManagerRegistry $managerRegistry;
private PreviewResolverInterface $previewResolver;
private ?NodeSourceSearchHandlerInterface $nodeSourceSearchHandler;
private int $highlightingFragmentSize;

public function __construct(
ManagerRegistry $managerRegistry,
PreviewResolverInterface $previewResolver,
?NodeSourceSearchHandlerInterface $nodeSourceSearchHandler,
int $highlightingFragmentSize = 200,
private readonly ManagerRegistry $managerRegistry,
private readonly PreviewResolverInterface $previewResolver,
private readonly ?NodeSourceSearchHandlerInterface $nodeSourceSearchHandler,
private readonly int $highlightingFragmentSize = 200,
) {
$this->nodeSourceSearchHandler = $nodeSourceSearchHandler;
$this->highlightingFragmentSize = $highlightingFragmentSize;
$this->managerRegistry = $managerRegistry;
$this->previewResolver = $previewResolver;
}

protected function getManagerRegistry(): ManagerRegistry
Expand Down
6 changes: 3 additions & 3 deletions src/Api/Extension/ArchiveExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
* ],
* ```
*/
final class ArchiveExtension implements QueryResultCollectionExtensionInterface
final readonly class ArchiveExtension implements QueryResultCollectionExtensionInterface
{
public function __construct(
private readonly RequestStack $requestStack,
private readonly string $defaultPublicationFieldName = 'publishedAt',
private RequestStack $requestStack,
private string $defaultPublicationFieldName = 'publishedAt',
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Api/Extension/AttributeValueRealmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
use RZ\Roadiz\CoreBundle\Realm\RealmResolverInterface;
use Symfony\Bundle\SecurityBundle\Security;

final class AttributeValueRealmExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface
final readonly class AttributeValueRealmExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface
{
public function __construct(
private readonly Security $security,
private readonly RealmResolverInterface $realmResolver,
private Security $security,
private RealmResolverInterface $realmResolver,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Extension/NodesTagsQueryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
use RZ\Roadiz\CoreBundle\Enum\NodeStatus;
use RZ\Roadiz\CoreBundle\Preview\PreviewResolverInterface;

final class NodesTagsQueryExtension implements QueryItemExtensionInterface, QueryCollectionExtensionInterface
final readonly class NodesTagsQueryExtension implements QueryItemExtensionInterface, QueryCollectionExtensionInterface
{
public function __construct(
private readonly PreviewResolverInterface $previewResolver,
private PreviewResolverInterface $previewResolver,
) {
}

Expand Down
42 changes: 12 additions & 30 deletions src/Api/Model/NodesSourcesHead.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,23 @@

class NodesSourcesHead implements NodesSourcesHeadInterface
{
#[Serializer\Ignore]
protected HandlerFactoryInterface $handlerFactory;

#[Serializer\Ignore]
protected ?array $seo = null;

#[Serializer\Ignore]
protected ?NodesSources $nodesSource;

#[Serializer\Ignore]
protected Settings $settingsBag;

#[Serializer\Ignore]
protected UrlGeneratorInterface $urlGenerator;

#[Serializer\Ignore]
protected NodeSourceApi $nodeSourceApi;

#[Serializer\Ignore]
protected TranslationInterface $defaultTranslation;

public function __construct(
?NodesSources $nodesSource,
Settings $settingsBag,
UrlGeneratorInterface $urlGenerator,
NodeSourceApi $nodeSourceApi,
HandlerFactoryInterface $handlerFactory,
TranslationInterface $defaultTranslation,
#[Serializer\Ignore]
protected readonly ?NodesSources $nodesSource,
#[Serializer\Ignore]
protected readonly Settings $settingsBag,
#[Serializer\Ignore]
protected readonly UrlGeneratorInterface $urlGenerator,
#[Serializer\Ignore]
protected readonly NodeSourceApi $nodeSourceApi,
#[Serializer\Ignore]
protected readonly HandlerFactoryInterface $handlerFactory,
#[Serializer\Ignore]
protected readonly TranslationInterface $defaultTranslation,
) {
$this->nodesSource = $nodesSource;
$this->settingsBag = $settingsBag;
$this->urlGenerator = $urlGenerator;
$this->nodeSourceApi = $nodeSourceApi;
$this->defaultTranslation = $defaultTranslation;
$this->handlerFactory = $handlerFactory;
}

#[Serializer\Groups(['web_response', 'nodes_sources_single', 'walker'])]
Expand Down
10 changes: 5 additions & 5 deletions src/Api/Model/NodesSourcesHeadFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
use RZ\Roadiz\CoreBundle\EntityApi\NodeSourceApi;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

final class NodesSourcesHeadFactory implements NodesSourcesHeadFactoryInterface
final readonly class NodesSourcesHeadFactory implements NodesSourcesHeadFactoryInterface
{
public function __construct(
private readonly Settings $settingsBag,
private readonly UrlGeneratorInterface $urlGenerator,
private readonly NodeSourceApi $nodeSourceApi,
private readonly HandlerFactoryInterface $handlerFactory,
private Settings $settingsBag,
private UrlGeneratorInterface $urlGenerator,
private NodeSourceApi $nodeSourceApi,
private HandlerFactoryInterface $handlerFactory,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Api/OpenApi/JwtDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use ApiPlatform\OpenApi\Model;
use ApiPlatform\OpenApi\OpenApi;

final class JwtDecorator implements OpenApiFactoryInterface
final readonly class JwtDecorator implements OpenApiFactoryInterface
{
public function __construct(
private readonly OpenApiFactoryInterface $decorated,
private OpenApiFactoryInterface $decorated,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Api/OpenApi/PreviewDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
use ApiPlatform\OpenApi\Model\PathItem;
use ApiPlatform\OpenApi\OpenApi;

final class PreviewDecorator implements OpenApiFactoryInterface
final readonly class PreviewDecorator implements OpenApiFactoryInterface
{
public function __construct(
private readonly OpenApiFactoryInterface $decorated,
private OpenApiFactoryInterface $decorated,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Api/OpenApi/WebResponseDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use ApiPlatform\OpenApi\Model;
use ApiPlatform\OpenApi\OpenApi;

final class WebResponseDecorator implements OpenApiFactoryInterface
final readonly class WebResponseDecorator implements OpenApiFactoryInterface
{
public function __construct(
private readonly OpenApiFactoryInterface $decorated,
private OpenApiFactoryInterface $decorated,
) {
}

Expand Down
18 changes: 9 additions & 9 deletions src/Api/TreeWalker/NodeSourceWalkerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
use Symfony\Component\Stopwatch\Stopwatch;

#[Exclude]
class NodeSourceWalkerContext implements WalkerContextInterface
readonly class NodeSourceWalkerContext implements WalkerContextInterface
{
public function __construct(
private readonly Stopwatch $stopwatch,
private readonly NodeTypes $nodeTypesBag,
private readonly NodeSourceApi $nodeSourceApi,
private readonly RequestStack $requestStack,
private readonly ManagerRegistry $managerRegistry,
private readonly CacheItemPoolInterface $cacheAdapter,
private readonly NodeTypeResolver $nodeTypeResolver,
private readonly PreviewResolverInterface $previewResolver,
private Stopwatch $stopwatch,
private NodeTypes $nodeTypesBag,
private NodeSourceApi $nodeSourceApi,
private RequestStack $requestStack,
private ManagerRegistry $managerRegistry,
private CacheItemPoolInterface $cacheAdapter,
private NodeTypeResolver $nodeTypeResolver,
private PreviewResolverInterface $previewResolver,
) {
}

Expand Down
18 changes: 9 additions & 9 deletions src/Api/TreeWalker/NodeSourceWalkerContextFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Stopwatch\Stopwatch;

final class NodeSourceWalkerContextFactory implements WalkerContextFactoryInterface
final readonly class NodeSourceWalkerContextFactory implements WalkerContextFactoryInterface
{
public function __construct(
private readonly Stopwatch $stopwatch,
private readonly NodeTypes $nodeTypesBag,
private readonly NodeSourceApi $nodeSourceApi,
private readonly RequestStack $requestStack,
private readonly ManagerRegistry $managerRegistry,
private readonly CacheItemPoolInterface $cacheAdapter,
private readonly NodeTypeResolver $nodeTypeResolver,
private readonly PreviewResolverInterface $previewResolver,
private Stopwatch $stopwatch,
private NodeTypes $nodeTypesBag,
private NodeSourceApi $nodeSourceApi,
private RequestStack $requestStack,
private ManagerRegistry $managerRegistry,
private CacheItemPoolInterface $cacheAdapter,
private NodeTypeResolver $nodeTypeResolver,
private PreviewResolverInterface $previewResolver,
) {
}

Expand Down
16 changes: 8 additions & 8 deletions src/Cache/CloudflareProxyCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

namespace RZ\Roadiz\CoreBundle\Cache;

final class CloudflareProxyCache
final readonly class CloudflareProxyCache
{
public function __construct(
private readonly string $name,
private readonly string $zone,
private readonly string $version,
private readonly string $bearer,
private readonly string $email,
private readonly string $key,
private readonly int $timeout,
private string $name,
private string $zone,
private string $version,
private string $bearer,
private string $email,
private string $key,
private int $timeout,
) {
}

Expand Down
10 changes: 5 additions & 5 deletions src/Cache/ReverseProxyCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace RZ\Roadiz\CoreBundle\Cache;

final class ReverseProxyCache
final readonly class ReverseProxyCache
{
public function __construct(
private readonly string $name,
private readonly string $host,
private readonly string $domainName,
private readonly int $timeout,
private string $name,
private string $host,
private string $domainName,
private int $timeout,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/Cache/ReverseProxyCacheLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace RZ\Roadiz\CoreBundle\Cache;

final class ReverseProxyCacheLocator
final readonly class ReverseProxyCacheLocator
{
/**
* @param ReverseProxyCache[] $frontends
*/
public function __construct(
private readonly array $frontends,
private readonly ?CloudflareProxyCache $cloudflareProxyCache = null,
private array $frontends,
private ?CloudflareProxyCache $cloudflareProxyCache = null,
) {
}

Expand Down
8 changes: 8 additions & 0 deletions src/Console/AppMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->isQuiet()
) ? $io->success('generate:nsentities') : $io->error('generate:nsentities');

0 === $this->runCommand(
'generate:api-resources',
'',
null,
$input->isInteractive(),
$output->isQuiet()
) ? $io->success('generate:api-resources') : $io->error('generate:api-resources');

$this->schemaUpdater->updateNodeTypesSchema();
$this->schemaUpdater->updateSchema();
$io->success('doctrine-migrations');
Expand Down
10 changes: 5 additions & 5 deletions src/Controller/HealthCheckController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

final class HealthCheckController
final readonly class HealthCheckController
{
public function __construct(
private readonly ?string $healthCheckToken,
private readonly ?string $appVersion,
private readonly ?string $cmsVersion,
private readonly ?string $cmsVersionPrefix,
private ?string $healthCheckToken,
private ?string $appVersion,
private ?string $cmsVersion,
private ?string $cmsVersionPrefix,
) {
}

Expand Down
Loading

0 comments on commit 48d9d51

Please sign in to comment.