Skip to content

Commit aaadd11

Browse files
committed
Revert public API change
1 parent d626b1e commit aaadd11

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -527,24 +527,6 @@ echo InnerList::new('foo', 'bar')
527527
// ("foo" "bar");expire=@1681538756;path="/";max-age=2500
528528
```
529529

530-
### Advanced usages
531-
532-
Starting with version `1.1.0` the parser is made public with the following public static methods:
533-
534-
```php
535-
Parser::parseList(Stringable|String $value): array
536-
Parser::parseDictionary(Stringable|String $value): array
537-
Parser::parseItem(Stringable|String $value): array
538-
Parser::parseInnerList(Stringable|String $value): array
539-
Parser::parseParameters(Stringable|String $value): array
540-
```
541-
542-
All these static methods parse the HTTP Header string value and return an `array` structure
543-
representing the parsed string. It is possible to use this representation if you want
544-
to build your own structure field objects. Those methods are the ones used inside the
545-
respective `fromHttpValue` named constructors to generate `StructuredField` instances
546-
from their returned value.
547-
548530
## Contributing
549531

550532
Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE OF CONDUCT](.github/CODE_OF_CONDUCT.md) for details.

src/Parser.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
*
2323
* @see https://www.rfc-editor.org/rfc/rfc8941.html#section-4.2
2424
*
25+
* @internal Use Dictionary::fromHttpValue(),
26+
* Parameters::fromHttpValue(),
27+
* OuterList::fromHttpValue(),
28+
* InnerList::fromHttpValue()
29+
* or Item::fromHttpValue() instead
30+
*
2531
* @phpstan-import-type SfType from StructuredField
2632
*/
2733
final class Parser

0 commit comments

Comments
 (0)