Skip to content

Commit a67d076

Browse files
committed
Annontate deprecated code that will be removed after the next release
1 parent 9535caf commit a67d076

File tree

7 files changed

+15
-0
lines changed

7 files changed

+15
-0
lines changed

library/EngineBlock/Corto/Model/Consent.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ public function explicitConsentWasGivenFor(ServiceProvider $serviceProvider): Co
9595
*
9696
* The caller must pass the ConsentVersion already retrieved by explicitConsentWasGivenFor or
9797
* implicitConsentWasGivenFor to avoid a second identical DB query.
98+
*
99+
* @deprecated Remove after stable consent hash is running in production
98100
*/
99101
public function upgradeAttributeHashFor(ServiceProvider $serviceProvider, ConsentType $consentType, ConsentVersion $consentVersion): void
100102
{
@@ -141,6 +143,7 @@ protected function _getConsentUid()
141143
return $this->_response->getNameIdValue();
142144
}
143145

146+
/** @deprecated Remove after stable consent hash is running in production */
144147
protected function _getAttributesHash($attributes): string
145148
{
146149
return $this->_hashService->getUnstableAttributesHash($attributes, $this->_mustStoreValues);
@@ -173,6 +176,7 @@ private function _storeConsent(ServiceProvider $serviceProvider, ConsentType $co
173176
return $this->_hashService->storeConsentHash($parameters);
174177
}
175178

179+
/** @deprecated Remove after stable consent hash is running in production */
176180
private function _updateConsent(ServiceProvider $serviceProvider, ConsentType $consentType): bool
177181
{
178182
$consentUid = $this->_getConsentUid();

src/OpenConext/EngineBlock/Authentication/Value/ConsentHashQuery.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ final class ConsentHashQuery
2323
public function __construct(
2424
public readonly string $hashedUserId,
2525
public readonly string $serviceId,
26+
/** @deprecated Remove after stable consent hash is running in production */
2627
public readonly string $attributeHash,
2728
public readonly string $attributeStableHash,
2829
public readonly string $consentType,

src/OpenConext/EngineBlock/Authentication/Value/ConsentStoreParameters.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function __construct(
2525
public readonly string $serviceId,
2626
public readonly string $attributeStableHash,
2727
public readonly string $consentType,
28+
/** @deprecated Remove after stable consent hash is running in production */
2829
public readonly ?string $attributeHash = null,
2930
) {
3031
}

src/OpenConext/EngineBlock/Authentication/Value/ConsentUpdateParameters.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ final class ConsentUpdateParameters
2222
{
2323
public function __construct(
2424
public readonly string $attributeStableHash,
25+
/** @deprecated Remove after stable consent hash is running in production */
2526
public readonly string $attributeHash,
2627
public readonly string $hashedUserId,
2728
public readonly string $serviceId,
2829
public readonly string $consentType,
30+
/** @deprecated Remove after stable consent hash is running in production */
2931
public readonly bool $clearLegacyHash = false,
3032
) {
3133
}

src/OpenConext/EngineBlock/Authentication/Value/ConsentVersion.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
final class ConsentVersion
2424
{
2525
const STABLE = 'stable';
26+
/** @deprecated Remove after stable consent hash is running in production */
2627
const UNSTABLE = 'unstable';
2728
const NOT_GIVEN = 'not-given';
2829

@@ -36,6 +37,7 @@ public static function stable(): ConsentVersion
3637
return new self(self::STABLE);
3738
}
3839

40+
/** @deprecated Remove after stable consent hash is running in production */
3941
public static function unstable(): ConsentVersion
4042
{
4143
return new self(self::UNSTABLE);
@@ -70,6 +72,7 @@ public function __toString()
7072
return $this->consentVersion;
7173
}
7274

75+
/** @deprecated Remove after stable consent hash is running in production */
7376
public function isUnstable(): bool
7477
{
7578
return $this->consentVersion === self::UNSTABLE;

src/OpenConext/EngineBlock/Service/Consent/ConsentHashService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
final class ConsentHashService implements ConsentHashServiceInterface
3434
{
35+
/** @deprecated Remove after stable consent hash is running in production */
3536
private const FEATURE_MIGRATION = 'eb.stable_consent_hash_migration';
3637

3738
/**
@@ -101,6 +102,8 @@ public function getStableConsentHash(ConsentAttributes $attributes): string
101102
}
102103

103104
/**
105+
* @deprecated Remove after stable consent hash is running in production
106+
*
104107
* The old way of calculating the attribute hash, this is not stable as a change of the attribute order,
105108
* change of case, stray/empty attributes, and renumbered indexes can cause the hash to change. Leaving the
106109
* user to give consent once again for a service she previously gave consent for.

src/OpenConext/EngineBlock/Service/Consent/ConsentHashServiceInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function updateConsentHash(ConsentUpdateParameters $parameters): bool;
3636

3737
public function countTotalConsent(string $consentUid): int;
3838

39+
/** @deprecated Remove after stable consent hash is running in production */
3940
public function getUnstableAttributesHash(array $attributes, bool $mustStoreValues): string;
4041

4142
public function getStableConsentHash(ConsentAttributes $attributes): string;

0 commit comments

Comments
 (0)