Skip to content

Commit 7d46a96

Browse files
committed
Prepare next release
1 parent 3040e5f commit 7d46a96

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ All Notable changes to `bakame/http-strucured-fields` will be documented in this
1212
- `Item` implements the `ValueAccess` interface;
1313
- `Item::toPair` to complement `Item::fromPair`;
1414
- `Item::fromDate` to improve and complete the Item Date public API;
15-
- `Item::new` to improve Item public API;
1615
- `Item::fromAssociative` to improve Item public API;
1716
- `Item::fromString` to improve Item public API;
1817
- `Value` internal class to improve Item public API;
1918
- `Token::toString` to return the string representation of the token.
20-
- `Parameters::new` and `Dictionary::new` to return a new and empty instance
21-
- `InnerList::new` and `InnerList::new` to return a new instance
19+
- `Item::new`, `Parameters::new`, `Dictionary::new`, `InnerList::new` and `OuterList::new` to return a new instance
2220

2321
### Fixed
2422

@@ -30,7 +28,7 @@ All Notable changes to `bakame/http-strucured-fields` will be documented in this
3028

3129
### Removed
3230

33-
- **[BC Break]** `InnerList::fromPairParameters` use `InnerList::fromPairs` instead.
31+
- **[BC Break]** `InnerList::fromPairParameters` use `InnerList::fromPair` instead.
3432
- **[BC Break]** `InnerList::fromAssociativeParameters` use `InnerList::fromAssociative` instead.
3533
- **[BC Break]** `Value` interface use a combination of `ValueAccess` **and** `ParameterAccess` instead.
3634
- **[BC Break]** `Token::value` is no longer public use `Token::toString` instead.

src/Value.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ public function __construct(mixed $value)
2424
{
2525
[$this->value, $this->type] = match (true) {
2626
$value instanceof ValueAccess => [$value->value(), $value->type()],
27+
$value instanceof Token,
28+
$value instanceof ByteSequence => [$value, $value->type()],
2729
$value instanceof DateTimeInterface => [self::filterDate($value), Type::Date],
2830
is_int($value) => [self::filterIntegerRange($value, 'Integer'), Type::Integer],
2931
is_float($value) => [self::filterDecimal($value), Type::Decimal],
30-
is_string($value) || $value instanceof Stringable => [self::filterString($value), Type::String],
3132
is_bool($value) => [$value, Type::Boolean],
32-
$value instanceof Token,
33-
$value instanceof ByteSequence => [$value, $value->type()],
33+
is_string($value) || $value instanceof Stringable => [self::filterString($value), Type::String],
3434
default => throw new SyntaxError('The type "'.(is_object($value) ? $value::class : gettype($value)).'" is not supported.')
3535
};
3636
}

0 commit comments

Comments
 (0)