Compare commits

..

5 Commits
2.9.0 ... 2.9.2

14 changed files with 62 additions and 33 deletions

View File

@@ -3,6 +3,7 @@
* ([#147](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/147)) Add history to scopes and to jobs in administrator section. When user job or main scope of user is changed, automaticaly add a new row in history.
* ([#146](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/146)) Allow closing motives to be identified as 'canceling the accompanying period' + don't take canceled accompanying periods into account
* [export] add an aggregator for activities: group by job scope's creator aggregator
* DX: prepare the code for the upgrade to symfony 5.4
### Traductions francophones des principaux changements
@@ -11,3 +12,12 @@
- modification des motifs de cloture des parcours: ajout d'un chanmp "annule le parcours", qui permet d'indiquer que le motif "annule" le parcours. Les parcours annulés n'apparaissent
pas dans les statistiques
- ajouter d'un regroupement pour les échanges: grouper par métier et service du créateur de l'échange
### Possible BC break in configuration
This release remove the use of deprecated package [symfony/templating](https://symfony.com/components/Templating).
If you use this package in your own bundle (usually `src/` directory, or other dependencies), you should add this dependencies in your local composer.json (`composer require symfony/templating`).
But if you do not need this any more, you must ensure that the configuration key `framework.templating` is removed. This is usually located into `config/packages/framework.yaml`. [See here an example](https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic/commit/cc716beaecc239e6a189f3db62ea95f169a37505#diff-df607fe73ff82c569824a7392edf5e760e998efe)

3
.changes/v2.9.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v2.9.1 - 2023-10-17
### Fixed
* Fix the handling of activity form when editing or creating an activity in an accompanying period with multiple centers

3
.changes/v2.9.2.md Normal file
View File

@@ -0,0 +1,3 @@
## v2.9.2 - 2023-10-17
### Fixed
* Fix possible null values in string's entities

View File

@@ -6,11 +6,20 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v2.9.2 - 2023-10-17
### Fixed
* Fix possible null values in string's entities
## v2.9.1 - 2023-10-17
### Fixed
* Fix the handling of activity form when editing or creating an activity in an accompanying period with multiple centers
## v2.9.0 - 2023-10-17
### Feature
* ([#147](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/147)) Add history to scopes and to jobs in administrator section. When user job or main scope of user is changed, automaticaly add a new row in history.
* ([#146](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/146)) Allow closing motives to be identified as 'canceling the accompanying period' + don't take canceled accompanying periods into account
* [export] add an aggregator for activities: group by job scope's creator aggregator
* DX: prepare the code for the upgrade to symfony 5.4
### Traductions francophones des principaux changements
@@ -20,6 +29,15 @@ and is generated by [Changie](https://github.com/miniscruff/changie).
pas dans les statistiques
- ajouter d'un regroupement pour les échanges: grouper par métier et service du créateur de l'échange
### Possible BC break in configuration
This release remove the use of deprecated package [symfony/templating](https://symfony.com/components/Templating).
If you use this package in your own bundle (usually `src/` directory, or other dependencies), you should add this dependencies in your local composer.json (`composer require symfony/templating`).
But if you do not need this any more, you must ensure that the configuration key `framework.templating` is removed. This is usually located into `config/packages/framework.yaml`. [See here an example](https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic/commit/cc716beaecc239e6a189f3db62ea95f169a37505#diff-df607fe73ff82c569824a7392edf5e760e998efe)
## v2.8.0 - 2023-10-05
### Feature

View File

@@ -87,8 +87,7 @@ class ActivityType extends AbstractType
/** @var \Chill\ActivityBundle\Entity\ActivityType $activityType */
$activityType = $options['activityType'];
// TODO revoir la gestion des center au niveau du form des activité.
if ($options['center'] instanceof Center && null !== $options['data']->getPerson()) {
if (null !== $options['data']->getPerson()) {
$builder->add('scope', ScopePickerType::class, [
'center' => $options['center'],
'role' => ActivityVoter::CREATE === (string) $options['role'] ? ActivityVoter::CREATE_PERSON : (string) $options['role'],
@@ -192,7 +191,7 @@ class ActivityType extends AbstractType
]);
}
if ($activityType->isVisible('user') && $options['center'] instanceof Center) {
if ($activityType->isVisible('user')) {
$builder->add('user', PickUserDynamicType::class, [
'label' => $activityType->getLabel('user'),
'required' => $activityType->isRequired('user'),
@@ -402,7 +401,7 @@ class ActivityType extends AbstractType
$resolver
->setRequired(['center', 'role', 'activityType', 'accompanyingPeriod'])
->setAllowedTypes('center', ['null', Center::class])
->setAllowedTypes('center', ['null', Center::class, 'array'])
->setAllowedTypes('role', ['string'])
->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class)
->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']);

View File

@@ -49,7 +49,7 @@ class Charge extends AbstractElement implements HasCentersInterface
/**
* @ORM\Column(name="help", type="string", nullable=true)
*/
private string $help = self::HELP_NOT_RELEVANT;
private ?string $help = self::HELP_NOT_RELEVANT;
/**
* @ORM\Column(name="id", type="integer")

View File

@@ -76,7 +76,7 @@ class ChargeKind
return $this->isActive;
}
public function getKind(): ?string
public function getKind(): string
{
return $this->kind;
}
@@ -98,7 +98,7 @@ class ChargeKind
return $this;
}
public function setKind(?string $kind): self
public function setKind(string $kind): self
{
$this->kind = $kind;

View File

@@ -75,7 +75,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
* min=2, max=250
* )
*/
private ?string $title = null;
private string $title = '';
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
@@ -92,7 +92,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
return $this->date;
}
public function getDescription(): ?string
public function getDescription(): string
{
return $this->description;
}
@@ -107,7 +107,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
return $this->template;
}
public function getTitle(): ?string
public function getTitle(): string
{
return $this->title;
}

View File

@@ -248,7 +248,7 @@ class AccompanyingPeriod implements
*
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
*/
private string $intensity = self::INTENSITY_OCCASIONAL;
private ?string $intensity = self::INTENSITY_OCCASIONAL;
/**
* @ORM\ManyToOne(
@@ -414,7 +414,7 @@ class AccompanyingPeriod implements
*
* @var AccompanyingPeriod::STEP_*
*/
private string $step = self::STEP_DRAFT;
private ?string $step = self::STEP_DRAFT;
/**
* @var Collection<AccompanyingPeriodStepHistory>

View File

@@ -62,7 +62,7 @@ class AccompanyingPeriodWorkGoal
* @Serializer\Groups({"accompanying_period_work:edit"})
* @Serializer\Groups({"read"})
*/
private ?string $note = null;
private string $note = '';
/**
* @var Collection<Result>

View File

@@ -49,7 +49,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
*
* @Assert\NotNull
*/
private ?string $content = null;
private string $content = '';
/**
* @ORM\Column(type="datetime")
@@ -99,7 +99,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
return $this->accompanyingPeriod;
}
public function getContent(): ?string
public function getContent(): string
{
return $this->content;
}

View File

@@ -234,7 +234,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\Column(type="text", nullable=true)
*/
private string $contactInfo = '';
private ?string $contactInfo = '';
/**
* The person's country of birth.
@@ -298,7 +298,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @Assert\Email()
*/
private string $email = '';
private ?string $email = '';
/**
* The person's first name.
@@ -319,7 +319,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\Column(type="text", nullable=true)
*/
private string $fullnameCanonical = '';
private ?string $fullnameCanonical = '';
/**
* The person's gender.
@@ -413,7 +413,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\Column(type="text")
*/
private string $memo = ''; // TO-CHANGE in remark
private string $memo = '';
/**
* The person's mobile phone number.

View File

@@ -37,14 +37,14 @@ class PersonAltName
*
* @Groups({"write"})
*/
private ?string $key = null;
private string $key = '';
/**
* @ORM\Column(name="label", type="text")
*
* @Groups({"write"})
*/
private ?string $label = null;
private string $label = '';
/**
* @ORM\ManyToOne(
@@ -92,13 +92,11 @@ class PersonAltName
/**
* Set key.
*
* @param string $key
*
* @return PersonAltName
*/
public function setKey($key)
public function setKey(?string $key)
{
$this->key = $key;
$this->key = (string) $key;
return $this;
}
@@ -106,13 +104,11 @@ class PersonAltName
/**
* Set label.
*
* @param string $label
*
* @return PersonAltName
*/
public function setLabel($label)
public function setLabel(?string $label)
{
$this->label = $label;
$this->label = (string) $label;
return $this;
}

View File

@@ -213,7 +213,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
*
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
*/
private string $firstname = '';
private ?string $firstname = '';
/**
* @ORM\Column(name="id", type="integer")
@@ -231,7 +231,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
*
* @Groups({"write", "docgen:read", "docgen:read:3party:parent"})
*/
private ?string $kind = '';
private string $kind = '';
/**
* @ORM\Column(name="name", type="string", length=255)
@@ -244,7 +244,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
*
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
*/
private ?string $name = '';
private string $name = '';
/**
* [fr] Raison sociale.
@@ -770,7 +770,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
public function setKind(?string $kind): ThirdParty
{
$this->kind = $kind;
$this->kind = (string) $kind;
return $this;
}