diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4fcaa8..9e7d5ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,30 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). +## 2.1.2 - 2020-03-29 + +#### Added + +* *Nothing* + +#### Changed + +* [#696](https://github.com/shlinkio/shlink/issues/696) Updated to infection v0.16. + +#### Deprecated + +* *Nothing* + +#### Removed + +* *Nothing* + +#### Fixed + +* [#700](https://github.com/shlinkio/shlink/issues/700) Fixed migration not working with postgres. +* [#690](https://github.com/shlinkio/shlink/issues/690) Fixed tags being incorrectly sluggified when filtering short URL lists, making results not be the expected. + + ## 2.1.1 - 2020-03-28 #### Added diff --git a/composer.json b/composer.json index 9cadd738..7094757d 100644 --- a/composer.json +++ b/composer.json @@ -63,8 +63,8 @@ "devster/ubench": "^2.0", "dms/phpunit-arraysubset-asserts": "^0.2.0", "eaglewu/swoole-ide-helper": "dev-master", - "infection/infection": "^0.15.0", - "phpstan/phpstan": "^0.12.3", + "infection/infection": "^0.16.1", + "phpstan/phpstan": "^0.12.18", "phpunit/phpunit": "^9.0.1", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.1.0", @@ -135,7 +135,7 @@ "test:api:ci": "@test:api --coverage-php build/coverage-api.cov", "test:unit:pretty": "phpdbg -qrr vendor/bin/phpunit --order-by=random --colors=always --coverage-html build/coverage", "infect": "infection --threads=4 --min-msi=80 --log-verbosity=default --only-covered", - "infect:ci": "@infect --coverage=build", + "infect:ci": "@infect --coverage=build --skip-initial-tests", "infect:show": "@infect --show-mutations", "infect:test": [ "@test:unit:ci", diff --git a/data/migrations/Version20200323190014.php b/data/migrations/Version20200323190014.php index fe3c340d..47cf402a 100644 --- a/data/migrations/Version20200323190014.php +++ b/data/migrations/Version20200323190014.php @@ -22,15 +22,16 @@ final class Version20200323190014 extends AbstractMigration { $qb = $this->connection->createQueryBuilder(); $qb->update('visit_locations') - ->set('is_empty', true) - ->where($qb->expr()->eq('country_code', ':empty')) - ->andWhere($qb->expr()->eq('country_name', ':empty')) - ->andWhere($qb->expr()->eq('region_name', ':empty')) - ->andWhere($qb->expr()->eq('city_name', ':empty')) - ->andWhere($qb->expr()->eq('timezone', ':empty')) + ->set('is_empty', ':isEmpty') + ->where($qb->expr()->eq('country_code', ':emptyString')) + ->andWhere($qb->expr()->eq('country_name', ':emptyString')) + ->andWhere($qb->expr()->eq('region_name', ':emptyString')) + ->andWhere($qb->expr()->eq('city_name', ':emptyString')) + ->andWhere($qb->expr()->eq('timezone', ':emptyString')) ->andWhere($qb->expr()->eq('lat', 0)) ->andWhere($qb->expr()->eq('lon', 0)) - ->setParameter('empty', '') + ->setParameter('isEmpty', true) + ->setParameter('emptyString', '') ->execute(); } diff --git a/module/Core/src/Validation/ShortUrlsParamsInputFilter.php b/module/Core/src/Validation/ShortUrlsParamsInputFilter.php index b3e6db2d..20191fa1 100644 --- a/module/Core/src/Validation/ShortUrlsParamsInputFilter.php +++ b/module/Core/src/Validation/ShortUrlsParamsInputFilter.php @@ -39,7 +39,7 @@ class ShortUrlsParamsInputFilter extends InputFilter $tags = $this->createArrayInput(self::TAGS, false); $tags->getFilterChain()->attach(new Filter\StringToLower()) - ->attach(new Validation\SluggerFilter()); + ->attach(new Filter\PregReplace(['pattern' => '/ /', 'replacement' => '-'])); $this->add($tags); } }