diff --git a/.codecov.yml b/.codecov.yml index 0ec2aaf3..e176465d 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -7,15 +7,6 @@ coverage: round: down range: "80...100" - status: - project: - default: - threshold: 0.5% - patch: - default: - threshold: 50% - changes: no - parsers: gcov: branch_detection: diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php index 90575946..aae34c19 100644 --- a/src/Entity/Customer.php +++ b/src/Entity/Customer.php @@ -67,7 +67,7 @@ class Customer implements EntityWithMetaFields, EntityWithBudget * @var string * * @Serializer\Expose() - * @Serializer\Groups({"Customer_Entity"}) + * @Serializer\Groups({"Default"}) * * @Exporter\Expose(label="label.number") * diff --git a/src/Form/UserRolesType.php b/src/Form/UserRolesType.php index 4c849124..6cd95119 100644 --- a/src/Form/UserRolesType.php +++ b/src/Form/UserRolesType.php @@ -27,7 +27,6 @@ class UserRolesType extends AbstractType { $builder ->add('roles', UserRoleType::class, [ - 'label' => 'label.roles', 'multiple' => true, 'expanded' => true, ]) diff --git a/src/Form/UserTeamsType.php b/src/Form/UserTeamsType.php index 0b645677..15857748 100644 --- a/src/Form/UserTeamsType.php +++ b/src/Form/UserTeamsType.php @@ -27,7 +27,6 @@ class UserTeamsType extends AbstractType { $builder ->add('teams', TeamType::class, [ - 'label' => 'label.team', 'multiple' => true, 'expanded' => true, ]) diff --git a/src/Repository/TeamRepository.php b/src/Repository/TeamRepository.php index ccd3161e..ef231509 100644 --- a/src/Repository/TeamRepository.php +++ b/src/Repository/TeamRepository.php @@ -211,7 +211,7 @@ class TeamRepository extends EntityRepository $or->add( $qb->expr()->andX( $qb->expr()->eq('members.user', ':id'), - $qb->expr()->eq('members.teamlead', true), + $qb->expr()->eq('members.teamlead', true) ) ); $qb->setParameter('id', $user); diff --git a/tests/API/APIControllerBaseTest.php b/tests/API/APIControllerBaseTest.php index 7ae3d94d..a0f3f1fe 100644 --- a/tests/API/APIControllerBaseTest.php +++ b/tests/API/APIControllerBaseTest.php @@ -368,6 +368,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest 'name' => 'string', 'visible' => 'bool', 'color' => '@string', + 'number' => '@string', ]; // if a list of customers is loaded @@ -377,6 +378,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest 'name' => 'string', 'visible' => 'boolean', 'color' => '@string', + 'number' => '@string', 'metaFields' => ['result' => 'array', 'type' => 'CustomerMeta'], 'teams' => ['result' => 'array', 'type' => 'Team'], 'currency' => 'string', // since 1.10 diff --git a/tests/Utils/CommandStyleTest.php b/tests/Utils/CommandStyleTest.php new file mode 100644 index 00000000..fb9729f3 --- /dev/null +++ b/tests/Utils/CommandStyleTest.php @@ -0,0 +1,48 @@ +error('FooBar-Error'); + $sut->warning('Hello-Warning'); + $sut->success('World-Success'); + + $exception = new ValidationFailedException(new ConstraintViolationList([ + new ConstraintViolation('123', null, [], $this, null, 123), + new ConstraintViolation('456', null, [], $this, null, 456), + ])); + $sut->validationError($exception); + + $result = $output->fetch(); + self::assertStringContainsString('[ERROR] FooBar-Error', $result); + self::assertStringContainsString('[WARNING] Hello-Warning', $result); + self::assertStringContainsString('[OK] World-Success', $result); + self::assertStringContainsString('[ERROR] (123)', $result); + self::assertStringContainsString('[ERROR] (456)', $result); + } +}