mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-23 13:23:33 +03:00
Fixed merge conflicts
This commit is contained in:
commit
cd06cea153
3 changed files with 23 additions and 3 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||
### Added
|
||||
* [#1015](https://github.com/shlinkio/shlink/issues/1015) Shlink now accepts configuration via env vars even when not using docker.
|
||||
|
||||
The config generated with the installing tool still has precedence over the env vars, so it cannot be combined. Either you use the tool, or use env vars.
|
||||
The config generated with the installing tool still has precedence over the env vars, so it cannot be combined. Either you use the tool, or use env vars.
|
||||
|
||||
### Changed
|
||||
* [#1142](https://github.com/shlinkio/shlink/issues/1142) Replaced `doctrine/cache` package with `symfony/cache`.
|
||||
|
@ -23,6 +23,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||
* *Nothing*
|
||||
|
||||
|
||||
## [2.8.1] - 2021-08-15
|
||||
### Added
|
||||
* *Nothing*
|
||||
|
||||
### Changed
|
||||
* *Nothing*
|
||||
|
||||
### Deprecated
|
||||
* *Nothing*
|
||||
|
||||
### Removed
|
||||
* *Nothing*
|
||||
|
||||
### Fixed
|
||||
* [#1155](https://github.com/shlinkio/shlink/issues/1155) Fixed numeric query params in long URLs being replaced by `0`.
|
||||
|
||||
|
||||
## [2.8.0] - 2021-08-04
|
||||
### Added
|
||||
* [#1089](https://github.com/shlinkio/shlink/issues/1089) Added new `ENABLE_PERIODIC_VISIT_LOCATE` env var to docker image which schedules the `visit:locate` command every hour when provided with value `true`.
|
||||
|
|
|
@ -5,11 +5,11 @@ declare(strict_types=1);
|
|||
namespace Shlinkio\Shlink\Core\ShortUrl\Helper;
|
||||
|
||||
use GuzzleHttp\Psr7\Query;
|
||||
use Laminas\Stdlib\ArrayUtils;
|
||||
use League\Uri\Uri;
|
||||
use Shlinkio\Shlink\Core\Entity\ShortUrl;
|
||||
use Shlinkio\Shlink\Core\Options\TrackingOptions;
|
||||
|
||||
use function array_merge;
|
||||
use function sprintf;
|
||||
|
||||
class ShortUrlRedirectionBuilder implements ShortUrlRedirectionBuilderInterface
|
||||
|
@ -37,7 +37,8 @@ class ShortUrlRedirectionBuilder implements ShortUrlRedirectionBuilderInterface
|
|||
unset($currentQuery[$disableTrackParam]);
|
||||
}
|
||||
|
||||
$mergedQuery = array_merge($hardcodedQuery, $currentQuery);
|
||||
// We want to merge preserving numeric keys, as some params might be numbers
|
||||
$mergedQuery = ArrayUtils::merge($hardcodedQuery, $currentQuery, true);
|
||||
|
||||
return empty($mergedQuery) ? null : Query::build($mergedQuery);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ class ShortUrlRedirectionBuilderTest extends TestCase
|
|||
yield ['https://domain.com/foo/bar?some=thing', [], null];
|
||||
yield ['https://domain.com/foo/bar?some=thing&else', ['else' => null], null];
|
||||
yield ['https://domain.com/foo/bar?some=thing&foo=bar', ['foo' => 'bar'], null];
|
||||
yield ['https://domain.com/foo/bar?some=thing&123=foo', ['123' => 'foo'], null];
|
||||
yield ['https://domain.com/foo/bar?some=thing&456=foo', [456 => 'foo'], null];
|
||||
yield ['https://domain.com/foo/bar?some=overwritten&foo=bar', ['foo' => 'bar', 'some' => 'overwritten'], null];
|
||||
yield ['https://domain.com/foo/bar?some=overwritten', ['foobar' => 'notrack', 'some' => 'overwritten'], null];
|
||||
yield ['https://domain.com/foo/bar/something/else-baz?some=thing', [], '/something/else-baz'];
|
||||
|
|
Loading…
Reference in a new issue