NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1244 most downloaded on Packagist
A library for convenient handling of query strings used in HTTP requests.
Last release 3 years ago
no release in 18 months
Ships fairly regularly
a new release about every 5 months
Most releases are documented
notes for 3 of 4 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
4 releases · first in 2022
One column per quarter.
Fixes an issue introduced in v1.0.2. When creating an instance from string, it's containing an array and the brackets are encoded (like filter%5Bfoo%5
filter%5Bfoo%5D%5B%5D=1&filter%5Bfoo%5D%5B%5D=2), the method trying to fix duplicate keys without brackets added another array level (like filter[foo][] to filter[foo][][]). This is fixed with this release.Duplicate keys without array notation (like foo=bar&foo=baz ) are now also interpreted as array (like foo[]=bar&foo[]=baz ). This is considered a bugf
foo=bar&foo=baz) are now also interpreted as array (like foo[]=bar&foo[]=baz). This is considered a bugfix because:
foo=bar&foo=baz became foo=baz, which is most likely unwanted behavior.[]), but if such a query is written without the brackets, the intention is either that it should be an array, or it's a mistake. If it is a mistake, the probability to notice it is higher, when the result contains all values instead of only the last one.When creating a Query from string, and it contains empty key value parts, like &foo=bar , foo=bar& or foo=bar&&baz=quz , the unnecessary & characters
Query from string, and it contains empty key value parts, like &foo=bar, foo=bar& or foo=bar&&baz=quz, the unnecessary & characters are removed in the string version now. For example, &foo=bar previously lead to $instance->toString() returning &foo=bar and now it returns foo=bar.Query class, no matter if the instance was created from string or array, the library now first converts incoming values back and forth. So, when an instance is created from string, it first converts it to an array and then again back to a string and vice versa when an instance is created from an array. Some Examples being fixed by this:
foo=bar :
+++foo=bar++, toArray(): ['foo' => 'bar '].foo=bar++, toArray(): ['foo' => 'bar ']foo[bar] [baz]=bar
foo%5Bbar%5D+%5Bbaz%5D=bar, toArray(): ['foo' => ['bar' => 'bar']].foo%5Bbar%5D=bar, toArray(): '[foo' => ['bar' => 'bar']].foo[bar][baz][]=bar&foo[bar][baz][]=foo
foo%5Bbar%5D%5Bbaz%5D%5B%5D=bar&foo%5Bbar%5D%5Bbaz%5D%5B%5D=foo, toArray(): ['foo' => ['bar' => ['baz' => ['bar', 'foo']]]].foo%5Bbar%5D%5Bbaz%5D%5B0%5D=bar&foo%5Bbar%5D%5Bbaz%5D%5B1%5D=foo, toArray(): ['foo' => ['bar' => ['baz' => ['bar', 'foo']]]].option
option, toArray(): ['option' => '']option=, toArray(): ['option' => '']foo=bar=bar==
foo=bar=bar==, toArray(): [['foo' => 'bar=bar==']foo=bar%3Dbar%3D%3D, toArray(): [['foo' => 'bar=bar==']sum=10%5c2%3d5
sum=10%5c2%3d5, toArray(): [['sum' => '10\\2=5']sum=10%5C2%3D5, toArray(): [['sum' => '10\\2=5']foo=%20+bar
foo=%20+bar, toArray(): ['foo' => ' bar']foo=++bar, toArray(): ['foo' => ' bar']Query from string, and it contains empty key value parts, like &foo=bar, foo=bar& or foo=bar&&baz=quz, the unnecessary & characters are removed in the string version now. For example, &foo=bar previously lead to $instance->toString() returning &foo=bar and now it returns foo=bar.Query class, no matter if the instance was created from string or array, the library now first converts incoming values back and forth. So, when an instance is created from string, it first converts it to an array and then again back to a string and vice versa when an instance is created from an array. Some Examples being fixed by this:
foo=bar :
+++foo=bar++, toArray(): ['foo' => 'bar '].foo=bar++, toArray(): ['foo' => 'bar ']foo[bar] [baz]=bar
foo%5Bbar%5D+%5Bbaz%5D=bar, toArray(): ['foo' => ['bar' => 'bar']].foo%5Bbar%5D=bar, toArray(): '[foo' => ['bar' => 'bar']].foo[bar][baz][]=bar&foo[bar][baz][]=foo
foo%5Bbar%5D%5Bbaz%5D%5B%5D=bar&foo%5Bbar%5D%5Bbaz%5D%5B%5D=foo, toArray(): ['foo' => ['bar' => ['baz' => ['bar', 'foo']]]].foo%5Bbar%5D%5Bbaz%5D%5B0%5D=bar&foo%5Bbar%5D%5Bbaz%5D%5B1%5D=foo, toArray(): ['foo' => ['bar' => ['baz' => ['bar', 'foo']]]].option
option, toArray(): ['option' => '']option=, toArray(): ['option' => '']foo=bar=bar==
foo=bar=bar==, toArray(): [['foo' => 'bar=bar==']foo=bar%3Dbar%3D%3D, toArray(): [['foo' => 'bar=bar==']sum=10%5c2%3d5
sum=10%5c2%3d5, toArray(): [['sum' => '10\\2=5']sum=10%5C2%3D5, toArray(): [['sum' => '10\\2=5']foo=%20+bar
foo=%20+bar, toArray(): ['foo' => ' bar']foo=++bar, toArray(): ['foo' => ' bar']Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →