Skip to content

Commit

Permalink
Update of LiipTest (dependency).
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienTouze committed Apr 4, 2022
1 parent 9f81ade commit 2eb9175
Show file tree
Hide file tree
Showing 34 changed files with 190 additions and 123 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ Install instructions are for server using Apache on Debian (Apache user being `w

A PostGre database and role should be created for the application.

For the next instructions, we will assume that you install the applicatino on a server on `/opt` with `www-data` beeing the Apache (or any other web server) user.

```(bash)
$ cd /var/www/
$ git clone https://github.com/SebastienTouze/rapportNav.git app/rapportNav
$ cd /opt/rapportnav/
$ git clone https://github.com/SebastienTouze/rapportNav.git app-ppr
```
Before taking the next steps, create your environment `.env.local` file copying `.template.env`.
You will need to configure :
Expand All @@ -71,6 +73,8 @@ $ sudo -u www-data yarn build
$ sudo -u www-data bin/console doctrine:migration:migrate
```

You may need to install assets for the SonataAdminBundle using `$ sudo -u www-data bin/console assets:install`

If you aim to contribute to the code you may prefer to use the `yarn dev` or `yarn watch` commands for js compilation.
Some basic fixtures to get a development environment are available using `bin/console doctrine:fixtures:load --group=default`
This command should be executed in dev environment, you may add the `--env=dev` depending on the environment defined in your `.env.local`
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"ext-xdebug" : "*",
"doctrine/doctrine-fixtures-bundle" : "^3.1",
"easycorp/easy-log-handler" : "^1.0.7",
"liip/functional-test-bundle" : "^4.0.0",
"liip/test-fixtures-bundle" : "^1.0.0",
"liip/functional-test-bundle" : "^4.5.0",
"liip/test-fixtures-bundle" : "^2.2",
"symfony/browser-kit" : "^4.4",
"symfony/css-selector" : "^4.4",
"symfony/debug-bundle" : "^4.4",
Expand Down
39 changes: 23 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions config/packages/doctrine_migrations.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
namespace: DoctrineMigrations
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
4 changes: 1 addition & 3 deletions config/packages/test/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ liip_functional_test:
authentication:
username: "alfred.de-musset"
password: "1234"
liip_test_fixtures:
cache_db:
sqlite: liip_test_fixtures.services_database_backup.sqlite

4 changes: 2 additions & 2 deletions src/Admin/AgentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

final class AgentAdmin extends AbstractAdmin {

public function toString($object): ?string {
public function toString($object): string {
return $object instanceof \App\Entity\Agent ? $object->__toString() : 'Agent';
}

Expand All @@ -36,7 +36,7 @@ protected function configureListFields(ListMapper $listMapper): void {
->add('service.nom')
->add('dateArrivee')
->add('dateDepart')
->add('_action', null, [
->add(ListMapper::NAME_ACTIONS, null, [
'actions' => [
'show' => [],
'edit' => [],
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieControleAutreAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieControleAutreAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true])
->add('complementDonnee')
;
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom')
->add('complementDonnee')
;
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom')
->add('complementDonnee')
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieControleNavireAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieControleNavireAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true]);
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom');
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom');
}
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieEtablissementAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieEtablissementAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true])
->add('complementDonnee')
;
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom')
->add('complementDonnee')
;
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom')
->add('complementDonnee')
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieLoisirAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieLoisirAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true]);
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom');
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom');
}
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieMethodeCiblage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieMethodeCiblage extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true])
;
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom')
;
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom')
;
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieMoyenAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

class CategorieMoyenAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true])
;
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom')
;
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom')
;
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieTacheAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieTacheAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true]);
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom');
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom');
}
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/CategorieUsageNavireAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

final class CategorieUsageNavireAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true]);
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom');
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom');
}
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/EtablissementAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;

class EtablissementAdmin extends AbstractAdmin {
protected function configureFormFields(FormMapper $formMapper) {
protected function configureFormFields(FormMapper $formMapper): void {
$formMapper
->add('nom', TextType::class, ['required' => true, 'label' => "Nom (ou N/A pour non applicable)"])
->add('type')
Expand All @@ -22,7 +22,7 @@ protected function configureFormFields(FormMapper $formMapper) {
;
}

protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void {
$datagridMapper
->add('nom')
->add('type')
Expand All @@ -31,13 +31,13 @@ protected function configureDatagridFilters(DatagridMapper $datagridMapper) {
;
}

protected function configureListFields(ListMapper $listMapper) {
protected function configureListFields(ListMapper $listMapper): void {
$listMapper
->addIdentifier('nom')
->add('type')
->add('adresse')
->add('commune')
->add('_action', null, [
->add(ListMapper::NAME_ACTIONS, null, [
'actions' => [
'show' => [],
'edit' => [],
Expand Down
Loading

0 comments on commit 2eb9175

Please sign in to comment.