mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge branch '111_exports_suite' into calendar/finalization
This commit is contained in:
@@ -18,7 +18,6 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class CountPerson implements ExportInterface
|
||||
{
|
||||
@@ -73,9 +72,9 @@ class CountPerson implements ExportInterface
|
||||
return ['export_result'];
|
||||
}
|
||||
|
||||
public function getResult($qb, $data)
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
@@ -106,9 +105,9 @@ class CountPerson implements ExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
public function requiredRole()
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return new Role(PersonVoter::STATS);
|
||||
return PersonVoter::STATS;
|
||||
}
|
||||
|
||||
public function supportsModifiers()
|
||||
|
@@ -265,7 +265,7 @@ Tests reside inside the installed bundles. You must `cd` into that directory, do
|
||||
|
||||
**Note**: some bundle require the fixture to be executed. See the dedicated _how-tos_.
|
||||
|
||||
Exemple, for running test inside `main` bundle:
|
||||
Exemple, for running unit test inside `main` bundle:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -280,6 +280,30 @@ Exemple, for running test inside `main` bundle:
|
||||
# run tests
|
||||
bin/phpunit src/Bundle/path/to/your/test
|
||||
|
||||
Or for running tests to check code style and php conventions with csfixer and phpstan:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# run code style fixer
|
||||
bin/grumphp run --tasks=phpcsfixer
|
||||
# run phpstan
|
||||
bin/grumphp run --tasks=phpstan
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
To avoid phpstan block your commits:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git commit -n ...
|
||||
|
||||
To avoid phpstan block your commits permanently:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./bin/grumphp git:deinit
|
||||
|
||||
How to run webpack interactively
|
||||
================================
|
||||
|
||||
|
Reference in New Issue
Block a user