Skip to content

Commit

Permalink
Set column name to createdAt
Browse files Browse the repository at this point in the history
The default name is in conflict with our undrescore naming strategy. It
was either adding a new migration, or fixing it like this. I opted for
this solution.
  • Loading branch information
MKodde committed Jun 17, 2024
1 parent 82aff57 commit e77a766
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ci/qa/phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2661,6 +2661,11 @@
'count' => 1,
'path' => __DIR__ . '/../../src/Surfnet/ServiceProviderDashboard/Domain/Entity/Service.php',
];
$ignoreErrors[] = [
'message' => '#^Property Surfnet\\\\ServiceProviderDashboard\\\\Domain\\\\Entity\\\\Service\\:\\:\\$createdAt is unused\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../src/Surfnet/ServiceProviderDashboard/Domain/Entity/Service.php',
];
$ignoreErrors[] = [
'message' => '#^Property Surfnet\\\\ServiceProviderDashboard\\\\Domain\\\\Entity\\\\Service\\:\\:\\$institutionId \\(string\\) does not accept string\\|null\\.$#',
'count' => 1,
Expand Down Expand Up @@ -3416,6 +3421,11 @@
'count' => 1,
'path' => __DIR__ . '/../../src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/PrivacyQuestionsController.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getContact\\(\\) on Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null\\.$#',
'count' => 1,
'path' => __DIR__ . '/../../src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Controller/ServiceConnectionsController.php',
];
$ignoreErrors[] = [
'message' => '#^Method Surfnet\\\\ServiceProviderDashboard\\\\Infrastructure\\\\DashboardBundle\\\\Controller\\\\ServiceConnectionsController\\:\\:myServices\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ private function addIdpList(EntityConnectionCollection $collection): void
$collection->addIdpList($this->listTestIdps());
}

/**
* @param array<string, IdentityProvider> $testIdpsIndexed
*/
private function addEntitiesToCollection(
EntityConnectionCollection $collection,
InstitutionId $institutionId,
Expand Down Expand Up @@ -150,6 +153,9 @@ private function addEntitiesToCollection(
$collection->addEntityConnections($list);
}

/**
* @return array<string, IdentityProvider>
*/
private function getTestIdpsIndexed(): array
{
// First create an indexed list of the test entities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

/**
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.UnusedPrivateField) It is used to indicate the age of a service. See: https://www.pivotaltracker.com/story/show/187715470
* @SuppressWarnings(PHPMD.UnusedPrivateField) - the createdAt field is not used in code, but used by TPM's to check for
* the creation date of a service.
*/
#[ORM\Entity(repositoryClass: ServiceRepository::class)]
class Service
Expand Down

0 comments on commit e77a766

Please sign in to comment.