mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
Merge pull request #1353 from acelaya-forks/feature/profiling
Feature/profiling
This commit is contained in:
commit
7adf2292bd
3 changed files with 5 additions and 8 deletions
|
@ -4,7 +4,7 @@ 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).
|
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
## [Unreleased]
|
## [3.0.0] - 2022-01-28
|
||||||
### Added
|
### Added
|
||||||
* [#767](https://github.com/shlinkio/shlink/issues/767) Added full support to use emojis everywhere, whether it is custom slugs, titles, referrers, etc.
|
* [#767](https://github.com/shlinkio/shlink/issues/767) Added full support to use emojis everywhere, whether it is custom slugs, titles, referrers, etc.
|
||||||
* [#1274](https://github.com/shlinkio/shlink/issues/1274) Added support to filter short URLs lists by all provided tags.
|
* [#1274](https://github.com/shlinkio/shlink/issues/1274) Added support to filter short URLs lists by all provided tags.
|
||||||
|
|
|
@ -48,10 +48,10 @@
|
||||||
"pugx/shortid-php": "^1.0",
|
"pugx/shortid-php": "^1.0",
|
||||||
"ramsey/uuid": "^4.2",
|
"ramsey/uuid": "^4.2",
|
||||||
"shlinkio/shlink-common": "^4.4",
|
"shlinkio/shlink-common": "^4.4",
|
||||||
"shlinkio/shlink-config": "dev-main#483cf8a as 1.6",
|
"shlinkio/shlink-config": "^1.6",
|
||||||
"shlinkio/shlink-event-dispatcher": "^2.3",
|
"shlinkio/shlink-event-dispatcher": "^2.3",
|
||||||
"shlinkio/shlink-importer": "^2.5",
|
"shlinkio/shlink-importer": "^2.5",
|
||||||
"shlinkio/shlink-installer": "dev-develop#3ca7ec5 as 7.0",
|
"shlinkio/shlink-installer": "^7.0",
|
||||||
"shlinkio/shlink-ip-geolocation": "^2.2",
|
"shlinkio/shlink-ip-geolocation": "^2.2",
|
||||||
"symfony/console": "^6.0",
|
"symfony/console": "^6.0",
|
||||||
"symfony/filesystem": "^6.0",
|
"symfony/filesystem": "^6.0",
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
"cebe/php-openapi": "^1.5",
|
"cebe/php-openapi": "^1.5",
|
||||||
"devster/ubench": "^2.1",
|
"devster/ubench": "^2.1",
|
||||||
"dms/phpunit-arraysubset-asserts": "^0.3.0",
|
"dms/phpunit-arraysubset-asserts": "^0.3.0",
|
||||||
"eaglewu/swoole-ide-helper": "dev-master",
|
|
||||||
"infection/infection": "^0.26",
|
"infection/infection": "^0.26",
|
||||||
|
"openswoole/ide-helper": "~4.9.1",
|
||||||
"phpspec/prophecy-phpunit": "^2.0",
|
"phpspec/prophecy-phpunit": "^2.0",
|
||||||
"phpstan/phpstan": "^1.2",
|
"phpstan/phpstan": "^1.2",
|
||||||
"phpstan/phpstan-doctrine": "^1.0",
|
"phpstan/phpstan-doctrine": "^1.0",
|
||||||
|
|
|
@ -63,9 +63,6 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito
|
||||||
$apiKey = $filtering?->apiKey();
|
$apiKey = $filtering?->apiKey();
|
||||||
$this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey), 't');
|
$this->applySpecification($subQb, new WithInlinedApiKeySpecsEnsuringJoin($apiKey), 't');
|
||||||
|
|
||||||
$subQuery = $subQb->getQuery();
|
|
||||||
$subQuerySql = $subQuery->getSQL();
|
|
||||||
|
|
||||||
// A native query builder needs to be used here, because DQL and ORM query builders do not support
|
// A native query builder needs to be used here, because DQL and ORM query builders do not support
|
||||||
// sub-queries at "from" and "join" level.
|
// sub-queries at "from" and "join" level.
|
||||||
// If no sub-query is used, the whole list is loaded even with pagination, making it very inefficient.
|
// If no sub-query is used, the whole list is loaded even with pagination, making it very inefficient.
|
||||||
|
@ -77,7 +74,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito
|
||||||
'COUNT(DISTINCT s.id) AS short_urls_count',
|
'COUNT(DISTINCT s.id) AS short_urls_count',
|
||||||
'COUNT(DISTINCT v.id) AS visits_count',
|
'COUNT(DISTINCT v.id) AS visits_count',
|
||||||
)
|
)
|
||||||
->from('(' . $subQuerySql . ')', 't')
|
->from('(' . $subQb->getQuery()->getSQL() . ')', 't')
|
||||||
->leftJoin('t', 'short_urls_in_tags', 'st', $nativeQb->expr()->eq('t.id_0', 'st.tag_id'))
|
->leftJoin('t', 'short_urls_in_tags', 'st', $nativeQb->expr()->eq('t.id_0', 'st.tag_id'))
|
||||||
->leftJoin('st', 'short_urls', 's', $nativeQb->expr()->eq('s.id', 'st.short_url_id'))
|
->leftJoin('st', 'short_urls', 's', $nativeQb->expr()->eq('s.id', 'st.short_url_id'))
|
||||||
->leftJoin('st', 'visits', 'v', $nativeQb->expr()->eq('s.id', 'v.short_url_id'))
|
->leftJoin('st', 'visits', 'v', $nativeQb->expr()->eq('s.id', 'v.short_url_id'))
|
||||||
|
|
Loading…
Reference in a new issue