Skip to content

Commit

Permalink
Merge tag 'v2.4.0' into develop
Browse files Browse the repository at this point in the history
v2.4.0
  • Loading branch information
ambroisemaupate committed Dec 6, 2024
2 parents f254f35 + 6ebbb9a commit af56cbb
Show file tree
Hide file tree
Showing 154 changed files with 647 additions and 863 deletions.
122 changes: 122 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Unit tests, static analysis and code style](https://github.com/roadiz/core-bundle-dev-app/actions/workflows/run-test.yml/badge.svg?branch=develop)](https://github.com/roadiz/core-bundle-dev-app/actions/workflows/run-test.yml) [![Packages Split](https://github.com/roadiz/core-bundle-dev-app/actions/workflows/split.yaml/badge.svg?branch=develop)](https://github.com/roadiz/core-bundle-dev-app/actions/workflows/split.yaml)

This is development app for Roadiz v2. It aggregates all Roadiz bundle and main repositories in one place:
This is **development app** for Roadiz v2. It aggregates all Roadiz bundles and main repositories in one place:

- DocGenerator
- Documents
Expand All @@ -21,6 +21,8 @@ This is development app for Roadiz v2. It aggregates all Roadiz bundle and main
- RoadizUserBundle
- Rozier

If you want to start a new headless project with Roadiz, check https://github.com/roadiz/skeleton instead.

### Install

- Clone this repository containing all monorepo packages in `lib` directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ meta {
get {
url: {{baseUrl}}/api/articles
body: none
auth: bearer
auth: none
}

params:query {
Expand Down Expand Up @@ -84,7 +84,3 @@ params:query {
~intersect[node.nodesTags.tag.tagName][]:
~_preview:
}

auth:bearer {
token: {{token}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ meta {
}

get {
url: {{baseUrl}}/api/nodes_sources/archives
url: {{baseUrl}}/api/nodes_sources/archives?node.nodeType.name=Article
body: none
auth: bearer
auth: none
}

params:query {
node.nodeType.name: Article
~page:
~itemsPerPage:
~properties[]:
Expand All @@ -32,7 +33,6 @@ params:query {
~node.nodesTags.tag.tagName[]:
~node.nodeType:
~node.nodeType[]:
~node.nodeType.name:
~node.nodeType.name[]:
~translation.id:
~translation.id[]:
Expand Down Expand Up @@ -79,7 +79,3 @@ params:query {
~intersect[node.nodesTags.tag.tagName][]:
~_preview:
}

auth:bearer {
token: {{token}}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ meta {
}

get {
url: {{baseUrl}}/api/nodes_sources/search
url: {{baseUrl}}/api/nodes_sources/search?search=cont&node.nodeType.name=Page
body: none
auth: bearer
auth: none
}

params:query {
search:
search: cont
node.nodeType.name: Page
~page:
~itemsPerPage:
~properties[]:
Expand All @@ -33,7 +34,6 @@ params:query {
~node.nodesTags.tag.tagName[]:
~node.nodeType:
~node.nodeType[]:
~node.nodeType.name:
~node.nodeType.name[]:
~translation.id:
~translation.id[]:
Expand Down Expand Up @@ -80,7 +80,3 @@ params:query {
~intersect[node.nodesTags.tag.tagName][]:
~_preview:
}

auth:bearer {
token: {{token}}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@
"require": "6.4.*"
},
"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"
}
},
"prefer-stable": true
Expand Down
4 changes: 2 additions & 2 deletions lib/DocGenerator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,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"
}
}
}
17 changes: 4 additions & 13 deletions lib/DocGenerator/src/Generators/AbstractFieldGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@

abstract class AbstractFieldGenerator
{
protected NodeTypeFieldInterface $field;
protected TranslatorInterface $translator;
protected ParameterBag $nodeTypesBag;
protected MarkdownGeneratorFactory $markdownGeneratorFactory;

public function __construct(
MarkdownGeneratorFactory $fieldGeneratorFactory,
NodeTypeFieldInterface $field,
ParameterBag $nodeTypesBag,
TranslatorInterface $translator,
protected readonly MarkdownGeneratorFactory $markdownGeneratorFactory,
protected readonly NodeTypeFieldInterface $field,
protected readonly ParameterBag $nodeTypesBag,
protected readonly TranslatorInterface $translator,
) {
$this->field = $field;
$this->nodeTypesBag = $nodeTypesBag;
$this->translator = $translator;
$this->markdownGeneratorFactory = $fieldGeneratorFactory;
}

abstract public function getContents(): string;
Expand Down
10 changes: 4 additions & 6 deletions lib/DocGenerator/src/Generators/DocumentationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@

class DocumentationGenerator
{
private ParameterBag $nodeTypesBag;
private TranslatorInterface $translator;
private MarkdownGeneratorFactory $markdownGeneratorFactory;
private ?array $reachableTypeGenerators = null;
private ?array $nonReachableTypeGenerators = null;

public function __construct(ParameterBag $nodeTypesBag, TranslatorInterface $translator)
{
$this->nodeTypesBag = $nodeTypesBag;
$this->translator = $translator;
public function __construct(
private readonly ParameterBag $nodeTypesBag,
private readonly TranslatorInterface $translator,
) {
$this->markdownGeneratorFactory = new MarkdownGeneratorFactory($nodeTypesBag, $translator);
}

Expand Down
6 changes: 3 additions & 3 deletions lib/DocGenerator/src/Generators/MarkdownGeneratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Contracts\Translation\TranslatorInterface;

final class MarkdownGeneratorFactory
final readonly class MarkdownGeneratorFactory
{
public function __construct(
private readonly ParameterBag $nodeTypesBag,
private readonly TranslatorInterface $translator,
private ParameterBag $nodeTypesBag,
private TranslatorInterface $translator,
) {
}

Expand Down
16 changes: 4 additions & 12 deletions lib/DocGenerator/src/Generators/NodeTypeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@

class NodeTypeGenerator
{
protected TranslatorInterface $translator;
protected MarkdownGeneratorFactory $markdownGeneratorFactory;
protected NodeTypeInterface $nodeType;
protected array $fieldGenerators;
protected array $fieldGenerators = [];

public function __construct(
NodeTypeInterface $nodeType,
TranslatorInterface $translator,
MarkdownGeneratorFactory $markdownGeneratorFactory,
protected NodeTypeInterface $nodeType,
protected TranslatorInterface $translator,
protected MarkdownGeneratorFactory $markdownGeneratorFactory,
) {
$this->nodeType = $nodeType;
$this->fieldGenerators = [];
$this->translator = $translator;
$this->markdownGeneratorFactory = $markdownGeneratorFactory;

/** @var NodeTypeFieldInterface $field */
foreach ($this->nodeType->getFields() as $field) {
$this->fieldGenerators[] = $this->markdownGeneratorFactory->createForNodeTypeField($field);
Expand Down
4 changes: 2 additions & 2 deletions lib/Documents/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-master": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
4 changes: 2 additions & 2 deletions lib/DtsGenerator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-master": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
4 changes: 2 additions & 2 deletions lib/DtsGenerator/src/DeclarationGeneratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
use RZ\Roadiz\Typescript\Declaration\Generators\ScalarFieldGenerator;
use Symfony\Component\HttpFoundation\ParameterBag;

final class DeclarationGeneratorFactory
final readonly class DeclarationGeneratorFactory
{
public function __construct(private readonly ParameterBag $nodeTypesBag)
public function __construct(private ParameterBag $nodeTypesBag)
{
}

Expand Down
9 changes: 2 additions & 7 deletions lib/DtsGenerator/src/Generators/AbstractFieldGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ abstract class AbstractFieldGenerator
// Four spaces
public const INDENTATION_MARK = ' ';

protected NodeTypeFieldInterface $field;
protected ParameterBag $nodeTypesBag;

public function __construct(
NodeTypeFieldInterface $field,
ParameterBag $nodeTypesBag,
protected readonly NodeTypeFieldInterface $field,
protected readonly ParameterBag $nodeTypesBag,
) {
$this->field = $field;
$this->nodeTypesBag = $nodeTypesBag;
}

protected function getNullableAssertion(): string
Expand Down
4 changes: 2 additions & 2 deletions lib/EntityGenerator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,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"
}
}
}
4 changes: 2 additions & 2 deletions lib/Jwt/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,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"
}
}
}
4 changes: 2 additions & 2 deletions lib/Markdown/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-master": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
4 changes: 2 additions & 2 deletions lib/Models/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
"dev-master": "2.4.x-dev",
"dev-develop": "2.5.x-dev"
}
}
}
24 changes: 12 additions & 12 deletions lib/Models/src/Core/AbstractEntities/AbstractField.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function getName(): string
/**
* @return $this
*/
public function setName(?string $name)
public function setName(?string $name): AbstractField
{
$this->name = StringHandler::variablize($name ?? '');

Expand Down Expand Up @@ -411,9 +411,9 @@ public function getLabel(): string
}

/**
* @return self
* @return $this
*/
public function setLabel(?string $label)
public function setLabel(?string $label): AbstractField
{
$this->label = $label ?? '';

Expand All @@ -426,9 +426,9 @@ public function getPlaceholder(): ?string
}

/**
* @return AbstractField
* @return $this
*/
public function setPlaceholder(?string $placeholder)
public function setPlaceholder(?string $placeholder): AbstractField
{
$this->placeholder = $placeholder;

Expand All @@ -443,7 +443,7 @@ public function getDescription(): ?string
/**
* @return $this
*/
public function setDescription(?string $description)
public function setDescription(?string $description): AbstractField
{
$this->description = $description;

Expand All @@ -458,7 +458,7 @@ public function getDefaultValues(): ?string
/**
* @return $this
*/
public function setDefaultValues(?string $defaultValues)
public function setDefaultValues(?string $defaultValues): AbstractField
{
$this->defaultValues = $defaultValues;

Expand All @@ -482,7 +482,7 @@ public function getType(): int
/**
* @return $this
*/
public function setType(int $type)
public function setType(int $type): AbstractField
{
$this->type = $type;

Expand Down Expand Up @@ -527,9 +527,9 @@ public function getGroupName(): ?string
*
* @param string|null $groupName the group name
*
* @return static
* @return $this
*/
public function setGroupName(?string $groupName)
public function setGroupName(?string $groupName): AbstractField
{
if (null === $groupName) {
$this->groupName = null;
Expand All @@ -553,9 +553,9 @@ public function isExpanded(): bool
}

/**
* @return AbstractField
* @return $this
*/
public function setExpanded(bool $expanded)
public function setExpanded(bool $expanded): AbstractField
{
$this->expanded = $expanded;

Expand Down
Loading

0 comments on commit af56cbb

Please sign in to comment.