Skip to content

Commit f8a67c7

Browse files
kidagertcarrio
andauthored
chore: update psr/log (#74)
## This PR - updates the `psr/log` version requirements ### Notes Some projects require other versions of `psr/log` than `1.*` Example: On a fresh Laravel 9 project, running `composer require open-feature/sdk` yields the following error: ``` Info from https://repo.packagist.org: #StandWithUkraine ./composer.json has been updated Running composer update open-feature/sdk Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires open-feature/sdk * -> satisfiable by open-feature/sdk[0.0.2, ..., 0.1.1, 1.0.0, ..., 1.3.1]. - open-feature/sdk[0.0.2, ..., 0.1.1, 1.0.0, ..., 1.3.1] require psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require open-feature/sdk:*" to figure out if any version is installable, or "composer require open-feature/sdk:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content. ``` --------- Signed-off-by: Jacem Chaieb <[email protected]> Signed-off-by: Tom Carrio <[email protected]> Co-authored-by: Tom Carrio <[email protected]>
1 parent a03e6b6 commit f8a67c7

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"require": {
1818
"php": "^8",
1919
"myclabs/php-enum": "^1.8",
20-
"psr/log": "^1.1"
20+
"psr/log": "^2.0 || ^3.0"
2121
},
2222
"require-dev": {
2323
"behat/behat": "^3.11",

integration/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"require": {
1818
"php": "^8",
1919
"open-feature/sdk": "^2.0.0",
20-
"open-feature/flagd-provider": "^0.4.0",
20+
"open-feature/flagd-provider": "^0.7.0",
2121
"guzzlehttp/guzzle": "^7.5",
2222
"guzzlehttp/psr7": "^2.4"
2323
},

src/OpenFeatureClient.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ private function evaluateFlag(
294294
string $flagKey,
295295
bool | string | int | float | DateTime | array | null $defaultValue,
296296
?EvaluationContextInterface $invocationContext = null,
297-
?EvaluationOptionsInterface $options = null
297+
?EvaluationOptionsInterface $options = null,
298298
): EvaluationDetailsInterface {
299299
$api = $this->api;
300300
$provider = $api->getProvider();
@@ -393,7 +393,7 @@ private function createProviderEvaluation(
393393
string $key,
394394
mixed $defaultValue,
395395
Provider $provider,
396-
EvaluationContextInterface $context
396+
EvaluationContextInterface $context,
397397
): ResolutionDetails {
398398
switch ($type) {
399399
case FlagValueType::BOOLEAN:

src/implementation/flags/NoOpClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getObjectValue(
6464
string $flagKey,
6565
array $defaultValue,
6666
?EvaluationContextInterface $context = null,
67-
?EvaluationOptions $options = null
67+
?EvaluationOptions $options = null,
6868
): array {
6969
return $defaultValue;
7070
}

src/implementation/hooks/HookContextFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function from(
2121
bool | string | int | float | DateTime | array | null $defaultValue,
2222
?EvaluationContextInterface $evaluationContext,
2323
Metadata $clientMetadata,
24-
Metadata $providerMetadata
24+
Metadata $providerMetadata,
2525
): HookContext {
2626
$builder = new HookContextBuilder();
2727

src/interfaces/common/LoggerAwareTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trait LoggerAwareTrait
2222
/**
2323
* Sets a logger.
2424
*/
25-
public function setLogger(LoggerInterface $logger)
25+
public function setLogger(LoggerInterface $logger): void
2626
{
2727
$this->logger = $logger;
2828
}

0 commit comments

Comments
 (0)