Commit bdb2aa2c authored by Blaise de Carné's avatar Blaise de Carné
Browse files

update CHANGELOG, run phpcs

parent 1e479190
Pipeline #23460 failed with stage
in 15 seconds
CHANGELOG
===================
# CHANGELOG
Ce fichier est basé sur [Keep a Changelog](http://keepachangelog.com/)
et le projet utilise [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [0.3.0] - 2022-02-18
### Ajout
- Explorer : Télécharger au format CSV/XLSX/ODT
## [0.2.2] - 2022-02-17
### Ajout
- Explorer : ajout de la facette "Nombre de média"
- Dashboard : Le 2nd niveau de type de POI est maintenant visible dans le widget répartition
- Carte : les points sont maintenant colorisé en fonction de leur premier type primaire.
- Carte : les points sont maintenant colorisés en fonction de leur premier type primaire.
### Modification
- Carte : la taille des points est maintenant linéairement liée au niveau de zoom
## [0.2.1] - 2022-02-11
### Modification
- Explorer : les POI peuvent maintenant être recherchés par identifiant
- Les producteurs peuvent maintenant impersonate leurs utilisateurs
- Le numéro de téléphone n'est plus un champ obligatoire
......@@ -25,18 +34,22 @@ et le projet utilise [Semantic Versioning](http://semver.org/).
## [0.2.0] - 2022-02-11
### Ajout
- Ajout de la section Anomalies
### Correction
- Explorer : le tri par commune fonctionne
## [0.1.0] - 2022-02-06
### Ajout
- Ajout de la procédure d'invitation d'utilisateur
- Ajout d'un bouton sur la carte de l'explorateur pour passer en mode plein écran
### Correction
- variables_order = "EGPCS" dans php.ini de production
- Ajout du réseau datatourisme dans le docker-compose.deploy.yml
- L'adresse d'envoi des mails de notification est maintenant une variable d'environnement MAILER_SENDER
......@@ -46,4 +59,5 @@ et le projet utilise [Semantic Versioning](http://semver.org/).
## [0.0.1] - 2022-01-28
### Ajout
- Publication initiale
......@@ -2,7 +2,7 @@
"name": "datatourisme/quality-platform-webapp",
"type": "project",
"description": "DATAtourisme - Quality Platform web application",
"version": "0.2.2",
"version": "0.3.0",
"license": "GPL-3.0-or-later",
"authors": [
{
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
* @author Conjecto <contact@conjecto.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
*/
namespace App\Command;
......@@ -62,7 +69,7 @@ class MapCommand extends Command
$scroll = $search->scroll();
foreach ($scroll as $scrollId => $resultSet) {
$progressBar->setMaxSteps($scroll->current()->getTotalHits());
foreach($resultSet as $hit) {
foreach ($resultSet as $hit) {
$source = $hit->getSource();
$data = [
'label' => $source['label']['@fr'],
......@@ -84,29 +91,34 @@ class MapCommand extends Command
return Command::SUCCESS;
}
private function appendToGlobalFile($data) {
private function appendToGlobalFile($data)
{
$file = self::PATH . '/data.json';
$this->appendToFile($file, $data);
}
private function appendToProducerFile($data, $hasOrganizationIdentifier) {
private function appendToProducerFile($data, $hasOrganizationIdentifier)
{
$file = self::PATH . '/producers/' . $hasOrganizationIdentifier . '.json';
$this->appendToFile($file, $data);
}
private function appendToCreatorFile($data, $uri) {
private function appendToCreatorFile($data, $uri)
{
$file = self::PATH . '/creators/' . md5($uri) . '.json';
$this->appendToFile($file, $data);
}
private function appendToFile($file, $data) {
private function appendToFile($file, $data)
{
$first = !$this->filesystem->exists($file);
$txt = $first ? '[' : ',';
$txt = $txt . json_encode($data);
$this->filesystem->appendToFile($file, $txt);
}
private function finalizeFiles() {
private function finalizeFiles()
{
$finder = new Finder();
$finder->name('*.json');
foreach ($finder->in(self::PATH) as $file) {
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......@@ -51,8 +52,8 @@ class DashboardController extends AbstractController
$files = [];
if ($user->getProducer()) {
if ($user->getHasBeenCreatedBy() && count($user->getHasBeenCreatedBy())) {
$files = array_map(function($uri) {
return "creators/" .md5($uri) . ".json";
$files = array_map(function ($uri) {
return "creators/" . md5($uri) . ".json";
}, $user->getHasBeenCreatedBy());
} else {
$files = ["producers/" . $user->getProducer()->getId() . ".json"];
......
......@@ -194,5 +194,4 @@ class NewsController extends AbstractController
'news' => $news,
]);
}
}
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......
......@@ -78,8 +78,7 @@ class SecurityController extends AbstractController
UserRepository $repository,
UserPasswordHasherInterface $userPasswordHasher,
MailerInterface $mailer
): Response
{
): Response {
$form = $this->createFormBuilder()
->add('email', EmailType::class, [
'label' => 'Email',
......
......@@ -62,7 +62,6 @@ abstract class AbstractIndex
*/
public function alterQuery(object &$query, User $user): void
{
}
/**
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......
......@@ -589,7 +589,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, GroupSe
*/
public function toRecipient(): RecipientInterface
{
return new Recipient($this->getEmail(), $this->getPhone()?:'');
return new Recipient($this->getEmail(), $this->getPhone() ?: '');
}
/**
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......@@ -37,10 +38,10 @@ class PasswordEncoderSubscriber implements EventSubscriberInterface
*/
public function getSubscribedEvents()
{
return array(
return [
Events::prePersist,
Events::preUpdate,
);
];
}
/**
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......@@ -26,7 +27,6 @@ class ArrayToStringTransformer implements DataTransformerInterface
*/
public function __construct()
{
}
/**
......
......@@ -26,7 +26,8 @@ class UserFilter extends AbstractType
/** @var Security */
private $security;
public function __construct(Security $security) {
public function __construct(Security $security)
{
$this->security = $security;
}
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......@@ -25,14 +26,14 @@ class CurrentPasswordType extends AbstractType
public function configureOptions(OptionsResolver $resolver)
{
$resolver
->setDefaults(array(
->setDefaults([
'mapped' => false,
'label' => 'Mot de passe actuel',
'constraints' => array(
new NotBlank(array('message' => 'empty_current_password')),
new UserPassword(array('message' => "wrong_password")),
),
))
'constraints' => [
new NotBlank(['message' => 'empty_current_password']),
new UserPassword(['message' => "wrong_password"]),
],
])
;
}
}
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......
......@@ -137,7 +137,7 @@ class UserType extends AbstractType
'required' => false,
'attr' => ['rows' => 5],
'auto_initialize' => false // it's important!!!
]);
]);
$builder->addModelTransformer(new ArrayToStringTransformer());
$form->add($builder->getForm());
} else {
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......
......@@ -7,7 +7,6 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\Security\Core\Security;
class ProducerRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry, Security $security)
......
<?php
/*
* This file is part of the DATAtourisme project.
* 2022
......@@ -110,12 +111,12 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
if ($strict) {
$users = $this->findBy(['role' => $role]);
} else {
$users = array_filter($this->findAll(), function($user) use ($role) {
$users = array_filter($this->findAll(), function ($user) use ($role) {
return in_array($role, $this->roleHierarchy->getReachableRoleNames($user->getRoles()));
});
}
return array_map(function($user) {
return array_map(function ($user) {
return $user->toRecipient();
}, $users);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment