Compare commits

...

4344 Commits

Author SHA1 Message Date
Alejandro Celaya
52d257dd42 Merge pull request #2481 from shlinkio/develop
Release 4.5.2
2025-08-27 09:45:58 +02:00
Alejandro Celaya
613c7b7368 Merge pull request #2480 from acelaya-forks/feature/garbage-collection
Garbage collect after every request
2025-08-27 09:41:38 +02:00
Alejandro Celaya
232f6e37c6 Ensure pipeline is not marked as failed if only v8.5 fails 2025-08-27 09:30:41 +02:00
Alejandro Celaya
c818d5603d Garbage collect after every request 2025-08-27 09:24:28 +02:00
Alejandro Celaya
ff77d8b149 Merge pull request #2479 from shlinkio/develop
Release 4.5.1
2025-08-24 11:28:44 +02:00
Alejandro Celaya
95be5a93fc Merge pull request #2478 from acelaya-forks/feature/memory-leak-mitigation
Try to mitigate memory leaks when using RoadRunner
2025-08-24 11:23:57 +02:00
Alejandro Celaya
20c41690da Try to mitigate memory leaks when using RoadRunner 2025-08-24 11:18:40 +02:00
Alejandro Celaya
22b5fa5a83 Merge pull request #2474 from acelaya-forks/feature/symfony-lock
Update to symfony/lock ^7.3.2
2025-08-01 08:28:05 +02:00
Alejandro Celaya
0c4d1b6d2f Update to symfony/lock ^7.3.2 2025-08-01 08:21:37 +02:00
Alejandro Celaya
4520ba50bf Merge pull request #2471 from shlinkio/develop
Release 4.5.0
2025-07-24 20:00:42 +02:00
Alejandro Celaya
d2514b7555 Merge pull request #2470 from acelaya-forks/feature/release-4.5.0
Add v4.5.0 to changelog
2025-07-24 12:11:03 +02:00
Alejandro Celaya
2d5734fc8b Add v4.5.0 to changelog 2025-07-24 12:07:11 +02:00
Alejandro Celaya
478ac344ff Merge pull request #2469 from acelaya-forks/feature/logs-encoding
Allow logs format to be configured as console or JSON
2025-07-24 10:01:36 +02:00
Alejandro Celaya
e40b82618a Allow logs format to be configured as console or JSON 2025-07-24 09:57:34 +02:00
Alejandro Celaya
51dd671174 Merge pull request #2467 from acelaya-forks/feature/nullable-match-value
Make RedirectCondition->matchValue nullable
2025-07-22 08:32:25 +02:00
Alejandro Celaya
5b5d0aae49 Make RedirectCondition->matchValue nullable 2025-07-22 08:28:09 +02:00
Alejandro Celaya
56df880a93 Merge pull request #2466 from acelaya-forks/feature/php-8.5
Run tests under PHP 8.5 in CI
2025-07-21 10:38:02 +02:00
Alejandro Celaya
afa509613a Run tests under PHP 8.5 in CI 2025-07-21 10:30:35 +02:00
Alejandro Celaya
3be49a25a0 Merge pull request #2465 from acelaya-forks/feature/redirect-cache-visibility
Allow redirect cache visibility to be configured
2025-07-21 10:21:36 +02:00
Alejandro Celaya
8b259b364d Allow redirect cache visibility to be configured 2025-07-21 10:13:17 +02:00
Alejandro Celaya
13d9b7b0a7 Merge pull request #2464 from acelaya-forks/feature/desktop-devices
Add support for more device types in device-specific redirects
2025-07-20 12:02:11 +02:00
Alejandro Celaya
2b33095392 Add support for more device types in device-specific redirects 2025-07-20 11:56:33 +02:00
Alejandro Celaya
3a1ce40a49 Merge pull request #2461 from acelaya-forks/feature/trusted-proxies
Allow trusted proxies to be provided via TRUSTED_PROXIES env var or config option
2025-07-18 08:32:48 +02:00
Alejandro Celaya
a68300f19a Fix phpstan report 2025-07-18 08:29:16 +02:00
Alejandro Celaya
3318987d63 Allow providing hop count via TRUSTED_PROXIES 2025-07-18 08:24:57 +02:00
Alejandro Celaya
1f825797f6 Allow trusted proxies to be provided via TRUSTED_PROXIES env var 2025-07-17 09:57:34 +02:00
Alejandro Celaya
650fafb7c4 Register ReverseForwardedAddressesMiddlewareDecorator via ServiceManager delegator 2025-07-17 09:47:02 +02:00
Alejandro Celaya
978e24d6fa Merge pull request #2460 from acelaya-forks/feature/enhanced-query-param-rules
Add support for any-value and valueless query param redirect rules
2025-07-17 08:57:30 +02:00
Alejandro Celaya
c3d3cc6288 Test RedirectConditionType::isValid() in isolation 2025-07-17 08:51:59 +02:00
Alejandro Celaya
223901324f Enhance RedirectRuleHandlerTest with new query-param-related conditions 2025-07-17 08:44:19 +02:00
Alejandro Celaya
47293be85c Enhance RedirectConditionTest with new query-param-related conditions 2025-07-17 08:39:37 +02:00
Alejandro Celaya
18c4c39fee Add support for any-value and valueless query param redirect rules 2025-07-17 08:31:29 +02:00
Alejandro Celaya
e762d28b67 Merge pull request #2455 from acelaya-forks/feature/cors-customization
Add new CORS configuration options
2025-07-16 08:41:42 +02:00
Alejandro Celaya
f5c6bc8204 Update changelog 2025-07-16 08:39:12 +02:00
Alejandro Celaya
3369afe22c Add CorsOptions test 2025-07-16 08:29:57 +02:00
Alejandro Celaya
1d96cc0279 Update CrossDomainMiddleware test 2025-07-08 13:17:46 +02:00
Alejandro Celaya
cd4fcc9b0a Update shlink-installer 2025-07-08 13:07:04 +02:00
Alejandro Celaya
834bc4ae20 Allow credentials to be enabled in CORS 2025-07-08 10:36:12 +02:00
Alejandro Celaya
92d7a44cee Add new CORS configuration options 2025-07-05 10:34:50 +02:00
Alejandro Celaya
c8e3b3df0a Update changelog 2025-07-04 18:31:20 +02:00
Alejandro Celaya
77244b52c9 Merge pull request #2454 from acelaya-forks/feature/real-time-updates-options
Allow individual real-time updates topics to be enabled
2025-07-04 18:29:12 +02:00
Alejandro Celaya
9e93e34e12 Add test to cover when visit updates topics are disabled 2025-07-04 18:25:45 +02:00
Alejandro Celaya
733b2e5647 Add test to cover when short URL updates topic is disabled 2025-07-04 18:04:27 +02:00
Alejandro Celaya
26fef87f3b Add RealTimeUpdatesOptions test 2025-07-04 10:07:40 +02:00
Alejandro Celaya
f4aaf02d55 Reduce duplicated code between enumValues and enumNames 2025-07-04 09:52:35 +02:00
Alejandro Celaya
314a99862d Update to latest shlink-installer with real-time updates support 2025-07-03 18:35:14 +02:00
Alejandro Celaya
240d9df177 Validate topic names in RealTimeUpdateOptions 2025-07-03 14:34:27 +02:00
Alejandro Celaya
fb995f2bea Allow individual real-time updates topics to be enabled 2025-07-03 10:10:06 +02:00
Alejandro Celaya
436be1985c Merge pull request #2452 from acelaya-forks/feature/invokable-command-poc
Use invokable commands approach on some API console commands
2025-06-26 08:46:20 +02:00
Alejandro Celaya
850e8574e9 Use invokable commands approach on some API console commands 2025-06-26 08:41:18 +02:00
Alejandro Celaya
c2743cb488 Merge pull request #2453 from acelaya-forks/feature/phpunit-warnings
Adjust tests to fix warnings
2025-06-26 08:40:10 +02:00
Alejandro Celaya
f1157aa177 Adjust tests to fix warnings 2025-06-24 19:47:18 +02:00
Alejandro Celaya
497429e685 Forward questions to the global discussions repo 2025-06-23 10:14:18 +02:00
Alejandro Celaya
2cad5dd435 Update to roadrunner 2025.1 2025-05-27 14:23:49 +02:00
Alejandro Celaya
f38f1ae5da Merge pull request #2439 from acelaya-forks/feature/mercure-enabled
Add new MERCURE_ENABLED env var
2025-05-22 08:29:23 +01:00
Alejandro Celaya
9c1db35d81 Add new MERCURE_ENABLED env var 2025-05-22 09:20:50 +02:00
Alejandro Celaya
11b8943919 Merge pull request #2432 from acelaya-forks/feature/docker-env-syntax
Update syntax used for env vars in Dockerfiles
2025-05-06 12:25:14 +02:00
Alejandro Celaya
27d24a4f15 Update syntax used for env vars in Dockerfiles 2025-05-06 11:56:49 +02:00
Alejandro Celaya
b2dbc4cf52 Fix typo in Dockerfile 2025-05-04 15:57:29 +02:00
Alejandro Celaya
1a7a745f2e Update Dockerfile marking image-related extensions as delegated 2025-05-04 15:56:44 +02:00
Alejandro Celaya
99bc1a21dd Merge pull request #2425 from acelaya-forks/feature/command-exit-codes
Replace ExitCode with standard symfony Command constants
2025-04-22 19:49:16 +02:00
Alejandro Celaya
cea8a982e2 Replace ExitCode with standard symfony Command constants 2025-04-22 12:07:41 +02:00
Alejandro Celaya
8bd1c6a79a Merge pull request #2423 from acelaya-forks/feature/remove-bootstrap
Remove references to bootstrap from error templates
2025-04-22 09:12:08 +02:00
Alejandro Celaya
71a3b993b1 Remove references to bootstrap from error templates 2025-04-22 09:09:52 +02:00
Alejandro Celaya
6e25e3c31d Merge pull request #2422 from acelaya-forks/feature/deprecate-qr-codes
Deprecate QR code generation endpoint
2025-04-22 08:50:34 +02:00
Alejandro Celaya
b15e832cf4 Deprecate QR code generation endpoint 2025-04-22 08:47:37 +02:00
Alejandro Celaya
851929ebef Merge pull request #2403 from acelaya-forks/feature/phpunit-phpstan-fixes
Fix compatibility with PHPUnit 12.0.9 and phpstan-phpunit
2025-03-24 19:36:44 +01:00
Alejandro Celaya
87d5f9bc75 Fix compatibility with PHPUnit 12.0.9 and phpstan-phpunit 2025-03-24 19:33:52 +01:00
Alejandro Celaya
c2649395f8 Merge pull request #2398 from shlinkio/develop
Release 4.4.6
2025-03-20 09:24:27 +01:00
Alejandro Celaya
b7d9ba8258 Merge pull request #2397 from acelaya-forks/feature/endroid-fix
Fix error intrduced by endroid/qr-code 6.0.4
2025-03-20 09:19:58 +01:00
Alejandro Celaya
6526cf8c44 Fix error intrduced by endroid/qr-code 6.0.4 2025-03-20 09:16:53 +01:00
Alejandro Celaya
a85afb2bee Merge pull request #2394 from acelaya-forks/feature/fix-artifact-removal
Update geekyeggo/delete-artifact action to v5
2025-03-14 18:00:47 +01:00
Alejandro Celaya
8b4067efbe Update geekyeggo/delete-artifact action to v5 2025-03-14 17:57:55 +01:00
Alejandro Celaya
c7c2272fab Update changelog 2025-03-14 17:53:23 +01:00
Alejandro Celaya
bc77750713 Merge pull request #2392 from wuuei/patch-1
Fix Matomo country logging by sending country code instead of country
2025-03-14 17:51:37 +01:00
Alejandro Celaya
1ceb38f50b Test actual arguments set to matomo tracker when sending visits 2025-03-14 17:40:37 +01:00
wuuei
d273b56144 Lock "endroid/qr-code" to 6.0.3 so that unit tests complete 2025-03-14 15:21:55 +00:00
wuuei
5cd7305666 Fix code style to resolve failing check 2025-03-14 15:20:49 +00:00
wuuei
3040a22c02 Fix Matomo country logging by sending country code instead of country name
Matomo expects the country code in lowercase for accurate logging and proper flag display
2025-03-13 15:33:00 +01:00
Alejandro Celaya
6991138812 Merge pull request #2379 from shlinkio/develop
Release 4.4.5
2025-03-01 09:41:16 +01:00
Alejandro Celaya
5eb1808217 Update CHANGELOG.md with V4.4.5 2025-03-01 09:14:37 +01:00
Alejandro Celaya
5eb14c5315 Merge pull request #2375 from acelaya-forks/feature/deprecation-error-reporting
Disable deprecation warnings when running in production envs
2025-02-21 21:18:44 +01:00
Alejandro Celaya
a18360a4d6 Disable deprecation warnings when running in production envs 2025-02-21 21:13:29 +01:00
Alejandro Celaya
104b1e7d04 Merge pull request #2371 from shlinkio/develop
Release 4.4.4
2025-02-19 19:40:28 +01:00
Alejandro Celaya
af2d67695b Merge pull request #2370 from acelaya-forks/feature/missing-join-fix
Fix 500 error when listing non-orphan visits with short-url-depending API key
2025-02-19 19:37:36 +01:00
Alejandro Celaya
449a588796 Fix 500 error when listing non-orphan visits with short-url-depending API key 2025-02-19 19:33:44 +01:00
Alejandro Celaya
7bbc938743 Merge pull request #2369 from acelaya-forks/feature/redis-cluster-fix
Downgrade to symfony/lock 7.1.6
2025-02-19 17:55:53 +01:00
Alejandro Celaya
766758ff9b Downgrade to symfony/lock 7.1.6 2025-02-19 17:45:52 +01:00
Alejandro Celaya
bee9f2a9cc Merge pull request #2364 from shlinkio/develop
Release 4.4.3
2025-02-15 11:28:09 +01:00
Alejandro Celaya
63d943d59d Merge pull request #2363 from acelaya-forks/feature/find-url-perf
Fix unique_short_code_plus_domain index in Microsoft SQL
2025-02-15 11:24:26 +01:00
Alejandro Celaya
053e1f3073 Update changelog 2025-02-15 11:19:30 +01:00
Alejandro Celaya
f3da345bf3 Fix unique_short_code_plus_domain index in Microsoft SQL 2025-02-15 11:17:14 +01:00
Alejandro Celaya
745255736a Simplify query to find short URL when domain is null 2025-02-14 10:20:50 +01:00
Alejandro Celaya
8fd53afe3f Merge pull request #2361 from acelaya-forks/feature/lock-downgrade
Downgrade symfony/lock to v7.2.0 to work around redis issue
2025-02-14 08:52:33 +01:00
Alejandro Celaya
259635ea2a Downgrade symfony/lock to v7.2.0 to work around redis issue 2025-02-14 08:40:06 +01:00
Alejandro Celaya
a1f2e6dc5c Merge pull request #2359 from acelaya-forks/feature/multi-proxy-fix
Workaround for IP resolution from x-Forwarded-For with multiple proxies
2025-02-13 22:03:36 +01:00
Alejandro Celaya
81e07bf08d Merge pull request #2358 from acelaya-forks/feature/phpunit-12
Update to PHPUnit 12
2025-02-13 21:59:00 +01:00
Alejandro Celaya
c650a3e665 Workaround for IP resolution from x-Forwarded-For with multiple proxies 2025-02-13 21:52:38 +01:00
Alejandro Celaya
65c01034ff Update to PHPUnit 12 2025-02-13 10:35:58 +01:00
Alejandro Celaya
48f910aaaa Merge pull request #2355 from acelaya-forks/feature/openapi-warnings
Remove suppressed warnings when running openapi tools
2025-02-05 08:43:28 +01:00
Alejandro Celaya
e511e15a87 Remove suppressed warnings when running openapi tools 2025-02-05 08:39:22 +01:00
Alejandro Celaya
888dc84d3f Merge pull request #2348 from shlinkio/develop
Release 4.4.2
2025-01-29 12:08:51 +01:00
Alejandro Celaya
ed09bf90eb Tag v4.4.2 in changelog 2025-01-29 12:05:53 +01:00
Alejandro Celaya
0ddfcb75dd Merge pull request #2347 from acelaya-forks/feature/docker-arm
Get back docker image building for ARM architecture
2025-01-29 12:02:19 +01:00
Alejandro Celaya
193be55f0c Get back docker image building for ARM architecture 2025-01-29 11:59:42 +01:00
Alejandro Celaya
3ba7ad3839 Merge pull request #2345 from shlinkio/develop
Release 4.4.1 - fixes
2025-01-28 15:53:49 +01:00
Alejandro Celaya
7ffb64eee1 Do not build docker image for ARM 2025-01-28 15:51:20 +01:00
Alejandro Celaya
0a2cc554c6 Build docker image with buildx 0.19.2 2025-01-28 15:38:47 +01:00
Alejandro Celaya
7c2b918d5d Merge pull request #2344 from shlinkio/develop
Release 4.4.1
2025-01-28 10:15:24 +01:00
Alejandro Celaya
af783dea57 Add v4.4.1 to changelog 2025-01-28 10:12:15 +01:00
Alejandro Celaya
a68a17f6b4 Merge pull request #2343 from acelaya-forks/feature/defensive-title-encoding
Fix error when creating short URL for page with unsupported encoding
2025-01-28 10:11:04 +01:00
Alejandro Celaya
e9fe1ac5d4 Fix error when creating short URL for page with unsupported encoding 2025-01-28 10:04:30 +01:00
Alejandro Celaya
88e97f18ad Merge pull request #2342 from acelaya-forks/feature/too-many-connections
Close connections after every async job that uses the db
2025-01-27 15:48:22 +01:00
Alejandro Celaya
3372a2a9c8 Close connections after every async job that uses the db 2025-01-27 15:45:37 +01:00
Alejandro Celaya
f02a8c876c Merge pull request #2340 from acelaya-forks/feature/update-shlink-deps
Update shlink packages
2025-01-25 16:16:42 +01:00
Alejandro Celaya
1549509eb8 Update shlink packages 2025-01-25 16:13:40 +01:00
Alejandro Celaya
62fde5a8e2 Update changelog 2025-01-13 08:47:19 +01:00
Alejandro Celaya
221e061ea6 Merge pull request #2332 from MaZe3D/develop
Add ADDRESS environment vairable to define the listening interface.
2025-01-13 08:45:20 +01:00
Mark Orlando Zeller
9ad565f8c8 Add ADDRESS environment vairable to define the listening interface. 2025-01-10 22:10:51 +01:00
Alejandro Celaya
0a67f71b94 Merge pull request #2317 from shlinkio/develop
Release 4.4.0
2024-12-27 16:31:44 +01:00
Alejandro Celaya
11fa28e489 Merge pull request #2316 from acelaya-forks/feature/v4.4
Add v4.4.0 to changelog and update dependencies
2024-12-27 16:27:06 +01:00
Alejandro Celaya
d7e51b388e Add v4.4.0 to changelog and update dependencies 2024-12-27 16:24:25 +01:00
Alejandro Celaya
5ef2df3d53 Merge pull request #2315 from acelaya-forks/feature/import-redirect-rules
Implement logic to import redirect rules from other Shlink instances
2024-12-22 18:50:10 +01:00
Alejandro Celaya
9c251b3646 Update changelog 2024-12-22 18:41:58 +01:00
Alejandro Celaya
2807b9ce2f Fix ImportedLinksProcessorTest 2024-12-22 18:41:03 +01:00
Alejandro Celaya
2f39aff2fe Implement logic to import redirect rules from other Shlink instances 2024-12-22 12:42:06 +01:00
Alejandro Celaya
b8d7917691 Merge pull request #2314 from acelaya-forks/feature/database-ssl
Support encrypted connections to MySQL/Maria and Postgres
2024-12-20 09:54:59 +01:00
Alejandro Celaya
d228c16f82 Fix test for ip middleware 2024-12-20 09:52:30 +01:00
Alejandro Celaya
c34bfac6b1 Update installer with support for DB_USE_ENCRYPTION option 2024-12-20 09:29:28 +01:00
Alejandro Celaya
4e7d09035a Support encrypted connections to MySQL/Maria and Postgres 2024-12-19 09:00:01 +01:00
Alejandro Celaya
83570f5c25 Merge pull request #2313 from acelaya-forks/feature/qr-disable-logo
Allow QR code logo to be individually disabled
2024-12-18 09:14:47 +01:00
Alejandro Celaya
6ad8b03850 Allow QR code logo to be individually disabled 2024-12-18 09:10:53 +01:00
Alejandro Celaya
736e09adfe Merge pull request #2310 from acelaya-forks/feature/less-restrictive-custom-slugs
Be less restrictive on what characters are disallowed in custom slugs
2024-12-17 18:08:51 +01:00
Alejandro Celaya
e80af78e09 Be less restrictive on what characters are disallowed in custom slugs 2024-12-17 18:04:38 +01:00
Alejandro Celaya
d533adf7ce Merge pull request #2308 from acelaya-forks/feature/geolocation-updates
Improve how geolocation DB files are downloaded/updated
2024-12-16 20:21:35 +01:00
Alejandro Celaya
509ef668e6 Fix GeolocationDbUpdater test 2024-12-16 19:50:06 +01:00
Alejandro Celaya
e715a0fb6f Track reason for which a geolocation db download was attempted 2024-12-16 09:23:30 +01:00
Alejandro Celaya
72a962ec6d Handle differently when trying to update geolocation and already in progress 2024-12-15 12:03:01 +01:00
Alejandro Celaya
853c50a819 Fix some cases of database download in GeolocationDbUpdater 2024-12-15 11:34:38 +01:00
Alejandro Celaya
f10a9d3972 Simplify geolocation_db_updates indexes 2024-12-15 10:08:22 +01:00
Alejandro Celaya
a77e07f906 Refactor geolocation download logic based on database table 2024-12-15 10:05:32 +01:00
Alejandro Celaya
d4d97c3182 Create new table to track geolocation updates 2024-12-13 10:33:53 +01:00
Alejandro Celaya
55724dbff6 Merge pull request #2306 from acelaya-forks/feature/update-docker-images
Update docker images to Alpine 3.21
2024-12-12 09:06:49 +01:00
Alejandro Celaya
9e34183901 Update docker images to Alpine 3.21 2024-12-12 08:52:01 +01:00
Alejandro Celaya
88c283952c Merge pull request #2304 from acelaya-forks/feature/geolocation-services-refactor
Move GeolocationDbUpdater to Core module
2024-12-11 08:58:23 +01:00
Alejandro Celaya
2ede615da8 Fix DownloadGeoLiteDbCommandTest 2024-12-11 08:50:56 +01:00
Alejandro Celaya
84d12f6811 Move GeolocationDbUpdaterTest to Core module 2024-12-11 08:47:13 +01:00
Alejandro Celaya
4f3c2c7d2d Fix UpdateGeoLiteDbTest 2024-12-11 08:35:24 +01:00
Alejandro Celaya
b8ac9f3673 Add more strict parameter for GeolocationDbUpdater 2024-12-11 08:27:56 +01:00
Alejandro Celaya
06c0a94b31 Move GeolocationDbUpdater from CLI to Core module 2024-12-10 10:58:08 +01:00
Alejandro Celaya
5d12b1d952 Merge pull request #2302 from acelaya-forks/feature/openapi-names
Use the openapi terminology over swagger
2024-12-06 11:40:15 +01:00
Alejandro Celaya
85c4c09afa Use the openapi terminology over swagger 2024-12-06 11:36:47 +01:00
Alejandro Celaya
e7c83d0b38 Merge pull request #2300 from acelaya-forks/feature/drop-8.2-support
Drop support for PHP 8.2
2024-12-02 09:21:50 +01:00
Alejandro Celaya
58de998596 Drop support for PHP 8.2 2024-12-02 09:16:15 +01:00
Alejandro Celaya
bfaab6c494 Merge pull request #2298 from acelaya-forks/feature/ignore-extra-path
Allow the extra path to be ignored when redirecting
2024-12-01 12:37:56 +01:00
Alejandro Celaya
d83081f4e9 Update shlink-installer 2024-12-01 12:28:29 +01:00
Alejandro Celaya
c65349d265 Allow the extra path to be ignored when redirecting 2024-12-01 09:56:09 +01:00
Alejandro Celaya
e74ee793a0 Merge pull request #2297 from acelaya-forks/feature/docker-php-8.4
Update docker images to PHP 8.4
2024-11-30 18:35:03 +01:00
Alejandro Celaya
ede58efe96 Update docker images to PHP 8.4 2024-11-30 13:53:19 +01:00
Alejandro Celaya
3f30af4794 Merge pull request #2294 from acelaya-forks/feature/user-agent
Migrate from mobiledetectlib to phpuseragentparser
2024-11-28 12:11:29 +01:00
Alejandro Celaya
6331fa3ed3 Migrate from mobiledetectlib to phpuseragentparser 2024-11-28 12:05:10 +01:00
Alejandro Celaya
d121d4d496 Merge pull request #2289 from acelaya-forks/feature/delete-old-migrations
Delete some old migrations
2024-11-28 09:00:40 +01:00
Alejandro Celaya
8499087a3b Move DEFAULT_DOMAIN constant to domains module 2024-11-28 08:54:29 +01:00
Alejandro Celaya
bb72c96ebb Delete some old migrations 2024-11-26 10:17:28 +01:00
Alejandro Celaya
8d4f2bbd12 Merge pull request #2288 from shlinkio/develop
Release 4.3.1
2024-11-25 23:49:37 +01:00
Alejandro Celaya
557c74286b Add v4.3.1 to changelog 2024-11-25 23:45:02 +01:00
Alejandro Celaya
67abe21716 Merge pull request #2287 from acelaya-forks/feature/ms-index-fix
Fix columns order in unique_short_code_plus_domain index in MSSQL
2024-11-25 23:43:55 +01:00
Alejandro Celaya
33cea36b15 Fix columns order in unique_short_code_plus_domain index in MSSQL 2024-11-25 22:48:04 +01:00
Alejandro Celaya
4e8f3f737a Merge pull request #2286 from acelaya-forks/feature/crawler-detect
Use jaybizzle/crawler-detect instead of acelaya/crawler-detect
2024-11-25 22:21:14 +01:00
Alejandro Celaya
35b835ec7b Use jaybizzle/crawler-detect instead of acelaya/crawler-detect 2024-11-25 22:17:15 +01:00
Alejandro Celaya
eff4f1fca3 Merge pull request #2284 from acelaya-forks/feature/rka-ip-address
Go back to using akrabat/ip-address-middleware instead of acelaya/ip-address-middleware
2024-11-25 09:31:43 +01:00
Alejandro Celaya
6f6388b2fc Go back to using akrabat/ip-address-middleware instead of acelaya/ip-address-middleware 2024-11-25 09:23:43 +01:00
Alejandro Celaya
6428903e7d Merge pull request #2283 from shlinkio/develop
Release 4.3.0
2024-11-24 14:31:16 +01:00
Alejandro Celaya
19f56e7ab0 Add v4.3.0 to changelog 2024-11-24 14:26:09 +01:00
Alejandro Celaya
6a96b72b94 Add real version constraints for Shlink packages 2024-11-24 14:23:12 +01:00
Alejandro Celaya
7634f55587 Merge pull request #2282 from acelaya-forks/feature/track-redirect-url
Add redirect_url field to track where a visitor is redirected for a visit
2024-11-24 14:20:12 +01:00
Alejandro Celaya
571a4643ab Update changelog 2024-11-24 14:13:59 +01:00
Alejandro Celaya
d5544554ef Improve API docs description for redirectUrl fields 2024-11-24 14:08:23 +01:00
Alejandro Celaya
85065c9330 Test behavior to track redirect URL 2024-11-24 14:05:33 +01:00
Alejandro Celaya
86cc2b717c Save where a visitor is redirected for any kind of tracked visit 2024-11-24 13:21:48 +01:00
Alejandro Celaya
89f70114e4 Fix typo in migration 2024-11-24 13:18:32 +01:00
Alejandro Celaya
8274525f75 Add redirect_url field to track where a visitor is redirected for a visit 2024-11-24 12:53:49 +01:00
Alejandro Celaya
fef512a7a3 Merge pull request #2280 from acelaya-forks/feature/php-8.4-support
Feature/php 8.4 support
2024-11-24 11:41:59 +01:00
Alejandro Celaya
deb9d4bdc7 Update docker images to Alpine 3.20 2024-11-24 11:37:08 +01:00
Alejandro Celaya
259aadfdb2 Update changelog 2024-11-24 11:05:36 +01:00
Alejandro Celaya
fe660654ed Add PHP 8.4 to the release pipeline 2024-11-24 11:04:41 +01:00
Alejandro Celaya
b2fc19af44 Replace akrabat/ip-address-middleware with acelaya/ip-address-middleware 2024-11-24 11:04:14 +01:00
Alejandro Celaya
7434616a8d Update mobiledetect/mobiledetectlib to a commit including PHP 8.4 fixes 2024-11-24 10:55:55 +01:00
Alejandro Celaya
fbf1aabcf5 Replace jaybizzle/crawler-detect with acelaya/crawler-detect 2024-11-24 10:49:44 +01:00
Alejandro Celaya
8ee905882f Merge pull request #2277 from acelaya-forks/feature/ip-address-factory
Use `IpAddressFactory` from akrabat/ip-address-middleware
2024-11-22 09:13:01 +01:00
Alejandro Celaya
2946b630c5 Use IpAddressFactory from akrabat/ip-address-middleware 2024-11-22 09:01:27 +01:00
Alejandro Celaya
b2bfe9799a Merge pull request #2276 from acelaya-forks/feature/visits-list-duplication
Reduce duplication in actions listing visits
2024-11-20 09:51:54 +01:00
Alejandro Celaya
d7e300e2d5 Reduce duplication in actions listing visits 2024-11-20 09:48:12 +01:00
Alejandro Celaya
0c75202936 Merge pull request #2273 from acelaya-forks/feature/remove-laminas-config
Remove dependency on laminas config
2024-11-19 20:15:28 +01:00
Alejandro Celaya
81bed53f90 Update Shlink libraries to remove dependency on laminas-config 2024-11-19 20:12:38 +01:00
Alejandro Celaya
a56ff1293e Remove direct dependency on laminas/laminas-config 2024-11-19 09:18:06 +01:00
Alejandro Celaya
c323bfcd63 Merge pull request #2272 from acelaya-forks/feature/geolocate-localhost-fix
Make sure IpGeolocationMiddleware skips localhost
2024-11-19 09:14:45 +01:00
Alejandro Celaya
f57f159002 Remove no longer used Visit::isLocatable method 2024-11-19 09:10:47 +01:00
Alejandro Celaya
fa08014226 Make sure IpGeolocationMiddleware skips localhost 2024-11-19 09:08:04 +01:00
Alejandro Celaya
052c9e76a1 Merge pull request #2271 from acelaya-forks/feature/api-key-domain-exceptions
Use more meaningful domain exceptions to represent ApiKeyService thrown errors
2024-11-18 09:59:25 +01:00
Alejandro Celaya
8298ef36f8 Use more meaningful domain exceptions to represent ApiKeyService thrown errors 2024-11-18 09:51:27 +01:00
Alejandro Celaya
b11d5c6864 Do not ignore platform reqs when using PHP 8.4 2024-11-18 08:50:20 +01:00
Alejandro Celaya
08394431f8 Merge pull request #2269 from acelaya-forks/feature/no-php-8.4-error
Do not allow pipelines to continue on error
2024-11-17 10:25:33 +01:00
Alejandro Celaya
a9ae4a24d0 Do not allow pipelines to continue on error 2024-11-17 10:15:25 +01:00
Alejandro Celaya
9b7b91402c Merge pull request #2268 from acelaya-forks/feature/delete-visits-fix
Fix visits counts not being deleted when deleting short URL or orphan visits
2024-11-15 19:26:57 +01:00
Alejandro Celaya
178a99b993 Fix visits counts not being deleted when deleting short URL or orphan visits 2024-11-15 19:22:29 +01:00
Alejandro Celaya
a8f046dfff Merge pull request #2266 from acelaya-forks/feature/geolocation-middleware
Feature/geolocation middleware
2024-11-15 10:47:18 +01:00
Alejandro Celaya
42ff0d5b69 Create IpGeolocationMiddlewareTest 2024-11-15 10:17:56 +01:00
Alejandro Celaya
6aaea2ac26 Simplify logic in RedirectRule when checking geolocation conditions 2024-11-15 09:00:59 +01:00
Alejandro Celaya
b5ff568651 Use IpGeolocationMiddleware to geolocate visitors instead of LocateVisit event 2024-11-15 08:55:43 +01:00
Alejandro Celaya
4a0b7e3fc9 Refactor Visitor model and allow a Location object to be passed to it 2024-11-14 14:48:18 +01:00
Alejandro Celaya
1fee745786 Merge pull request #2263 from acelaya-forks/feature/geolocation-city-name-redirects
Add support for city name dynamic redirects
2024-11-14 10:07:01 +01:00
Alejandro Celaya
a6e0916272 Add support for city name dynamic redirects 2024-11-14 09:58:53 +01:00
Alejandro Celaya
dbef32ffcb Merge pull request #2257 from acelaya-forks/feature/geolocation-country-code-redirects
Add new geolocatio-country-code redirect condition type
2024-11-14 09:43:10 +01:00
Alejandro Celaya
7ddb3e7a70 Add tests covering country code validation 2024-11-14 09:40:10 +01:00
Alejandro Celaya
fd34332e69 Improve ExtraPathRedirectMiddlewareTest 2024-11-14 09:28:10 +01:00
Alejandro Celaya
51d838870d Add reference to ISO 3166-1 alpha-2 country codes wikipedia page 2024-11-14 09:14:17 +01:00
Alejandro Celaya
4619ebd014 After tracking a visit, set its location in the request as attribute 2024-11-14 08:21:16 +01:00
Alejandro Celaya
f2371b6124 Update RedirectRuleHandlerTest 2024-11-13 10:01:52 +01:00
Alejandro Celaya
b5b5f92eda Add validation for country-code redirect conditions 2024-11-12 10:25:39 +01:00
Alejandro Celaya
781c083c9f Add new geolocatio-country-code redirect condition type 2024-11-12 10:25:39 +01:00
Alejandro Celaya
a444ed0246 Merge pull request #2258 from acelaya-forks/feature/phpstan-2
Update to PHPStan 2.0
2024-11-12 10:25:02 +01:00
Alejandro Celaya
9a69d06531 Update to PHPStan 2.0 2024-11-12 10:22:23 +01:00
Alejandro Celaya
15cb3bb73c Merge pull request #2256 from acelaya-forks/feature/unecessary-flush
Remove unnecessary flush calls when used in wrapInTransaction
2024-11-11 09:35:30 +01:00
Alejandro Celaya
7ca605e216 Remove unnecessary flush calls when used in wrapInTransaction 2024-11-11 09:31:23 +01:00
Alejandro Celaya
59a4704658 Merge pull request #2255 from acelaya-forks/feature/expose-tracked-visits
Return `Visit` object created when tracking a visit successfully
2024-11-11 09:19:20 +01:00
Alejandro Celaya
48ecef3436 Update RequestTracker so that its methods return the new Visit instance, if any 2024-11-11 08:58:16 +01:00
Alejandro Celaya
a5a98bd578 Update VisitsTracker so that its methods return the new Visit instance, if any 2024-11-11 08:51:55 +01:00
Alejandro Celaya
12a08cb373 Merge pull request #2253 from acelaya-forks/feature/api-key-improvements
Feature/api key improvements
2024-11-09 12:23:10 +01:00
Alejandro Celaya
3c6f12aec6 Ensure auto-generated name API keys do not throw duplicated name 2024-11-09 12:07:07 +01:00
Alejandro Celaya
d228b88e51 Lock transaction to avoid race conditions when renaming an API key 2024-11-09 11:16:36 +01:00
Alejandro Celaya
95685d958d Update to latest test utils 2024-11-09 11:02:10 +01:00
Alejandro Celaya
1a278eaf07 Merge pull request #2252 from acelaya-forks/feature/readonly-classes
Make classes readonly when possible
2024-11-09 09:58:56 +01:00
Alejandro Celaya
72f1e243b5 Make classes readonly when possible 2024-11-09 09:55:51 +01:00
Alejandro Celaya
d6b103de83 Merge pull request #2251 from acelaya-forks/feature/inject-repos
Feature/inject repos
2024-11-09 09:54:06 +01:00
Alejandro Celaya
fca3891819 Inject ShortUrlRepository in ShortCodeUniquenessHelper 2024-11-09 09:47:47 +01:00
Alejandro Celaya
3ec24e3c67 Inject ShortUrlRepository in UrlShortener 2024-11-09 09:43:55 +01:00
Alejandro Celaya
532102e662 Inject ShortUrlRepository in ShortUrlResolver 2024-11-09 09:39:56 +01:00
Alejandro Celaya
fcd82522ab Merge pull request #2250 from acelaya-forks/feature/inject-tag-repo
Inject TagRepository in TagService, instead of getting it from EntityManager
2024-11-09 09:39:03 +01:00
Alejandro Celaya
102169b6c7 Inject DomainRepository in DomainService 2024-11-09 09:34:24 +01:00
Alejandro Celaya
dba9302f78 Inject TagRepository in TagService, instead of getting it from EntityManager 2024-11-09 09:25:01 +01:00
Alejandro Celaya
92ad6d2732 Merge pull request #2249 from acelaya-forks/feature/hash-api-keys
Feature/hash api keys
2024-11-09 09:14:38 +01:00
Alejandro Celaya
7e573bdb9b Add tests for RenameApiKeyCOmmand and ApiKeyMeta 2024-11-08 09:58:02 +01:00
Alejandro Celaya
6f837b3b91 Move logic to determine if a new key has a duplicated name to the APiKeyService 2024-11-08 09:03:50 +01:00
Alejandro Celaya
b08c498b13 Create command to rename API keys 2024-11-08 08:47:49 +01:00
Alejandro Celaya
a661d05100 Allow API keys to be renamed 2024-11-08 08:25:07 +01:00
Alejandro Celaya
9e6f129de6 Make sure a unique name is required by api-key:generate command 2024-11-07 14:52:06 +01:00
Alejandro Celaya
4c1ff72438 Add method to check if an API exists for a given name 2024-11-07 09:55:10 +01:00
Alejandro Celaya
6f95acc202 Inject ApiKeyRepository in ApiKeyService 2024-11-07 09:34:42 +01:00
Alejandro Celaya
bd73362c94 Update api-key:disable command to allow passing a name 2024-11-06 20:10:06 +01:00
Alejandro Celaya
f6d70c599e Make name required in ApiKey entity 2024-11-06 08:57:10 +01:00
Alejandro Celaya
1b9c8377ae Hash existing API keys, and do checks against the hash 2024-11-05 23:27:39 +01:00
Alejandro Celaya
9f6975119e Show only API key name in short URLs list 2024-11-05 22:52:01 +01:00
Alejandro Celaya
a094be2b9e Fall back API key names to auto-generated keys 2024-11-05 11:26:39 +01:00
Alejandro Celaya
819a535bfe Create migration to set API keys in name column 2024-11-05 11:08:11 +01:00
Alejandro Celaya
e4fe7adf00 Merge pull request #2248 from acelaya-forks/feature/api-key-simplification
Simplify ApiKey entity by exposing key as a readonly prop
2024-11-04 23:17:17 +01:00
Alejandro Celaya
79c5418ac2 Simplify ApiKey entity by exposing key as a readonly prop 2024-11-04 14:22:39 +01:00
Alejandro Celaya
b5010e4d8c Merge pull request #2246 from acelaya-forks/feature/nanoid-2
Update to hidehalo/nanoid-php 2.0
2024-11-04 08:55:17 +01:00
Alejandro Celaya
3085fa76cf Update to hidehalo/nanoid-php 2.0 2024-11-04 08:50:58 +01:00
Alejandro Celaya
1fd7d58084 Update Bluesky handle 2024-11-03 11:38:31 +01:00
Alejandro Celaya
eae001a34a Rename ShortUrlWithVisitsSummary to ShortUrlWithDeps 2024-11-03 11:38:31 +01:00
Alejandro Celaya
d7ecef94f2 Avoid selecting domains for every short URL in list 2024-11-03 11:38:31 +01:00
Alejandro Celaya
98364a1aae Update to mlocati/ip-lib 1.18.1 2024-11-03 11:38:31 +01:00
Alejandro Celaya
9ccb866e5e Display warnings and deprecations in all test suites 2024-11-03 11:38:31 +01:00
Alejandro Celaya
3f1d61e01e Update to PHP coding standard 2.4.0 2024-11-03 11:38:31 +01:00
Alejandro Celaya
93a277a94d Allow short URLs to be filtered by domain from the command line 2024-11-03 11:38:30 +01:00
Alejandro Celaya
a10ca655a2 Cover domain filtering in ListShortUrls API test 2024-11-03 11:37:59 +01:00
Alejandro Celaya
bb270396b6 Allow short URLs list to be filtered by domain authority 2024-11-03 11:37:59 +01:00
Alejandro Celaya
525a306ec6 Create constant representing default domain identifier 2024-11-03 11:37:59 +01:00
Alejandro Celaya
1dd71d2ee7 Update changelog 2024-11-03 11:37:59 +01:00
Alejandro Celaya
ac2e249746 Update swagger Short URL examples to include forwardQuery and hasRedirectRules 2024-11-03 11:37:16 +01:00
Alejandro Celaya
af569ad7a5 Fix PHPStan rules 2024-11-03 11:37:16 +01:00
Alejandro Celaya
bf121c58ba Fix API tests 2024-11-03 11:37:16 +01:00
Alejandro Celaya
d2403367b5 Fix PublishingUpdatesGeneratorTest 2024-11-03 11:37:16 +01:00
Alejandro Celaya
84a187a26f Include left join with domains when listing short URLs to avoid N+1 SELECT problem 2024-11-03 11:37:15 +01:00
Alejandro Celaya
3149adebdb Expose the fact that a short URL has redirect rules attached to it 2024-11-03 11:36:50 +01:00
Alejandro Celaya
228bf093d3 Merge pull request #2245 from acelaya-forks/feature/fix-redis-7.4-scan
Update to shlink-common 6.5 to fix integration with redis 7.4
2024-11-03 11:35:50 +01:00
Alejandro Celaya
26589e6126 Update to shlink-common 6.5 to fix integration with redis 7.4 2024-11-03 11:32:44 +01:00
Alejandro Celaya
02e48ae665 Merge pull request #2237 from shlinkio/develop
Release 4.2.4
2024-10-27 08:48:05 +01:00
Alejandro Celaya
0d627ce808 Set user to 0 in database containers when running in CI 2024-10-27 08:45:11 +01:00
Alejandro Celaya
99639b9844 Depend on actual versions for shlink packages 2024-10-27 08:36:57 +01:00
Alejandro Celaya
0c3c7ff3b2 Add v4.2.4 to changelog 2024-10-27 08:23:38 +01:00
Alejandro Celaya
d7423585ff Build docker image in CI using reusable workflow 2024-10-26 10:25:11 +02:00
Alejandro Celaya
7de07a9cd4 Merge pull request #2236 from acelaya-forks/feature/normalize-composer-json
Feature/normalize composer json
2024-10-24 14:25:01 +02:00
Alejandro Celaya
2a734b5d89 Ensure proper env vars are promoted for dev and test envs 2024-10-24 14:20:49 +02:00
Alejandro Celaya
4520afb271 Normalize composer.json scripts with composer capabilities 2024-10-24 14:08:48 +02:00
Alejandro Celaya
e7a9ad1db0 Merge pull request #2224 from acelaya-forks/feature/dev-config-as-env
Migrate dev-specific configuration to env vars via .env file
2024-10-24 12:01:13 +02:00
Alejandro Celaya
84860539ce Ensure dev env files are not accidentally leaked to locally built docker images 2024-10-24 11:58:04 +02:00
Alejandro Celaya
2901fe8b7b Reduce duplication in CLI tests 2024-10-24 11:50:06 +02:00
Alejandro Celaya
f9694333c5 Add ADR for transition to env vars for dev configs 2024-10-24 11:44:05 +02:00
Alejandro Celaya
fc1f35ad59 Update CONTRIBUTING file removing references to old local config files 2024-10-24 10:12:34 +02:00
Alejandro Celaya
9a58748581 Get LC_ALL env var back to docker compose 2024-10-24 10:00:57 +02:00
Alejandro Celaya
45e108d21e Load dev env as a PHP array instead of an env file 2024-10-24 09:59:13 +02:00
Alejandro Celaya
f4da9c1fcc Update dependencies to stop using cuyz/valinor 2024-10-24 09:22:44 +02:00
Alejandro Celaya
a3ea8f56dd Remove app_options config 2024-10-24 08:49:58 +02:00
Alejandro Celaya
f3244b35e3 Remove remaining local config files 2024-10-23 10:53:09 +02:00
Alejandro Celaya
442eea0ea7 Add script to run CLI tests that loads and exports test env vars 2024-10-23 10:16:38 +02:00
Alejandro Celaya
46601443f5 Load specific env file when running API tests 2024-10-23 09:17:00 +02:00
Alejandro Celaya
c0200317dd Load dev env vars via roadrunner instead of docker compose 2024-10-22 15:31:53 +02:00
Alejandro Celaya
c8e5196aab Remove dependencies on url_shortener raw config 2024-10-22 15:15:41 +02:00
Alejandro Celaya
b991b1699e Define unique dev .env file 2024-10-22 15:15:41 +02:00
Alejandro Celaya
582033ceb3 Migrate dev-specific configuration to env vars via .env file 2024-10-22 15:15:41 +02:00
Alejandro Celaya
549a8d8837 Merge pull request #2233 from acelaya-forks/feature/endroid-qr-code-6
Update to endroid/qr-code 6.0
2024-10-22 09:06:30 +02:00
Alejandro Celaya
5fb6c8708c Update to endroid/qr-code 6.0 2024-10-22 09:02:32 +02:00
Alejandro Celaya
7ee757243a Merge pull request #2230 from acelaya-forks/feature/xdebug-coverage
Switch to xdebug for code coverage reports
2024-10-21 12:01:29 +02:00
Alejandro Celaya
044efe6ee4 Switch to xdebug for code coverage reports 2024-10-21 11:54:45 +02:00
Alejandro Celaya
9b16749737 Remove twitter badge from readme 2024-10-17 16:27:38 +02:00
Alejandro Celaya
6d51ff831f Merge pull request #2228 from acelaya-forks/feature/docker-signals
Feature/docker signals
2024-10-17 15:09:08 +02:00
Alejandro Celaya
0635615149 Run RoadRunner in docker with exec to ensure signals are properly handled 2024-10-17 15:03:55 +02:00
Alejandro Celaya
51de4b17c0 Merge pull request #2227 from shlinkio/develop
Release 4.2.3
2024-10-17 09:41:21 +02:00
Alejandro Celaya
615b443652 Merge pull request #2226 from acelaya-forks/feature/fix-qr-codes
Update to shlink-config 3.2.1, which fixes skipping config options with null value
2024-10-17 09:37:21 +02:00
Alejandro Celaya
4b7b530f49 Update to shlink-config 3.2.1, which fixes skipping config options with null value 2024-10-17 09:33:53 +02:00
Alejandro Celaya
fa7969c746 Merge pull request #2222 from shlinkio/develop
Release 4.2.2
2024-10-14 09:50:13 +02:00
Alejandro Celaya
aef04af4f0 Merge pull request #2220 from acelaya-forks/feature/env-var-command
Feature/env var command
2024-10-14 09:45:48 +02:00
Alejandro Celaya
f118ea252c Depend on shlink-config 3.2 2024-10-14 09:41:47 +02:00
Alejandro Celaya
d514f39a82 Update changelog 2024-10-14 09:41:46 +02:00
Alejandro Celaya
e17556a7ae Add ReadEnvVarCommand test 2024-10-14 09:41:22 +02:00
Alejandro Celaya
d79f11eeb8 Add missing default value for DEFAULT_QR_CODE_BG_COLOR env var 2024-10-14 09:41:22 +02:00
Alejandro Celaya
1ec950ee1e Fix tests not properly unsetting env vars 2024-10-14 09:41:22 +02:00
Alejandro Celaya
14ba9fd6a4 Create command to return the value of an env var for current env 2024-10-14 09:41:22 +02:00
Alejandro Celaya
83e8801827 Move env var default values to EnvVars enum 2024-10-14 09:41:22 +02:00
Alejandro Celaya
be822646e4 Update changelog 2024-10-13 09:49:34 +02:00
Alejandro Celaya
3a4a27a60c Merge pull request #2214 from acelaya-forks/feature/fix-query-params
Ensure query parameters are preserved verbatim when forwarded to long URL
2024-10-10 11:38:15 +02:00
Alejandro Celaya
1773e6ecae Ensure query parameters are preserved verbatim when forwarded to long URL 2024-10-10 11:35:29 +02:00
Alejandro Celaya
a8e4b2fceb Merge pull request #2211 from acelaya-forks/feature/explicit-env-from-config
Promote installer config options as env vars explicitly
2024-10-08 09:07:11 +02:00
Alejandro Celaya
15b53ef43c Update changelog 2024-10-08 09:04:30 +02:00
Alejandro Celaya
11a4702b10 Promote installer config options as env vars explicitly 2024-10-08 08:57:51 +02:00
Alejandro Celaya
6b15cd6d51 Merge pull request #2204 from shlinkio/develop
Release 4.2.1
2024-10-04 12:53:11 +02:00
Alejandro Celaya
00169a5729 Require shlink-common 6.3 2024-10-04 12:48:19 +02:00
Alejandro Celaya
94702791d9 Merge pull request #2203 from acelaya-forks/feature/fix-memory-limit
Fix `MEMORY_LIMIT` being ignored when provided as installer config option
2024-10-04 12:43:38 +02:00
Alejandro Celaya
447cccacdf Update changelog 2024-10-04 12:41:02 +02:00
Alejandro Celaya
0413399102 Make sure MEMORY_LIMIT env var is read after config options have been promoted to env vars 2024-10-04 12:33:27 +02:00
Alejandro Celaya
9afc7876c4 Merge pull request #2184 from acelaya-forks/feature/redis-db-index
Allow specifying the redis database index to be used
2024-08-26 10:00:05 +02:00
Alejandro Celaya
187c17319a Take all Postgres platform classes into consideration 2024-08-26 09:57:17 +02:00
Alejandro Celaya
7310ecd886 Allow specifying the redis database index to be used 2024-08-25 12:51:34 +02:00
Alejandro Celaya
620cd92d11 Merge pull request #2172 from shlinkio/develop
Release v4.2.0
2024-08-11 18:33:09 +02:00
Alejandro Celaya
f9658c8da1 Add v4.2.0 to changelog 2024-08-11 18:30:06 +02:00
Alejandro Celaya
613b1d3045 Update changelog 2024-08-06 10:13:55 +02:00
Alejandro Celaya
d39711ec51 Merge pull request #2170 from acelaya-forks/feature/testdox-summary
Add --testdox-summary flag to phpunit executions
2024-08-04 13:16:32 +02:00
Alejandro Celaya
69dcab96f8 Add --testdox-summary flag to phpunit executions 2024-08-04 13:13:03 +02:00
Alejandro Celaya
d76c96ad41 Fix coding standard 2024-08-01 08:38:49 +02:00
Alejandro Celaya
133efff2cd Improve PHPStan config 2024-07-31 19:53:05 +02:00
Alejandro Celaya
c10f0db170 Merge pull request #2168 from acelaya-forks/feature/update-common
Update to latest shlink-common and remove deprecation references
2024-07-29 20:47:04 +02:00
Alejandro Celaya
037cd8a389 Add missing generic tyoes annotations 2024-07-29 20:43:52 +02:00
Alejandro Celaya
1d24750f43 Fix phpstan checks 2024-07-29 19:59:46 +02:00
Alejandro Celaya
b52ceaff9a Update to latest shlink-common and remove deprecation references 2024-07-29 19:41:40 +02:00
Alejandro Celaya
6b0b52853c Improve repro steps description in bug issue template 2024-07-28 10:49:24 +02:00
Alejandro Celaya
64d7ac7093 Merge pull request #2166 from acelaya-forks/feature/options-enum
Reduce hardcoded options in ShortUrlDataInput
2024-07-27 09:15:16 +02:00
Alejandro Celaya
b9ba1246d4 Reduce hardcoded options in ShortUrlDataInput 2024-07-27 09:12:54 +02:00
Alejandro Celaya
7f9dc10f6a Merge pull request #2164 from acelaya-forks/feature/update-url-cli
Add command to update short URLs
2024-07-26 20:14:02 +02:00
Alejandro Celaya
a1afc90150 Fix sqlcmd path 2024-07-26 20:09:59 +02:00
Alejandro Celaya
df94c68e2e Add unit test for EditShortUrlCommand 2024-07-26 19:54:39 +02:00
Alejandro Celaya
65ea1e00a6 Prevent resetting of non-providen params in EditShortUrlCommand 2024-07-26 19:26:48 +02:00
Alejandro Celaya
5bccdded8a Create command to edit existing short URLs 2024-07-26 09:21:00 +02:00
Alejandro Celaya
8917ed5c2e Create command to edit existing short URLs 2024-07-26 00:01:40 +02:00
Alejandro Celaya
fabc752398 Extract reading and parsing of arguments for short URLs data in commands 2024-07-25 23:44:46 +02:00
Alejandro Celaya
38d8086516 Merge pull request #2161 from acelaya-forks/feature/php-8.4-ci
Add PHP 8.4 to CI
2024-07-23 20:06:09 +02:00
Alejandro Celaya
ae0ff5f23c Add PHP 8.4 to CI 2024-07-23 20:02:49 +02:00
Alejandro Celaya
7c659699f3 Merge pull request #2151 from acelaya-forks/feature/ip-dynamic-redirects
Add logic for IP-based dynamic redirects
2024-07-18 21:32:24 +02:00
Alejandro Celaya
9e6cdcb838 Update changelog 2024-07-18 21:26:28 +02:00
Alejandro Celaya
7e2f755dfd Validate IP address patterns when creating ip-address redirect conditions 2024-07-18 21:23:48 +02:00
Alejandro Celaya
ce2ed237c7 Add ip-address condition type to redirect rules API spec docs 2024-07-17 20:23:58 +02:00
Alejandro Celaya
626caa4afa Add API test for dynamic IP-based redirects 2024-07-17 20:13:46 +02:00
Alejandro Celaya
f4a7712ded Add InvalidIpFormatExceptionTest 2024-07-17 19:59:13 +02:00
Alejandro Celaya
bab6a3951e Add missing unit test 2024-07-17 19:56:53 +02:00
Alejandro Celaya
f49d98f2ea Add logic for IP-based dynamic redirects 2024-07-17 19:51:13 +02:00
Alejandro Celaya
1312ea61f4 Add new IP address redirect condition 2024-07-06 10:35:33 +02:00
Alejandro Celaya
8d90661d0a Extract logic to match IP address against list of groups 2024-07-06 10:12:05 +02:00
Alejandro Celaya
b6b2530cb6 Merge pull request #2149 from acelaya-forks/feature/robots-user-agents
Add option to customize user agents in robots.txt
2024-07-06 10:08:03 +02:00
Alejandro Celaya
e4f66b7ce6 Update installer 2024-07-05 09:41:26 +02:00
Alejandro Celaya
4b52c92e97 Add option to customize user agents in robots.txt 2024-07-05 08:54:54 +02:00
Alejandro Celaya
76c42bc17c Merge pull request #2148 from acelaya-forks/feature/roadrunner-2024
Update to RoadRunner 2024
2024-07-03 19:56:36 +02:00
Alejandro Celaya
c4f8da5f02 Fix phpstan error definition 2024-07-03 19:53:26 +02:00
Alejandro Celaya
80bdeb280a Update to RoadRunner 2024 2024-07-03 19:52:06 +02:00
Alejandro Celaya
99010b6eae Fix merge conflicts 2024-05-23 09:26:27 +02:00
Alejandro Celaya
b2dabf06bf Merge pull request #2136 from acelaya-forks/release/4.1.1
Release/4.1.1
2024-05-23 09:21:56 +02:00
Alejandro Celaya
67ae05f473 Add v4.1.1 to changelog 2024-05-23 09:18:58 +02:00
Alejandro Celaya
fb4fecf411 Merge pull request #2135 from acelaya-forks/feature/non-utf8-titles
Convert encoding of resolved titles based on page encoding
2024-05-23 09:17:49 +02:00
Alejandro Celaya
c855f011d1 Merge pull request #2132 from acelaya-forks/feature/update-phpstan
Update to latest phpstan
2024-05-23 09:17:37 +02:00
Alejandro Celaya
02717eb2fb Merge pull request #2130 from marijnvandevoorde/nanoid
Replaces short-id by nano-id
2024-05-23 09:17:26 +02:00
Alejandro Celaya
de70ebe769 Merge pull request #2125 from acelaya-forks/feature/phpunit-11
Update to PHPUnit 11
2024-05-23 09:16:56 +02:00
Alejandro Celaya
c6109fd396 Merge pull request #2115 from acelaya-forks/feature/fix-oas-docs
Fix typo in OAS docs
2024-05-23 09:16:24 +02:00
Alejandro Celaya
83584a3175 Link crchived changelogs from main one 2024-05-23 09:15:40 +02:00
Alejandro Celaya
f5dcc52b3b Migrate to new docker-publish-image reusable workflow 2024-05-23 09:15:16 +02:00
Alejandro Celaya
1901964de1 Merge pull request #2135 from acelaya-forks/feature/non-utf8-titles
Convert encoding of resolved titles based on page encoding
2024-05-22 18:14:56 +02:00
Alejandro Celaya
80e9c2452b Convert encoding of resolved titles based on page encoding 2024-05-22 18:11:55 +02:00
Alejandro Celaya
5ad4b39160 Merge pull request #2132 from acelaya-forks/feature/update-phpstan
Update to latest phpstan
2024-05-21 19:05:39 +02:00
Alejandro Celaya
89b73a9cfa Update to latest phpstan 2024-05-21 18:09:45 +02:00
Alejandro Celaya
e2d8334d69 Merge pull request #2130 from marijnvandevoorde/nanoid
Replaces short-id by nano-id
2024-05-21 17:58:53 +02:00
Marijn Vandevoorde
9b16d7acc0 Replaces short-id by nano-id 2024-05-16 14:00:39 +02:00
Alejandro Celaya
6836840746 Merge pull request #2125 from acelaya-forks/feature/phpunit-11
Update to PHPUnit 11
2024-05-12 13:22:26 +02:00
Alejandro Celaya
4084d301ca Update to PHPUnit 11 2024-05-12 12:49:53 +02:00
Alejandro Celaya
added21b18 Merge pull request #2118 from shlinkio/revert-2117-feature/superfluous-distinct
Revert "Remove unneeded DISTINCT from list short URLs query"
2024-05-09 10:00:29 +02:00
Alejandro Celaya
8cd77391cc Revert "Remove unneeded DISTINCT from list short URLs query" 2024-05-09 09:43:55 +02:00
Alejandro Celaya
05ebfccc63 Merge pull request #2117 from acelaya-forks/feature/superfluous-distinct
Remove unneeded DISTINCT from list short URLs query
2024-05-06 18:54:01 +02:00
Alejandro Celaya
cb3a690294 Remove unneeded DISTINCT from list short URLs query 2024-05-06 18:50:10 +02:00
Alejandro Celaya
194a7b0e57 Merge pull request #2115 from acelaya-forks/feature/fix-oas-docs
Fix typo in OAS docs
2024-04-29 15:22:32 +02:00
Alejandro Celaya
98e4d01feb Fix typo in OAS docs 2024-04-29 15:18:54 +02:00
Alejandro Celaya
c22e3895b5 Allow more dev hosts in dev mercure 2024-04-29 08:52:18 +02:00
Alejandro Celaya
9a76c19615 Migrate to new docker-publish-image reusable workflow 2024-04-26 09:27:21 +02:00
Alejandro Celaya
59fa088975 Merge pull request #2107 from acelaya-forks/feature/robots-allow-all
Add option to allow all URLs to be crawlable via robots.txt
2024-04-22 09:23:34 +02:00
Alejandro Celaya
163244f40f Add option to allow all URLs to be crawlable via robots.txt 2024-04-22 09:16:44 +02:00
Alejandro Celaya
a89b53af4f Link crchived changelogs from main one 2024-04-21 16:46:24 +02:00
Alejandro Celaya
35508e253d Merge pull request #2099 from shlinkio/develop
Release 4.1.0
2024-04-14 09:12:56 +02:00
Alejandro Celaya
e586fec338 Rearrange changelog 2024-04-14 08:53:31 +02:00
Alejandro Celaya
93fa27bdba Add v4.1.0 to changelog 2024-04-14 08:40:52 +02:00
Alejandro Celaya
048856c333 Merge pull request #2098 from acelaya-forks/feature/matomo-command
Create console command to send visits to matomo
2024-04-13 20:59:57 +02:00
Alejandro Celaya
986f1162dd Set COLUMNS env var when running unit tests 2024-04-13 20:56:59 +02:00
Alejandro Celaya
dc8dfa9f0c Update changelog 2024-04-13 20:49:34 +02:00
Alejandro Celaya
82e7094f3a Fix VisitIterationRepositoryTest for MS SQL 2024-04-13 20:48:03 +02:00
Alejandro Celaya
f0e62004d5 Add unit test to MatomoSendVisitsCommand 2024-04-13 20:30:31 +02:00
Alejandro Celaya
bbdbafd8db Test MatomoVisitSender::sendVisitsInDateRange 2024-04-13 19:27:03 +02:00
Alejandro Celaya
6121efec59 Create command to send visits to matomo 2024-04-13 18:59:09 +02:00
Alejandro Celaya
4fdbcc25a0 Pass visit date to matomo when tracking 2024-04-13 18:59:09 +02:00
Alejandro Celaya
ca42425b33 Make Visit::date field readonly 2024-04-13 18:59:09 +02:00
Alejandro Celaya
ce0f61b66d Allow filtering by date in VisitIterationRepository 2024-04-13 18:59:09 +02:00
Alejandro Celaya
13ee71f351 Move allowed HTTP methods definition to RedirectStatus enum 2024-04-13 18:59:09 +02:00
Alejandro Celaya
c57494d7cd Extract logic to send visits to Matomo to its own service 2024-04-13 18:59:09 +02:00
Alejandro Celaya
d2e74ab330 Merge pull request #2097 from acelaya-forks/feature/bitly-custom-slugs
Fix custom slugs not being properly imported from bitly
2024-04-12 22:31:12 +02:00
Alejandro Celaya
850dde1a06 Fix custom slugs not being properly imported from bitly 2024-04-12 22:28:13 +02:00
Alejandro Celaya
5e83f301ff Merge pull request #2092 from acelaya-forks/customizable-memory-limit
Allow memory_limit to be configurable
2024-04-09 09:45:08 +02:00
Alejandro Celaya
5e74dd7a6d Update to installer version with support for memory limit option 2024-04-09 09:40:08 +02:00
Alejandro Celaya
8a273e01e9 Allow memory_limit to be configurable 2024-04-09 08:47:01 +02:00
Alejandro Celaya
75f6f8dd18 Merge pull request #2090 from acelaya-forks/feature/propagate-job-request-id
Forward request ID from sync request process to async job processes
2024-04-07 11:30:47 +02:00
Alejandro Celaya
e1cf0c4ea7 Forward request ID from sync request process to async job processes 2024-04-07 11:26:17 +02:00
Alejandro Celaya
cc134abd12 Merge pull request #2086 from acelaya-forks/feature/delete-expired
Feature/delete expired
2024-04-03 19:27:17 +02:00
Alejandro Celaya
b7db676cba Test non-interactivity on DeleteExpiredShortUrlsCommand 2024-04-03 19:24:08 +02:00
Alejandro Celaya
3881996560 Migrate from docker-compose to docker compose in CI pipelines 2024-04-03 19:20:38 +02:00
Alejandro Celaya
527d28ad81 Add DeleteExpiredShortUrlsCommand test 2024-04-03 19:18:56 +02:00
Alejandro Celaya
f2371e8a80 Add command to delete expired short URLs 2024-04-03 18:57:09 +02:00
Alejandro Celaya
fd882834d3 Create repository to handle expired short URLs deletion 2024-04-03 09:52:38 +02:00
Alejandro Celaya
f92a720d63 Use short_url_visits_counts table when excluding short URLs which reached max visits 2024-04-03 09:06:43 +02:00
Alejandro Celaya
d6f58698b7 Merge pull request #2082 from acelaya-forks/feature/orphan-visits-counts
Track orphan visits counts
2024-04-01 10:28:05 +02:00
Alejandro Celaya
d090260b17 Track orphan visits counts 2024-04-01 10:22:51 +02:00
Alejandro Celaya
cd43c1c01f Merge pull request #2083 from acelaya-forks/feature/matomo-title
Track short URL title as document title when sending visits to matomo
2024-03-31 13:53:58 +02:00
Alejandro Celaya
284b28e8d9 Track short URL title as document title when sending visits to matomo 2024-03-31 13:51:03 +02:00
Alejandro Celaya
b50547d868 Create new orphan_visits_counts table 2024-03-31 13:18:44 +02:00
Alejandro Celaya
401046fbe5 Merge pull request #2081 from acelaya-forks/feature/performant-count-visits
Load non-orphan visits overview via short url visits counts
2024-03-31 13:07:52 +02:00
Alejandro Celaya
6e82509964 Update changelog 2024-03-31 13:04:58 +02:00
Alejandro Celaya
ab6fa490e5 Test ShortUrlVisitsCountRepository via VisitRepositoryTest 2024-03-31 12:37:22 +02:00
Alejandro Celaya
55e2780f50 Load non-orphan visits overview via short url visits counts 2024-03-31 12:27:20 +02:00
Alejandro Celaya
f4803c675c Merge pull request #2079 from acelaya-forks/feature/fix-order-by-title
Ensure ordering by title is consistent between database engines
2024-03-29 09:38:25 +01:00
Alejandro Celaya
90514c603f Ensure ordering by title is consistent between database engines 2024-03-29 09:35:54 +01:00
Alejandro Celaya
7f4137e7cc Merge pull request #2078 from acelaya-forks/feature/tags-stats-improvements
Improve tags stats performance by using the new short_url_visits_counts table
2024-03-28 19:26:33 +01:00
Alejandro Celaya
071cb9af2b Improve tags stats performance by using the new short_url_visits_counts table 2024-03-28 19:17:37 +01:00
Alejandro Celaya
6ce1550457 Merge pull request #2074 from acelaya-forks/feature/slotted-counts
Feature/slotted counts
2024-03-28 17:44:31 +01:00
Alejandro Celaya
8cb5d44dc9 Update changelog 2024-03-28 17:27:49 +01:00
Alejandro Celaya
1331b3f87c Fix RabbitMQ dev port 2024-03-28 17:24:00 +01:00
Alejandro Celaya
ab96297e58 Make sure VisitsTracker wraps as little operations as possible in the transaction 2024-03-28 17:06:18 +01:00
Alejandro Celaya
c4fd3a74c5 Fix type hint in migration 2024-03-28 16:10:56 +01:00
Alejandro Celaya
da922fb2a7 Add ShortUrlVisitsCountTrackerTest 2024-03-28 09:43:58 +01:00
Alejandro Celaya
4a05c4be40 Wrap visits tracking in transaction 2024-03-27 19:14:41 +01:00
Alejandro Celaya
cef30c8e2d Fix type in Version20240318084804 2024-03-27 19:08:25 +01:00
Alejandro Celaya
8417498f08 Fixes on static check and unit tests 2024-03-27 19:08:25 +01:00
Alejandro Celaya
10e941cea6 Add missing COALESCE when summing visits counts 2024-03-27 19:08:25 +01:00
Alejandro Celaya
3d7b1ca799 Move from preFlush to onFlush + postFlush 2024-03-27 19:08:25 +01:00
Alejandro Celaya
b236354fc7 Fix order in which entities are flushed in ShortUrlListRepositoryTest 2024-03-27 19:08:25 +01:00
Alejandro Celaya
6fbb5a380d Add missing default value for short url visits count 2024-03-27 19:08:25 +01:00
Alejandro Celaya
054eb42613 Remove no-longer used methods in OrderableField enum 2024-03-27 19:08:25 +01:00
Alejandro Celaya
6074f4475d Add preFlush listener to track visits counts 2024-03-27 19:08:25 +01:00
Alejandro Celaya
7afd3fd6a2 Load visits and nonBotVisits via sub-queries in ShortUrlListRepository 2024-03-27 19:08:25 +01:00
Alejandro Celaya
7d415e40b2 Add unique index in short_url_visits_counts 2024-03-27 19:08:25 +01:00
Alejandro Celaya
3c89d252d2 Simplify logic to match order by for short URL lists 2024-03-27 19:08:25 +01:00
Alejandro Celaya
f678873e9f Use pre-calculated visits counts when listing short URLs 2024-03-27 19:08:25 +01:00
Alejandro Celaya
17d37a062a Add new table to track short URL visits counts 2024-03-27 19:08:25 +01:00
Alejandro Celaya
14702063f2 Merge pull request #2076 from acelaya-forks/feature/fix-array-inputs
Make sure tags fallback to empty array when null
2024-03-27 19:08:06 +01:00
Alejandro Celaya
c599d8a0ed Make sure tags fallback to empty array when null 2024-03-27 13:04:42 +01:00
Alejandro Celaya
207d5adceb Merge pull request #2070 from acelaya-forks/feature/visited-url-always
Feature/visited url always
2024-03-24 17:27:57 +01:00
Alejandro Celaya
b4c46ce222 Update changelog 2024-03-24 17:24:46 +01:00
Alejandro Celaya
6fe269193a Expose visitedUrl when serializing any kind of visit, not only orphan visits 2024-03-24 17:20:41 +01:00
Alejandro Celaya
d948543d5c Wrap JSON serialization for any kind of visit in Visit entity itself 2024-03-24 17:06:11 +01:00
Alejandro Celaya
a327e6c0a7 Make Visit::jsonSerialize() return different props for orphan visits 2024-03-24 16:54:49 +01:00
Alejandro Celaya
fbd35b7974 Add more named constructors to Ordering class 2024-03-20 09:15:45 +01:00
Alejandro Celaya
b94a22e6a7 Rename Ordering::emptyInstance to Ordering::none to make it more clear 2024-03-20 09:06:35 +01:00
Alejandro Celaya
63ea9e4a21 Merge pull request #2069 from acelaya-forks/feature/short-url-simplification
Move logic to serialize ShortUrls to entity itself
2024-03-19 07:34:59 +01:00
Alejandro Celaya
e028d8ea31 Move logic to serialize ShortUrls to entity itself 2024-03-18 22:09:15 +01:00
Alejandro Celaya
457a7a14e5 Merge pull request #2068 from acelaya-forks/feature/modernize-entities
Feature/modernize entities
2024-03-18 20:26:47 +01:00
Alejandro Celaya
cd387328be Update changelog 2024-03-18 20:22:54 +01:00
Alejandro Celaya
5524476787 Modernize ShortUrl entity 2024-03-18 20:21:26 +01:00
Alejandro Celaya
78526fb405 Modernize Visit entity 2024-03-18 19:57:30 +01:00
Alejandro Celaya
b2dee43bb0 Modernize VisitLocation entity 2024-03-18 19:11:42 +01:00
Alejandro Celaya
60e9443b12 Modernize ApiKey entity 2024-03-18 18:33:56 +01:00
Alejandro Celaya
ab8fa52ca4 Modernize Domain entity 2024-03-18 18:15:05 +01:00
Alejandro Celaya
16f64f6247 Merge pull request #2064 from shlinkio/develop
Release 4.0.3
2024-03-15 23:07:25 +01:00
Alejandro Celaya
98992c656f Merge pull request #2063 from acelaya-forks/feature/non-http-url
Fix error when redirecting to a non-http URL
2024-03-15 23:05:02 +01:00
Alejandro Celaya
053e026982 Fix error when redirecting to a non-http URL 2024-03-15 23:00:40 +01:00
Alejandro Celaya
74180a4381 Merge pull request #2062 from acelaya-forks/feature/string-db-credentials
Feature/string db credentials
2024-03-15 18:33:29 +01:00
Alejandro Celaya
293725f933 Update changelog 2024-03-15 18:22:27 +01:00
Alejandro Celaya
c33f8d0ea2 Cast database credentials to string when read from the env 2024-03-15 14:32:53 +01:00
Alejandro Celaya
0f2cd3cb7f Remove useless return annotation 2024-03-12 09:09:59 +01:00
Alejandro Celaya
2441ac5e77 Update Bug template 2024-03-12 09:00:49 +01:00
Alejandro Celaya
f248001460 Merge pull request #2053 from shlinkio/develop
Release 4.0.2
2024-03-09 09:49:51 +01:00
Alejandro Celaya
1fe2c93946 Merge pull request #2051 from acelaya-forks/feature/fix-geolite-update
Fix infinite GeoLite2 downloads
2024-03-09 09:39:31 +01:00
Alejandro Celaya
a3d50605c1 Update changelog 2024-03-09 09:32:05 +01:00
Alejandro Celaya
5427152f15 Make sure GeoLite2 db file is always read from the filesystem befor etrying to operate on it 2024-03-09 09:30:05 +01:00
Alejandro Celaya
a4e9c2fdde Merge pull request #2046 from shlinkio/develop
Release 4.0.1
2024-03-08 08:57:40 +01:00
Alejandro Celaya
e244b2dc51 Add v4.0.1 to changelog 2024-03-08 08:56:55 +01:00
Alejandro Celaya
31dea8fa99 Merge pull request #2045 from acelaya-forks/feature/match-languages-fix
Ensure language redirect conditions do not match for too low quality accepted languages
2024-03-07 23:23:58 +01:00
Alejandro Celaya
be8cf56240 Ensure language redirect conditions do not match for too low quality accepted languages 2024-03-07 23:21:31 +01:00
Alejandro Celaya
0bc7412430 Fix incorrect redirect condition type definiition 2024-03-05 15:09:44 +01:00
Alejandro Celaya
6d56e92306 Merge pull request #2042 from acelaya-forks/feature/qr-code-color-args
Document color and bgColor QR code query params
2024-03-05 11:16:49 +01:00
Alejandro Celaya
97c94f8fcc Document color and bgColor QR code query params 2024-03-05 11:14:07 +01:00
Alejandro Celaya
92b5a5296d Merge pull request #2039 from shlinkio/develop
Release 4.0.0
2024-03-03 19:23:35 +01:00
Alejandro Celaya
febca6d441 Small reword in UPGRADE guide 2024-03-03 19:16:46 +01:00
Alejandro Celaya
bf29abc468 Merge pull request #2040 from acelaya-forks/feature/redirect-checks
Feature/redirect checks
2024-03-03 18:54:15 +01:00
Alejandro Celaya
97cb30565c Add v4.0.0 2024-03-03 18:50:23 +01:00
Alejandro Celaya
9809f050ef Update changelog 2024-03-03 18:19:40 +01:00
Alejandro Celaya
7ecfb24584 Merge pull request #2038 from acelaya-forks/feature/redirect-rules-cli
Add command to manage the redirect rules for a short URLs
2024-03-03 13:19:42 +01:00
Alejandro Celaya
4aa65f750e Add CLI test for manage redirects command, to cover validation errors 2024-03-03 13:16:37 +01:00
Alejandro Celaya
63c533fa62 Fix incorrect rule selection when deleting rules with same long URL 2024-03-03 12:59:58 +01:00
Alejandro Celaya
8751d6c315 Add unit test for RedirectRuleHandler 2024-03-03 12:51:17 +01:00
Alejandro Celaya
eb40dc2d5d Add unit test for ShortUrlRedirectRuleService::saveRulesForShortUrl 2024-03-03 10:36:17 +01:00
Alejandro Celaya
c9d1a955b9 Add ManageRedirectRulesCommand unit test 2024-03-03 10:27:21 +01:00
Alejandro Celaya
c346fd0602 Reduce duplicated code when parsing short codes and domains from CLI 2024-03-03 10:11:12 +01:00
Alejandro Celaya
a45550b0c6 Extract logic to determine list of rules from ManageRedirectRulesCommand to a helper service 2024-03-03 09:51:56 +01:00
Alejandro Celaya
a843c59d77 Fix inconsistencies when editing rules and saving a mix of new and old ones 2024-03-03 09:09:43 +01:00
Alejandro Celaya
3bfb29a51c Test new methods for RedirectCondition and ShortUrlRedirectRule 2024-03-03 08:47:31 +01:00
Alejandro Celaya
d8ede3263f Implement command to manage redirect rules for a short URL 2024-03-02 23:01:49 +01:00
Alejandro Celaya
c36e43e249 Merge pull request #2037 from acelaya-forks/feature/improve-rules-swagger
Define different swagger models for get and set redirect rules
2024-03-01 08:58:11 +01:00
Alejandro Celaya
52150b3067 Define different swagger models for get and set redirect rules 2024-03-01 08:56:03 +01:00
Alejandro Celaya
e7796cc917 Merge pull request #2033 from acelaya-forks/feature/redirect-rule-creation
Create endpoint to set redirect rules for a short URL
2024-02-29 20:23:42 +01:00
Alejandro Celaya
7f560e6a65 Add SetRedirectRulesAction API test 2024-02-29 20:20:04 +01:00
Alejandro Celaya
8f233221e5 Add SetRedirectRulesAction unit test 2024-02-29 20:14:15 +01:00
Alejandro Celaya
f700abd65d Add tests for ShortUrlRedirectionRuleService::setRulesForShortUrl 2024-02-29 19:55:34 +01:00
Alejandro Celaya
f9e4d6d617 Create RedirectRulesDataTest 2024-02-29 19:17:10 +01:00
Alejandro Celaya
d9286765e1 Create endpoint to set redirect rules for a short URL 2024-02-29 10:16:41 +01:00
Alejandro Celaya
a7cde9364a Merge pull request #2035 from acelaya-forks/feature/improve-rules-persistence
Remove name and uniqueness in redirect condition table
2024-02-29 09:26:51 +01:00
Alejandro Celaya
070d74830b Remove name and uniqueness in redirect condition table 2024-02-29 09:05:30 +01:00
Alejandro Celaya
23c07c4e82 Merge pull request #2031 from acelaya-forks/feature/redirect-rules-api
Create endpoint to list redirect rules for a specific short URL
2024-02-28 09:17:05 +01:00
Alejandro Celaya
ab7824aa85 Add unit test for ListRedirectRulesAction 2024-02-28 09:14:27 +01:00
Alejandro Celaya
67bafbe44e Add API test for redirect rules list 2024-02-28 08:55:44 +01:00
Alejandro Celaya
c4805b8152 Remove old error models and examples from swagger spec 2024-02-28 08:39:26 +01:00
Alejandro Celaya
33729289c7 Create endpoint to list redirect rules for a specific short URL 2024-02-27 21:00:53 +01:00
Alejandro Celaya
721e3d9ef9 Merge pull request #2030 from acelaya-forks/feature/device-redirect-rules
Feature/device redirect rules
2024-02-27 19:27:59 +01:00
Alejandro Celaya
a72e22e046 Unit-test RedirectCondition for devices 2024-02-27 19:24:26 +01:00
Alejandro Celaya
36749658da Remove device long URLs support 2024-02-27 18:46:49 +01:00
Alejandro Celaya
4ad3dc0bc7 Create new migration to drop old device_long_urls table 2024-02-27 09:09:03 +01:00
Alejandro Celaya
73864b923d Add migration to migrate device_long_urls to redirect_rules 2024-02-26 23:42:37 +01:00
Alejandro Celaya
71277e979a Merge pull request #2026 from acelaya-forks/feature/language-redirects
Feature/language redirects
2024-02-26 20:10:26 +01:00
Alejandro Celaya
60fef3de74 Merge lines 2024-02-26 20:06:15 +01:00
Alejandro Celaya
0fe503fa0e Update changelog 2024-02-26 19:59:34 +01:00
Alejandro Celaya
db02d9f1ba Finalize logic to dynamically match accept language rules 2024-02-26 19:58:46 +01:00
Alejandro Celaya
89a987d03a Merge pull request #2024 from acelaya-forks/feature/rule-based-redirects
Logic to resolve the long URL to redirect to for a short URL
2024-02-26 19:11:13 +01:00
Alejandro Celaya
3284cea6f2 Update changelog 2024-02-26 19:08:21 +01:00
Alejandro Celaya
df5ad554c1 Add E2E tests for dynamic rule-based redirects 2024-02-26 19:05:39 +01:00
Alejandro Celaya
07ae92943d Add test for ShortUrlRedirectResolver rule matching 2024-02-25 23:09:16 +01:00
Alejandro Celaya
175712d4a9 Add test for ShortUrlRedirectRule request matching 2024-02-25 19:38:54 +01:00
Alejandro Celaya
3f1b253c31 Add test for RedirectCondition request matching 2024-02-25 19:21:39 +01:00
Alejandro Celaya
202d0b86b3 Extract logic to match every type of redirect condition to its own private method 2024-02-25 17:13:54 +01:00
Alejandro Celaya
4e87affb0b Take redirect rules into consideration when resolving the long URL for a short URL 2024-02-25 12:34:27 +01:00
Alejandro Celaya
7f83d37b3c Add logic to match redirect conditions based on query params or language 2024-02-25 12:34:27 +01:00
Alejandro Celaya
09e81b00c5 Create component to resolve the long URL to redirect to for a short URL 2024-02-25 12:34:27 +01:00
Alejandro Celaya
68b77e22c5 Merge pull request #2025 from acelaya-forks/feature/old-migrations
Delete old migrations
2024-02-25 12:33:49 +01:00
Alejandro Celaya
c5ddd8302a Delete old migrations 2024-02-25 12:28:20 +01:00
Alejandro Celaya
1a0fe0429a Merge pull request #2022 from acelaya-forks/feature/redirect-rules-persistence
Create migration for new rules and conditions tables
2024-02-24 20:27:47 +01:00
Alejandro Celaya
6646232311 Set eager loading for redirect rule conditions 2024-02-24 20:24:41 +01:00
Alejandro Celaya
c1e88c3e83 Use named args to avoid passing default values for args 2024-02-24 18:21:53 +01:00
Alejandro Celaya
c91a534d1a Create new entities for redirect rules 2024-02-24 18:17:09 +01:00
Alejandro Celaya
752100f1ce Create migration for new rules and conditions tables 2024-02-24 17:30:46 +01:00
Alejandro Celaya
dae083c540 Merge pull request #2023 from acelaya-forks/feature/unused-env-vars
Remove unused entries from EnvVars enum
2024-02-24 17:29:46 +01:00
Alejandro Celaya
857c3a4f8d Remove unused entries from EnvVars enum 2024-02-24 17:26:12 +01:00
Alejandro Celaya
acc4c4756e Simplify and normalize API tests script 2024-02-23 19:30:58 +01:00
Alejandro Celaya
0bacb215c5 Merge pull request #2019 from acelaya-forks/feature/long-url-as-text
Change long URL columns to TEXT type
2024-02-22 09:39:46 +01:00
Alejandro Celaya
d1a6e60b01 Add migration to update long URLs columns to text type 2024-02-22 09:35:14 +01:00
Alejandro Celaya
8f954151ca Change long URL columns to TEXT type 2024-02-21 19:43:02 +01:00
Alejandro Celaya
145d4eaaed Merge pull request #2020 from acelaya-forks/feature/path-prefix
Feature/path prefix
2024-02-21 19:41:19 +01:00
Alejandro Celaya
7673232793 Add --path-prefix to short URL creation 2024-02-21 19:38:11 +01:00
Alejandro Celaya
f08951a9b9 Add unit test for short URL path prefix 2024-02-21 19:24:30 +01:00
Alejandro Celaya
ff963a9df4 Add API test for short URL path prefix 2024-02-21 19:14:30 +01:00
Alejandro Celaya
f30c74b987 Prepend path prefix to generated short code or custom slug 2024-02-21 18:06:06 +01:00
Alejandro Celaya
467dbdd183 Update to latest shlink-common 2024-02-21 17:57:45 +01:00
Alejandro Celaya
0e78deb8f2 Refactor ShortUrlInputFilter for creation and edition 2024-02-21 10:12:40 +01:00
Alejandro Celaya
50cc7ae632 Fix donate URL 2024-02-20 22:33:10 +01:00
Alejandro Celaya
512d765d60 Merge pull request #2018 from acelaya-forks/feature/remove-infection
Remove dependency on infection and mutation tests
2024-02-20 22:28:48 +01:00
Alejandro Celaya
7b9331bd14 Merge DB test jobs into one with a matrix 2024-02-20 22:26:04 +01:00
Alejandro Celaya
4f5ce9fb43 Remove dependency on infection and mutation tests 2024-02-20 22:20:16 +01:00
Alejandro Celaya
83f73eb631 Merge pull request #2017 from acelaya-forks/feature/improve-e2e-coverage
Simplify and improve how code coverage is generated in API and CLI tests
2024-02-20 22:03:17 +01:00
Alejandro Celaya
3f1b89d665 Install dependencies in upload-coverage CI job 2024-02-20 18:30:34 +01:00
Alejandro Celaya
8f6fc97fc8 Simplify and improve how code coverage is generated in API and CLI tests 2024-02-20 18:23:37 +01:00
Alejandro Celaya
a463e6f9d7 Merge pull request #2014 from acelaya-forks/feature/qr-code-improvements
Allow customizing color, background color and logo in QR codes
2024-02-19 23:22:57 +01:00
Alejandro Celaya
2a0364ca8f Update changelog 2024-02-19 23:13:09 +01:00
Alejandro Celaya
23e9ed93bb Add test for QrCodeAction with logo URL 2024-02-19 23:10:51 +01:00
Alejandro Celaya
689343d1c9 Test QR codes logic when providing a color 2024-02-18 21:02:35 +01:00
Alejandro Celaya
d01dc334d7 Update to endroid/qr-code 5 2024-02-18 19:58:19 +01:00
Alejandro Celaya
58a3791a5c Allow customizing color, background color and logo in QR codes 2024-02-18 14:22:25 +01:00
Alejandro Celaya
1a133af141 Merge pull request #2013 from acelaya-forks/feature/title-resolution-timeout
Add a 5-second timeout to title resolution
2024-02-18 14:21:46 +01:00
Alejandro Celaya
938fb6509e Add API test to verify titles for timing-out long URLs 2024-02-18 12:45:59 +01:00
Alejandro Celaya
d3bfd99210 Add a 3-second timeout to title resolution 2024-02-18 11:32:31 +01:00
Alejandro Celaya
3a1740fdca Merge pull request #2012 from acelaya-forks/feature/remove-validate-url
Feature/remove validate url
2024-02-17 12:13:05 +01:00
Alejandro Celaya
e3de403c6c Remove support to validate long URLs during short URL creation/edition 2024-02-17 12:02:57 +01:00
Alejandro Celaya
5c1ab02753 Update shlink dependencies 2024-02-17 10:59:06 +01:00
Alejandro Celaya
e5713df008 Merge pull request #2011 from acelaya-forks/feature/update-symfony
Update to Symfony 7
2024-02-17 10:52:41 +01:00
Alejandro Celaya
95ea64980b Update to Symfony 7 2024-02-17 10:46:29 +01:00
Alejandro Celaya
c0a77b790d Merge pull request #2009 from acelaya-forks/feature/doctrine-orm-3
Update to doctrine ORM 3.0
2024-02-17 10:36:29 +01:00
Alejandro Celaya
e073b4331a Update to doctrine ORM 3.0 2024-02-17 10:23:37 +01:00
Alejandro Celaya
e919901487 Merge pull request #2007 from acelaya-forks/feature/coverage-improvements
Feature/coverage improvements
2024-02-17 08:46:18 +01:00
Alejandro Celaya
13f9f106be Update to event-dispatcher without swoole 2024-02-17 08:41:53 +01:00
Alejandro Celaya
e9c7053ef5 Move code around generating code coverage to test-utils lib 2024-02-17 08:41:17 +01:00
Alejandro Celaya
62051c8809 Merge pull request #2006 from acelaya-forks/feature/fix-ci
Recover prev approach to generate API tests coverage
2024-02-16 23:46:06 +01:00
Alejandro Celaya
0a6a794e23 Recover prev approach to generate API tests coverage 2024-02-16 23:32:20 +01:00
Alejandro Celaya
01846657d1 Merge pull request #2003 from acelaya-forks/feature/improve-coverage-collection
Move E2E coverage collectors to shlink-test-utils
2024-02-16 23:27:44 +01:00
Alejandro Celaya
dd7545afdf Move E2E coverage collectors to shlink-test-utils 2024-02-16 23:25:42 +01:00
Alejandro Celaya
9296013596 Merge pull request #2005 from acelaya-forks/feature/remove-swoole
Drop support for openswoole
2024-02-16 23:18:39 +01:00
Alejandro Celaya
8015c6cc88 Skip extensions cache if there are no extensions to install 2024-02-16 23:11:38 +01:00
Alejandro Celaya
8c93444286 Do not set default value for php-extensions input in ci-setup action 2024-02-16 23:08:03 +01:00
Alejandro Celaya
96ed7cae0d Drop support for openswoole 2024-02-16 23:02:46 +01:00
Alejandro Celaya
72c4628b79 Merge pull request #2002 from acelaya-forks/feature/rr-e2e-tests
Feature/rr e2e tests
2024-02-16 07:57:04 +01:00
Alejandro Celaya
1117631717 Move rr tests config back to the config/roadrunner folder 2024-02-16 00:01:35 +01:00
Alejandro Celaya
60176060cb Update changelog 2024-02-15 23:42:03 +01:00
Alejandro Celaya
d949b54ef4 Switch to roadrunner as the default runtime for API tests 2024-02-15 23:39:50 +01:00
Alejandro Celaya
720db64a03 Switch to RoadRunner as default API test runtime 2024-02-14 09:31:26 +01:00
Alejandro Celaya
37e0978bfc Merge pull request #1999 from acelaya-forks/feature/remove-deprecated-stuff
Removed deprecated features
2024-02-13 22:52:00 +01:00
Alejandro Celaya
cf355b0b69 Update shlink-common and shlink-installer 2024-02-13 22:46:25 +01:00
Alejandro Celaya
f2edb54b8b Document changes from v3 to v4 2024-02-13 09:30:37 +01:00
Alejandro Celaya
13ec27039d Ensure non-root user in Dockerfile 2024-02-13 08:55:22 +01:00
Alejandro Celaya
ad3805a560 Removed deprecated features 2024-02-12 23:18:30 +01:00
Alejandro Celaya
cc4afa7b62 Merge pull request #1998 from acelaya-forks/feature/default-php-8.3
Feature/default php 8.3
2024-02-11 11:56:20 +01:00
Alejandro Celaya
7a6bfed445 Update changelog 2024-02-11 11:23:34 +01:00
Alejandro Celaya
f2a7b687a9 Update docker images to PHP 8.3 2024-02-11 11:22:48 +01:00
Alejandro Celaya
522d021264 Merge pull request #1995 from acelaya-forks/feature/orphan-visits-filter
Support filtering orphan visits by type in VisitRepository
2024-02-10 18:37:17 +01:00
Alejandro Celaya
14a0db1f34 Update changelog 2024-02-10 18:28:54 +01:00
Alejandro Celaya
430883987a Add API test for type-filtering in orphan visits list 2024-02-10 18:26:19 +01:00
Alejandro Celaya
f17b641d46 Allow filtering orphan visits by type from the CLI 2024-02-10 18:19:28 +01:00
Alejandro Celaya
48a8290e92 Allow type filter property for orphan visits list 2024-02-10 17:51:42 +01:00
Alejandro Celaya
46acf4de1c Support filtering orphan visits by type in VisitRepository 2024-02-10 13:58:03 +01:00
Alejandro Celaya
17792a1603 Merge pull request #1994 from acelaya-forks/feature/docker-compose-secrets
Support loading env vars from secret files
2024-02-10 10:12:02 +01:00
Alejandro Celaya
a8611f5d80 Support loading env vars from secret files 2024-02-10 09:54:59 +01:00
Alejandro Celaya
deef938e97 Merge pull request #1991 from acelaya-forks/feature/remove-league-uri
Feature/remove league uri
2024-02-05 23:12:17 +01:00
Alejandro Celaya
e014cfa72a Remove dependency on league/uri 2024-02-05 23:05:31 +01:00
Alejandro Celaya
aa242eba25 Remove League\Uri from ShortUrlRedirectionBuilder 2024-02-05 22:13:59 +01:00
Alejandro Celaya
0ac5569d60 Merge pull request #1989 from acelaya-forks/feature/request-id-lib
Feature/request id lib
2024-02-04 14:38:49 +01:00
Alejandro Celaya
7c3e3442c2 Update changelog 2024-02-04 14:18:16 +01:00
Alejandro Celaya
0f894dcdfe Replace request-id middleware dependency with userland code 2024-02-04 14:16:42 +01:00
Alejandro Celaya
361d987f47 Merge pull request #1970 from shlinkio/develop
Release 3.7.3
2024-01-04 14:07:53 +01:00
Alejandro Celaya
6017db260a Add v3.7.3 to changelog 2024-01-04 14:02:00 +01:00
Alejandro Celaya
f9c9b3d981 Merge pull request #1969 from acelaya-forks/feature/mountable-data-dir
Feature/mountable data dir
2024-01-04 08:42:41 +01:00
Alejandro Celaya
e7b876f4e6 Update changelog 2024-01-03 19:42:33 +01:00
Alejandro Celaya
554b948775 Create data directories in docker entry point if they don't exist 2024-01-03 19:22:33 +01:00
Alejandro Celaya
9bdbb59401 Update shlinkio/shlink-testing-utils 2024-01-03 10:08:03 +01:00
Alejandro Celaya
377861c5f1 Move migrations to module/Core 2024-01-02 17:55:23 +01:00
Alejandro Celaya
26c2aaf567 Merge pull request #1963 from shlinkio/develop
Release 3.7.2
2023-12-26 16:23:49 +01:00
Alejandro Celaya
62b54ceaaf Add v3.7.2 to changelog 2023-12-26 16:16:10 +01:00
Alejandro Celaya
625eba76c7 Merge pull request #1962 from acelaya-forks/feature/disabled-qr-codes
Allow QR codes to be generated for disabled short URLs
2023-12-24 16:55:52 +01:00
Alejandro Celaya
e12bda3f42 Add API test to verify QR codes return a 404 for disabled short URLs 2023-12-24 10:37:09 +01:00
Alejandro Celaya
0f0301ae5c Update changelog 2023-12-24 10:27:25 +01:00
Alejandro Celaya
8d1776af98 Test error when short URLs cannot be resolved 2023-12-24 10:25:58 +01:00
Alejandro Celaya
c597738915 Test how URLs are resolved in QrCodeAction 2023-12-24 10:13:19 +01:00
Alejandro Celaya
639329dbe4 Update installer 2023-12-24 09:48:44 +01:00
Alejandro Celaya
92b0525b6e Update Twitter badge 2023-12-23 11:14:12 +01:00
Alejandro Celaya
06306aabd5 Allow QR codes to be generated for disabled short URLs 2023-12-22 13:29:22 +01:00
Alejandro Celaya
225905fcdb update changelog 2023-12-19 11:22:40 +01:00
Alejandro Celaya
8ca2b3c641 Merge pull request #1955 from acelaya-forks/feature/artifact-actions
Update artifact GitHub actions
2023-12-19 11:19:34 +01:00
Alejandro Celaya
ac1737492b Update artifact GitHub actions 2023-12-19 11:13:13 +01:00
Alejandro Celaya
a63075eb4c Merge pull request #1953 from shlinkio/develop
Release 3.7.1
2023-12-17 20:06:25 +01:00
Alejandro Celaya
97e9dfad67 Merge pull request #1952 from shlinkio/feature/rr-logs-improvement
Feature/rr logs improvement
2023-12-17 19:59:21 +01:00
Alejandro Celaya
17c4f13568 Set fixed versions for Shlink dependencies 2023-12-17 19:49:50 +01:00
Alejandro Celaya
3b5243689b Fine-tune RoadRunner logs to avoid too many useless info 2023-12-17 19:26:28 +01:00
Alejandro Celaya
4d28adf4a7 Merge pull request #1948 from acelaya-forks/feature/fix-postgres-import
Fix error when importing short URLs while using Postgres
2023-12-16 20:38:46 +01:00
Alejandro Celaya
1b14bb07b1 Fix error when importing short URLs while using Postgres 2023-12-16 20:22:39 +01:00
Alejandro Celaya
3a43aa4d41 Merge pull request #1942 from acelaya-forks/feature/geoip-3
Update to geolite2 v3
2023-12-07 07:52:58 +01:00
Alejandro Celaya
2340b4f601 Update to geolite2 v3 2023-12-06 21:48:54 +01:00
Alejandro Celaya
664886eddf Support laminas-diactoros 3 2023-11-30 22:10:41 +01:00
Alejandro Celaya
d3570dac0b Merge pull request #1937 from acelaya-forks/feature/remove-functional
Feature/remove functional
2023-11-30 18:53:21 +01:00
Alejandro Celaya
1854cc2f19 Remove last references to functional-php 2023-11-30 18:39:27 +01:00
Alejandro Celaya
bff4bd12ae Removed more functional-php usages 2023-11-30 14:34:44 +01:00
Alejandro Celaya
549c6605f0 Replaced usage of Functional\contians 2023-11-30 09:13:29 +01:00
Alejandro Celaya
f50263d2d9 Remove usage of Functional\map function 2023-11-29 12:34:13 +01:00
Alejandro Celaya
c80ec54508 Merge pull request #1933 from shlinkio/develop
Release 3.7.0
2023-11-25 20:22:38 +01:00
Alejandro Celaya
a91a560651 Fix typo in version contraint 2023-11-25 20:12:41 +01:00
Alejandro Celaya
a931c60230 Point to actual versions on shlink deps 2023-11-25 20:08:29 +01:00
Alejandro Celaya
479a331008 Merge pull request #1932 from acelaya-forks/feature/ssl-connections
Feature/ssl connections
2023-11-25 18:11:30 +01:00
Alejandro Celaya
5d99b1aef0 Update changelog 2023-11-25 13:08:15 +01:00
Alejandro Celaya
17e0c9176e Add support for SSL on Redis and RabbitMQ connections 2023-11-25 13:04:30 +01:00
Alejandro Celaya
48d7388bdc Merge pull request #1931 from acelaya-forks/feature/update-installer
Update to installer with runtime question
2023-11-25 10:01:19 +01:00
Alejandro Celaya
aa01c034db Update to installer with runtime question 2023-11-25 09:55:01 +01:00
Alejandro Celaya
9035161b65 Merge pull request #1928 from acelaya-forks/feature/redis-urlencoded
Allow redis credentials be URL-decoded before passing them to connection
2023-11-23 11:29:46 +01:00
Alejandro Celaya
df57ca5edb Allow redis credentials be URL-decoded before passing them to connection 2023-11-23 11:22:23 +01:00
Alejandro Celaya
0511c73cc8 Merge pull request #1926 from acelaya-forks/feature/geolite-download-warn
Print a warning when manually running visit:download-db with no license
2023-11-23 09:42:31 +01:00
Alejandro Celaya
a3554eaf74 Print a warning when manually running visit:download-db with no license 2023-11-23 09:31:02 +01:00
Alejandro Celaya
cb0bac55d2 Merge pull request #1920 from acelaya-forks/feature/matomo-integration
Feature/matomo integration
2023-11-22 18:59:45 +01:00
Alejandro Celaya
bd5d3f6897 Update changelog 2023-11-22 18:51:47 +01:00
Alejandro Celaya
5e6e386c5a Add matomo dev config 2023-11-22 18:30:03 +01:00
Alejandro Celaya
e783bdc456 Set referrer when sending visits to Matomo 2023-11-21 10:01:27 +01:00
Alejandro Celaya
316b88cea6 Add 10 second timeout to matomo requests 2023-11-21 08:34:37 +01:00
Alejandro Celaya
c03eea789c Fix LocateVisitTest 2023-11-21 08:25:58 +01:00
Alejandro Celaya
bd5d3cb6fa Create SendVisitToMatomoTest 2023-11-20 10:11:15 +01:00
Alejandro Celaya
e1f2dcc136 Create MatomoTrackerBuilderTest 2023-11-17 23:31:23 +01:00
Alejandro Celaya
5e6ebfa5a9 Update shlink-event-dispatcher 2023-11-17 09:32:07 +01:00
Alejandro Celaya
a7ed14a1c9 Enhance EnableListenerCheckerTest with support for matomo listener 2023-11-16 09:24:52 +01:00
Alejandro Celaya
f88d57b2b6 Do not dispatch async job for matomo if disabled 2023-11-15 20:02:35 +01:00
Alejandro Celaya
9dbd15bc0c Add logic to send visits to a matomo instance 2023-11-15 19:57:58 +01:00
Alejandro Celaya
0edb3e5c2c Update to installer with support for matomo 2023-11-11 20:12:39 +01:00
Alejandro Celaya
7501eca71e Update matomo container 2023-11-09 09:04:41 +01:00
Alejandro Celaya
b145d106b0 Add matomo env vars and config 2023-11-09 08:59:34 +01:00
Alejandro Celaya
b4386a3508 Add matomo container 2023-11-09 08:58:58 +01:00
Alejandro Celaya
36e2a9387d Merge pull request #1917 from acelaya-forks/feature/php-8.3-deps
Update native deps for PHP 8.3 preparation
2023-11-08 19:13:29 +01:00
Alejandro Celaya
14c68b4bbe Update native deps for PHP 8.3 preparation 2023-11-08 18:51:03 +01:00
Alejandro Celaya
d6fedaf926 Merge pull request #1913 from acelaya-forks/feature/fix-delete-multi-segment-visits
Fix short URL visits deletion when multi-segment slugs are enabled
2023-11-08 09:20:06 +01:00
Alejandro Celaya
8d35c1dde2 Fix short URL visits deletion when multi-segment slugs are enabled 2023-11-08 09:06:12 +01:00
Alejandro Celaya
85b5f760e5 Update dev swagger UI 2023-11-05 10:58:41 +01:00
Alejandro Celaya
1a4a107952 Merge pull request #1911 from acelaya-forks/feature/slug-url-chars
Feature/slug url chars
2023-11-05 10:52:46 +01:00
Alejandro Celaya
e431395a12 Update changelog 2023-11-05 10:31:51 +01:00
Alejandro Celaya
cfc3d54122 Do not allow URL reserved characters in custom slugs 2023-11-05 10:30:40 +01:00
Alejandro Celaya
d9d6d5bd9c Merge pull request #1907 from acelaya-forks/feature/php-8.3
Add support for PHP 8.3
2023-11-04 13:30:31 +01:00
Alejandro Celaya
32f465f7a6 Add PHP 8.3 to building pipeline 2023-11-04 13:15:15 +01:00
Alejandro Celaya
4cddb573a0 Ignore all platform reqs on PHP 8.3, as openswoole cannot be installed there 2023-11-04 13:03:10 +01:00
Alejandro Celaya
2cb8486bb3 Add support for PHP 8.3 2023-11-04 12:42:31 +01:00
Alejandro Celaya
2a782ab60b Merge pull request #1897 from acelaya-forks/feature/disable-health-endpoint-logs
Do not log requests to the health endpoint
2023-10-20 20:44:49 +02:00
Alejandro Celaya
5bde273d59 Fix Rest's ConfigProvider test 2023-10-20 09:42:48 +02:00
Alejandro Celaya
41e322fd47 Update changelog 2023-10-20 09:34:20 +02:00
Alejandro Celaya
55885b0f25 Do not log requests to the health endpoint 2023-10-20 09:33:29 +02:00
Alejandro Celaya
d419b9d62d Merge pull request #1891 from acelaya-forks/feature/customizable-cache-namespace
Feature/customizable cache namespace
2023-10-07 11:33:40 +02:00
Alejandro Celaya
3bdc05fbc4 Fix CliTestUtils for PHPUnit 10.4 2023-10-07 10:56:04 +02:00
Alejandro Celaya
57053d66a4 Update changelog 2023-10-06 09:21:53 +02:00
Alejandro Celaya
9d8ea0a4f6 Allow cache namespace to be customizable via env var 2023-10-06 09:19:55 +02:00
Alejandro Celaya
46354baae9 Merge pull request #1886 from acelaya-forks/feature/chronos-3
Update to chronos 3
2023-09-30 21:19:01 +02:00
Alejandro Celaya
27c48414da Update to chronos 3 2023-09-30 21:03:17 +02:00
Alejandro Celaya
25b1138000 Fix merge conflicts 2023-09-23 09:06:38 +02:00
Alejandro Celaya
4cf3bc08f9 Merge pull request #1883 from shlinkio/release/v3.6.4
Release 3.6.4
2023-09-23 08:57:10 +02:00
Alejandro Celaya
7e093a3fd8 Fix date in changelog 2023-09-23 08:41:57 +02:00
Alejandro Celaya
abecf3be02 Merge pull request #1882 from acelaya-forks/feature/create-api-key
Feature/create api key
2023-09-23 08:40:53 +02:00
Alejandro Celaya
3d9b48c5fd Create InitialApiKeyCommand cli test 2023-09-23 08:28:57 +02:00
Alejandro Celaya
ba4a66f772 Add InitialApiKeyCommand unit test 2023-09-23 08:16:22 +02:00
Alejandro Celaya
ec839183e8 Add unit test for ApiKeyService::createInitial 2023-09-23 08:01:10 +02:00
Alejandro Celaya
b0ec0601c1 Update to latest shlink-installer 2023-09-22 10:00:19 +02:00
Alejandro Celaya
637d8334f4 New CLI command to create the initial API key idempotently 2023-09-21 09:47:21 +02:00
Alejandro Celaya
6db46b50e9 Roll back change to allow creating API keys with custom value 2023-09-21 08:58:05 +02:00
Alejandro Celaya
f6b1cc7556 Test API key creation with custom key 2023-09-19 10:14:04 +02:00
Alejandro Celaya
65a0a90a51 Allow custom API keys to be created 2023-09-19 09:10:17 +02:00
Alejandro Celaya
38a7872fbf Merge pull request #1878 from acelaya-forks/feature/add-swagger-ui-dev
Add a swagger ui container for dev env
2023-09-17 12:01:05 +02:00
Alejandro Celaya
5839cc5926 Add a swagger ui container for dev env 2023-09-17 11:59:23 +02:00
Alejandro Celaya
49bd230474 Merge pull request #1874 from acelaya-forks/feature/redis-lock-namespace
Make sure locks include the same cache namespace when sent to Redis
2023-09-12 21:44:45 +02:00
Alejandro Celaya
074f2135f6 Make sure locks include the same cache namespace when sent to Redis 2023-09-12 21:20:38 +02:00
Alejandro Celaya
ef073d59ca Merge pull request #1872 from acelaya-forks/bugfix/db-commands-timeout
Fix incorrect timeout in init commands
2023-09-12 08:33:13 +02:00
Alejandro Celaya
a3b2f94339 Make sure local config is not loaded in tests 2023-09-12 08:21:34 +02:00
Alejandro Celaya
b17c576a30 Fix incorrect timeout in init commands 2023-09-11 09:07:18 +02:00
Alejandro Celaya
bc4156ca3c Merge pull request #1858 from acelaya-forks/feature/update-deps
Update dependencies
2023-08-19 12:51:02 +02:00
Alejandro Celaya
b747b8448e Update dependencies 2023-08-19 12:03:29 +02:00
Alejandro Celaya
aa4b9fc27e Replace references to docker-compose with docker compose 2023-08-03 09:10:05 +02:00
Alejandro Celaya
3f3c2c3d1e Add form config for Feature Request issues 2023-08-03 09:08:35 +02:00
Alejandro Celaya
4b49f8fb7f Use issue form for bugs 2023-07-25 08:45:24 +02:00
Alejandro Celaya
550f3b28ea Use textarea instead of markdown for main field in help-wanted discussion 2023-07-15 11:09:36 +02:00
Alejandro Celaya
6d4c232345 Merge pull request #1844 from acelaya-forks/feature/help-discussion-template
Add discussion template for 'Help wanted'
2023-07-15 10:59:51 +02:00
Alejandro Celaya
2d085ad6f4 Add discussion template for 'Help wanted' 2023-07-15 10:59:39 +02:00
Alejandro Celaya
3ea83f5cc3 Merge pull request #1836 from acelaya-forks/feature/oas-3.1
Feature/oas 3.1
2023-07-12 19:42:42 +02:00
Alejandro Celaya
b47bd0fc7a Use stable version of devizzent/cebe-php-openapi 2023-07-12 11:33:58 +02:00
Alejandro Celaya
27e90c4c26 Update changelog 2023-07-12 11:30:12 +02:00
Alejandro Celaya
ad1a846d8e Remove references to nullable in OAS 2023-07-12 11:29:44 +02:00
Alejandro Celaya
78f75a06df Updated swagger docs to v3.1, and fixed some 'required' definitions 2023-07-12 11:29:44 +02:00
Alejandro Celaya
262d714751 Add ADR for latest docker image publishing change 2023-07-09 11:31:13 +02:00
Alejandro Celaya
f71c3bba5c Merge pull request #1842 from acelaya-forks/feature/docker-build-on-tag
Build docker image only on tags
2023-07-09 09:59:25 +02:00
Alejandro Celaya
8b495064b2 Build docker image only on tags 2023-07-09 09:45:46 +02:00
Alejandro Celaya
57a36204db Merge pull request #1840 from acelaya-forks/feature/docker-no-interactive-init
Improve verbosity hint when an error occurs during docker init
2023-07-06 09:11:04 +02:00
Alejandro Celaya
7cc1722858 Improve verbosity hint when an error occurs during docker init 2023-07-05 09:58:51 +02:00
Alejandro Celaya
af50887361 Fix typo 2023-07-01 16:33:52 +02:00
Alejandro Celaya
99c8c6c8d4 Merge pull request #1832 from acelaya-forks/feature/migrations-config
Refactor cli-config file as it's currently used by doctrine migrations only
2023-06-23 22:05:24 +02:00
Alejandro Celaya
1d7c9fd553 Refactor cli-config file as it's currently used by doctrine migrations only 2023-06-23 09:16:33 +02:00
Alejandro Celaya
274c454fa4 Merge pull request #1827 from acelaya-forks/feature/question-discussion
Make sure people asking questions opens a discussion instead of an issue
2023-06-21 08:55:07 +02:00
Alejandro Celaya
453fcc4675 Make sure people asking questions opens a discussion instead of an issue 2023-06-21 08:54:03 +02:00
Alejandro Celaya
42427bfd74 Merge pull request #1824 from acelaya-forks/feature/api-coverage-fix
Update shlink-test-utils to fix coverage ID on API tests
2023-06-18 19:24:03 +02:00
Alejandro Celaya
33eedd2270 Update shlink-test-utils to fix coverage ID on API tests 2023-06-18 18:59:15 +02:00
Alejandro Celaya
edaf9e34f4 Merge pull request #1823 from acelaya-forks/feature/external-data-providers
Feature/external data providers
2023-06-18 11:06:24 +02:00
Alejandro Celaya
965325aa7c Replace traits with static classes in CLI unit tests 2023-06-18 10:51:59 +02:00
Alejandro Celaya
bdf2bbd0f1 Replace traits with external data providers in Core unit tests 2023-06-18 10:41:24 +02:00
Alejandro Celaya
dc4aab2cab Replace traits with external data providers in API tests 2023-06-18 10:36:45 +02:00
Alejandro Celaya
3b1f6c69de Merge pull request #1822 from acelaya-forks/feature/fix-installer-command-timeouts
Fix incorrect timeout in init commands
2023-06-15 19:07:32 +02:00
Alejandro Celaya
cdf5082cff Fix incorrect timeout in init commands 2023-06-15 18:53:42 +02:00
Alejandro Celaya
61686ed6ea Fix JamesIves/github-pages-deploy-action version 2023-06-14 18:27:03 +02:00
Alejandro Celaya
f63b96fd05 Fix merge conflicts 2023-06-14 18:25:09 +02:00
Alejandro Celaya
228bd83b75 Merge pull request #1818 from acelaya-forks/feature/fix-sqlite-db-creation
Fix Shlink trying to create SQLite database tables even if they already exist
2023-06-14 18:22:39 +02:00
Alejandro Celaya
a21dcb852a Fix Shlink trying to create SQLite database tables even if they already exist 2023-06-14 18:08:39 +02:00
Alejandro Celaya
6558c37b9a Fix merge conflicts 2023-06-11 20:10:29 +02:00
Alejandro Celaya
e6720cce12 Merge pull request #1814 from acelaya-forks/feature/update-test-utils
Update to latest test utils lib
2023-06-11 20:05:45 +02:00
Alejandro Celaya
22d039c550 Update to latest test utils lib 2023-06-11 19:54:33 +02:00
Alejandro Celaya
a21fcd72ce Merge pull request #1807 from acelaya-forks/feature/mercure-options
Use MercureOptions instead of raw config, where possible
2023-06-08 19:00:43 +02:00
Alejandro Celaya
058391cf06 Merge pull request #1809 from acelaya-forks/feature/fix-rr-download
Update to a shlink-installer version that fixes rr download
2023-06-08 18:59:28 +02:00
Alejandro Celaya
24e6acc6e8 Update to a shlink-installer version that fixes rr download 2023-06-08 18:47:55 +02:00
Alejandro Celaya
8e3508f28d Use MercureOptions instead of raw config, where possible 2023-06-06 20:25:14 +02:00
Alejandro Celaya
e72b424968 Fix merge conflicts 2023-06-04 09:33:16 +02:00
Alejandro Celaya
56d299a7dc Merge pull request #1804 from acelaya-forks/feature/release-3.6.1
Feature/release 3.6.1
2023-06-04 09:30:19 +02:00
Alejandro Celaya
575e6bf707 Downgrade PHPUnit to avoid infection error 2023-06-04 09:13:37 +02:00
Alejandro Celaya
e50c21440f Define default values for env vars used in rr prod config 2023-06-04 09:07:41 +02:00
Alejandro Celaya
7cff11080d Update changelog 2023-06-04 08:57:07 +02:00
Alejandro Celaya
72381f9844 Change order to create initial database to avoid permission errors 2023-06-04 08:54:08 +02:00
Alejandro Celaya
7c649e7497 Merge pull request #1801 from acelaya-forks/feature/no-run-disabled-tasks
Feature/no run disabled tasks
2023-06-03 19:19:08 +02:00
Alejandro Celaya
eff308cd43 Update changelog 2023-06-03 17:58:26 +02:00
Alejandro Celaya
bd3745118e Add logic to prevent roadrunner/openswoole jobs for tasks that will do nothing 2023-06-03 17:56:52 +02:00
Alejandro Celaya
602ebef02a Merge pull request #1800 from acelaya-forks/feature/deprecate-openswoole
Deprecate support for openswoole
2023-06-03 10:06:03 +02:00
Alejandro Celaya
9040937376 Stick with PHPUnit 10.1 until API tests coverage is fixed 2023-06-03 09:24:43 +02:00
Alejandro Celaya
a11be5b2ff Deprecate support for openswoole 2023-06-03 09:08:07 +02:00
Alejandro Celaya
6351d0b87d Merge pull request #1797 from acelaya-forks/feature/improve-new-db-check
Feature/improve new db check
2023-06-01 20:01:39 +02:00
Alejandro Celaya
fae3434393 Update changelog 2023-06-01 19:28:15 +02:00
Alejandro Celaya
4013ae87dd Change order to create initial database to avoid permission errors 2023-06-01 19:27:04 +02:00
Alejandro Celaya
cb4ba58b08 Merge pull request #1795 from acelaya-forks/feature/non-orphan-role
Feature/non orphan role
2023-05-31 09:43:18 +02:00
Alejandro Celaya
8c94452348 Fix CLI tests 2023-05-31 09:33:05 +02:00
Alejandro Celaya
ea96a00b12 Update changelog 2023-05-31 09:24:23 +02:00
Alejandro Celaya
be26dd58c3 Add API tests to cover usage of orphan visits restricted keys 2023-05-31 09:22:40 +02:00
Alejandro Celaya
eaba5edf7f Restrict interaction with orphan visits when API key has that role 2023-05-31 09:11:20 +02:00
Alejandro Celaya
12da04ef37 Add ApiKey check to tell if it has any role that is short-url restrictive 2023-05-30 09:32:44 +02:00
Alejandro Celaya
8b03532ddb Add ORPHAN_VISITS_EXCLUDED API key role 2023-05-30 09:15:35 +02:00
Alejandro Celaya
112b54ec7d Merge pull request #1793 from acelaya-forks/feature/drop-php-8.1
Drop support for PHP 8.1
2023-05-29 21:53:30 +02:00
Alejandro Celaya
ee6a8ede0a Drop support for PHP 8.1 2023-05-29 09:43:12 +02:00
Alejandro Celaya
07ce5f05a2 Add missing entry to v3.6.0 changelog 2023-05-29 09:02:59 +02:00
Alejandro Celaya
7b04016ca2 Fix version number on JamesIves/github-pages-deploy-action GitHub action 2023-05-24 08:59:21 +02:00
Alejandro Celaya
b6792d3fb8 Merge pull request #1792 from shlinkio/develop
Release 3.6.0
2023-05-24 08:46:25 +02:00
Alejandro Celaya
2f0d658432 Merge pull request #1791 from acelaya-forks/feature/fix-cpu-100
Update changelog
2023-05-23 23:25:39 +02:00
Alejandro Celaya
8c1865c3ec Update changelog 2023-05-23 23:15:59 +02:00
Alejandro Celaya
096d2098d6 Update installer 2023-05-23 18:42:50 +02:00
Alejandro Celaya
882d64ae11 Add deprecation note for ENABLE_PERIODIC_VISIT_LOCATE env var 2023-05-23 10:55:49 +02:00
Alejandro Celaya
3352bcd186 Merge pull request #1789 from acelaya-forks/feature/improved-dependency-locks
Feature/improved dependency locks
2023-05-21 18:44:10 +02:00
Alejandro Celaya
9743c1624d Update changelog 2023-05-21 18:10:08 +02:00
Alejandro Celaya
e85d59c5a4 Add locks when creating short URL dependencies, to avoid race condition 2023-05-21 18:08:17 +02:00
Alejandro Celaya
ac0ff8fb94 Merge pull request #1787 from acelaya-forks/feature/shlink-init-command
Feature/shlink init command
2023-05-21 14:44:08 +02:00
Alejandro Celaya
90f93ee4ec Update changelog 2023-05-21 14:32:00 +02:00
Alejandro Celaya
794d926e3a Update docker entry point to use new shlink-installer init command 2023-05-21 14:30:20 +02:00
Alejandro Celaya
bd41ebef9f Merge pull request #1785 from acelaya-forks/feature/non-root-support
Allow running docker container as non-root
2023-05-19 20:29:40 +02:00
Alejandro Celaya
725370704f Update changelog 2023-05-19 19:50:05 +02:00
Alejandro Celaya
f03b7689ce Allow running docker container as non-root 2023-05-19 19:48:20 +02:00
Alejandro Celaya
fb31e2a5e4 Merge pull request #1782 from acelaya-forks/feature/clear-orphan-visits
Feature/clear orphan visits
2023-05-18 09:49:31 +02:00
Alejandro Celaya
d688c6da7e Update changelog 2023-05-18 09:36:50 +02:00
Alejandro Celaya
618784dc3b Create command to delete all orphan visits 2023-05-18 09:35:42 +02:00
Alejandro Celaya
9d64d4ed1d Create abstract base class for commands deleting visits 2023-05-18 09:33:15 +02:00
Alejandro Celaya
7f02243c6c Rename short-url:delete-visits to short-url:visits-delete for consistency with other commands 2023-05-18 09:19:01 +02:00
Alejandro Celaya
3916c68126 Add DeleteOrphanVisitsTest API test 2023-05-18 09:09:44 +02:00
Alejandro Celaya
a6f0c66331 Document endpoint to delete orphan visits 2023-05-18 09:06:52 +02:00
Alejandro Celaya
bdfb220126 Create REST action to delete orphan visits 2023-05-18 09:04:28 +02:00
Alejandro Celaya
abcf2f86be Create service to delete orphan visits 2023-05-18 09:01:57 +02:00
Alejandro Celaya
a4d8ebdfc9 Create DB logic to delete orphan visits 2023-05-18 08:58:07 +02:00
Alejandro Celaya
b51c149c30 Merge pull request #1779 from acelaya-forks/feature/clear-short-url-visits
Feature/clear short url visits
2023-05-17 09:20:28 +02:00
Alejandro Celaya
39095a3098 Fix coding styles 2023-05-17 08:57:36 +02:00
Alejandro Celaya
765199727e Update changelog 2023-05-16 09:29:22 +02:00
Alejandro Celaya
c7043af853 Create DeleteShortUrlVisitsCommandTest 2023-05-16 09:26:29 +02:00
Alejandro Celaya
02a8ef7dd9 Create DeleteShortUrlVisitsCommand 2023-05-15 09:48:24 +02:00
Alejandro Celaya
6bb8c1b2f5 Rename CLI Option namespace to Input 2023-05-15 09:02:23 +02:00
Alejandro Celaya
3cf253fd0f Document short URLs visits deletion endpoint 2023-05-14 18:25:27 +02:00
Alejandro Celaya
0365728337 Create DeleteShortUrlVisitsTest 2023-05-14 13:35:15 +02:00
Alejandro Celaya
b8143a5bb4 Create VisitDeleterRepositoryTest 2023-05-14 13:04:45 +02:00
Alejandro Celaya
531a19dde9 Refactor short URL visits deletion layers 2023-05-14 13:04:17 +02:00
Alejandro Celaya
69ff7de481 Create ShortUrlVisitsDeleterTest 2023-05-14 12:32:54 +02:00
Alejandro Celaya
ffc0555c7c Create DeleteShortUrlVisitsActionTest 2023-05-14 12:15:35 +02:00
Alejandro Celaya
84a7981dfa Create REST action to delete short URL visits 2023-05-14 12:00:08 +02:00
Alejandro Celaya
2573c2bf98 Update roadrunner config 2023-05-14 11:56:49 +02:00
Alejandro Celaya
3b4c1501f3 Set platforms to be used for openswoole docker image 2023-05-07 17:13:26 +02:00
Alejandro Celaya
e836bedecc Merge pull request #1775 from acelaya-forks/feature/default-roadrunner
Feature/default roadrunner
2023-05-07 13:34:53 +02:00
Alejandro Celaya
a797b74a70 Standardize logger for all Shlink execution contexts 2023-05-07 13:18:19 +02:00
Alejandro Celaya
ab497403ca Merge pull request #1773 from acelaya-forks/feature/rr-friendly-installer
Update shlink-installer
2023-05-06 18:07:57 +02:00
Alejandro Celaya
d4dea9a1d2 Update shlink-installer 2023-05-06 10:12:42 +02:00
Alejandro Celaya
28d93ea5e0 Update changelog 2023-05-03 08:59:47 +02:00
Alejandro Celaya
e6a31b16ed Switch to roadrunner as default docker runtime 2023-05-03 08:59:09 +02:00
Alejandro Celaya
9553192281 Merge pull request #1766 from acelaya-forks/feature/rr-cli-2.5
Update to rr-cli 2.5, and do not generate config
2023-05-02 20:01:51 +02:00
Alejandro Celaya
74069f2d24 Skip API tests fetching Twitter during CI 2023-05-02 19:51:37 +02:00
Alejandro Celaya
b4b00a57c1 Update chrome user agent used for anti-bots 2023-05-02 19:40:23 +02:00
Alejandro Celaya
a516ef691d Update to rr-cli 2.5, and do not generate config 2023-05-02 08:43:14 +02:00
Alejandro Celaya
e80b7448f5 Merge pull request #1761 from acelaya-forks/feature/null-default-domain
Feature/null default domain
2023-04-23 15:57:02 +02:00
Alejandro Celaya
f129544f83 Update changelog 2023-04-23 15:22:40 +02:00
Alejandro Celaya
9fa291a32f Update shlink-common 2023-04-23 15:20:33 +02:00
Alejandro Celaya
d06e92ffc2 Created CLI test for short URL importing 2023-04-23 13:26:59 +02:00
Alejandro Celaya
1b83344995 Create CLI test checking default domain is ignored even if explicitly provided 2023-04-23 11:20:54 +02:00
Alejandro Celaya
cf49393ef2 Add --show-domain flag to list short URLs command 2023-04-23 11:19:05 +02:00
Alejandro Celaya
f2ecbceae9 Update changelog 2023-04-22 19:46:28 +02:00
Alejandro Celaya
c582eba753 Make sure short URL domain is resolved as null when default one is provided 2023-04-22 19:44:04 +02:00
Alejandro Celaya
de86b62cdd Merge pull request #1759 from acelaya-forks/feature/fix-docker-build
Fix docker image build
2023-04-20 09:00:39 +02:00
Alejandro Celaya
73150471e9 Fix docker image build 2023-04-19 18:57:35 +02:00
Alejandro Celaya
ec751f4ac2 Merge pull request #1758 from acelaya-forks/feature/roadrunner-2023
Feature/roadrunner 2023
2023-04-19 08:11:18 +02:00
Alejandro Celaya
e652166289 Update changelog 2023-04-18 23:24:21 +02:00
Alejandro Celaya
a671d555cb Update to roadrunner 2023 2023-04-18 23:22:48 +02:00
Alejandro Celaya
6240554f4c Merge pull request #1757 from acelaya-forks/feature/shlink-json
Migrate to shlinkio/shlink-json
2023-04-18 23:14:11 +02:00
Alejandro Celaya
4ee9c9bbe3 Migrate to shlinkio/shlink-json 2023-04-18 23:04:58 +02:00
Alejandro Celaya
c830439085 Merge pull request #1752 from acelaya-forks/feature/phpunit-10.1
Update phpunit configs to fulfil v10.1
2023-04-14 09:55:38 +02:00
Alejandro Celaya
f2196583c8 Update phpunit configs to fulfil v10.1 2023-04-14 09:44:01 +02:00
Alejandro Celaya
3dbca2115c Merge pull request #1751 from acelaya-forks/feature/openswoole-22
Add support for openswoole 22
2023-04-14 09:16:47 +02:00
Alejandro Celaya
b45d8de27d Ignore openswoole dep on roadrunner tests CI 2023-04-14 09:02:17 +02:00
Alejandro Celaya
3ba46bbbfa Add support for openswoole 22 2023-04-14 08:58:54 +02:00
Alejandro Celaya
06f3f0c86c Merge pull request #1750 from acelaya-forks/feature/update-delete-artifacts
Update to geekyeggo/delete-artifact@2
2023-04-13 08:58:24 +02:00
Alejandro Celaya
06f07e3e40 Update to geekyeggo/delete-artifact@2 2023-04-12 19:13:35 +02:00
Alejandro Celaya
740740b8c6 Update to latest JamesIves/github-pages-deploy-action 2023-04-12 19:11:06 +02:00
Alejandro Celaya
b6ed39b18b Merge pull request #1749 from shlinkio/develop
Release 3.5.4
2023-04-12 19:03:25 +02:00
Alejandro Celaya
958c4704f8 Merge pull request #1748 from acelaya-forks/feature/create-error
Feature/create error
2023-04-12 18:52:18 +02:00
Alejandro Celaya
ef075fb0ce Fix test when CLI output viewport is too narrow 2023-04-12 18:36:28 +02:00
Alejandro Celaya
556520583a Update changelog 2023-04-12 18:31:57 +02:00
Alejandro Celaya
399c56a097 Print warning when trying to create short URL from CLI on openswoole in verbose mode 2023-04-12 18:30:02 +02:00
Alejandro Celaya
f078d95588 Capture error on real-time update when creating short URL 2023-04-12 09:25:01 +02:00
Alejandro Celaya
33911afcd6 Merge pull request #1744 from acelaya-forks/feature/regression-fix
Feature/regression fix
2023-04-11 19:13:08 +02:00
Alejandro Celaya
ae8d31e83f Add test case for deeplink long URLs 2023-04-11 17:24:38 +02:00
Alejandro Celaya
72c4052012 Be less restrictive when validating long URLs 2023-04-10 18:05:57 +02:00
Alejandro Celaya
f713a1fa7e Merge pull request #1737 from shlinkio/develop
Release 3.5.3
2023-03-31 22:07:51 +02:00
Alejandro Celaya
62488ac4e5 Merge pull request #1739 from acelaya-forks/feature/import-memory-leak
Feature/import memory leak
2023-03-31 10:00:36 +02:00
Alejandro Celaya
ab4c6e5fca Update changelog 2023-03-31 09:48:08 +02:00
Alejandro Celaya
26f4a969c9 Fix memory leak when importing big amounts of visits 2023-03-31 09:46:05 +02:00
Alejandro Celaya
703965915d Merge pull request #1736 from acelaya-forks/feature/lcobucci-jwt-5
Update to latest shlink-common
2023-03-30 18:45:39 +02:00
Alejandro Celaya
24e38a3cf9 Update to latest shlink-common 2023-03-30 18:33:53 +02:00
Alejandro Celaya
b12cfaedf3 Merge pull request #1730 from acelaya-forks/feature/validate-uris
Feature/validate uris
2023-03-25 13:29:36 +01:00
Alejandro Celaya
71807e698c Update changelog 2023-03-25 11:23:01 +01:00
Alejandro Celaya
1d155298c1 Fix API tests 2023-03-25 11:23:01 +01:00
Alejandro Celaya
4dfc5ae681 Fix DB tests 2023-03-25 11:23:01 +01:00
Alejandro Celaya
26f237069c Fixed unit tests 2023-03-25 11:23:01 +01:00
Alejandro Celaya
b6e1c65c4c Enforce a schema to be provided when short URLs are created 2023-03-25 11:23:00 +01:00
Alejandro Celaya
11f94b8306 Merge pull request #1723 from acelaya-forks/feature/tags-list-performance-join-tags
Feature/tags list performance join tags
2023-03-16 21:57:43 +01:00
Alejandro Celaya
01bcedef7a Simplify how ordering field is resolved in tags list 2023-03-04 11:54:30 +01:00
Alejandro Celaya
e51384fcc0 Reduce duplicated logic when checking if an API key is admin 2023-03-04 10:22:46 +01:00
Alejandro Celaya
83c53c8b2e Add correct index on visits potential_bot column 2023-03-04 09:51:14 +01:00
Alejandro Celaya
1afe08caed Simplify how limits are applied to tags query 2023-03-04 09:50:38 +01:00
Alejandro Celaya
7289833928 Move join on short URLs to tags sub-query 2023-03-03 12:10:41 +01:00
Alejandro Celaya
f4d10df0f3 Delete no longer used spec file 2023-02-27 09:28:27 +01:00
Alejandro Celaya
652b0df054 Use native query builders for all queries/sub-queries in tags list 2023-02-27 09:21:11 +01:00
Alejandro Celaya
0e9ea5027c Merge pull request #1705 from shlinkio/develop
Release 3.5.2
2023-02-16 19:36:59 +01:00
Alejandro Celaya
658303d375 Merge pull request #1706 from acelaya-forks/feature/fix-ms-ci
Comment-out unixodbc-dev installation in CI, as it's already present …
2023-02-16 19:33:08 +01:00
Alejandro Celaya
ccc3a4b584 Comment-out unixodbc-dev installation in CI, as it's already present in Ubuntu 22.04 2023-02-16 19:24:09 +01:00
Alejandro Celaya
ef5ac86e0a Add v3.5.2 to changelog 2023-02-15 20:25:55 +01:00
Alejandro Celaya
91b90b276a Merge pull request #1704 from acelaya-forks/feature/stronger-db-detection
Feature/stronger db detection
2023-02-15 19:19:11 +01:00
Alejandro Celaya
85c32c3c9a Fix CreateDatabaseCommandTest 2023-02-15 18:55:25 +01:00
Alejandro Celaya
40838255a7 Make sure database detection is not affected by the existence of foreign tables 2023-02-15 08:52:17 +01:00
Alejandro Celaya
a67ccb384f Merge pull request #1697 from acelaya-forks/feature/phpunit-10
Feature/phpunit 10
2023-02-13 19:15:33 +01:00
Alejandro Celaya
cb31e5a581 Update to phpcov 9 2023-02-13 19:05:27 +01:00
Alejandro Celaya
3c12a55872 Merge branch 'develop' into feature/phpunit-10 2023-02-13 11:54:49 +01:00
Alejandro Celaya
6da8b11674 Update changelog 2023-02-12 19:52:22 +01:00
Alejandro Celaya
552489611f Merge pull request #1700 from acelaya-forks/feature/optimize-tags-query
Feature/optimize tags query
2023-02-12 19:50:23 +01:00
Alejandro Celaya
e48d0f4f0c Upgrade deps for MSSQL tests 2023-02-12 19:08:20 +01:00
Alejandro Celaya
49b6063501 Fix ordering on Postgres 2023-02-12 13:35:05 +01:00
Alejandro Celaya
dd049feb40 Add migration with new index for short_url_id+potential_bot on visits table 2023-02-12 13:12:09 +01:00
Alejandro Celaya
76a86c452e Optimize tags list query performance by using more subqueries 2023-02-12 13:09:24 +01:00
Alejandro Celaya
41aec15fab Migrate new test to PHPUnit 10 2023-02-10 20:45:09 +01:00
Alejandro Celaya
245cb0e35d Fixed merge conflicts 2023-02-10 20:44:05 +01:00
Alejandro Celaya
7a0b1e8494 Merge pull request #1699 from acelaya-forks/feature/fix-robots-txt
Fix dependency injected in CrawlingHelper
2023-02-10 20:41:10 +01:00
Alejandro Celaya
70c1c9f018 Fix dependency injected in CrawlingHelper 2023-02-10 20:26:18 +01:00
Alejandro Celaya
97e965157b Update changelog 2023-02-09 20:43:07 +01:00
Alejandro Celaya
04bbd471ff Migrate from PHPUnit annotations to native attributes 2023-02-09 20:42:18 +01:00
Alejandro Celaya
650a286982 Update to PHPUnit 10 2023-02-09 09:32:38 +01:00
Alejandro Celaya
ad44a8441a Merge pull request #1694 from acelaya-forks/feature/fix-gha-deprecations
Fix usage of deprecated GitHub actions practices
2023-02-06 21:56:35 +01:00
Alejandro Celaya
b339cf2429 Fix usage of deprecated GitHub actions practices 2023-02-06 21:47:04 +01:00
Alejandro Celaya
9cd97c2f1e Merge pull request #1691 from shlinkio/develop
Release 3.5.1
2023-02-04 17:58:27 +01:00
Alejandro Celaya
a7f6b60cba Merge pull request #1690 from acelaya-forks/feature/uninitialized-prop
Update to latest shlink-common including the cache clear fix for redis replication
2023-02-04 17:51:04 +01:00
Alejandro Celaya
0d7dc50670 Update to latest shlink-common including the cache clear fix for redis replication 2023-02-04 17:40:44 +01:00
Alejandro Celaya
4bc5b9261f Merge pull request #1687 from acelaya-forks/feature/ms-case-sensitive
Feature/ms case sensitive
2023-01-30 11:16:13 +01:00
Alejandro Celaya
fb572d5abb Fix accidentally removed statement in new migration 2023-01-30 10:52:07 +01:00
Alejandro Celaya
8fa4219b30 Update changelog 2023-01-30 10:50:47 +01:00
Alejandro Celaya
a52d0cd419 Ensure short_code column is case sensitive in Microsoft SQL server 2023-01-30 10:49:47 +01:00
Alejandro Celaya
0080ab5132 Merge pull request #1686 from acelaya-forks/feature/loose-mode
Rename loosely mode to loose mode
2023-01-29 11:42:52 +01:00
Alejandro Celaya
8afa582aa5 Create ShortUrlModeTest 2023-01-29 11:32:13 +01:00
Alejandro Celaya
d847c7648e Rename loosely mode to loose mode 2023-01-29 10:30:34 +01:00
Alejandro Celaya
c140db16d1 Improve issue templates requesting roadrunner when appropriate 2023-01-29 09:53:47 +01:00
Alejandro Celaya
adbf7c6f5e Fix twitter badge 2023-01-28 11:15:46 +01:00
Alejandro Celaya
5cec697be3 Merge pull request #1683 from shlinkio/develop
Release 3.5.0
2023-01-28 11:10:49 +01:00
Alejandro Celaya
587bbfdd73 Add SemVer-compliant constraints for shlink libs 2023-01-28 10:48:34 +01:00
Alejandro Celaya
b3a2ceedea Merge pull request #1680 from acelaya-forks/feature/loosly-mode
Feature/loosly mode
2023-01-28 10:36:19 +01:00
Alejandro Celaya
621f18bf40 Recover DB test only for platforms in which it passes 2023-01-28 10:20:57 +01:00
Alejandro Celaya
99c1a59dd4 Refactor CustomSlugFilter for simplicity 2023-01-28 10:16:53 +01:00
Alejandro Celaya
3a149c9edc Update changelog 2023-01-28 10:09:54 +01:00
Alejandro Celaya
fdaf5fb2f3 Add support for short URL mode in installer, and handle loosely mode in custom slugs 2023-01-28 10:06:11 +01:00
Alejandro Celaya
2f83e90c8b Add option to do loosely matches on short URLs when mode is loosely 2023-01-26 20:45:36 +01:00
Alejandro Celaya
05acd4ae88 Add two modes for short URLs 2023-01-25 20:33:07 +01:00
Alejandro Celaya
87007677ed Merge pull request #1679 from acelaya-forks/feature/deprecate-url-validation
Deprecated validateUrl option on short URL creation/edition
2023-01-23 20:45:13 +01:00
Alejandro Celaya
4ee0032c2a Deprecated validateUrl option on short URL creation/edition 2023-01-23 20:30:12 +01:00
Alejandro Celaya
06583a0bc1 Merge pull request #1677 from acelaya-forks/feature/openswoole-4.12.1
Updated to openswoole 4.12.1
2023-01-23 08:07:15 +01:00
Alejandro Celaya
024c9c1a7a Fixed paths glob patterns in some workflows 2023-01-22 21:01:46 +01:00
Alejandro Celaya
f3855dbc6f Updated to openswoole 4.12.1 2023-01-22 20:57:48 +01:00
Alejandro Celaya
758dac47c3 Merge pull request #1668 from acelaya-forks/feature/device-long-urls
Feature/device long urls
2023-01-22 12:50:33 +01:00
Alejandro Celaya
81393a76b4 Ensure GITHUB_TOKEN is exposed to roadrunner api tests workflow 2023-01-22 12:43:03 +01:00
Alejandro Celaya
9949bb654d Set more accurate swagger docs in terms of what props are required/nullable for device long URLs 2023-01-22 12:35:07 +01:00
Alejandro Celaya
b0b9902f40 Add unit test to cover device URLs edition, and fix bug thanks to it 2023-01-22 12:18:36 +01:00
Alejandro Celaya
5aa8de11f4 Update version on user agent used to validate URLsç 2023-01-22 12:00:16 +01:00
Alejandro Celaya
b18c9e495f Add API test for short URL edition with device long URLs 2023-01-22 11:47:45 +01:00
Alejandro Celaya
d3590234a3 Add API test for short URL creation with device long URLs 2023-01-22 11:36:00 +01:00
Alejandro Celaya
39adef8ab8 Make it impossible to create a short URL with an empty long URL 2023-01-22 11:27:16 +01:00
Alejandro Celaya
13e443880a Allow device long URLs to be removed from short URLs by providing null value 2023-01-22 11:03:05 +01:00
Alejandro Celaya
45961144b9 Update changelog 2023-01-22 09:47:15 +01:00
Alejandro Celaya
34129b8d24 Update async API docs with device long URLs 2023-01-21 12:09:38 +01:00
Alejandro Celaya
48bd97fe41 Return deviceLongUrls as part of the short URL data and document API changes 2023-01-21 12:05:54 +01:00
Alejandro Celaya
b1b67c497e Add logic to dynamically resolve the long URL to redirect to based on requesting device 2023-01-21 11:15:42 +01:00
Alejandro Celaya
237fb95b4b Update ShortUrlRedirectionBuilder to accept a request object instead of a raw query array 2023-01-21 10:37:12 +01:00
Alejandro Celaya
c1b7c6ba6c Updated to shlink-common with support for proxies for entities with public readonly props 2023-01-21 10:12:52 +01:00
Alejandro Celaya
d8add9291f Removed public readonly prop from entity, as it can cause errors when a proxy is generated 2023-01-21 10:12:52 +01:00
Alejandro Celaya
a93edf158e Added logic to persist device long URLs while creating/editing a short URL 2023-01-21 10:12:52 +01:00
Alejandro Celaya
fdadf3ba07 Created unit test for DeviceLongUrlsValidator 2023-01-21 10:12:52 +01:00
Alejandro Celaya
3e26f1113d Extract device long URL validation to its own validation class 2023-01-21 10:12:52 +01:00
Alejandro Celaya
822652cac3 Allow providing device long URLs during short URL edition 2023-01-21 10:12:52 +01:00
Alejandro Celaya
1447687ebe Add deviceLongUrls to short URL creation 2023-01-21 10:12:52 +01:00
Alejandro Celaya
12150f775d Created persistence for device long URLs 2023-01-21 10:12:52 +01:00
Alejandro Celaya
5f2f179581 Merge pull request #1675 from acelaya-forks/feature/gh-build-improve
Extract docker image building during CI to its own workflow
2023-01-21 10:11:48 +01:00
Alejandro Celaya
407134bab1 Extract docker image building during CI to its own workflow 2023-01-21 09:59:43 +01:00
Alejandro Celaya
de5b895fad Merge pull request #1672 from acelaya-forks/feature/domain
Replace references to doma.in with s.test
2023-01-19 09:30:28 +01:00
Alejandro Celaya
80e3f01562 Replace references to doma.in with s.test 2023-01-19 09:05:52 +01:00
Alejandro Celaya
6904dcfed0 Merge pull request #1665 from acelaya-forks/feature/openswoole-env
Add support to load openswoole-specific config via env vars
2023-01-12 20:10:21 +01:00
Alejandro Celaya
21863e8de6 Add support to load openswoole-specific config via env vars 2023-01-12 19:39:26 +01:00
Alejandro Celaya
d75be372cb Merge pull request #1657 from acelaya-forks/feature/extra-method-redirects
Feature/extra method redirects
2023-01-07 17:20:17 +01:00
Alejandro Celaya
edaf999bf5 Fixed constant assignment on enum which is not valid for PHP 8.1 2023-01-07 17:09:53 +01:00
Alejandro Celaya
3e98485c8b Updated to installer supporting redirect status codes 308 and 307 2023-01-07 17:02:34 +01:00
Alejandro Celaya
cc292886a6 Updated changelog 2023-01-07 13:55:46 +01:00
Alejandro Celaya
0c1b36d0d4 Added config post-processor which sets proper allowed methods based on redirect status codes 2023-01-07 13:51:35 +01:00
Alejandro Celaya
a06957e9fa Moved config post-processors to their own sub-namespace 2023-01-07 13:04:46 +01:00
Alejandro Celaya
390bc59d99 Added support for redirect status code 307 and 308 2023-01-07 11:27:15 +01:00
Alejandro Celaya
85464f0fbb Added ADR with options to support other HTTP methods in short URLs 2023-01-07 10:44:08 +01:00
Alejandro Celaya
42f7a68ba5 Updated dev container base images 2023-01-05 18:50:49 +01:00
Alejandro Celaya
e3397a7c90 Merge pull request #1652 from acelaya-forks/feature/extended-tags-stats
Feature/extended tags stats
2023-01-02 20:25:50 +01:00
Alejandro Celaya
46b4a21617 Fixed missing null check 2023-01-02 20:17:29 +01:00
Alejandro Celaya
fc0aba6311 Updated changelog 2023-01-02 20:03:30 +01:00
Alejandro Celaya
0b96a79c41 Updated async API docs 2023-01-02 20:02:50 +01:00
Alejandro Celaya
a5929ebb29 Added swagger docs for visits summary in tags with stats 2023-01-02 19:58:02 +01:00
Alejandro Celaya
ce9ec0d738 Fixed ordering in tags supporting more fields 2023-01-02 19:49:54 +01:00
Alejandro Celaya
961178fd82 Added amount of bots, non-bots and total visits to the list of tags with stats 2023-01-02 19:28:32 +01:00
Alejandro Celaya
49c73a9590 Merge pull request #1650 from acelaya-forks/feature/handle-malformed-body
Feature/handle malformed body
2023-01-02 13:54:52 +01:00
Alejandro Celaya
92c80e7833 Removed superfluous exception code by using named args 2023-01-02 13:47:16 +01:00
Alejandro Celaya
6d5bce0078 Updated changelog 2023-01-02 13:39:13 +01:00
Alejandro Celaya
112cbb9039 Added API test for malformed request JSON body 2023-01-02 13:38:04 +01:00
Alejandro Celaya
812c5f4993 Added new handled error for when request body is not valid JSON 2023-01-02 13:33:24 +01:00
Alejandro Celaya
921f303404 Merge pull request #1649 from acelaya-forks/feature/detailed-visits-stats
Feature/detailed visits stats
2023-01-02 13:11:20 +01:00
Alejandro Celaya
e0a9f8120c Fixed unintended change in phpdoc 2023-01-02 12:48:23 +01:00
Alejandro Celaya
8ecc241a4b Added API test for the visits stats endpoint 2023-01-02 12:45:08 +01:00
Alejandro Celaya
30e34151ed Updated changelog 2023-01-02 12:36:25 +01:00
Alejandro Celaya
d734578f74 Reflected changes to visits stats in the swagger docs 2023-01-02 12:35:15 +01:00
Alejandro Celaya
37c8328eed Added split info about bots, non-bots and total visits to the visits stats 2023-01-02 12:28:34 +01:00
Alejandro Celaya
e71f6bb528 Documented support for PHP 8.2 in readme 2022-12-29 16:35:20 +01:00
Alejandro Celaya
f7ae52f86e Fixed build badge in README 2022-12-17 10:59:42 +01:00
Alejandro Celaya
067d1cc41c Merge pull request #1637 from shlinkio/develop
Release 3.4.0
2022-12-16 22:55:02 +01:00
Alejandro Celaya
b97af7efb9 Added v3.4.0 to changelog 2022-12-16 22:33:16 +01:00
Alejandro Celaya
fd0ecc05b2 Merge pull request #1634 from acelaya-forks/feature/non-bot-count
Feature/non bot count
2022-12-16 21:02:22 +01:00
Alejandro Celaya
5b934c3f9a Updated changelog 2022-12-16 19:47:17 +01:00
Alejandro Celaya
c7a2f499e0 Added support to order short URLs list by amount of non-bot visits 2022-12-16 19:42:46 +01:00
Alejandro Celaya
713f7e7bc9 Added missing dock block 2022-12-16 18:18:09 +01:00
Alejandro Celaya
09078e4c6a Updated short URL API docs including new visitsSummary 2022-12-16 13:34:40 +01:00
Alejandro Celaya
1f66ec2af5 Fixed API tests 2022-12-16 10:53:44 +01:00
Alejandro Celaya
936e5b3b86 Fixed PublishingUpdatesGeneratorTest 2022-12-16 10:36:09 +01:00
Alejandro Celaya
99f28b569b Created method to get non-bot visits count for a short URL 2022-12-16 10:06:39 +01:00
Alejandro Celaya
0c83dea8b7 Merge pull request #1629 from acelaya-forks/feature/docker-8.2
Feature/docker 8.2
2022-12-14 18:55:37 +01:00
Alejandro Celaya
30edfdbdc5 Updated docker images to PHP 8.2 2022-12-14 15:01:00 +01:00
Alejandro Celaya
60ef98b836 Extracted method to find crawlable short codes to its own query object 2022-12-14 14:38:22 +01:00
Alejandro Celaya
73c8b53882 Split some logic from VisitRepository into its own injectable repository 2022-12-14 12:28:23 +01:00
Alejandro Celaya
425d8f0a3f Merge pull request #1628 from acelaya-forks/feature/split-repos-poc
Split short URL listing capabilities on its own repo and service
2022-12-13 20:48:34 +01:00
Alejandro Celaya
92a83b82a0 Split short URL listing capabilities on its own repo and service 2022-12-13 19:37:02 +01:00
Alejandro Celaya
d1ec15febf Merge pull request #1627 from acelaya-forks/feature/redis-credentials
Feature/redis credentials
2022-12-12 21:00:40 +01:00
Alejandro Celaya
dd345c82ea Updated changelog 2022-12-12 20:51:43 +01:00
Alejandro Celaya
2bf3e6a13b Addedsupport for credentials on redis 2022-12-12 20:50:21 +01:00
Alejandro Celaya
0b04476c99 Merge pull request #1622 from acelaya-forks/feature/filter-out-disabled
Feature/filter out disabled
2022-12-11 18:44:42 +01:00
Alejandro Celaya
229dc93132 Fixed typo 2022-12-11 18:36:46 +01:00
Alejandro Celaya
0952c488be Added exclusion flags to ListShortUrlsCommand 2022-12-11 18:33:40 +01:00
Alejandro Celaya
c4f28b3a32 Renamed ShortUrl::fromMeta to ShortUrl::create 2022-12-11 18:24:47 +01:00
Alejandro Celaya
201f25e0ad Improved API tests to cover exlucding disabled URLs from lists 2022-12-11 13:38:11 +01:00
Alejandro Celaya
0c3523c34a Fixed E2E test suites 2022-12-11 13:22:16 +01:00
Alejandro Celaya
0d7a0ee9ea Fixed more coding styles 2022-12-11 13:11:43 +01:00
Alejandro Celaya
931bdb0cd7 Fixed coding styles 2022-12-11 13:03:19 +01:00
Alejandro Celaya
8807a78463 Improved performance when filtering out shortUrls which reached their limit by using a sub-query 2022-12-11 13:00:06 +01:00
Alejandro Celaya
d832133410 Enhanced db tests for expired short urls filtering 2022-12-11 12:33:17 +01:00
Alejandro Celaya
cdde59b543 Added db test for filtering of disabled short URLs 2022-12-11 11:41:37 +01:00
Alejandro Celaya
463dfe9729 Added support to filter out expired short URLs from list 2022-12-11 10:26:04 +01:00
Alejandro Celaya
805c8c87ba Fixed nasty typo 2022-12-10 19:59:30 +01:00
Alejandro Celaya
7ba2cfc010 Moved true before false in swagger docs 2022-12-10 19:59:30 +01:00
Alejandro Celaya
40794c476f Updated API docs with new short URLs list filters 2022-12-10 19:59:30 +01:00
Alejandro Celaya
c3ab871366 Exposed new short URLs list filtering params 2022-12-10 19:59:30 +01:00
Alejandro Celaya
42a5296f93 Added new params to short URLs list to filter out 'disabled' short ones 2022-12-10 19:59:30 +01:00
Alejandro Celaya
183db4ff80 Merge pull request #1626 from acelaya-forks/feature/fix-ms-sql
Feature/fix ms sql
2022-12-10 19:57:50 +01:00
Alejandro Celaya
0bc9bd9281 Added TrustServerCertificate=true to mssql connections 2022-12-10 19:40:33 +01:00
Alejandro Celaya
9bed7ef156 Updated docker images to MS ODBC 18 for PDO MSSQL 2022-12-10 19:15:38 +01:00
Alejandro Celaya
8f68e4b9f5 Merge pull request #1624 from acelaya-forks/feature/php-8.2-full-support
Feature/php 8.2 full support
2022-12-10 18:37:18 +01:00
Alejandro Celaya
6589c8fce6 Downgraded docker images to latest php 8.1 2022-12-10 17:58:10 +01:00
Alejandro Celaya
38b313a25d Updated changelog 2022-12-10 17:30:35 +01:00
Alejandro Celaya
dab0ebeb99 Updated dockerimages to PHP 8.2 and added full support for this version 2022-12-10 17:29:52 +01:00
Alejandro Celaya
27bf7220b9 Merge pull request #1623 from acelaya-forks/feature/fix-flush-redis
Added missing namespace for cache adapters, causing full cache to be …
2022-12-10 10:21:46 +01:00
Alejandro Celaya
e68ef87c66 Renamed config file from redis to cache 2022-12-10 10:12:56 +01:00
Alejandro Celaya
29b747c192 Added missing namespace for cache adapters, causing full cache to be flushed in some circumstances 2022-12-10 10:11:25 +01:00
Alejandro Celaya
2047d6b772 Merge pull request #1621 from acelaya-forks/feature/default-domain-search
Feature/default domain search
2022-12-08 20:43:42 +01:00
Alejandro Celaya
71e7938b7a Updated changelog 2022-12-08 20:33:59 +01:00
Alejandro Celaya
6bce219eb3 Added test to cover searching short URLs by default domain 2022-12-08 20:32:48 +01:00
Alejandro Celaya
dfcac525bc Enabled search by default domain 2022-12-08 20:22:50 +01:00
Alejandro Celaya
da307aee0a Merge pull request #1620 from acelaya-forks/feature/empty-domain-fix
Feature/empty domain fix
2022-12-07 19:15:29 +01:00
Alejandro Celaya
edf2b5b4c2 Updated changelog 2022-12-07 19:06:58 +01:00
Alejandro Celaya
f41d947cf7 Ensured empty string is ignored as the domain during short URL creation 2022-12-07 19:06:05 +01:00
Alejandro Celaya
54bc169525 Merge pull request #1619 from acelaya-forks/feature/import-orphan-visits
Feature/import orphan visits
2022-12-05 15:03:28 +01:00
Alejandro Celaya
05d55c4000 Added one more case to cover import orphan visits when visits already exist 2022-12-05 14:48:24 +01:00
Alejandro Celaya
739f5eb421 Added test for orphan visits import 2022-12-05 14:42:26 +01:00
Alejandro Celaya
0aab1bdc4e Added test for findMostRecentOrphanVisit 2022-12-04 20:42:28 +01:00
Alejandro Celaya
47f99cf6cc Updated changelog 2022-12-04 20:38:07 +01:00
Alejandro Celaya
55c9773a02 Added logic to import orphan visits 2022-12-04 20:35:38 +01:00
Alejandro Celaya
4b66aaba5c Updated to latest shlink-importer 2022-12-04 12:28:44 +01:00
Alejandro Celaya
4223408090 Updated to common-config with support for valinor 1.0.0 2022-11-28 15:47:59 +01:00
Alejandro Celaya
58e6b0b683 Added badge for Mastodon follow 2022-11-17 19:57:47 +01:00
Alejandro Celaya
891438c672 Updated shlink-config 2022-11-11 16:33:02 +01:00
Alejandro Celaya
910864eaaf Reduced required MSI to 80 2022-11-05 10:54:12 +01:00
Alejandro Celaya
598c0757be Merge pull request #1587 from acelaya-forks/feature/phpstan-phpunit
Feature/phpstan phpunit
2022-10-24 20:34:11 +02:00
Alejandro Celaya
01e0a95e14 Added rest of tests to phpstan check 2022-10-24 20:25:06 +02:00
Alejandro Celaya
f459a99e7e Added db tests to phpstan checks 2022-10-24 20:14:48 +02:00
Alejandro Celaya
85e18a4754 Fixed all phpstan inspections on tests 2022-10-24 20:11:25 +02:00
Alejandro Celaya
1650499a38 Added more stricter types for mocks 2022-10-24 19:59:03 +02:00
Alejandro Celaya
51f243995a Added stricter types for mocks 2022-10-24 19:53:13 +02:00
Alejandro Celaya
aeafb244d9 Merge pull request #1586 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-23 23:18:49 +02:00
Alejandro Celaya
142417dda1 Updated changelog 2022-10-23 23:08:54 +02:00
Alejandro Celaya
da658185c3 Fixed coding styles 2022-10-23 23:07:50 +02:00
Alejandro Celaya
ef82158368 Migrated ApiKeyServiceTest to use PHPUnit mocks 2022-10-23 23:07:17 +02:00
Alejandro Celaya
083ccd36b7 Migrated OverrideDomainMiddlewareTest to use PHPUnit mocks 2022-10-23 23:00:57 +02:00
Alejandro Celaya
d61c79da84 Migrated DropDefaultDomainFromRequestMiddlewareTest to use PHPUnit mocks 2022-10-23 22:56:12 +02:00
Alejandro Celaya
8f76c3e202 Migrated DefaultShortCodesLengthMiddlewareTest to use PHPUnit mocks 2022-10-23 22:55:11 +02:00
Alejandro Celaya
23aa7a015c Migrated CreateShortUrlContentNegotiationMiddlewareTest to use PHPUnit mocks 2022-10-23 22:53:48 +02:00
Alejandro Celaya
674a4416cf Migrated NotConfiguredMercureErrorHandlerTest to use PHPUnit mocks 2022-10-23 22:51:38 +02:00
Alejandro Celaya
db85915c2f Migrated BackwardsCompatibleProblemDetailsHandlerTest to use PHPUnit mocks 2022-10-23 22:48:30 +02:00
Alejandro Celaya
dfc8e8d74e Migrated CrossDomainMiddlewareTest to use PHPUnit mocks 2022-10-23 22:47:34 +02:00
Alejandro Celaya
b2b424a4ed Migrated BodyParserMiddlewareTest to use PHPUnit mocks 2022-10-23 22:45:23 +02:00
Alejandro Celaya
3433899577 Migrated AuthenticationMiddlewareTest to use PHPUnit mocks 2022-10-23 22:40:14 +02:00
Alejandro Celaya
b1f814e118 Migrated InitialApiKeyDelegatorTest to use PHPUnit mocks 2022-10-23 22:36:16 +02:00
Alejandro Celaya
7aa6afeb30 Migrated TagVisitsActionTest to use PHPUnit mocks 2022-10-23 22:28:29 +02:00
Alejandro Celaya
d414496a3c Migrated ShortUrlVisitsActionTest to use PHPUnit mocks 2022-10-23 22:27:27 +02:00
Alejandro Celaya
d4684fd01f Migrated OrphanVisitsActionTest to use PHPUnit mocks 2022-10-23 22:25:54 +02:00
Alejandro Celaya
bb444a02fe Migrated NonOrphanVisitsActionTest to use PHPUnit mocks 2022-10-23 22:24:06 +02:00
Alejandro Celaya
e980a8d121 Migrated GlobalVisitsActionTest to use PHPUnit mocks 2022-10-23 22:23:08 +02:00
Alejandro Celaya
f493baaf2b Migrated DomainVisitsActionTest to use PHPUnit mocks 2022-10-23 22:22:14 +02:00
Alejandro Celaya
28f26920dd Migrated UpdateTagActionTest to use PHPUnit mocks 2022-10-23 22:21:23 +02:00
Alejandro Celaya
69e994c067 Migrated TagsStatsActionTest to use PHPUnit mocks 2022-10-23 22:20:21 +02:00
Alejandro Celaya
656083cb6f Migrated ListTagsActionTest to use PHPUnit mocks 2022-10-23 22:19:14 +02:00
Alejandro Celaya
ab9ea887d2 Migrated DeleteTagsActionTest to use PHPUnit mocks 2022-10-23 22:17:35 +02:00
Alejandro Celaya
9ac6a50e66 Migrated SingleStepCreateShortUrlActionTest to use PHPUnit mocks 2022-10-23 22:16:19 +02:00
Alejandro Celaya
acc9cb94b5 Migrated ResolveShortUrlActionTest to use PHPUnit mocks 2022-10-23 22:14:28 +02:00
Alejandro Celaya
01829c82ee Migrated ListShortUrlsActionTest to use PHPUnit mocks 2022-10-23 22:13:27 +02:00
Alejandro Celaya
9c02ea8799 Migrated EditShortUrlActionTest to use PHPUnit mocks 2022-10-23 22:12:27 +02:00
Alejandro Celaya
d202538581 Migrated DeleteShortUrlActionTest to use PHPUnit mocks 2022-10-23 22:10:41 +02:00
Alejandro Celaya
a84b642ba5 Migrated CreateShortUrlActionTest to use PHPUnit mocks 2022-10-23 22:09:37 +02:00
Alejandro Celaya
74176c298f Migrated ListDomainsActionTest to use PHPUnit mocks 2022-10-23 22:06:48 +02:00
Alejandro Celaya
91e21441f7 Migrated DomainRedirectsActionTest to use PHPUnit mocks 2022-10-23 22:05:51 +02:00
Alejandro Celaya
896b7f2d73 Migrated MercureInfoActionTest to use PHPUnit mocks 2022-10-23 22:04:00 +02:00
Alejandro Celaya
66ed152358 Migrated HealthActionTest to use PHPUnit mocks 2022-10-23 22:02:31 +02:00
Alejandro Celaya
257134cd80 Migrated VisitsForTagPaginatorAdapterTest to use PHPUnit mocks 2022-10-23 21:59:18 +02:00
Alejandro Celaya
a4373aee91 Migrated OrphanVisitsPaginatorAdapterTest to use PHPUnit mocks 2022-10-23 21:56:34 +02:00
Alejandro Celaya
7442905873 Migrated NonOrphanVisitsPaginatorAdapterTest to use PHPUnit mocks 2022-10-23 21:55:06 +02:00
Alejandro Celaya
d3af51f684 Migrated VisitToLocationHelperTest to use PHPUnit mocks 2022-10-23 21:24:30 +02:00
Alejandro Celaya
04419a7242 Migrated VisitLocatorTest to use PHPUnit mocks 2022-10-23 21:21:23 +02:00
Alejandro Celaya
a45d6e6b44 Migrated VisitsTrackerTest to use PHPUnit mocks 2022-10-23 21:08:58 +02:00
Alejandro Celaya
37b1306eb3 Migrated VisitsStatsHelperTest to use PHPUnit mocks 2022-10-23 21:05:13 +02:00
Alejandro Celaya
cff6573767 Migrated RequestTrackerTest to use PHPUnit mocks 2022-10-23 20:45:56 +02:00
Alejandro Celaya
a2f34e02ad Migrated UrlValidatorTest to use PHPUnit mocks 2022-10-23 20:39:06 +02:00
Alejandro Celaya
796543d194 Migrated DoctrineBatchHelperTest to use PHPUnit mocks 2022-10-23 20:32:13 +02:00
Alejandro Celaya
3b25fb27fe Migrated TagsPaginatorAdapterTest to use PHPUnit mocks 2022-10-23 20:28:45 +02:00
Alejandro Celaya
3b20f955ff Migrated TagsInfoPaginatorAdapterTest to use PHPUnit mocks 2022-10-23 20:27:51 +02:00
Alejandro Celaya
c81ae9c40d Migrated TagServiceTest to use PHPUnit mocks 2022-10-23 20:26:44 +02:00
Alejandro Celaya
7ceae7af87 Merge pull request #1585 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-23 20:19:22 +02:00
Alejandro Celaya
5e02cfe375 Fixed coding styles 2022-10-23 18:29:32 +02:00
Alejandro Celaya
6e836b5fd9 Migrated PersistenceShortUrlRelationResolverTest to use PHPUnit mocks 2022-10-23 18:28:28 +02:00
Alejandro Celaya
8753e3a77f Migrated ShortUrlRepositoryAdapterTest to use PHPUnit mocks 2022-10-23 18:17:29 +02:00
Alejandro Celaya
6a2227efc5 Removed all uinnecessary usages of equalsTo param constraint 2022-10-23 18:15:57 +02:00
Alejandro Celaya
1fbcea7a06 Migrated ExtraPathRedirectMiddlewareTest to use PHPUnit mocks 2022-10-23 17:53:09 +02:00
Alejandro Celaya
168c839cf1 Migrated TrimTrailingSlashMiddlewareTest to use PHPUnit mocks 2022-10-23 17:39:57 +02:00
Alejandro Celaya
162e913cc4 Migrated ShortUrlTitleResolutionHelperTest to use PHPUnit mocks 2022-10-23 17:38:04 +02:00
Alejandro Celaya
5aaf50d68e Migrated ShortCodeUniquenessHelperTest to use PHPUnit mocks 2022-10-23 17:35:50 +02:00
Alejandro Celaya
d2f5be1d18 Migrated UrlShortenerTest to use PHPUnit mocks 2022-10-23 11:32:13 +02:00
Alejandro Celaya
36ab455a49 Migrated ShortUrlServiceTest to use PHPUnit mocks 2022-10-23 11:14:01 +02:00
Alejandro Celaya
ee8cab8455 Migrated ShortUrlResolverTest to use PHPUnit mocks 2022-10-23 11:09:40 +02:00
Alejandro Celaya
bd884e85d4 Migrated DeleteShortUrlServiceTest to use PHPUnit mocks 2022-10-23 11:03:47 +02:00
Alejandro Celaya
5ceb6fb740 No longer let pipelines pass on error with PHP 8.2 2022-10-23 11:00:50 +02:00
Alejandro Celaya
0d6155e8bc Merge pull request #1584 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-22 20:51:01 +02:00
Alejandro Celaya
a78c59c11a Fixed coding styles 2022-10-22 20:41:17 +02:00
Alejandro Celaya
173420c608 Migrated ImportedLinksProcessorTest to use PHPUnit mocks 2022-10-22 20:39:55 +02:00
Alejandro Celaya
10b0ec301b Migrated ValidationExceptionTest to use PHPUnit mocks 2022-10-22 20:05:06 +02:00
Alejandro Celaya
1706a869d9 Migrated NotifyVisitToRedisTest to use PHPUnit mocks 2022-10-22 20:04:12 +02:00
Alejandro Celaya
d0393799d2 Migrated NotifyNewShortUrlToRedisTest to use PHPUnit mocks 2022-10-22 19:59:32 +02:00
Alejandro Celaya
739433ba8b Migrated NotifyVisitToRabbitMqTest to use PHPUnit mocks 2022-10-22 19:05:34 +02:00
Alejandro Celaya
a15e9c29c8 Migrated NotifyNewShortUrlToRabbitMqTest to use PHPUnit mocks 2022-10-22 18:49:43 +02:00
Alejandro Celaya
d58f89aa26 Merge pull request #1583 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-22 15:14:57 +02:00
Alejandro Celaya
b7671f70da Fixed coding styles 2022-10-22 14:41:42 +02:00
Alejandro Celaya
52366b9dd4 Removed last reference to prophecytrait in CLI module 2022-10-22 14:41:22 +02:00
Alejandro Celaya
32417e40cb Migrated ShlinkTableTest to use PHPUnit mocks 2022-10-22 14:40:35 +02:00
Alejandro Celaya
4cb44be9a0 Migrated ProcessRunnerTest to use PHPUnit mocks 2022-10-22 14:37:13 +02:00
Alejandro Celaya
a484455b0b Migrated GeolocationDbUpdaterTest to use PHPUnit mocks 2022-10-22 14:27:07 +02:00
Alejandro Celaya
4b3ed2b7ba Migrated LocateVisitsCommandTest to use PHPUnit mocks 2022-10-22 14:16:42 +02:00
Alejandro Celaya
e2986a7b4c Migrated GetOrphanVisitsCommandTest to use PHPUnit mocks 2022-10-22 14:06:54 +02:00
Alejandro Celaya
82e04800aa Migrated GetNonOrphanVisitsCommandTest to use PHPUnit mocks 2022-10-22 14:06:00 +02:00
Alejandro Celaya
5d367da626 Migrated DownloadGeoLiteDbCommandTest to use PHPUnit mocks 2022-10-22 14:02:38 +02:00
Alejandro Celaya
59de5a5f55 Migrated RenameTagCommandTest to use PHPUnit mocks 2022-10-22 13:53:45 +02:00
Alejandro Celaya
0855104068 Migrated ListTagsCommandTest to use PHPUnit mocks 2022-10-22 13:49:11 +02:00
Alejandro Celaya
8c6f97c4e2 Migrated GetTagVisitsCommandTest to use PHPUnit mocks 2022-10-22 13:47:28 +02:00
Alejandro Celaya
2d16856582 Migrated DeleteTagsCommandTest to use PHPUnit mocks 2022-10-22 13:45:11 +02:00
Alejandro Celaya
41e903cf26 Migrated ResolveUrlCommandTest to use PHPUnit mocks 2022-10-22 13:44:10 +02:00
Alejandro Celaya
4872bd3a92 Migrated ListShortUrlsCommandTest to use PHPUnit mocks 2022-10-22 13:42:46 +02:00
Alejandro Celaya
8b675f55cc Migrated GetShortUrlVisitsCommandTest to use PHPUnit mocks 2022-10-22 13:38:46 +02:00
Alejandro Celaya
acda7f02c6 Migrated DeleteShortUrlCommandTest to use PHPUnit mocks 2022-10-22 13:36:33 +02:00
Alejandro Celaya
184ff90b9f Migrated CreateShortUrlCommandTest to use PHPUnit mocks 2022-10-22 13:27:48 +02:00
Alejandro Celaya
d8be3c28cb Migrated ListDomainsCommandTest to use PHPUnit mocks 2022-10-22 13:21:54 +02:00
Alejandro Celaya
3d358ab046 Migrated GetDomainVisitsCommandTest to use PHPUnit mocks 2022-10-22 13:21:00 +02:00
Alejandro Celaya
960bdfc232 Migrated DomainRedirectsCommandTest to use PHPUnit mocks 2022-10-22 13:17:12 +02:00
Alejandro Celaya
101b4daff4 Migrated MigrateDatabaseCommandTest to use PHPUnit mocks 2022-10-22 13:08:05 +02:00
Alejandro Celaya
13431ff8cf Migrated CreateDatabaseCommandTest to use PHPUnit mocks 2022-10-22 13:05:36 +02:00
Alejandro Celaya
4cdcad29df Migrated ListKeysCommandTest to use PHPUnit mocks 2022-10-22 12:53:28 +02:00
Alejandro Celaya
a4c34ff7be Migrated GenerateKeyCommandTest to use PHPUnit mocks 2022-10-22 12:52:11 +02:00
Alejandro Celaya
2b7b5e9a8f Migrated DisableKeyCommandTest to use PHPUnit mocks 2022-10-22 12:48:17 +02:00
Alejandro Celaya
58db902084 Migrated CliTestUtilsTrait to use PHPUnit mocks 2022-10-22 12:46:16 +02:00
Alejandro Celaya
983e3c9eaa Merge pull request #1582 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-22 10:11:30 +02:00
Alejandro Celaya
dbe35cf567 Fixed coding styles 2022-10-22 10:03:28 +02:00
Alejandro Celaya
8298f9d491 Migrated NotifyVisitToMercureTest to use PHPUnit mocks 2022-10-22 10:03:05 +02:00
Alejandro Celaya
16a951b938 Migrated NotifyNewShortUrlToMercureTest to use PHPUnit mocks 2022-10-22 09:50:12 +02:00
Alejandro Celaya
51fcbfb3c2 Migrated UpdateGeoLiteDbTest to use PHPUnit mocks 2022-10-22 09:42:21 +02:00
Alejandro Celaya
e01e370d16 Migrated NotifyVisitToWebHooksTest to use PHPUnit mocks 2022-10-22 08:08:49 +02:00
Alejandro Celaya
736ac8ba90 Migrated LocateVisitTest to use PHPUnit mocks 2022-10-22 07:54:57 +02:00
Alejandro Celaya
d07104b8d9 Migrated LocateUnlocatedVisitsTest to use PHPUnit mocks 2022-10-22 07:34:38 +02:00
Alejandro Celaya
cad53e397a Migrated CloseDbConnectionEventListenerTest to use PHPUnit mocks 2022-10-22 07:32:37 +02:00
Alejandro Celaya
3608a6d068 Migrated CloseDbConnectionEventListenerDelegatorTest to use PHPUnit mocks 2022-10-22 07:28:15 +02:00
Alejandro Celaya
92ddd2eebe Merge pull request #1581 from acelaya-forks/feature/phpunit-mocks
Feature/phpunit mocks
2022-10-21 19:42:58 +02:00
Alejandro Celaya
bf0b58b344 Migrated NotFoundTypeResolverMiddlewareTest to use PHPUnit mocks 2022-10-21 19:32:25 +02:00
Alejandro Celaya
ff543b151c Migrated NotFoundTrackerMiddlewareTest to use PHPUnit mocks 2022-10-21 19:29:02 +02:00
Alejandro Celaya
d842025835 Migrated NotFoundTemplateHandlerTest to use PHPUnit mocks 2022-10-21 19:25:29 +02:00
Alejandro Celaya
230e56370a Migrated NotFoundRedirectHandlerTest to use PHPUnit mocks 2022-10-21 19:24:39 +02:00
Alejandro Celaya
a8514a9ae4 Migrated DomainServiceTest to use PHPUnit mocks 2022-10-21 19:01:41 +02:00
Alejandro Celaya
148f7a9cfe Migrated CrawlingHelperTest to use PHPUnit mocks 2022-10-21 18:49:47 +02:00
Alejandro Celaya
29d50cabc2 Migrated NotFoundRedirectResolverTest to use PHPUnit mocks 2022-10-21 18:47:10 +02:00
Alejandro Celaya
a8f8297131 Migrated RedirectActionTest to use PHPUnit mocks 2022-10-21 18:44:55 +02:00
Alejandro Celaya
cd4b632d75 Migrated QrActionTest to use PHPUnit mocks 2022-10-21 18:39:22 +02:00
Alejandro Celaya
843754b7e7 Migrated PixelActionTest to use PHPUnit mocks 2022-10-21 18:32:34 +02:00
Alejandro Celaya
847cc2bc50 Updated shlink-config 2022-10-19 14:19:03 +02:00
Alejandro Celaya
751bd15785 Fixed merge conflicts 2022-10-18 19:08:20 +02:00
Alejandro Celaya
c12db7567e Merge pull request #1577 from acelaya-forks/feature/fix-enum-hydration
Feature/fix enum hydration
2022-10-18 19:05:07 +02:00
Alejandro Celaya
e8069a10ba Updated changelog 2022-10-18 18:49:52 +02:00
Alejandro Celaya
9742bf13e4 Upgraded to latest doctrine/orm 2022-10-18 18:48:35 +02:00
Alejandro Celaya
6441707c76 Merge branch 'develop' of github.com:shlinkio/shlink into develop 2022-10-18 18:32:02 +02:00
Alejandro Celaya
23bcba4fd9 Updated shlink-ip-geolocation 2022-10-12 19:07:05 +02:00
Alejandro Celaya
9049a205b7 Merge pull request #1570 from acelaya-forks/feature/phpunit-mocks
Migrated to PHPUnit mocks in RobotsActionTest
2022-10-12 18:56:24 +02:00
Alejandro Celaya
8cfa0b595c Migrated to PHPUnit mocks in RobotsActionTest 2022-10-12 18:23:36 +02:00
Alejandro Celaya
4b958e8b87 Merge pull request #1568 from acelaya-forks/feature/phpunit-mocks-experiment
Used PHPUnit mocks in RoleResolverTest instead of prophezy
2022-10-12 12:55:34 +02:00
Alejandro Celaya
bcd5d2848d Used PHPUnit mocks in RoleResolverTest instead of prophezy 2022-10-12 12:47:58 +02:00
Alejandro Celaya
b59cbeceac Updated deps 2022-10-12 08:49:58 +02:00
Alejandro Celaya
46f948a584 Merge pull request #1565 from acelaya-forks/feature/command-reusable-args
Feature/command reusable args
2022-10-06 21:38:19 +02:00
Alejandro Celaya
14bf3a134b Updated changelog 2022-10-06 21:30:23 +02:00
Alejandro Celaya
1557438fdf Moved logic to reuse command options to option classes instead of base abstract command classes 2022-10-06 21:29:27 +02:00
Alejandro Celaya
27b680e0cd Created CLI test for short URLs list 2022-10-06 21:01:11 +02:00
Alejandro Celaya
14314ef939 Updated shlink deps 2022-10-06 19:49:32 +02:00
Alejandro Celaya
bf5c168d7d Merge pull request #1560 from acelaya-forks/feature/openswoole-4.12
Updated to openswoole 4.12
2022-10-03 20:26:25 +02:00
Alejandro Celaya
1e0791416d Downgraded openswoole ide helper 2022-10-03 20:05:43 +02:00
Alejandro Celaya
ab8d42b609 Updated to openswoole 4.12 in main Dockerfile 2022-10-03 20:01:46 +02:00
Alejandro Celaya
96dbdbe7c9 Updated to openswoole 4.12 2022-10-03 20:00:31 +02:00
Alejandro Celaya
6f135ad6ab Fixed typo 2022-09-30 17:45:36 +02:00
Alejandro Celaya
5b9a1e1978 Merge pull request #1559 from shlinkio/develop
Release 3.3.1
2022-09-30 17:37:29 +02:00
Alejandro Celaya
4ba3522e79 Merge pull request #1558 from acelaya-forks/feature/multisegment-trailing-slash
Feature/multisegment trailing slash
2022-09-30 17:35:01 +02:00
Alejandro Celaya
d3faa22b78 Fixed usage of enum where the enum's value should be used 2022-09-30 17:26:22 +02:00
Alejandro Celaya
1daad334a5 Updated changelog 2022-09-30 17:21:27 +02:00
Alejandro Celaya
3dda49dab4 Created middleware which ensures trailing slash and multi-segment features work properly together 2022-09-30 17:19:07 +02:00
Alejandro Celaya
c6c4e5580b Merge pull request #1554 from acelaya-forks/feature/php-8.2
Added PHP 8.2 to build matrixes
2022-09-24 08:26:54 +02:00
Alejandro Celaya
3f808e3813 Updated changelog 2022-09-24 08:17:14 +02:00
Alejandro Celaya
e5107c40f9 Ignored platform req during roadrunner API tests in CI workflow when using PHP 8.2 2022-09-24 08:14:59 +02:00
Alejandro Celaya
0871ca884e Fixed typo 2022-09-24 08:06:41 +02:00
Alejandro Celaya
62ce9311bf Added PHP 8.2 to build matrixes 2022-09-24 08:03:38 +02:00
Alejandro Celaya
70b15a7ab0 Merge pull request #1553 from acelaya-forks/feature/organize-namespaces
Feature/organize namespaces
2022-09-24 07:35:53 +02:00
Alejandro Celaya
708bff20f0 Updated changelog 2022-09-23 19:09:38 +02:00
Alejandro Celaya
369628ee95 Migrated infection config files to json5 2022-09-23 19:08:54 +02:00
Alejandro Celaya
0c6f8f1136 Refactored global entities into their own proper namespaces 2022-09-23 19:03:32 +02:00
Alejandro Celaya
9f9d011d46 Moved ShortCodeUniquenessHelper to ShortUrl\Helper namespace 2022-09-23 18:46:51 +02:00
Alejandro Celaya
e28b73c130 Refactored global services into their own proper namespaces 2022-09-23 18:42:38 +02:00
Alejandro Celaya
56f953ab2f Refactored global validations into their own proper namespaces 2022-09-23 18:30:07 +02:00
Alejandro Celaya
3ad8be175c Refactored global repositories into their own proper namespaces 2022-09-23 18:24:14 +02:00
Alejandro Celaya
f5f990511c Refactored global models into their own proper namespaces 2022-09-23 18:05:17 +02:00
Alejandro Celaya
1e3ccba503 Merge pull request #1552 from acelaya-forks/feature/visit-geolocation-namespace
Feature/visit geolocation namespace
2022-09-23 15:07:42 +02:00
Alejandro Celaya
a842b5b7cd Updated changelog 2022-09-23 14:58:00 +02:00
Alejandro Celaya
909e42b0be Moved services related to geolocating visits to the Visit\Geolocation namespace 2022-09-23 14:50:26 +02:00
Alejandro Celaya
c8acb5de68 Merge pull request #1549 from shlinkio/develop
Release 3.3.0
2022-09-18 19:36:55 +02:00
Alejandro Celaya
53b9e3ddc1 Merge pull request #1548 from acelaya-forks/feature/deferred-geolite-download
Feature/deferred geolite download
2022-09-18 19:35:00 +02:00
Alejandro Celaya
68e1c61e7f Removed unnecessary ADR entry 2022-09-18 19:28:14 +02:00
Alejandro Celaya
8605b35b57 Removed unneeded injected dependency 2022-09-18 19:22:57 +02:00
Alejandro Celaya
36680e82aa Reduced duplication in LocateVisitsCommand by reusing VisitToLocationHelper 2022-09-18 19:21:59 +02:00
Alejandro Celaya
83b7d5a5f1 Extracted logic to geolocate a visit, handling possible domain errors 2022-09-18 18:44:01 +02:00
Alejandro Celaya
fe41e9d573 Updated changelog 2022-09-18 17:12:21 +02:00
Alejandro Celaya
d76e6647d2 Added real version for composer dependencies 2022-09-18 17:10:11 +02:00
Alejandro Celaya
6f17f70137 Allowed to delay GeoLite2 db download on docker images 2022-09-18 17:00:03 +02:00
Alejandro Celaya
ef01754ad5 Added event dispatching to UpdateGeoLiteDb dispatcher so that it locates visits when file has just been created 2022-09-18 11:17:17 +02:00
Alejandro Celaya
eab9347522 Created enum to determine what was the result of updating a geolite DB 2022-09-18 10:31:14 +02:00
Alejandro Celaya
59bcd62717 Moved Geolocation services to its own namespace inside CLI module 2022-09-18 10:01:22 +02:00
Alejandro Celaya
3f01fad12f Ensured empty initial PAI keys are discarded 2022-09-18 09:29:38 +02:00
Alejandro Celaya
c7f0d14c1b Merge pull request #1546 from acelaya-forks/feature/immutable-options
Feature/immutable options
2022-09-17 16:02:36 +02:00
Alejandro Celaya
2408829627 Updated changelog 2022-09-17 15:55:54 +02:00
Alejandro Celaya
8d244c8d34 Migrated UrlShortenerOptions to immutable object 2022-09-17 15:54:43 +02:00
Alejandro Celaya
42af057316 Migrated RedirectOptions to immutable object 2022-09-17 15:36:40 +02:00
Alejandro Celaya
8f68078835 Migrated RabbitMqOptions to immutable object 2022-09-17 13:56:59 +02:00
Alejandro Celaya
0c34032fd3 Migrated QrCodeOptions to immutable object 2022-09-17 13:45:09 +02:00
Alejandro Celaya
20f457a3e9 Migrated NotFoundRedirectOptions to immutable object 2022-09-17 13:32:40 +02:00
Alejandro Celaya
39693ca1fe Added --thread=max to infection command 2022-09-17 13:19:17 +02:00
Alejandro Celaya
784908420e Migrated DeleteShortUrlsOptions to immutable object 2022-09-17 13:04:49 +02:00
Alejandro Celaya
9685929824 Migrated AppOptions to immutable object 2022-09-17 13:01:28 +02:00
Alejandro Celaya
fe4b2c4ae4 Migrated TrackingOptions to immutable object 2022-09-17 12:57:04 +02:00
Alejandro Celaya
5f87bb13f8 Fixed tracking config 2022-09-17 11:27:56 +02:00
Alejandro Celaya
a87f6c6709 Merge pull request #1541 from acelaya-forks/feature/initial-api-key
Feature/initial api key
2022-09-11 13:23:44 +02:00
Alejandro Celaya
da3ee6b65e Updated installer with support for API key generation 2022-09-11 13:14:36 +02:00
Alejandro Celaya
c5eda37bda Updated changelog 2022-09-11 12:36:47 +02:00
Alejandro Celaya
1966367caf Fixed ApiKeyRepository for MS and Postgres 2022-09-11 12:33:28 +02:00
Alejandro Celaya
eed7b6e565 Added db test for ApiKeyRepository 2022-09-11 12:18:04 +02:00
Alejandro Celaya
0e54ed691d Created InitialApiKeyDelegatorTest 2022-09-11 12:11:39 +02:00
Alejandro Celaya
997289da02 Changed all public setUp methods in tests to be protected 2022-09-11 12:02:49 +02:00
Alejandro Celaya
c841e57db5 Reduced duplication in ApiKeyRepository 2022-09-11 11:59:49 +02:00
Alejandro Celaya
f5138385be Created new env var to programatically provide an initial API key 2022-09-11 10:45:03 +02:00
Alejandro Celaya
63ceba199d Removed mention to improvement on mutation tests in changelog 2022-09-11 09:03:25 +02:00
Alejandro Celaya
e6ee4ceae2 Simplified mapping of TagInfo objects 2022-09-08 20:50:11 +02:00
Alejandro Celaya
19a9d815eb Merge pull request #1538 from acelaya-forks/feature/doctrine-cli
Feature/doctrine cli
2022-09-08 17:42:38 +02:00
Alejandro Celaya
5b78b363f0 Updated changelog 2022-09-08 14:11:01 +02:00
Alejandro Celaya
b078c00492 Migrated to custom doctrine cli entry point, as the built-in is deprecated 2022-09-08 14:10:09 +02:00
Alejandro Celaya
e712efd008 Simplified exception 2022-09-06 21:56:18 +02:00
Alejandro Celaya
ab27c0ce53 Merge pull request #1532 from acelaya-forks/feature/trailing-slash-support
Feature/trailing slash support
2022-09-05 21:21:09 +02:00
Alejandro Celaya
d97cabbe79 Updated changelog 2022-09-05 21:14:53 +02:00
Alejandro Celaya
c3c7ffad25 Updated to installer supporting trailing slash option 2022-09-05 21:12:05 +02:00
Alejandro Celaya
fe4329d730 Allowed trailing slashes support to be enabled for the short URLs route 2022-09-05 20:59:16 +02:00
Alejandro Celaya
c53ba7b119 Exported defaults for env vars in docker only when the runtime is RoadRunner 2022-09-03 17:02:57 +02:00
Alejandro Celaya
025eec6c70 Merge remote-tracking branch 'upstream/develop' into develop 2022-08-28 10:20:26 +02:00
Alejandro Celaya
40e1670314 Fixed default port in docker entry point 2022-08-28 10:18:02 +02:00
Alejandro Celaya
2bca260627 What're RoadRunner docker images is not tried to build for arm/v7 2022-08-27 21:49:20 +02:00
Alejandro Celaya
463d8e8950 Updated changelog 2022-08-27 19:51:59 +02:00
Alejandro Celaya
e2eed8a728 Merge pull request #1523 from acelaya-forks/feature/roadrunner-support
Feature/roadrunner support
2022-08-27 19:48:48 +02:00
Alejandro Celaya
f97effcfe0 Fixed rr E2E tests 2022-08-27 19:40:52 +02:00
Alejandro Celaya
2cf21ab3bd Fixed openswoole E2E tests 2022-08-27 19:38:05 +02:00
Alejandro Celaya
7daa602630 Removed accidental flag in build script 2022-08-27 17:51:14 +02:00
Alejandro Celaya
7b637d6a61 Ensured RoadRunner deps are removed when building openswoole dist file 2022-08-27 17:48:59 +02:00
Alejandro Celaya
a4f979be08 Enabled support for static files from public dir via RoadRunner 2022-08-27 17:27:54 +02:00
Alejandro Celaya
8852739111 Ensured some dynamic RR config for prod env, based on env vars 2022-08-27 17:17:37 +02:00
Alejandro Celaya
2099ea16ec Added stage to build docker images for roadrunner 2022-08-27 13:14:27 +02:00
Alejandro Celaya
a739eb6d60 Added support to build the docker image with RoadRunner instead of openswoole 2022-08-27 13:01:38 +02:00
Alejandro Celaya
529ddacafe Removed usage of bash again from tests in CI, as it does nothing really 2022-08-27 09:54:15 +02:00
Alejandro Celaya
f71c95b74a Another attempt to make API tests script sh compatible 2022-08-27 09:49:32 +02:00
Alejandro Celaya
8260a0843b Undone changes for sh on API tests 2022-08-27 09:43:20 +02:00
Alejandro Celaya
bfbeb7b1fb Improved run-api-tests.sh script to make it compatible with sh 2022-08-27 09:36:37 +02:00
Alejandro Celaya
df70810aa6 Ensured tests are run in bash in CI 2022-08-27 09:23:45 +02:00
Alejandro Celaya
aca5804f98 Fixed usage of inputs instead of matrix on CI workflow 2022-08-27 09:21:17 +02:00
Alejandro Celaya
b7f7288a4b Fixed reference to unknown job in CI workflow 2022-08-27 09:19:55 +02:00
Alejandro Celaya
d54a2bde0f Fixed reference to unknown job in CI workflow 2022-08-27 09:18:46 +02:00
Alejandro Celaya
679bb8d357 Added API tests over roadrunner on CI 2022-08-27 09:15:58 +02:00
Alejandro Celaya
ca515998e4 Added support to run API tests on roadrunner 2022-08-27 09:09:14 +02:00
Alejandro Celaya
c5b6d203f5 Simplified RoadRunner worker, and fixed RoadRunner reloading config 2022-08-27 08:01:57 +02:00
Alejandro Celaya
86159c5d86 Updated to latest event dispatcher lib 2022-08-26 19:17:10 +02:00
Alejandro Celaya
846802c003 Slight improvements on RoadRunner config 2022-08-26 17:58:25 +02:00
Alejandro Celaya
e9ec32b3c3 Added support to dispatch async event listeners as RoadRunner jobs 2022-08-26 14:59:27 +02:00
Alejandro Celaya
4882bec118 Added roadrunner to the project 2022-08-21 13:19:27 +02:00
Alejandro Celaya
89ff259be0 Merge pull request #1517 from acelaya-forks/feature/reusable-docker-build
Moved to docker build on reusable workflow
2022-08-19 15:18:20 +02:00
Alejandro Celaya
60ece7fbf7 Moved to docker build on reusable workflow 2022-08-19 15:11:46 +02:00
Alejandro Celaya
0c110f574a Merge pull request #1516 from acelaya-forks/feature/reduce-ci-artifact-download
Ensured every mutation test job only downloads the specific coverage …
2022-08-17 19:27:52 +02:00
Alejandro Celaya
dbca5b2a7e Ensured every mutation test job only downloads the specific coverage report 2022-08-17 19:16:33 +02:00
Alejandro Celaya
3088298e6b Merge pull request #1515 from acelaya-forks/feature/reusable-docker-build
Migrated docker build to a reusable workflow
2022-08-14 18:35:59 +02:00
Alejandro Celaya
a9c6a12182 Migrated docker build to a reusable workflow 2022-08-14 17:36:58 +02:00
Alejandro Celaya
fa5b512629 Merge pull request #1514 from acelaya-forks/feature/ghcr-support
Feature/ghcr support
2022-08-14 17:12:56 +02:00
Alejandro Celaya
5c2061a6e6 Updated changelog 2022-08-14 17:07:07 +02:00
Alejandro Celaya
cf0fc956c9 Added publishing of the docker image in GHCR 2022-08-14 17:05:13 +02:00
Alejandro Celaya
a0517dfbeb Merge pull request #1512 from acelaya-forks/feature/api-v3
Feature/api v3
2022-08-14 14:07:32 +02:00
Alejandro Celaya
39c71638e6 Updated changelog 2022-08-14 14:02:09 +02:00
Alejandro Celaya
672b728379 Updated swagger docs, with new API v3 error types 2022-08-14 13:55:43 +02:00
Alejandro Celaya
750a546faf Disabled mutation tests filtering until it properly works 2022-08-14 13:18:29 +02:00
Alejandro Celaya
a41835573b Centralized prefix for problem detail types 2022-08-14 13:12:10 +02:00
Alejandro Celaya
2650cb89b5 Created BackwardsCompatibleProblemDetailsExceptionTest 2022-08-14 12:39:05 +02:00
Alejandro Celaya
4a122e0209 Added remaining API tests covering error type convertions 2022-08-14 10:51:12 +02:00
Alejandro Celaya
ce4bf62d75 Added more granular resolution of arguments for infection based on branch 2022-08-14 10:34:27 +02:00
Alejandro Celaya
40bbcb3250 Added some API tests for v3 API errors 2022-08-13 17:49:00 +02:00
Alejandro Celaya
905f51fbd0 Added logic to properly map all existing errors from v3 to v2 in the API 2022-08-13 17:15:04 +02:00
Alejandro Celaya
cd4fe4362b Created middleware to keep backwards compatibility on errors when using v1 and 2 of the API 2022-08-13 16:50:19 +02:00
Alejandro Celaya
ed7be6eb99 Updated changelog 2022-08-13 12:37:15 +02:00
Alejandro Celaya
555007ab16 Merge pull request #1511 from acelaya-forks/feature/only-changed-mutants
Ensured only mutants for changed lines are executed in CI mutation tests
2022-08-13 12:34:52 +02:00
Alejandro Celaya
bd31b99324 Ensured only mutants for changed lines are executed in CI mutation tests 2022-08-13 12:31:12 +02:00
Alejandro Celaya
60237c3c0b Merge pull request #1509 from acelaya-forks/feature/local-composed-action
Extracted all steps for setting up to a reusable action
2022-08-13 12:02:28 +02:00
Alejandro Celaya
eb21833d94 Used ci-setup composite action as much as possible in ci workflow 2022-08-13 11:56:46 +02:00
Alejandro Celaya
763002ae14 Fixed typo when reading etxnesions input on ci-setup action 2022-08-13 11:18:50 +02:00
Alejandro Celaya
ae2dc39a78 Fixed ci-setup local composite action 2022-08-13 11:16:33 +02:00
Alejandro Celaya
fe4ced2709 Moved checkout step back to workflow 2022-08-13 11:06:41 +02:00
Alejandro Celaya
9075d68b7c Fixed reference to local composed action 2022-08-13 11:03:40 +02:00
Alejandro Celaya
759c0ea957 Extracted all steps for setting up to a reusable action 2022-08-13 10:53:24 +02:00
Alejandro Celaya
67b393d4a3 Merge pull request #1508 from acelaya-forks/feature/improve-cache-key-ci
Improved cache keys for extensions in CI workflow to support several …
2022-08-13 10:27:13 +02:00
Alejandro Celaya
de71821759 Updated to latest actions/checkout version 2022-08-13 10:19:38 +02:00
Alejandro Celaya
0c2bcaee34 Fixed typo 2022-08-13 10:12:52 +02:00
Alejandro Celaya
1613975e0e Improved cache keys for extensions in CI workflow to support several PHP versions when needed 2022-08-13 10:11:41 +02:00
Alejandro Celaya
be82204df2 Merge pull request #1507 from acelaya-forks/feature/improve-ci-uploads
Feature/improve ci uploads
2022-08-12 20:52:50 +02:00
Alejandro Celaya
14c2ff5545 Ensured unique cache key 2022-08-12 20:35:59 +02:00
Alejandro Celaya
d7d0e11f2c Added cache for PHP extensions in CI pipeline 2022-08-12 20:32:16 +02:00
Alejandro Celaya
6654f45cb8 Updated upload/download artifact actions 2022-08-12 18:19:12 +02:00
Alejandro Celaya
23f92179ad Optimized how and when code coverage reports are generated for different types of tests 2022-08-12 18:10:45 +02:00
Alejandro Celaya
7377917642 Merge pull request #1506 from acelaya-forks/feature/local-reusable-workflows
Extracted definition of unit tests job to local reusable workflow
2022-08-12 09:52:01 +02:00
Alejandro Celaya
0f796859f2 Fixed typo in ci workflow 2022-08-12 09:32:30 +02:00
Alejandro Celaya
6383230678 Extracted DB tests and mutation tests to reusable workflows 2022-08-12 09:30:52 +02:00
Alejandro Celaya
51536f8746 Moved reusable ci tests workflow to workflows folder 2022-08-12 09:13:04 +02:00
Alejandro Celaya
e3b6c061c4 Extracted definition of unit tests job to local reusable workflow 2022-08-12 08:35:10 +02:00
Alejandro Celaya
4bd3fa74d1 Merge pull request #1502 from acelaya-forks/feature/cli-tests
Feature/cli tests
2022-08-10 17:39:27 +02:00
Alejandro Celaya
71553988d5 Added cli mutation tests to pipeline, and referenced CLI tests in CONTRIBUTING file 2022-08-10 17:21:55 +02:00
Alejandro Celaya
761b24e614 Added CLI tests to to CI pipeline 2022-08-10 17:13:21 +02:00
Alejandro Celaya
10974902b5 Updated changelog 2022-08-10 17:09:54 +02:00
Alejandro Celaya
474407dbc2 Ensured proper coverage is generated during CLI tests 2022-08-10 17:08:42 +02:00
Alejandro Celaya
95d84f354d Simplified tests config 2022-08-09 19:48:43 +02:00
Alejandro Celaya
db47a9a253 Added mutation tests for CLI E2E tests 2022-08-09 19:15:49 +02:00
Alejandro Celaya
709a4639b3 Fixed merge conflicts 2022-08-09 18:59:55 +02:00
Alejandro Celaya
28b9cd02ef Merge pull request #1501 from shlinkio/develop
Release 3.2.1
2022-08-08 19:51:00 +02:00
Alejandro Celaya
af9ea13933 Merge pull request #1500 from acelaya-forks/feature/fix-env-var-loading
Feature/fix env var loading
2022-08-08 19:46:53 +02:00
Alejandro Celaya
bd2cd18916 Tagged stable releases for all shlink teps 2022-08-08 19:33:59 +02:00
Alejandro Celaya
23138dc0b4 Updated changelog 2022-08-08 19:24:51 +02:00
Alejandro Celaya
a2f9742cfc Fix loading of config options as env vars 2022-08-08 19:23:16 +02:00
Alejandro Celaya
6378e614b0 Merge pull request #1498 from acelaya-forks/feature/update-shlink-deps
Feature/update shlink deps
2022-08-07 10:04:23 +02:00
Alejandro Celaya
b116a57aa7 Updated changelog 2022-08-07 09:37:49 +02:00
Alejandro Celaya
a03f32f521 Updated to latest shlink dependencies 2022-08-07 09:36:51 +02:00
Alejandro Celaya
b9180be685 Merge pull request #1496 from acelaya-forks/feature/centralize-multi-segment
Feature/centralize multi segment
2022-08-06 09:54:09 +02:00
Alejandro Celaya
334aee64ad Updated changelog 2022-08-06 09:37:15 +02:00
Alejandro Celaya
16bd368a58 Centralized how routes are configured to support multi-segment slugs 2022-08-06 09:30:13 +02:00
Alejandro Celaya
3266a0f85c Merge pull request #1494 from shlinkio/develop
Release 3.2.0
2022-08-05 19:04:45 +02:00
Alejandro Celaya
4629f1b03f Merge pull request #1493 from acelaya-forks/feature/update-deps
Updated to latest PHP version and native dependencies
2022-08-05 16:44:29 +02:00
Alejandro Celaya
fbd0c6cbea Merge pull request #1491 from acelaya-forks/feature/multi-segment-slugs
Feature/multi segment slugs
2022-08-05 16:31:38 +02:00
Alejandro Celaya
8260051c30 Updated to latest PHP version and native dependencies 2022-08-05 16:31:15 +02:00
Alejandro Celaya
c061c9c3ff Added v3.2.0 to changelog 2022-08-05 16:19:40 +02:00
Alejandro Celaya
8961191b2e Documented ADR for multi-segment slugs 2022-08-05 16:18:53 +02:00
Alejandro Celaya
fc0d99be41 Ensure filtering of custom-slug is different depending on the multi-sement lugsfeature flag 2022-08-05 08:38:05 +02:00
Alejandro Celaya
6834e72c4a Updated changelog 2022-08-04 17:15:35 +02:00
Alejandro Celaya
efe655f880 Enhanced ExtraPathRedirectMiddleware so that it supports multi-segment slugs 2022-08-04 17:03:08 +02:00
Alejandro Celaya
3d5ddce621 Ensured multi-segment feature flag affects how append_extra_path is checked 2022-08-04 16:10:54 +02:00
Alejandro Celaya
a3de3e15cb Updated installer with support for multi-segment slugs flag 2022-08-04 13:00:09 +02:00
Alejandro Celaya
619999d4f8 Added feature flag to enable/disable multi-segment support 2022-08-04 11:49:33 +02:00
Alejandro Celaya
7acf27dd38 Replaced usage of deprecated methods in DateRange class 2022-08-04 11:27:33 +02:00
Alejandro Celaya
ba517eeeb5 Moved routes config together, and ensure they are loaded last 2022-08-04 11:14:26 +02:00
Alejandro Celaya
fdd3e24967 Added support for multi-segment slugs 2022-08-03 19:32:59 +02:00
Alejandro Celaya
a570ce202a Updated to latest common 2022-08-03 12:59:09 +02:00
Alejandro Celaya
0a220bbc7a Allowed slashes on custom slugs during short URL creation 2022-08-01 17:32:54 +02:00
Alejandro Celaya
e0e511f56d Some improvements and comments in preparation of multi-segment slugs 2022-08-01 17:32:54 +02:00
Alejandro Celaya
d375dece0e Updated required deps 2022-08-01 17:32:54 +02:00
Alejandro Celaya
f801f265ed Added comments on places to change 2022-08-01 17:32:54 +02:00
Alejandro Celaya
1b4fc89b07 Merge pull request #1490 from acelaya-forks/feature/ci-composer-cache
Added cache for composer dependencies during CI
2022-08-01 17:32:07 +02:00
Alejandro Celaya
3ac2b77bf0 Removed composer cache due to a bug in github runner making it fail 2022-08-01 17:23:51 +02:00
Alejandro Celaya
b2ca4ad66b Migrated all workflows to ubuntu-22.04 2022-08-01 17:13:34 +02:00
Alejandro Celaya
25a7c7bc7f Added cache for composer dependencies during CI 2022-08-01 16:56:25 +02:00
Alejandro Celaya
6b009a4de4 Merge pull request #1489 from acelaya-forks/feature/command-error
Feature/command error
2022-08-01 12:25:05 +02:00
Alejandro Celaya
0b80a86e88 Updated changelog 2022-08-01 12:07:50 +02:00
Alejandro Celaya
b03f24d59a Ensured no arguments are passed form locate visits command to download geolite command, is it does not expect any 2022-08-01 12:06:38 +02:00
Alejandro Celaya
78ea13d366 Merge pull request #1488 from acelaya-forks/feature/redis-pub-sub
Feature/redis pub sub
2022-07-28 11:04:19 +02:00
Alejandro Celaya
8c2bdfba1c Refactored match to ifs with eary returns 2022-07-28 10:51:48 +02:00
Alejandro Celaya
3289968a93 Updated changelog 2022-07-28 10:46:24 +02:00
Alejandro Celaya
73ae754aa7 Created NotifyVisitToRedisTest 2022-07-28 10:36:52 +02:00
Alejandro Celaya
20a6e7e210 Created NotifyNewShortUrlToRedisTest 2022-07-28 10:33:26 +02:00
Alejandro Celaya
4cf433a994 Defined enum with supported remote systems 2022-07-28 10:25:55 +02:00
Alejandro Celaya
e36c4d397c Moved duplicated code in visit listeners to an abstract class 2022-07-27 18:18:36 +02:00
Alejandro Celaya
26037327f9 Moved duplicated code in short URL listeners to an abstract class 2022-07-27 18:06:47 +02:00
Alejandro Celaya
da6aa1d697 Integrated PublishUpdatesGenerator in NotifyVisitToRabbitMq listener 2022-07-27 17:41:48 +02:00
Alejandro Celaya
dada6aa3d1 Integrated PublishUpdatesGenerator in NotifyVisitToRedis listener 2022-07-27 16:55:19 +02:00
Alejandro Celaya
fa5ebb1677 Integrated PublishUpdatesGenerator in NotifyNewShortUrlToRedis listener 2022-07-27 16:47:21 +02:00
Alejandro Celaya
f071df325d Fixed NotifyNewShortUrlToRabbitMqTest 2022-07-27 10:26:18 +02:00
Alejandro Celaya
3c042c4011 Integrated PublishUpdatesGenerator in NotifyNewShortUrlToRabbitMq listener 2022-07-27 10:18:28 +02:00
Alejandro Celaya
7e8109caa3 Renamed MercureUpdatesGenerator to PublishingUpdatesGenerator to make it general purpose 2022-07-27 09:38:47 +02:00
Alejandro Celaya
d3add6d8e4 Added TODO 2022-07-26 12:18:58 +02:00
Alejandro Celaya
1b089749c0 Migrated mercure event listeners to use new publishing helper from shlink-common 2022-07-26 12:17:37 +02:00
Alejandro Celaya
791d6b7e57 Updated to latest common, with unified publishing API 2022-07-26 12:07:27 +02:00
Alejandro Celaya
233bb603cf Updated local redis config 2022-07-26 10:25:16 +02:00
Alejandro Celaya
db8a816524 Implemented redis pub/sub listeners 2022-07-26 10:17:50 +02:00
Alejandro Celaya
eff50ca202 Created new event listeners to send events to redis pub/sub 2022-07-25 18:23:13 +02:00
Alejandro Celaya
ceabb5ab2c Merge pull request #1486 from acelaya-forks/feature/backwards-compatible-rabbit-mq
Feature/backwards compatible rabbit mq
2022-07-25 12:55:28 +02:00
Alejandro Celaya
122c2fd5e6 Updated changelog 2022-07-25 12:34:40 +02:00
Alejandro Celaya
cd27a72982 Reduced duplicated code in NotifyNewShortUrlToRabbitMqTest 2022-07-25 12:31:32 +02:00
Alejandro Celaya
19b0f0d7dc Extended NotifyVisitToRabbitMqTest covering legacy and non-legacy use-cases 2022-07-25 12:30:28 +02:00
Alejandro Celaya
6ce2049935 Added support for legacy and new publishing of visits in RabbitMQ 2022-07-25 12:08:22 +02:00
Alejandro Celaya
53b937be63 Updated coding standard 2022-07-25 09:49:14 +02:00
Alejandro Celaya
71c8f99dab Merge pull request #1484 from acelaya-forks/feature/short-url-created-event
Feature/short url created event
2022-07-25 09:48:44 +02:00
Alejandro Celaya
9eb3fca726 Updated changelog 2022-07-25 09:32:09 +02:00
Alejandro Celaya
019bd4dec8 Created NotifyNewShortUrlToMercureTest 2022-07-25 09:30:25 +02:00
Alejandro Celaya
be1ce06c00 Updated asyn API spec 2022-07-25 09:04:15 +02:00
Alejandro Celaya
074bfe3db2 Updated MercureUpdatesGeneratorTest 2022-07-25 09:02:05 +02:00
Alejandro Celaya
34e72b42dc Implemented listener to publish new short URL events in Mercure 2022-07-24 19:00:48 +02:00
Alejandro Celaya
97d24d76d8 Fixed new short URL event payload to RabbitMQ, and started to add logic for Mercure 2022-07-24 12:37:57 +02:00
Alejandro Celaya
4d1af867a4 Extracted real-time update topic names to an enum 2022-07-24 12:06:00 +02:00
Alejandro Celaya
fc6b4c12b2 Configured publishing of new short URL events in RabbitMQ 2022-07-24 11:07:20 +02:00
Alejandro Celaya
405c6de591 Created NotifyNewShortUrlToRabbitMq test 2022-07-24 10:53:42 +02:00
Alejandro Celaya
47bfa5fcc0 Simplified NotifyNewShortUrlToRabbitMq 2022-07-24 10:18:19 +02:00
Alejandro Celaya
67d91d5fc5 Migrated rabbit integration to RabbitMqPublishingHelper from shlink-common 2022-07-24 10:12:26 +02:00
Alejandro Celaya
f832c56adb Moved Mercure and RabbitMq event listeners to their own subnamespaces 2022-07-21 20:07:28 +02:00
Alejandro Celaya
1aa9ae680e Merge pull request #1479 from acelaya-forks/feature/unknown-visits
Added missing implements JsonSerializable on VisitLocation that got l…
2022-07-18 20:43:02 +02:00
Alejandro Celaya
c4b30db82d Added missing implements JsonSerializable on VisitLocation that got lost when VisitLocationInterface was removed 2022-07-18 20:23:27 +02:00
Alejandro Celaya
abd9f3c6be Removed style checks disabling due to bug on php code sniffer 2022-07-04 17:12:38 +02:00
Alejandro Celaya
3de3594282 Merge pull request #1465 from jsoref/spelling
Spelling
2022-06-08 07:31:25 +02:00
Alejandro Celaya
ed5816d464 Fixed merge conflicts 2022-06-04 11:43:02 +02:00
Alejandro Celaya
3d43bdbb49 Merge pull request #1462 from acelaya-forks/feature/search-with-all-tags
Fixed error when filtering short URLs by ALL tags and search term
2022-06-04 11:37:14 +02:00
Alejandro Celaya
1ab492ce5b Added missing test case 2022-06-04 11:22:10 +02:00
Alejandro Celaya
de30c6ad79 Fixed error when filtering short URLs by ALL tags and search term 2022-06-04 11:20:08 +02:00
Alejandro Celaya
f5a48ff98d Merge pull request #1460 from acelaya-forks/feature/monolog3
Feature/monolog3
2022-06-04 09:11:31 +02:00
Alejandro Celaya
8493ee5b83 Updated changelog 2022-06-04 09:00:00 +02:00
Alejandro Celaya
52a6d55e5d Updated to monolog 3 2022-06-04 08:59:17 +02:00
Josh Soref
7142295aa5 spelling: urls
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
8b65be26a6 spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
60f5deb494 spelling: received
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
0fc09e6dd3 spelling: monolog
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
0c4ccf4e3e spelling: middleware
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
a0e79bf446 spelling: microsoft
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
aa356ad7c7 spelling: github
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 23:36:42 -04:00
Josh Soref
9e0e384d46 spelling: campaign
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-30 22:39:08 -04:00
Alejandro Celaya
a20b99e643 Merge pull request #1451 from acelaya-forks/feature/missing-visits-commands
Feature/missing visits commands
2022-05-24 18:44:56 +02:00
Alejandro Celaya
fe4237b2b1 Updated changelog 2022-05-24 18:00:17 +02:00
Alejandro Celaya
4146835f6f Created GetOrhanVisitsCommand test 2022-05-24 17:59:06 +02:00
Alejandro Celaya
5201ea4516 Created tests for short-url-visits commands 2022-05-24 17:54:44 +02:00
Alejandro Celaya
fba7b36245 Improved GetShortUrlVisitsCommand test 2022-05-24 17:44:12 +02:00
Alejandro Celaya
353ac0fc0c Added logic to resolve extra columns on visits commands 2022-05-23 21:19:59 +02:00
Alejandro Celaya
00002b1e24 Renamed some visits commands 2022-05-23 20:47:37 +02:00
Alejandro Celaya
aa32830671 Added note to readme 2022-05-23 07:55:33 +02:00
Alejandro Celaya
12b8100d89 Created visits commands for orphan, non-orphan and domain 2022-05-22 19:34:08 +02:00
Alejandro Celaya
72e56d271d Created tags visits command, with abstract class wrapping common logic for visits lists commands 2022-05-22 19:22:29 +02:00
Alejandro Celaya
2b69f5eff4 Merge pull request #1449 from acelaya-forks/feature/title-html-entities
Feature/title html entities
2022-05-22 10:12:54 +02:00
Alejandro Celaya
f224bb98c4 Updated changelog 2022-05-22 08:30:46 +02:00
Alejandro Celaya
ec17eb3fbc Ensured html entities are parsed when auto-resolving titles 2022-05-22 08:29:26 +02:00
Alejandro Celaya
358b600713 Fixed merge conflicts 2022-05-09 08:21:19 +02:00
Alejandro Celaya
aacb5c39ba Merge pull request #1445 from acelaya-forks/feature/update-openswoole
Updated to openswoole 4.11.1 in docker images
2022-05-09 08:17:01 +02:00
Alejandro Celaya
9ae8804095 Updated to openswoole 4.11.1 in docker images 2022-05-09 08:00:54 +02:00
Alejandro Celaya
2d51bd895d Merge pull request #1440 from acelaya-forks/feature/url-validation-memory-issue
Feature/url validation memory issue
2022-05-01 12:14:52 +02:00
Alejandro Celaya
18f656fed2 Changed logic when resolving the title of a URL, to ensure only html content is tried to be downloaded, and only until the title tag has been parsed 2022-05-01 11:48:20 +02:00
Alejandro Celaya
eea76999b2 Ensured URL validation is doe via HEAD method when the title does not need to be resolved 2022-05-01 09:51:15 +02:00
Alejandro Celaya
bd495adf22 Set SemVer versions for some shlink package versions 2022-05-01 08:40:20 +02:00
Alejandro Celaya
e8c7bee924 Added SemVer constraints for some deps which were left with specific commits by mistake 2022-04-23 19:30:33 +02:00
Alejandro Celaya
24b06c24dc Merge pull request #1434 from acelaya-forks/feature/drop-php-8.0
Feature/drop php 8.0
2022-04-23 19:26:02 +02:00
Alejandro Celaya
6fdd764a35 Updated to phpcov 8.2.1 2022-04-23 19:11:23 +02:00
Alejandro Celaya
2400d1f265 Removed unused method 2022-04-23 19:07:36 +02:00
Alejandro Celaya
cdef430b0b Set ShortUrlIdentifier constructor to private 2022-04-23 19:01:02 +02:00
Alejandro Celaya
6074e4ae2c Updated changelog 2022-04-23 18:57:39 +02:00
Alejandro Celaya
6ada704bc3 Moved TagsMode to its own enum 2022-04-23 18:56:27 +02:00
Alejandro Celaya
e8f7daac6f Converted Role constants to enum 2022-04-23 18:41:16 +02:00
Alejandro Celaya
404455928e Converted visit types into enum 2022-04-23 18:19:16 +02:00
Alejandro Celaya
bca3e62ced Updated to readonly public props on as many models as possible 2022-04-23 14:00:47 +02:00
Alejandro Celaya
e79391907a Added some PHP 8.1 features 2022-04-23 13:08:21 +02:00
Alejandro Celaya
54a23cc7fa Converted EnvVars to enum 2022-04-23 12:44:17 +02:00
Alejandro Celaya
e8ebe77923 Dropped PHP 8.0 support 2022-04-23 12:08:01 +02:00
Alejandro Celaya
68e0aa1ea9 Merge pull request #1433 from shlinkio/develop
Release 3.1.0
2022-04-23 11:39:27 +02:00
Alejandro Celaya
ceaf64c9b3 Fixed typo in changelog 2022-04-23 11:35:55 +02:00
Alejandro Celaya
e015b1bec5 Improved changelog 2022-04-23 11:34:40 +02:00
Alejandro Celaya
ca9726c997 Merge pull request #1432 from acelaya-forks/feature/domain-visits
Feature/domain visits
2022-04-23 11:33:04 +02:00
Alejandro Celaya
85c79abd30 Updated changelog 2022-04-23 11:19:14 +02:00
Alejandro Celaya
54c1c7ad84 Created DomainVisits API test 2022-04-23 11:17:32 +02:00
Alejandro Celaya
af15e31b42 Created DomainVisitsActionTest 2022-04-23 11:07:10 +02:00
Alejandro Celaya
99b4f9f4dd Improved VisitsStatsHelperTest covering visitsForDomain method 2022-04-23 11:02:51 +02:00
Alejandro Celaya
9a0e5ea626 Created method to check if domain exists based on authority and API key 2022-04-23 10:58:33 +02:00
Alejandro Celaya
984205e02c Extended VisitRepositoryTest with domain visits functions 2022-04-23 10:45:42 +02:00
Alejandro Celaya
e11bf6ac67 Created endpoint to get visits for one specific domain 2022-04-23 10:32:07 +02:00
Alejandro Celaya
e029d91544 Documented new domain visits endpoint 2022-04-23 09:27:52 +02:00
Alejandro Celaya
011856cbfa Removed redundant var 2022-04-23 09:15:01 +02:00
Alejandro Celaya
9ce8164013 Merge pull request #1431 from acelaya-forks/feature/update-deps
Updated docker images and dependencies
2022-04-23 09:13:47 +02:00
Alejandro Celaya
dca6b7bbf5 Updated docker images and dependencies 2022-04-23 08:56:25 +02:00
Alejandro Celaya
2511ec3395 Merge pull request #1424 from acelaya-forks/feature/skip-invalid-imports
Added errorhandling for individual imported URLs, so that one failing…
2022-04-23 08:35:21 +02:00
Alejandro Celaya
9f6ffc7186 Added errorhandling for individual imported URLs, so that one failing doe snot make the whole process fail 2022-04-18 14:45:37 +02:00
Alejandro Celaya
622f0217fa Merge pull request #1421 from acelaya-forks/feature/cast-incoming-dates
Feature/cast incoming dates
2022-04-15 20:20:26 +02:00
Alejandro Celaya
09eba49bab Updated changelog 2022-04-15 20:06:51 +02:00
Alejandro Celaya
c20c3801a8 Ensured all input dates are changed to the default timezone before being used on any inner layer 2022-04-15 19:57:27 +02:00
Alejandro Celaya
f8208b7288 Merge pull request #1420 from acelaya-forks/feature/timezone
Feature/timezone
2022-04-15 09:27:17 +02:00
Alejandro Celaya
3db8a65ddb Fixed test 2022-04-14 16:00:15 +02:00
Alejandro Celaya
0495b6f298 Updated changelog 2022-04-14 14:24:01 +02:00
Alejandro Celaya
52c55f385d Added support to set the timezone via config/env vars 2022-04-14 14:22:48 +02:00
Alejandro Celaya
fe28d6fba0 Merge pull request #1417 from acelaya-forks/feature/kutt-import
Updated importer with support for Kutt.it
2022-04-14 12:51:56 +02:00
Alejandro Celaya
0294e49d4a Added dist local config for app options 2022-04-14 11:35:12 +02:00
Alejandro Celaya
cbaf51d3ef Updated importer with support for Kutt.it 2022-04-14 11:31:50 +02:00
Alejandro Celaya
efb604a381 Merge pull request #1415 from acelaya-forks/feature/yourls-domain
Feature/yourls domain
2022-04-13 12:54:12 +02:00
Alejandro Celaya
da87f05126 Updated changelog 2022-04-13 12:41:09 +02:00
Alejandro Celaya
21534b78cb Updated to latest shlink-importer, with support to import on a specific domain for YOURLS 2022-04-13 12:40:21 +02:00
Alejandro Celaya
ab65593f7d Merge pull request #1414 from acelaya-forks/feature/postgres-db-error
Feature/postgres db error
2022-04-12 19:27:35 +02:00
Alejandro Celaya
3a82691503 Small improvements on CreateDatabaseCommand 2022-04-10 19:48:32 +02:00
Alejandro Celaya
430e2ff0b5 Ensured db and api tests can be run without the need of creating the database beforehand 2022-04-09 17:46:13 +02:00
Alejandro Celaya
7d572e7988 Merge pull request #1404 from acelaya-forks/feature/fix-double-paths
Feature/fix double paths
2022-03-14 19:56:58 +01:00
Alejandro Celaya
1449e24b66 Improved some tests 2022-03-14 19:41:33 +01:00
Alejandro Celaya
6a671760da Updated changelog 2022-03-14 19:28:55 +01:00
Alejandro Celaya
613bdd82b0 Ensured base path is not prefixed more than it should 2022-03-14 19:26:02 +01:00
Alejandro Celaya
01bae358f9 Merge pull request #1399 from shlinkio/feature/improve-db-create
Feature/improve db create
2022-03-05 11:03:39 +01:00
Alejandro Celaya
3a8e560dc5 Increased required mutation score for unit tests to 85% 2022-03-05 10:51:48 +01:00
Alejandro Celaya
a0c538d9ee Updated changelog 2022-03-05 10:48:02 +01:00
Alejandro Celaya
07c30f86e9 Excluded migrations table when checking if the database schema exists 2022-03-05 10:41:13 +01:00
Alejandro Celaya
c22e38f9a0 Removed deprecated method call 2022-03-05 10:32:05 +01:00
Alejandro Celaya
4d082a87a1 Added preliminary config to export coverage for CLI tests 2022-02-27 08:11:33 +01:00
Alejandro Celaya
1b6512fc8d Replaced deprecated transactional function with wrapTransaction 2022-02-27 08:10:18 +01:00
Alejandro Celaya
7502e8a1e4 Merge pull request #1386 from acelaya-forks/feature/mercure-error
Feature/mercure error
2022-02-20 15:58:49 +01:00
Alejandro Celaya
5a25211371 Created NotConfiguredMercureErrorHandlerTest 2022-02-20 10:50:21 +01:00
Alejandro Celaya
6983f9b2bf Added middleware that mitigates big error traces being logged for those not using mercure 2022-02-20 10:36:54 +01:00
Alejandro Celaya
5affe64b61 Removed references in CONTRIBUTING.md file to no longer existing assets 2022-02-19 19:55:36 +01:00
Alejandro Celaya
c52f3c396b Fixed merge conflicts 2022-02-19 19:47:34 +01:00
Alejandro Celaya
e1ebbaa52f Merge pull request #1384 from acelaya-forks/feature/default-domain-role
Feature/default domain role
2022-02-19 19:42:12 +01:00
Alejandro Celaya
7abe6af5ec Updated changelog 2022-02-19 19:24:43 +01:00
Alejandro Celaya
c98ea6055b Ensured API keys cannot be generated with domain-only roles linked to default domain 2022-02-19 19:23:36 +01:00
Alejandro Celaya
3e3d255edf Merge pull request #1383 from acelaya-forks/feature/fixes
Updated docker images to PHP 8.1.3
2022-02-19 19:11:30 +01:00
Alejandro Celaya
816d4851e7 Updated docker images to PHP 8.1.3 2022-02-19 18:57:36 +01:00
Alejandro Celaya
9e32886f60 Created first CLI E2E tests 2022-02-13 12:20:02 +01:00
Alejandro Celaya
79af315b9f Fixed merge conflicts 2022-02-10 21:48:21 +01:00
Alejandro Celaya
4110c702c0 Merge pull request #1376 from acelaya-forks/feature/release-3.0.2
Feature/release 3.0.2
2022-02-10 21:44:30 +01:00
Roy-Orbison
57eb29c3c8 Optimise RewriteRules/Conds
From upstream changes on Mezzio Skeleton.

Closes #1369.
2022-02-10 21:31:45 +01:00
Alejandro Celaya
5267c4eee6 Updated changelog 2022-02-10 21:31:30 +01:00
Alejandro Celaya
1453ebe8ca Updated to shlink-installer 7.0.1 2022-02-10 21:29:28 +01:00
Alejandro Celaya
3b5cea5768 Updated changelog 2022-02-07 18:49:22 +01:00
Roy-Orbison
a89f67348d Optimise RewriteRules/Conds
From upstream changes on Mezzio Skeleton.

Closes #1369.
2022-02-07 18:45:27 +01:00
Alejandro Celaya
af1ae0399c Fixed merge conflicts 2022-02-04 18:03:29 +01:00
Alejandro Celaya
5bf84144e7 Tagged v3.0.1 in changelog 2022-02-04 17:53:29 +01:00
Alejandro Celaya
d9adff5749 Merge pull request #1368 from acelaya-forks/feature/stable-pdo-sqlsrv
Updated to stable pdo_sqlsrv in docker images
2022-02-03 22:17:07 +01:00
Alejandro Celaya
a1cd8baf3e Updated to stable pdo_sqlsrv in docker images 2022-02-03 22:03:20 +01:00
Alejandro Celaya
87cadce0ac Merge pull request #1366 from acelaya-forks/feature/fix-autoresolve-titles
Feature/fix autoresolve titles
2022-02-01 20:00:49 +01:00
Alejandro Celaya
f22f50afa2 Updated changelog 2022-02-01 19:46:36 +01:00
Alejandro Celaya
d0fa6f7e03 Added missing test covering URL validation with valid URL but title resolutio is disabled 2022-02-01 19:44:14 +01:00
Alejandro Celaya
d29c58dce5 Unified test:unit:pretty command 2022-02-01 19:25:18 +01:00
Alejandro Celaya
9ea8f3b590 Fixed URL validation still being true by default 2022-02-01 19:12:53 +01:00
Alejandro Celaya
ffffc68144 Updated readme 2022-02-01 07:36:44 +01:00
Alejandro Celaya
086de9f2a0 Merge pull request #1362 from acelaya-forks/feature/deprecate-webhooks
Deprecated webhooks
2022-01-31 12:41:44 +01:00
Alejandro Celaya
1b731aa4a3 Deprecated webhooks 2022-01-31 12:30:29 +01:00
Alejandro Celaya
12913f6b90 Merge pull request #1360 from acelaya-forks/feature/hide-db-commands
Marked database commands as hidden
2022-01-30 13:04:10 +01:00
Alejandro Celaya
1d4186392c Marked database commands as hidden 2022-01-30 12:15:53 +01:00
Alejandro Celaya
48d3ab0cb4 Changed file name used for inlined OAS 2022-01-30 09:37:57 +01:00
Alejandro Celaya
a9d04729eb Merge pull request #1351 from shlinkio/develop
Release 3.0.0
2022-01-28 16:31:55 +01:00
Alejandro Celaya
7adf2292bd Merge pull request #1353 from acelaya-forks/feature/profiling
Feature/profiling
2022-01-28 16:12:27 +01:00
Alejandro Celaya
c8f55f9c05 Added release date for Shlink 3.0.0 2022-01-28 16:00:40 +01:00
Alejandro Celaya
93de62f81d Fixed typo in UPGRADE.md 2022-01-28 13:06:56 +01:00
Alejandro Celaya
9766231d41 Added v3.0.0 to changelog 2022-01-27 20:59:05 +01:00
Alejandro Celaya
9df80e5bec Added explicit versions for shlink dependencies 2022-01-27 20:56:52 +01:00
Alejandro Celaya
81b00e4302 Merge branch 'develop' into feature/profiling 2022-01-27 20:20:15 +01:00
Alejandro Celaya
25ac7c31c4 Minor doc improvements 2022-01-25 20:39:31 +01:00
Alejandro Celaya
11c6c9a2b8 Removed unneeded lines 2022-01-23 18:17:39 +01:00
Alejandro Celaya
066268765a Fixed merge conflicts 2022-01-23 18:17:13 +01:00
Alejandro Celaya
356b33ced0 Merge pull request #1350 from acelaya-forks/feature/fix-memory-leak
Updated to shlink-common 4.4, which no longer uses doctrine/cache
2022-01-23 18:14:00 +01:00
Alejandro Celaya
77088d55f9 Updated to shlink-common 4.4, which no longer uses doctrine/cache 2022-01-23 17:54:49 +01:00
Alejandro Celaya
8d965655a8 Merge pull request #1348 from acelaya-forks/feature/drop-swoole-support
Feature/drop swoole support
2022-01-23 11:52:19 +01:00
Alejandro Celaya
3ace4952e6 Changed swoole with openswoole in issue templates 2022-01-23 11:37:46 +01:00
Alejandro Celaya
299f9f3a10 Documented support on swoole being dropped 2022-01-23 11:36:05 +01:00
Alejandro Celaya
0e6790cdab Replaced references to regular swoole by openswoole 2022-01-23 11:29:53 +01:00
Alejandro Celaya
1f90af3aec Merge pull request #1345 from acelaya-forks/feature/extended-tags-ordering
Feature/extended tags ordering
2022-01-23 11:08:02 +01:00
Alejandro Celaya
cdb18a5baf Documented performance issue when sorting by visits or short URLs count 2022-01-23 10:48:38 +01:00
Alejandro Celaya
8adb6596fb Refactored TagInfo to wrap the raw tag name instead of a Tag entity 2022-01-23 09:37:02 +01:00
Alejandro Celaya
dd6bcd68cc Removed not-needed extra line 2022-01-22 20:36:50 +01:00
Alejandro Celaya
1c9ce0ede0 Fixed default/fallback tags with stats ordering 2022-01-21 22:22:55 +01:00
Alejandro Celaya
6b409b06cc Simplified TagRepository test for tags info list, making it more predictable 2022-01-21 22:04:53 +01:00
Alejandro Celaya
361e864415 Added fallback ordering to tags list 2022-01-21 20:12:16 +01:00
Alejandro Celaya
d5606114cd Documented new ordering fields supported on tags list 2022-01-21 20:02:52 +01:00
Alejandro Celaya
afca66d655 Added tests covering tags info with counted ordering and limit 2022-01-21 19:58:56 +01:00
Alejandro Celaya
33a6c9fda7 Added support to order tags with stats by short URLs or visits count. In a non-performant way 2022-01-21 19:52:25 +01:00
Alejandro Celaya
a198484ab6 Updated test utils lib 2022-01-21 19:21:30 +01:00
Alejandro Celaya
dd5bce9694 Merge pull request #1344 from acelaya-forks/feature/strinct-env-vars
Feature/strinct env vars
2022-01-20 21:08:33 +01:00
Alejandro Celaya
bef17ff76d Fixed inverted condition when determining locks 2022-01-20 20:56:38 +01:00
Alejandro Celaya
7202605fc8 Created EnvVarsTest 2022-01-20 20:40:34 +01:00
Alejandro Celaya
747dac531d Added a more strict way to handle valid and expected env vars 2022-01-20 20:16:37 +01:00
Alejandro Celaya
07d24f70e1 Merge pull request #1343 from acelaya-forks/feature/inline-specs-improvements
Feature/inline specs improvements
2022-01-18 20:27:02 +01:00
Alejandro Celaya
d0546a2ea2 Split spec to join ApiKey spec with short URLs, into inlined and regular versions 2022-01-18 20:14:24 +01:00
Alejandro Celaya
9e9621e7b2 Standardized how inlined or regular specs are applied to query builders 2022-01-18 20:06:32 +01:00
Alejandro Celaya
d39f3b4265 Enhanced TagRepositoryTest and replaced inlined quoting by doctrine connection quoting 2022-01-18 19:50:48 +01:00
Alejandro Celaya
223339cd61 Merge pull request #1337 from acelaya-forks/feature/short-urls-filtering
Feature/short urls filtering
2022-01-17 20:33:40 +01:00
Alejandro Celaya
dc430bae10 Refactored method in ShortUrlsRepository 2022-01-17 20:21:35 +01:00
Alejandro Celaya
661b07e12f Refactored ShortUrlRepository to wrap args into DTOs 2022-01-17 20:10:41 +01:00
Alejandro Celaya
0727c7bdfb Updated readme file 2022-01-17 19:12:50 +01:00
Alejandro Celaya
b4c52116b4 Enabled stryker report for infection 2022-01-17 07:41:33 +01:00
Alejandro Celaya
89dc6108b7 Merge pull request #1334 from acelaya-forks/feature/tackle-todos
Feature/tackle todos
2022-01-16 16:06:21 +01:00
Alejandro Celaya
492eba3a8b Fixed duplicated slashes generated in path when doing not-found redirects with placeholders 2022-01-16 15:54:22 +01:00
Alejandro Celaya
77fee1390f Renamed class to a more appropriate name 2022-01-16 15:41:20 +01:00
Alejandro Celaya
bfb54189b8 Moved some config to the proper namespace, now that config is no longer part of the public contract 2022-01-16 15:34:13 +01:00
Alejandro Celaya
fb43885d85 Merge pull request #1333 from acelaya-forks/feature/all-visits-endpoint
Feature/all visits endpoint
2022-01-16 12:49:01 +01:00
Alejandro Celaya
7c1f705e64 Created NonOrphanVisitsPaginatorAdapter test 2022-01-16 12:29:36 +01:00
Alejandro Celaya
fe1fa7689a Created endpoint to list non-orphan visits 2022-01-16 12:24:02 +01:00
Alejandro Celaya
8b79eee081 Updated changelog 2022-01-16 12:08:11 +01:00
Alejandro Celaya
4a3e04ced9 Added tests covering count non orphan visits with different combinations of filters 2022-01-16 11:44:12 +01:00
Alejandro Celaya
61618250ec Renamed countVisits to countNonOrphanVisits, and updated its signature to expect a VisitsCountFiltering DTO 2022-01-16 11:15:39 +01:00
Alejandro Celaya
60c0ca3ae5 Changed VisitsCountFiltering and VisitsListFiltering so that they encapsulate an ApiKey instead of a Spec 2022-01-16 10:56:37 +01:00
Alejandro Celaya
3436405c55 Merge branch 'develop' into feature/all-visits-endpoint 2022-01-16 10:23:22 +01:00
Alejandro Celaya
d43c3ec865 Merge pull request #1326 from acelaya-forks/feature/high-priority-env-vars
Feature/high priority env vars
2022-01-15 17:46:03 +01:00
Alejandro Celaya
545da96d15 Updated env vars ADR 2022-01-15 17:21:36 +01:00
Alejandro Celaya
f53305c404 Added ADR for the changes to load env vars on top of installer config 2022-01-15 17:17:22 +01:00
Alejandro Celaya
199d976e3d Updated changelog and upgrading doc 2022-01-15 16:55:57 +01:00
Alejandro Celaya
a1366f0ef1 Exposed port 8888 on php container for experimentation 2022-01-15 16:52:48 +01:00
Alejandro Celaya
91192a8a8f Updated to latest shlink-installer and shlink-config, ensuring env vars are properly loaded 2022-01-15 16:06:24 +01:00
Alejandro Celaya
c6f16b0558 Updated to latest installer with support for env vars 2022-01-15 11:34:17 +01:00
Alejandro Celaya
0d37eb65c9 Used PhpFileProvider to load installer generated config 2022-01-13 17:11:23 +01:00
Alejandro Celaya
f7e3a74794 Merge pull request #1323 from acelaya-forks/feature/doctrine-2.11
Updated to doctrine 2.11
2022-01-12 21:03:02 +01:00
Alejandro Celaya
976b07cd61 Updated to doctrine 2.11 2022-01-12 20:48:42 +01:00
Alejandro Celaya
cff9cd5fb8 Documented endpoint to get all non-orphan visits 2022-01-10 22:23:00 +01:00
Alejandro Celaya
f0fd947046 Moved existing paginator adapters that are related with visits to the Visits namespace 2022-01-10 22:16:33 +01:00
Alejandro Celaya
7f4ada9c4b Created method in VisitRepository to fetch all non-orphan visits 2022-01-10 21:43:32 +01:00
Alejandro Celaya
db4ef328b1 Renamed some visits paginator adapters for consistency 2022-01-10 20:26:33 +01:00
Alejandro Celaya
b438802e71 Merge pull request #1321 from acelaya-forks/feature/update-docker-deps
Feature/update docker deps
2022-01-10 17:30:34 +01:00
Alejandro Celaya
632a19ceeb Updated changelog 2022-01-10 17:12:09 +01:00
Alejandro Celaya
629f8ece7a Updated to latest docker images and openswoole 2022-01-10 17:10:36 +01:00
Alejandro Celaya
9215f9beb5 Merge pull request #1320 from acelaya-forks/feature/infection-update
Updated to infection 0.26
2022-01-10 15:37:05 +01:00
Alejandro Celaya
154431e86c Updated to infection 0.26 2022-01-10 15:15:16 +01:00
Alejandro Celaya
8cfb14198b Merge pull request #1319 from acelaya-forks/feature/emoji-support
Feature/emoji support
2022-01-10 14:51:13 +01:00
Alejandro Celaya
2ed475fc76 Ensure database fields are created with proper charset and collation in MySQL 2022-01-10 14:37:44 +01:00
Alejandro Celaya
34512da2fb Fixed indentation 2022-01-10 13:21:12 +01:00
Alejandro Celaya
5b3c6f7752 Fixed charset in local entity manager config 2022-01-10 13:09:24 +01:00
Alejandro Celaya
f4dd27ca3f Updated changelog 2022-01-10 13:05:40 +01:00
Alejandro Celaya
ce47d8c591 Added full support for emojis 2022-01-10 13:04:16 +01:00
Alejandro Celaya
b941ee9aa9 Removed usage of deprecated methods from migrations 2022-01-10 12:05:01 +01:00
Alejandro Celaya
45de3f0128 Ensured emojis in short URLs are not URL-encoded 2022-01-10 11:13:16 +01:00
Alejandro Celaya
41d3826c1a Ensured bars are replaced by dashes in custom slugs 2022-01-10 10:43:20 +01:00
Alejandro Celaya
f2ff6e6a70 Merge pull request #1318 from acelaya-forks/feature/custom-slug-simplification
Simplified how the custom slugs are processed, allowing more characte…
2022-01-10 10:28:17 +01:00
Alejandro Celaya
e47c90c645 Simplified how the custom slugs are processed, allowing more characters in the process 2022-01-09 21:02:23 +01:00
Alejandro Celaya
d2fef20239 Merge pull request #1317 from acelaya-forks/feature/tag-stats-endpoint
Feature/tag stats endpoint
2022-01-09 18:02:03 +01:00
Alejandro Celaya
3b359cfc4f Reduced amount of duplicated code in API tests 2022-01-09 17:47:19 +01:00
Alejandro Celaya
acfc5a4676 Updated changelog 2022-01-09 17:38:45 +01:00
Alejandro Celaya
a6b1647f27 Created TagStatsActionTest 2022-01-09 17:37:00 +01:00
Alejandro Celaya
d5851bbb6a Created TagsStats endpoint 2022-01-09 17:24:07 +01:00
Alejandro Celaya
397bbe2655 Merge pull request #1316 from acelaya-forks/feature/tags-ordering
Feature/tags ordering
2022-01-09 14:10:34 +01:00
Alejandro Celaya
95d8d3ef72 Added ordering by name support for tags list with stats 2022-01-09 13:38:59 +01:00
Alejandro Celaya
1b51a1aedd Added ordering support for tags list when not requesting stats 2022-01-09 13:31:08 +01:00
Alejandro Celaya
ff75b3cd1f Enhanced test covering list short URLs with invalid params 2022-01-09 11:28:32 +01:00
Alejandro Celaya
2abcaf02e2 Standardized ordering field handling and added validation for short URLs list 2022-01-09 11:23:27 +01:00
Alejandro Celaya
d0c9f5a776 Fixed merge conflicts 2022-01-08 17:40:49 +01:00
Alejandro Celaya
a46d510e2b Merge pull request #1314 from acelaya-forks/feature/paginated-tags-performance
Feature/paginated tags performance
2022-01-08 17:37:01 +01:00
Alejandro Celaya
2d861b4077 Improved performance when loading paginated tags, by using an ugly compound of native queries and DQL 2022-01-08 17:25:09 +01:00
Alejandro Celaya
470c62d993 Merge pull request #1313 from acelaya-forks/feature/redis-memory-usage
Added a default lifetime for cache entries when using redis
2022-01-07 21:50:31 +01:00
Alejandro Celaya
364734094b Added a default lifetime for cache entries when using redis 2022-01-07 21:37:24 +01:00
Alejandro Celaya
a667c957ee Added Twitter follow badge to readme 2022-01-07 16:15:47 +01:00
Alejandro Celaya
dc648b0142 Merge pull request #1311 from acelaya-forks/feature/ip-in-logs
Ensured remote IP address is not logged when using swoole/openswoole
2022-01-07 14:44:19 +01:00
Alejandro Celaya
1d14140986 Ensured remote IP address is not logged when using swoole/openswoole 2022-01-07 14:30:06 +01:00
Alejandro Celaya
2b693dc492 Merge pull request #1310 from acelaya-forks/feature/title-max-length
Feature/title max length
2022-01-07 14:24:58 +01:00
Alejandro Celaya
38bea6c086 Added edge case tests for SHortUrlMetaTest on title field 2022-01-07 14:07:07 +01:00
Alejandro Celaya
cbdc5f121e Updated changelog 2022-01-07 14:04:21 +01:00
Alejandro Celaya
562763199a Ensured URL titles are trimmed to avoid error when persisted in database 2022-01-07 13:13:45 +01:00
Alejandro Celaya
107c09604a Fixed performance issues on list tags endpoint when requesting it with stats 2022-01-06 19:01:00 +01:00
Alejandro Celaya
2b0567b368 Fixed typo 2022-01-06 18:35:50 +01:00
Alejandro Celaya
d00a56bec0 Fixed query to count tags when a search term is present 2022-01-06 12:22:05 +01:00
Alejandro Celaya
ead8cc6cec Merge pull request #1302 from acelaya-forks/feature/paginated-tags
Feature/paginated tags
2022-01-06 11:54:30 +01:00
Alejandro Celaya
806ff9daaf Updated changelog 2022-01-06 11:40:20 +01:00
Alejandro Celaya
b3863a3e10 Improved TagServiceTest, covering tagsInfo method with params 2022-01-06 11:36:08 +01:00
Alejandro Celaya
5559107776 Changed namespace for database tests to ShlinkioDbTest 2022-01-06 11:01:21 +01:00
Alejandro Celaya
af1cf806f0 Created tag paginator adapter tests 2022-01-06 10:55:57 +01:00
Alejandro Celaya
0cf33c6119 Added DB test for TagsPaginator 2022-01-06 10:35:01 +01:00
Alejandro Celaya
b38b8a3365 Extended TagRepositoryTest, covering filterings on tags 2022-01-06 10:13:37 +01:00
Alejandro Celaya
e998c8434d Extracted tags filtering params to a DTO 2022-01-06 09:50:43 +01:00
Alejandro Celaya
4b90cf93d3 Created DB-level paginator for tags with stats 2022-01-05 23:44:14 +01:00
Alejandro Celaya
3dd4e33758 Created DB-level paginator for tags without stats 2022-01-05 23:30:35 +01:00
Alejandro Celaya
6caeb11598 Added output logs for swoole during API tests 2022-01-05 22:14:09 +01:00
Alejandro Celaya
11a383b7e5 Extracted common logic from TagService to a private method 2022-01-05 19:25:50 +01:00
Alejandro Celaya
fd2a2530b1 Documented pagination for tags endpoint 2022-01-05 19:21:32 +01:00
Alejandro Celaya
2f42b2d072 Added API tests covering pagination for tags 2022-01-05 19:16:49 +01:00
Alejandro Celaya
775f58f972 Added support for pagination in tags lists 2022-01-05 19:12:08 +01:00
Alejandro Celaya
5c0abb3d96 Created TagsParams class 2022-01-05 18:19:29 +01:00
Alejandro Celaya
3dc46bc5a3 Updated to latest shlink-common and shlink-config 2022-01-05 17:46:38 +01:00
Alejandro Celaya
e2871fc048 Merge pull request #1301 from acelaya-forks/feature/desc-default-order
Changed default ordering of short URLs, returning newest first
2022-01-05 15:15:44 +01:00
Alejandro Celaya
44e3f9b49f Changed default ordering of short URLs, returning newest first 2022-01-05 14:10:24 +01:00
Alejandro Celaya
d3f4263639 Merge pull request #1298 from acelaya-forks/feature/filter-all-tags
Feature/filter all tags
2022-01-04 14:59:22 +01:00
Alejandro Celaya
9dec05f62d Added API test covering invalid tagsMode 2022-01-04 14:42:31 +01:00
Alejandro Celaya
0447aa07fa Added more API tests covering the new tagsMode param on short URLs list 2022-01-04 14:34:31 +01:00
Alejandro Celaya
0e25af790d Updated changelog 2022-01-04 14:28:00 +01:00
Alejandro Celaya
d8484e777f Added logic to actually filter short URLs by any tag or all tags 2022-01-04 14:23:21 +01:00
Alejandro Celaya
665a3dbcbf Documented tagsMode param for short URLs list 2022-01-04 12:22:36 +01:00
Alejandro Celaya
103af2e2c1 Added support for a new tagsMode param when listing short URLs 2022-01-04 12:11:47 +01:00
Alejandro Celaya
d0daeb0078 Merge pull request #1297 from acelaya-forks/feature/docker-image-size
Feature/docker image size
2022-01-03 19:49:12 +01:00
Alejandro Celaya
a9aa49c2e5 Updated changelog 2022-01-03 19:37:05 +01:00
Alejandro Celaya
aad24389a7 Slightly reduced docker image size by merging mssql and openswoole installation steps 2022-01-03 19:34:36 +01:00
Alejandro Celaya
4b4f6f3201 Removed gmp extension as bcmath does the same 2022-01-03 19:10:58 +01:00
Alejandro Celaya
81f82d3b73 Reduced docker image size by ensuring dev native libs are not included in final image 2022-01-03 18:48:08 +01:00
Alejandro Celaya
4103ccf791 Merge pull request #1292 from acelaya-forks/feature/simplify-matches
Simplified some match expressions
2022-01-01 21:15:45 +01:00
Alejandro Celaya
e2ed11f960 Updated installer 2022-01-01 18:43:41 +01:00
Alejandro Celaya
8e1cd67a3d Simplified some match expressions 2022-01-01 18:40:48 +01:00
Alejandro Celaya
18b4caa55e Fixed merge conflicts 2021-12-21 14:48:06 +01:00
Alejandro Celaya
30207ce0c2 Merge pull request #1287 from acelaya-forks/bugfix/db-error
Bugfix/db error
2021-12-21 14:43:13 +01:00
Alejandro Celaya
0f37f1cb23 Updated changelog 2021-12-21 14:25:21 +01:00
Alejandro Celaya
99a905cdee Updated to latest shlink-common with support to close EM on middleware 2021-12-21 14:22:11 +01:00
Alejandro Celaya
6eac079440 Ensured EM is closed and not cleared after running an async task 2021-12-21 14:10:06 +01:00
Alejandro Celaya
4a1e7b8d5a Changed condition to pipe RequestIdMiddleware, so that it applies to non-rest requests too 2021-12-19 10:23:55 +01:00
Alejandro Celaya
5e781a9010 Merge pull request #1284 from acelaya-forks/feature/visits-threshold-change
Feature/visits threshold change
2021-12-19 09:41:34 +01:00
Alejandro Celaya
277d817429 Removed API test which is no longer relevant 2021-12-18 18:41:11 +01:00
Alejandro Celaya
970f202757 Updated changelog 2021-12-18 18:26:27 +01:00
Alejandro Celaya
2c6b2b47a4 Updated installer 2021-12-18 18:23:27 +01:00
Alejandro Celaya
5c8be4b21f Updated logic to handle visits threshold env var so that it is disabled if not provided 2021-12-18 18:18:30 +01:00
Alejandro Celaya
558a4a2b30 Merge pull request #1281 from acelaya-forks/feature/update-deps
Updated dependencies
2021-12-16 22:08:17 +01:00
Alejandro Celaya
203ad7d594 Updated dependencies 2021-12-16 21:46:52 +01:00
Alejandro Celaya
04cf1aed9c Merge pull request #1279 from acelaya-forks/feature/remove-deprecated-stuff
Feature/remove deprecated stuff
2021-12-14 23:02:38 +01:00
Alejandro Celaya
8c14526f85 Fixed tests and updated changelog 2021-12-14 22:30:09 +01:00
Alejandro Celaya
1ff241411b Removed everything that was deprecated 2021-12-14 22:21:53 +01:00
Alejandro Celaya
351e36b273 Added missing 8.1 to clean-artifacts job in publish-release pipeline 2021-12-12 17:45:56 +01:00
Alejandro Celaya
ca06040efc Fixed publish-release and publish-swagger-spec pipelines 2021-12-12 17:38:50 +01:00
Alejandro Celaya
2102cc4e9a Merge pull request #1270 from shlinkio/develop
Release 2.10.0
2021-12-12 17:27:21 +01:00
Alejandro Celaya
14d3493db8 Merge pull request #1269 from acelaya-forks/feature/replace-ip-lib
Feature/replace ip lib
2021-12-12 17:21:08 +01:00
Alejandro Celaya
d082d208e1 Tagged specific versions for shlink packages 2021-12-12 17:08:26 +01:00
Alejandro Celaya
959efd17c8 Updated changelog 2021-12-12 13:31:08 +01:00
Alejandro Celaya
30a7c55e84 Migrated to a new lib to match IP addresses with ranges 2021-12-12 13:30:18 +01:00
Alejandro Celaya
2aec759857 Merge pull request #1267 from acelaya-forks/feature/rabbitmq
Feature/rabbitmq
2021-12-12 11:43:43 +01:00
Alejandro Celaya
54dcaaac0c Updated to an installer version with support for RabbitMQ 2021-12-12 11:24:58 +01:00
Alejandro Celaya
8e5730f374 Renamed Rabbit instances to use RabbitMq 2021-12-12 10:32:57 +01:00
Alejandro Celaya
cb1705b6e8 Created NotifyVisitToRabbitTest 2021-12-11 22:18:46 +01:00
Alejandro Celaya
0bcefda60d Added sockets and bcmath extensions to docker image 2021-12-11 21:44:56 +01:00
Alejandro Celaya
966620f840 Created event listener to send visits to a RabbitMQ instance 2021-12-11 21:04:16 +01:00
Alejandro Celaya
bd3bb67949 Added dependencies and config to integrate with Rabbit MQ 2021-12-11 17:07:40 +01:00
Alejandro Celaya
69f4daa9d2 Added dev container with RabbitMQ 2021-12-11 16:19:38 +01:00
Alejandro Celaya
ec11155c9c Updated publish swagger workflow to be triggered for tags 2021-12-11 13:17:45 +01:00
Alejandro Celaya
c48a3a24f7 Fix yet another typo in pipeline 2021-12-11 13:09:39 +01:00
Alejandro Celaya
1b8bc9f0ff Ensured version subfolder is preserved when publishing swagger spec 2021-12-11 13:04:45 +01:00
Alejandro Celaya
5bf25c7eca Added custom token for swagger publishing 2021-12-11 12:55:50 +01:00
Alejandro Celaya
5a7f0ad340 Fixed another typo... 2021-12-11 12:35:34 +01:00
Alejandro Celaya
8a93922da0 Added missing space in mv command 2021-12-11 12:27:45 +01:00
Alejandro Celaya
295de5be8e Changed how version is determined 2021-12-11 12:18:55 +01:00
Alejandro Celaya
5c114b584d Fixed typo 2021-12-11 12:11:22 +01:00
Alejandro Celaya
dad58b7610 Disabled env step on publis-swagger workflow 2021-12-11 11:53:18 +01:00
Alejandro Celaya
23c1dadb4c Merge pull request #1265 from acelaya-forks/feature/publish-swagger-workflow
Feature/publish swagger workflow
2021-12-11 11:44:12 +01:00
Alejandro Celaya
05332e0606 Created workflow to publish swagger specs 2021-12-11 11:40:59 +01:00
Alejandro Celaya
453842246f Ensured docker publish is run under ubuntu 20.04 2021-12-11 11:30:03 +01:00
Alejandro Celaya
38280b9027 Merge pull request #1264 from acelaya-forks/feature/unify-ci-jobs
Unified jobs in ci pipeline as much as possible
2021-12-11 10:47:10 +01:00
Alejandro Celaya
7d7c0011bb Fixed references to test:api and test:api:ci inside composer.json and added missing driver for MS SQL 2021-12-11 10:33:00 +01:00
Alejandro Celaya
de2d87a6d9 Unified jobs in ci pipeline as much as possible 2021-12-11 10:26:23 +01:00
Alejandro Celaya
537152450f Merge pull request #1263 from acelaya-forks/feature/api-tests-coverage
Feature/api tests coverage
2021-12-10 18:25:38 +01:00
Alejandro Celaya
87f6b19207 Updated changelog 2021-12-10 18:12:46 +01:00
Alejandro Celaya
064fef5d8a Added comment to explain why API tests coverage is generated the way it is 2021-12-10 18:12:00 +01:00
Alejandro Celaya
6aebaa94af Added mutations to API tests 2021-12-10 17:45:55 +01:00
Alejandro Celaya
a1a6ac9c08 Merge pull request #1262 from acelaya-forks/feature/env-var-fix
Added new IS_HTTPS_ENABLED env var and deprecated USE_HTTPS
2021-12-10 16:55:58 +01:00
Alejandro Celaya
0d936425c2 Added new IS_HTTPS_ENABLED env var and deprecated USE_HTTPS 2021-12-10 16:24:38 +01:00
Alejandro Celaya
00f867c6ee Merge pull request #1259 from acelaya-forks/feature/83-msi
Feature/83 msi
2021-12-10 14:17:20 +01:00
Alejandro Celaya
bfea3f35f0 Updated changelog 2021-12-10 14:01:58 +01:00
Alejandro Celaya
3f3cf5e20e Explicitly required an MSI of 83 for unit tests 2021-12-10 14:00:59 +01:00
Alejandro Celaya
0786a962e7 Increased MIS to 83% 2021-12-10 13:42:33 +01:00
Alejandro Celaya
f7c0486101 Added swagger:validate to ci and ci:parallel commands 2021-12-10 12:52:36 +01:00
Alejandro Celaya
2e3798b282 Merge pull request #1256 from acelaya-forks/feature/api-examples
Feature/api examples
2021-12-09 19:09:02 +01:00
Alejandro Celaya
181740c3e9 Fixed typo in swagger docs 2021-12-09 18:55:17 +01:00
Alejandro Celaya
23c51a1d5f Updated changelog 2021-12-09 18:52:27 +01:00
Alejandro Celaya
15ce529c09 Added swagger validation to CI pipeline 2021-12-09 18:51:26 +01:00
Alejandro Celaya
0fd941401b Added extra examples for error responses in swagger docs 2021-12-09 18:28:52 +01:00
Alejandro Celaya
808ae6a442 Fixed existing examples for API 2021-12-09 15:27:18 +01:00
Alejandro Celaya
ada8d18fa1 Merge pull request #1255 from acelaya-forks/feature/consistent-default-domain-redirects
Feature/consistent default domain redirects
2021-12-09 13:03:08 +01:00
Alejandro Celaya
9752abff19 Refactored method in DomainRepo, as one fo their arguments was no longer used 2021-12-09 12:43:49 +01:00
Alejandro Celaya
ee43e68a57 Changed behavior of domains list so that it does not return configured redirects as redirects for default domain 2021-12-09 12:32:53 +01:00
Alejandro Celaya
348ac78f5a Enhanced ListDomainsAction so that it returns default redirects in the response 2021-12-09 12:11:09 +01:00
Alejandro Celaya
0b22fb933c Defined new env vars for not-found redirects, deprecating old ones 2021-12-09 10:30:33 +01:00
Alejandro Celaya
cbd4b4849f Ensured default domain is stripped when creating short URLs from CLI 2021-12-09 10:24:58 +01:00
Alejandro Celaya
f8a48c16f0 Renamed GenerateShortUrlCommand to CreateShortUrlCommand 2021-12-09 09:45:15 +01:00
Alejandro Celaya
8cc4e4bfca Merge branch 'develop' into feature/consistent-default-domain-redirects 2021-12-09 09:18:17 +01:00
Alejandro Celaya
6c01bb87bf Replaced tabs by spaces in phpstan.neon config 2021-12-08 17:52:17 +01:00
Alejandro Celaya
02d5a6f15e Merge pull request #1253 from acelaya-forks/feature/php8.1
Feature/php8.1
2021-12-08 17:49:15 +01:00
Alejandro Celaya
f361403888 Updated paginator types 2021-12-08 17:36:40 +01:00
Alejandro Celaya
3a4550fe24 Updated dependencies to corresponding versions supporting PHP 8.1 2021-12-08 09:40:43 +01:00
Alejandro Celaya
5e722c830f Allowed to set redirects for default domain via command line or API 2021-12-07 21:13:47 +01:00
Alejandro Celaya
5a56982ad9 Merge pull request #1252 from acelaya-forks/feature/docker-debug-fix
Updated docker entry point to make sure debugging and verbosity of co…
2021-12-07 19:27:43 +01:00
Alejandro Celaya
13d70cd12a Updated docker entry point to make sure debugging and verbosity of commands works as expected 2021-12-07 19:14:56 +01:00
Alejandro Celaya
bb87bdce8a Updated docker images to use PHP 8.1 2021-12-07 10:43:36 +01:00
Alejandro Celaya
cc7ded1be7 Removed allowed failures in CI pipeline for PHP 8.1 2021-12-07 09:55:06 +01:00
Alejandro Celaya
d8735e6a91 Merge pull request #1250 from acelaya-forks/feature/qr-round-block-size
Feature/qr round block size
2021-12-06 18:19:53 +01:00
Alejandro Celaya
813ae71aad Added test checking if auto margin is added to QR codes 2021-12-06 18:06:29 +01:00
Alejandro Celaya
1a75bd87d8 Updated installer with support for QR code block size rounding 2021-12-06 17:35:32 +01:00
Alejandro Celaya
bdc89e2056 Fixed execution on non-swoole contexts 2021-12-06 17:15:19 +01:00
Alejandro Celaya
bf09990f9c Added support to disable rounding on block size for QR codes 2021-12-06 17:10:10 +01:00
Alejandro Celaya
81ba8dc518 Merge pull request #1249 from acelaya-forks/feature/yourls-import
Added support to import from YOURLS
2021-12-05 15:38:41 +01:00
Alejandro Celaya
e519aaaf1e Added support to import from YOURLS 2021-12-05 15:16:41 +01:00
Alejandro Celaya
5a90a5e6c7 Merge pull request #1248 from acelaya-forks/feature/openswoole
Feature/openswoole
2021-12-05 10:21:20 +01:00
Alejandro Celaya
b855ea92a9 Updated changelog 2021-12-05 10:09:06 +01:00
Alejandro Celaya
7e74d06cdd Added support for openswoole and migrated docker images from swoole to openswoole 2021-12-05 10:08:10 +01:00
Alejandro Celaya
1e7602bc36 Merge pull request #1247 from acelaya-forks/feature/mutation-badge
Added mutation score badge
2021-12-05 09:24:44 +01:00
Alejandro Celaya
7477e672fe Added mutation score badge 2021-12-05 08:55:05 +01:00
Alejandro Celaya
4a4522dfa3 Merge pull request #1246 from acelaya-forks/feature/mssql-updates
Updated dependencies
2021-12-02 21:11:39 +01:00
Alejandro Celaya
8afe058cfc Updated dependencies 2021-12-02 20:57:06 +01:00
Alejandro Celaya
e13103a925 Merge pull request #1245 from acelaya-forks/feature/mssqlsrv-beta2
Update ci.yml
2021-12-02 19:44:32 +01:00
Alejandro Celaya
8e167ff174 Merge pull request #1244 from acelaya-forks/feature/missing-domain-in-error
Added domain to DeleteShortUrlException
2021-12-02 19:34:02 +01:00
Alejandro Celaya
c0dcd31819 Update ci.yml 2021-12-02 19:33:01 +01:00
Alejandro Celaya
a83ae996db Ensured a formatter is resolved 2021-11-30 21:47:23 +01:00
Alejandro Celaya
a66ddabe8a Added domain to DeleteShortUrlException 2021-11-30 21:38:09 +01:00
Alejandro Celaya
cdab1e9cae Pulled 2021-11-15 19:56:10 +01:00
Alejandro Celaya
f2140d1eb0 Fixed merge conflicts 2021-11-15 19:55:07 +01:00
Alejandro Celaya
4a3fa85b5f Merge pull request #1234 from acelaya-forks/feature/sql-injection
Enforced doctrine/dbal 3.1.4
2021-11-15 19:53:01 +01:00
Alejandro Celaya
ade23a9650 Enforced doctrine/dbal 3.1.4 2021-11-15 19:41:38 +01:00
Alejandro Celaya
fc547e6c47 Merge pull request #1224 from acelaya-forks/feature/phpstan-1.0
Updated to phpstan 1.0
2021-11-04 21:38:31 +01:00
Alejandro Celaya
f532b5edee Added LC_ALL: C env var during ms db tests 2021-11-04 21:31:51 +01:00
Alejandro Celaya
da76eb5cf4 Updated to phpstan 1.0 2021-11-04 21:17:31 +01:00
Alejandro Celaya
ac89f352ce Updated shlink libs 2021-11-01 11:27:44 +01:00
Alejandro Celaya
198b2a2ace Merge pull request #1220 from acelaya-forks/feature/update-dev-mercure
Updated mercure on dev env from v0.10 to 0.13
2021-10-31 20:00:46 +01:00
Alejandro Celaya
93a3d78111 Updated mercure on dev env from v0.10 to 0.13 2021-10-31 19:42:40 +01:00
Alejandro Celaya
494997d021 Merge pull request #1219 from acelaya-forks/feature/symfony-mercure-0.6
Updated to symfony/mercure 0.6
2021-10-31 13:24:34 +01:00
Alejandro Celaya
eb1345e5c3 Updated to symfony/mercure 0.6 2021-10-31 13:02:58 +01:00
Alejandro Celaya
dc8f5d002d Merge pull request #1215 from shlinkio/develop
Release 2.9.2
2021-10-23 16:52:47 +02:00
Alejandro Celaya
9030e5e6eb Merge pull request #1214 from acelaya-forks/feature/min-task-workers
Feature/min task workers
2021-10-23 16:47:18 +02:00
Alejandro Celaya
2b827baeed Updated changelog 2021-10-23 16:35:38 +02:00
Alejandro Celaya
cc6fa312f0 Ensured minimum amount of task workers provided via config option or env var is 4 2021-10-23 16:32:06 +02:00
Alejandro Celaya
b8eba5b643 Merge pull request #1213 from acelaya-forks/feature/migrations-3.3
Feature/migrations 3.3
2021-10-23 16:18:39 +02:00
Alejandro Celaya
0c3f98cc37 Replaced implicit false in migration by a check on the platform 2021-10-23 16:04:54 +02:00
Alejandro Celaya
cd35770d26 Ensured migrations are not transactional when run in mysql 2021-10-23 16:02:29 +02:00
Alejandro Celaya
bd3a59e9ca Updated to doctrine-migrations 3.3 2021-10-23 15:44:56 +02:00
Alejandro Celaya
ff50d601b3 Merge pull request #1212 from acelaya-forks/feature/wrong-transactionality
Removed transactionality when dispatching async events
2021-10-23 13:49:09 +02:00
Alejandro Celaya
a4fde0f9e6 Changed mechanism to determine if connection to database worked for health endpoint 2021-10-23 13:36:27 +02:00
Alejandro Celaya
c7a621cb31 Removed transactionality when dispatching async events, as they run in different processes with different db connections 2021-10-23 13:22:42 +02:00
Alejandro Celaya
6f62d62909 Merge pull request #1203 from shlinkio/develop
Release 2.9.1
2021-10-11 09:03:16 +02:00
Alejandro Celaya
c3aa2df4e9 Merge pull request #1202 from acelaya-forks/feature/fix-use-https
Fixed crash when trying to resolve schema based on USE_HTTPS env var
2021-10-11 09:01:38 +02:00
Alejandro Celaya
f4fbf2da75 Tagged version in changelog 2021-10-11 08:47:41 +02:00
Alejandro Celaya
288de8acaa Fixed crash when trying to resolve schema based on USE_HTTPS env var 2021-10-11 08:46:40 +02:00
Alejandro Celaya
750e6cff45 Merge pull request #1200 from shlinkio/develop
Release 2.9.0
2021-10-10 22:45:17 +02:00
Alejandro Celaya
f49e94052d Merge pull request #1199 from acelaya-forks/feature/address-based-tracking
Feature/address based tracking
2021-10-10 22:42:27 +02:00
Alejandro Celaya
ceb642b745 Updated to latest installer and changelog 2021-10-10 22:31:26 +02:00
Alejandro Celaya
ed1d886f01 Added option to disable tracking based on IP address patterns 2021-10-10 22:00:22 +02:00
Alejandro Celaya
db98d811b0 Merge pull request #1198 from acelaya-forks/feature/orphan-visits-webhook
Feature/orphan visits webhook
2021-10-09 13:08:05 +02:00
Alejandro Celaya
14ba11e1ab Enhanced changelog 2021-10-09 12:36:37 +02:00
Alejandro Celaya
483bdddb18 Updated to installer version with support for orphan visits webhooks 2021-10-09 12:35:45 +02:00
Alejandro Celaya
d16fda3f16 Added option to send orphan visits to webhooks 2021-10-09 10:53:21 +02:00
Alejandro Celaya
c718b94937 Fixed crash when notifying orphan visits to a webhook 2021-10-09 10:35:37 +02:00
Alejandro Celaya
bb21ab073f Merge pull request #1196 from acelaya-forks/feature/redis-sentinels
Feature/redis sentinels
2021-10-08 19:05:17 +02:00
Alejandro Celaya
3ffe530461 Updated changelog 2021-10-08 18:52:53 +02:00
Alejandro Celaya
95cf0d86bc Added support to provide redis sentinel when using redis cache 2021-10-08 18:52:17 +02:00
Alejandro Celaya
9899a5fc56 Merge pull request #1195 from acelaya-forks/feature/not-found-redirect-placeholders
Feature/not found redirect placeholders
2021-10-03 17:04:17 +02:00
Alejandro Celaya
952648185c Removed duplicated space 2021-10-03 16:48:39 +02:00
Alejandro Celaya
69740493b7 Updated changelog 2021-10-03 16:47:43 +02:00
Alejandro Celaya
994a28f31d Ensured NotFoundRedirectResolver replaces placeholders from the URL 2021-10-03 16:45:13 +02:00
Alejandro Celaya
b0a8a03f0a Refactored NotFoundRedirectResolver to remove duplicated lines and non-strict code 2021-10-03 10:35:35 +02:00
Alejandro Celaya
36e740f4cc Added logic to forward path and domain to not-found redirects when they contain placeholders 2021-10-02 17:30:25 +02:00
Alejandro Celaya
a5874a3f80 Merge pull request #1194 from acelaya-forks/feature/optinally-forward-query
Feature/optinally forward query
2021-10-02 10:56:48 +02:00
Alejandro Celaya
0c95b978b4 Added option in CLI to disable query forwarding when creating Short URLs 2021-10-02 10:45:00 +02:00
Alejandro Celaya
e21f9dd1fb Added forwardQuery prop to the SHortUrl serialization 2021-10-02 10:31:23 +02:00
Alejandro Celaya
74a08b86ce Estended ShortUrlRedirectionBuilderTest covering short URLS withput query forwarding 2021-10-02 10:16:56 +02:00
Alejandro Celaya
8212d3c540 Allowed to set and update the forwardQuery param on short URLs 2021-10-02 10:02:47 +02:00
Alejandro Celaya
1ed6458b39 Added forwardQuery property in short URLs, that determines if the query should be forwarded to the long URL 2021-10-02 09:32:04 +02:00
Alejandro Celaya
60c8f23a63 Merge pull request #1193 from acelaya-forks/feature/api-key-visits
Added extra DB tests ensuring proper short URL visits are resolved fr…
2021-10-01 19:59:30 +02:00
Alejandro Celaya
5e627641ea Added more tests ensuring any short URL can be fetched by using an admin API key 2021-10-01 19:32:34 +02:00
Alejandro Celaya
abc954aa47 Added extra DB tests ensuring proper short URL visits are resolved from an API key 2021-09-30 22:57:24 +02:00
Alejandro Celaya
3bfa27e682 Merge pull request #1191 from acelaya-forks/feature/default-qr-codes-config
Feature/default qr codes config
2021-09-26 20:39:09 +02:00
Alejandro Celaya
4b7e122254 Updated changelog 2021-09-26 20:15:00 +02:00
Alejandro Celaya
cfd3c13751 Updated to latest installer 2021-09-26 20:13:50 +02:00
Alejandro Celaya
6a1ee2b894 Added new config to set custom defaults for QR codes 2021-09-26 13:25:02 +02:00
Alejandro Celaya
cbec4a4e81 Moved constants to its own file inside config folder 2021-09-26 11:26:26 +02:00
Alejandro Celaya
c7d8c1cab5 Merge pull request #1189 from acelaya-forks/feature/roll-back-domain-redirects-logic
Reolled-back logic that would have made domains with no specific redi…
2021-09-26 11:22:58 +02:00
Alejandro Celaya
c39e1e649d Reolled-back logic that would have made domains with no specific redirects to not fall back to the default redirects 2021-09-26 11:10:00 +02:00
Alejandro Celaya
95ab64ba77 Merge pull request #1187 from acelaya-forks/feature/build-8.1
Feature/build 8.1
2021-09-26 10:43:55 +02:00
Alejandro Celaya
1f8fcdb0f3 Fixed typo in ci workflow 2021-09-26 10:20:09 +02:00
Alejandro Celaya
fb26a8ae50 Downgraded pdo_sqlsrv version for PHP 8.0 2021-09-26 10:19:26 +02:00
Alejandro Celaya
42dbeaa1a5 Updated MS native deps in swoole dev container 2021-09-26 10:06:35 +02:00
Alejandro Celaya
3305f4c03a Updated pdo_sqlsrv version used in CI workflow 2021-09-26 10:04:50 +02:00
Alejandro Celaya
f5beec70c8 Updated MS native deps 2021-09-26 10:03:07 +02:00
Alejandro Celaya
c2cd21c15e Updated swoole version used in CI workflow 2021-09-26 09:53:58 +02:00
Alejandro Celaya
633e389275 Updated changelog 2021-09-26 09:50:35 +02:00
Alejandro Celaya
f5aaf298e1 Added experimental builds under PHP 8.1 2021-09-26 09:49:51 +02:00
Alejandro Celaya
7db6136436 Simplified how the not-found redirects are resolved 2021-09-26 09:40:24 +02:00
Alejandro Celaya
ce7296eebb Merge pull request #1186 from acelaya-forks/feature/deprecate-domain-env-vars
Feature/deprecate domain env vars
2021-09-26 09:23:01 +02:00
Alejandro Celaya
c6226547f7 Updated changelog 2021-09-26 09:12:26 +02:00
Alejandro Celaya
e7ec8f0489 Deprecated SHORT_DOMAIN_* env vars with replacements 2021-09-26 09:10:54 +02:00
Alejandro Celaya
dc466f238b Updated changelog 2021-09-12 08:32:24 +02:00
Alejandro Celaya
f164656874 Merge pull request #1172 from NReilingh/patch-1
Slight misuse of VOLUME in Dockerfile
2021-09-12 08:30:28 +02:00
Nick Reilingh
ef3c59152f Dockerfile -- remove unneeded VOLUME instructions 2021-09-11 16:40:09 -04:00
Nick Reilingh
14c6ead389 Dockerfile - comment misused VOLUME instructions
Issuing a VOLUME instruction in a production Dockerfile requires the Docker engine to create a volume whether or not it is mapped to the host or a named volume. Neither of these paths have data that needs to be persisted for production use, so their inclusion under a typical `docker run` example forces the engine to create extraneous volumes which quickly become orphaned whenever the container is recreated.
2021-09-11 13:46:52 -04:00
Alejandro Celaya
b0d33f3a85 Merge pull request #1166 from acelaya-forks/feature/fix-undefined-var
Feature/fix undefined var
2021-08-26 10:06:33 +02:00
Alejandro Celaya
066cc20ee6 Updated changelog 2021-08-26 09:53:10 +02:00
Alejandro Celaya
0f51b5b1ce Fixed warning displayed when trying to late visits and there are no pending 2021-08-26 09:52:11 +02:00
Alejandro Celaya
ebcf3e0119 Merge pull request #1158 from acelaya-forks/feature/global-cors
Feature/global cors
2021-08-16 13:02:18 +02:00
Alejandro Celaya
6ee248d656 Updated changelog 2021-08-16 12:50:18 +02:00
Alejandro Celaya
8a46b410f6 Ensured Cors middleware applies for all routes, not only rest ones 2021-08-16 12:49:15 +02:00
Alejandro Celaya
cd06cea153 Fixed merge conflicts 2021-08-15 19:32:27 +02:00
Alejandro Celaya
8393d44c50 Merge pull request #1156 from acelaya-forks/feature/query-num-keys
Fixed numeric query params being replaced by 0 in long URLs
2021-08-15 19:25:13 +02:00
Alejandro Celaya
3e8ce80f80 Fixed numeric query params being replaced by 0 in long URLs 2021-08-15 19:13:26 +02:00
Alejandro Celaya
80e033c91d Fixed local dev config for db 2021-08-14 19:23:08 +02:00
Alejandro Celaya
a7dd441333 Added missing double quote. Closes #1151 2021-08-09 22:16:12 +02:00
Alejandro Celaya
48efaa9fd7 Merge pull request #1150 from acelaya-forks/feature/env-config
Feature/env config
2021-08-07 14:13:26 +02:00
Alejandro Celaya
92e831175f Ensure no DB driver config falls back to SQLite 2021-08-07 13:32:59 +02:00
Alejandro Celaya
9b75e076b5 Updated changelog 2021-08-07 11:08:52 +02:00
Alejandro Celaya
2c5d6d1651 Moved env vars to common global config files, so that theycan be used in non-docker contexts too 2021-08-07 11:05:20 +02:00
Alejandro Celaya
c5cf116f33 Fixed changelog message 2021-08-06 19:59:35 +02:00
Alejandro Celaya
66a4a9bce6 Moved bugfix from Unreleased to v2.8.0, as it's already fixed there 2021-08-06 13:57:39 +02:00
Alejandro Celaya
7e7ef64c79 Merge pull request #1146 from acelaya-forks/feature/coding-standard
Updated to coding standard v2.2.0
2021-08-05 19:58:34 +02:00
Alejandro Celaya
9a31f53d4d Updated to coding standard v2.2.0 2021-08-05 19:47:17 +02:00
Alejandro Celaya
60d6314262 Merge pull request #1145 from acelaya-forks/feature/update-cache
Feature/update cache
2021-08-05 17:07:41 +02:00
Alejandro Celaya
eff7445804 Updated changelog 2021-08-05 16:50:50 +02:00
Alejandro Celaya
2bfe21aef4 Documented architectural decission on what component to pick for caching 2021-08-05 16:47:30 +02:00
Alejandro Celaya
6ae0c7dcfc Updated to latest common with symfony/cache support 2021-08-05 14:05:44 +02:00
Alejandro Celaya
883ac1007a Updated to provisional hero-common v4.0 2021-08-04 18:46:19 +02:00
Alejandro Celaya
ff6747dab5 Merge pull request #1143 from shlinkio/develop
Release 2.8.0
2021-08-04 15:43:59 +02:00
Alejandro Celaya
555e6f804c Merge pull request #1141 from acelaya-forks/feature/update-deps
Feature/update deps
2021-08-04 15:36:28 +02:00
Alejandro Celaya
98c5c7990f Updated changelog 2021-08-04 13:29:33 +02:00
Alejandro Celaya
27dcdb517d Updated dockerfile dependencies 2021-08-04 13:28:14 +02:00
Alejandro Celaya
916d75d161 Updated project dependencies 2021-08-04 13:22:16 +02:00
Alejandro Celaya
57bd16f4f5 Updated test utils lib to v2.2 2021-08-04 11:11:00 +02:00
Alejandro Celaya
444a1756a2 Merge pull request #1140 from acelaya-forks/feature/domain-redirects-endpoint
Feature/domain redirects endpoint
2021-08-03 19:59:54 +02:00
Alejandro Celaya
0c97c8f04f Updated changelog 2021-08-03 19:47:44 +02:00
Alejandro Celaya
de81e81ecb Created API test for Domain redirects 2021-08-03 19:43:30 +02:00
Alejandro Celaya
40a7d5a112 Documented error when trying to edit default domain redirects through endpoint 2021-08-03 18:33:50 +02:00
Alejandro Celaya
7c06633a67 Ensured default domain redirects cannot be edited through regular approach 2021-08-03 18:28:09 +02:00
Alejandro Celaya
9abf611d63 Created DomainResirectsAction unit test 2021-08-03 18:09:39 +02:00
Alejandro Celaya
565fe4c348 Added redirects to the list of domains 2021-08-03 17:00:26 +02:00
Alejandro Celaya
7b43403b1c Fixed error when editing domain redirects for a new domain 2021-08-03 16:48:17 +02:00
Alejandro Celaya
9f25979b4c Added validation to not found redirects for domain 2021-08-03 14:08:36 +02:00
Alejandro Celaya
20f70b8b07 Created new table with row separators for CLI, to use with multi-line rows 2021-08-03 10:21:42 +02:00
Alejandro Celaya
8fbf05acd4 Added deprecated keyword to ensure something is changed for v3.0.0 2021-08-03 10:02:44 +02:00
Alejandro Celaya
6860855c71 Prevent double flush when editing domain redirects 2021-08-03 09:55:21 +02:00
Alejandro Celaya
b78660c685 Updated installer 2021-08-02 20:50:35 +02:00
Alejandro Celaya
6a40bbdcb5 Created new action to set redirects for a domain 2021-08-02 20:49:39 +02:00
Alejandro Celaya
5a1a4f5594 Added support to configure domain redirects but taking into consideration the permissions on an API key 2021-08-02 20:49:39 +02:00
Alejandro Celaya
2ac7be4363 Extended DomainNotFoundException to allow creating from an authority 2021-08-02 20:49:39 +02:00
Alejandro Celaya
4ef5ab7a90 Fixed wrong domains getting resolved for an API key roles 2021-08-02 20:49:39 +02:00
Alejandro Celaya
192308a6a3 Added swagger docs for endpoint do edit domain redirects 2021-08-02 20:49:39 +02:00
Alejandro Celaya
c9ce111643 Fixed merge conflicts 2021-08-02 20:39:33 +02:00
Alejandro Celaya
32fda231ad Merge pull request #1138 from acelaya-forks/feature/fix-import-with-no-visits
Feature/fix import with no visits
2021-08-02 20:34:06 +02:00
Alejandro Celaya
e4d4686717 Ensure visits lists where the page is lower than 1, fall back to page 1 to avoid errors 2021-08-02 20:22:07 +02:00
Alejandro Celaya
ca6c6a1b6e Updated importer to v2.3.1 2021-08-02 18:29:16 +02:00
Alejandro Celaya
806c4ce168 Merge pull request #1134 from acelaya-forks/feature/infection24
Feature/infection24
2021-08-01 10:11:53 +02:00
Alejandro Celaya
9d14597be0 Added --only-covering-test-cases flag when running infection commands 2021-08-01 10:00:24 +02:00
Alejandro Celaya
dc68bb907c Updated infection to v0.24 2021-08-01 09:57:34 +02:00
Alejandro Celaya
e4598c058a Merge pull request #1133 from acelaya-forks/feature/docker-cron-permissions
Disabled user change on Dockerfile, as it produces some issues
2021-08-01 09:11:06 +02:00
Alejandro Celaya
377562cdff Disabled user change on Dockerfile, as it produces some issues 2021-08-01 08:55:39 +02:00
Alejandro Celaya
969fcccc1f Merge pull request #1131 from acelaya-forks/feature/clean-workarounds-from-fix
Removed hardcoded dependency
2021-07-30 18:54:45 +02:00
Alejandro Celaya
4c00764146 Removed hardcoded dependency 2021-07-30 18:40:26 +02:00
Alejandro Celaya
e98ee64695 Merge branch 'main' into develop 2021-07-30 18:25:48 +02:00
Alejandro Celaya
51c7d0ed3e Removed deprecated env var for publish release 2021-07-30 18:25:00 +02:00
Alejandro Celaya
db93498ee6 Fixed merge conflicts 2021-07-30 18:19:32 +02:00
Alejandro Celaya
b3af493758 Merge pull request #1130 from acelaya-forks/feature/docker-memory-limit
Fixed memory too low limit on docker image
2021-07-30 18:16:40 +02:00
Alejandro Celaya
7b9ebbbb5f Fixed use of ImplicitOptionsMiddleware with its new signature 2021-07-30 18:05:03 +02:00
Alejandro Celaya
ea735fc0a0 Ensured guzzle/psr7 1.7 is used as the project still has deprecated calls 2021-07-30 17:48:43 +02:00
Alejandro Celaya
06227e97d0 Fixed memory too low limit on docker image 2021-07-30 17:39:45 +02:00
Alejandro Celaya
dbc50b6d4f Merge pull request #1124 from acelaya-forks/feature/domain-specific-redirects
Feature/domain specific redirects
2021-07-23 18:59:24 +02:00
Alejandro Celaya
8b75ad1e7f Covered detached domains with redirects in domains list API test 2021-07-23 13:11:09 +02:00
Alejandro Celaya
8f3c740b57 Ensured domains not used in short URLs but with redirects configured are returned in domains list 2021-07-23 13:06:03 +02:00
Alejandro Celaya
24a6a0c23f Added test for DomainRedirectCommand 2021-07-22 20:48:58 +02:00
Alejandro Celaya
267d72a76c Improved unit tests covering new not found redirects for domains capability 2021-07-22 17:49:37 +02:00
Alejandro Celaya
021cecc216 Created command that allows configuring not found redirects for every domain 2021-07-21 21:09:33 +02:00
Alejandro Celaya
4642480bbb Updated changelog 2021-07-21 09:41:58 +02:00
Alejandro Celaya
4d48482d1e Added support to define differnet not-found redirects per domain 2021-07-21 09:28:21 +02:00
Alejandro Celaya
2054784a4a Merge pull request #1123 from acelaya-forks/feature/match-in-db-tests
Replaced map with match
2021-07-20 14:04:19 +02:00
Alejandro Celaya
57d816b862 Replaced map with match 2021-07-20 14:03:19 +02:00
Alejandro Celaya
32bb66c42b Merge pull request #1122 from acelaya-forks/feature/phpstan-level
Feature/phpstan level
2021-07-20 14:01:45 +02:00
Alejandro Celaya
e4d15e64b6 Ensured static analysis is run with APP_ENV=test 2021-07-20 13:50:14 +02:00
Alejandro Celaya
b11daeae7d Fixed version constraint in composer.json 2021-07-20 13:41:55 +02:00
Alejandro Celaya
8e78f8527e Updated changelog 2021-07-20 13:37:00 +02:00
Alejandro Celaya
bc385744db Temporarely ignored some phpstan errors until a custom rule is defined 2021-07-20 13:36:09 +02:00
Alejandro Celaya
02fd28edec Installed phpstan-dcotrine and fixed more static analysis errors 2021-07-20 13:29:50 +02:00
Alejandro Celaya
95770ac104 Increased phpstan level to 8 2021-07-20 12:51:07 +02:00
Alejandro Celaya
2eeb762cd9 Moved specific phpstan ignore to their own lines 2021-07-19 22:50:32 +02:00
Alejandro Celaya
de5666d262 Resolved all phpstan errors 2021-07-19 22:47:12 +02:00
Alejandro Celaya
934d266880 Added phpstan-symfony plugin to improve inspections on getArgument and getOption 2021-07-19 20:00:53 +02:00
Alejandro Celaya
b8fa234dbb Fixed some phpstan errors 2021-07-19 18:35:42 +02:00
Alejandro Celaya
bceea090ed Increaed phpstan level to 7 2021-07-17 20:58:24 +02:00
Alejandro Celaya
8efda2ef56 Merge pull request #1108 from kanadaj/develop
Change the Docker user to non-root
2021-07-15 20:19:42 +02:00
Alejandro Celaya
f86cda6730 Removed deprecated env var for publish release 2021-07-15 19:53:42 +02:00
Alejandro Celaya
43f59a19fb Merge pull request #1120 from acelaya-forks/feature/redirect-with-extra-path
Feature/redirect with extra path
2021-07-15 19:48:16 +02:00
Alejandro Celaya
eabaa94e06 Created ExtraPathRedirectMiddleware test 2021-07-15 19:37:09 +02:00
Alejandro Celaya
20575a2b0f Added support to provide append_extra_path config from installer or env vars for docker 2021-07-15 18:57:32 +02:00
Alejandro Celaya
0096a778ac Created RequestTracker test 2021-07-15 17:43:29 +02:00
Alejandro Celaya
050f83e3bb Wrapped logic to track requests to a new RequestTracker service 2021-07-15 17:23:09 +02:00
Alejandro Celaya
32f7b4fbf6 Created new middleware that redirects to short URLs with an extra path 2021-07-15 16:54:54 +02:00
Alejandro Celaya
265e8cdeaf Refactored tracking actions 2021-07-15 13:28:31 +02:00
Alejandro Celaya
fe5460e0c5 Created ShortUrlRedirectBuilder test 2021-07-14 16:44:21 +02:00
Alejandro Celaya
d4cad337fc Created component wrapping the logic to determine what's the URL to redirect to for a ShortUrl 2021-07-14 16:36:03 +02:00
Alejandro Celaya
0af6ecbd34 Merge pull request #1115 from acelaya-forks/feature/qr-code-correction
Feature/qr code correction
2021-07-13 14:13:34 +02:00
Alejandro Celaya
6466045363 Updated changelog 2021-07-13 14:00:54 +02:00
Alejandro Celaya
67c7e503d9 Used lowercase values when trying to match the QR code error level 2021-07-13 13:55:00 +02:00
Alejandro Celaya
01e06f0503 Improved swagger docs for QR code endpoint 2021-07-13 13:53:10 +02:00
Alejandro Celaya
d6e155d874 Extracted logic to determine QR code params to its own data object 2021-07-13 13:46:01 +02:00
Alejandro Celaya
5a2350bac1 Added suport for error correction level to QR codes 2021-07-13 13:22:50 +02:00
kanadaj
2b97f9ac9e Update Dockerfile
Security update
2021-06-13 23:54:35 +01:00
kanadaj
090b215179 Update Dockerfile 2021-06-13 23:51:16 +01:00
Alejandro Celaya
32f483c333 Merge pull request #1107 from PxSonny/patch-1
Update CONTRIBUTING.md
2021-06-13 21:21:44 +02:00
Sonny Alves Dias
655652f94f Update CONTRIBUTING.md
Fixing a typo
2021-06-13 22:24:20 +08:00
Alejandro Celaya
53b84c147c Merge branch 'develop' of github.com:shlinkio/shlink into develop 2021-05-30 17:55:37 +02:00
Alejandro Celaya
d8b4827601 Updated changelog 2021-05-30 17:55:30 +02:00
Alejandro Celaya
5737acf759 Merge pull request #1099 from mikafouenski/develop
Run periodic `visit:locate` as opt-in
2021-05-30 17:55:13 +02:00
Alejandro Celaya
58262e8604 Update docker/docker-entrypoint.sh 2021-05-30 17:41:40 +02:00
Alejandro Celaya
b9e5eaf689 Update docker/docker-entrypoint.sh 2021-05-30 17:41:00 +02:00
Alejandro Celaya
6d78cd59e9 Fixed merge conflicts 2021-05-30 13:31:37 +02:00
Alejandro Celaya
aa00e33b6d Added v2.7.1 to changelog 2021-05-30 13:25:37 +02:00
Alejandro Celaya
4ef04c641e Merge pull request #1101 from acelaya-forks/feature/disable-geolite-download
Feature/disable geolite download
2021-05-30 13:02:30 +02:00
Alejandro Celaya
bfcccd8c33 Added test to check for GeoLite db update disabling based on tracking options 2021-05-30 12:36:58 +02:00
Alejandro Celaya
f7d3c73c4a Skip downloading GeoLite db if global tracking or IP tracking are disabled 2021-05-30 12:30:03 +02:00
Mickaël Bernardini
bfdece1c23 add ENABLE_PERIODIC_VISIT_LOCATE opt-in
This will trigger `visit:locate` every hour
2021-05-26 15:45:24 +02:00
Alejandro Celaya
a68f450d36 Merge pull request #1097 from acelaya-forks/feature/php8
Feature/php8
2021-05-23 12:54:12 +02:00
Alejandro Celaya
d1df225e47 Moved changelog line 2021-05-23 12:39:00 +02:00
Alejandro Celaya
9c6ba4bc61 More PHP 8 syntactic sugar 2021-05-23 12:37:53 +02:00
Alejandro Celaya
c01121d61a Added nullsafe operator to simplify conditions 2021-05-23 12:31:10 +02:00
Alejandro Celaya
e0f0bb5523 Migrated all constructor props to property promotion when possible 2021-05-23 11:57:31 +02:00
Alejandro Celaya
a3b7742992 Merge pull request #1096 from shlinkio/develop
Release 2.7.0
2021-05-23 09:31:01 +02:00
Alejandro Celaya
4b5fa6ddad Merge pull request #1095 from acelaya-forks/feature/update-docker-deps
Updated docker dependencies
2021-05-23 09:16:54 +02:00
Alejandro Celaya
b6aca82da6 Updated docker dependencies 2021-05-23 09:05:35 +02:00
Alejandro Celaya
8ee3bb4d58 Merge pull request #1094 from acelaya-forks/feature/improve-locks
Feature/improve locks
2021-05-23 08:54:10 +02:00
Alejandro Celaya
46bea241e6 Updated changelog 2021-05-23 08:42:26 +02:00
Alejandro Celaya
5e6d2881bc Used ShorturlIdentifier model whenever possible 2021-05-23 08:41:42 +02:00
Alejandro Celaya
cd19876419 Removed methods to create tags and domains with lock, as they do not really lock as expected 2021-05-23 08:21:40 +02:00
Alejandro Celaya
f82e103bc5 Added locks to tag and domain creation during short URL creation 2021-05-22 22:06:40 +02:00
Alejandro Celaya
3ff4ac84c4 Added locking to short URL creation when checking if URL exists 2021-05-22 22:06:40 +02:00
Alejandro Celaya
bf0c679a48 Added real versions from some shlink dependencies 2021-05-22 22:06:08 +02:00
Alejandro Celaya
96c5bc164a Merge pull request #1093 from acelaya-forks/feature/improve-mutation-ci
Split execution of db and unit mutation tests during ci workflow
2021-05-22 21:50:59 +02:00
Alejandro Celaya
73aead01b4 Split execution of db and unit mutation tests during ci workflow 2021-05-22 21:35:32 +02:00
Alejandro Celaya
e19b3cc45d Merge pull request #1092 from acelaya-forks/feature/bot-detection
Feature/bot detection
2021-05-22 21:34:59 +02:00
Alejandro Celaya
a1cab4ca7d Fixed typos 2021-05-22 21:22:15 +02:00
Alejandro Celaya
4b89687e45 Updated changelog 2021-05-22 21:17:00 +02:00
Alejandro Celaya
1c861fecfc Documented the excludeBots query param for visits endpoints 2021-05-22 21:14:15 +02:00
Alejandro Celaya
a12c9f54c4 Added API tests covering the excludion of bot visits 2021-05-22 21:05:54 +02:00
Alejandro Celaya
69d72e754f Added logic to exclude bots from visits when requested 2021-05-22 20:49:24 +02:00
Alejandro Celaya
db3c5a3031 Added new models to pass to repositories when listing visits of any kind 2021-05-22 20:32:30 +02:00
Alejandro Celaya
6327ed814a Added new models to pass to repositories when counting visits of any kind 2021-05-22 20:16:32 +02:00
Alejandro Celaya
9fa32b5b6b Added detection of visits from potential bots 2021-05-22 15:09:14 +02:00
Alejandro Celaya
663ae9f6bb Merge pull request #1091 from acelaya-forks/feature/improved-crawling
Feature/improved crawling
2021-05-22 11:48:55 +02:00
Alejandro Celaya
70c73bc5d6 Removed no-longer valid false positive for static analysis 2021-05-22 10:08:33 +02:00
Alejandro Celaya
05d73552cf Used PHP 8.0 in ci workflow when running against just one PHP version 2021-05-22 09:49:24 +02:00
Alejandro Celaya
70384237c1 Updated changelog 2021-05-22 09:42:24 +02:00
Alejandro Celaya
36e4a0dd32 Added tests for findCrawlableShortCodes 2021-05-22 09:41:12 +02:00
Alejandro Celaya
3ef02d46c0 Added logic to resolve crawlable short codes 2021-05-22 09:34:42 +02:00
Alejandro Celaya
e6ce84aa14 Added more missing API spec docs 2021-05-22 07:40:21 +02:00
Alejandro Celaya
348e34d52e Added new crawlable flag to Short URLs 2021-05-22 07:35:47 +02:00
Alejandro Celaya
2e6b3c0561 Documented crawlable prop in API specs 2021-05-22 07:32:47 +02:00
Alejandro Celaya
7280b48cdc Created action to dynamically build the robots.txt 2021-05-22 07:15:34 +02:00
Alejandro Celaya
2803f65479 Merge pull request #1087 from acelaya-forks/feature/granular-tracking
Feature/granular tracking
2021-05-16 13:26:52 +02:00
Alejandro Celaya
3535688c3b Updated to latest installer with support for all tracking options 2021-05-16 13:21:12 +02:00
Alejandro Celaya
9cff570c45 Updated changelog 2021-05-16 10:12:35 +02:00
Alejandro Celaya
15c028e151 Ensured visitor is normalized before creating the visit 2021-05-16 10:08:05 +02:00
Alejandro Celaya
f0dc32b6e5 Added logic for new tracking options 2021-05-16 09:53:44 +02:00
Alejandro Celaya
d423d18249 Defined new structure for tracking config, together with new options 2021-05-16 09:30:15 +02:00
Alejandro Celaya
8a8e3c3fc8 Merge pull request #1076 from acelaya-forks/feature/import-from-shlink
Feature/import from shlink
2021-04-18 17:43:48 +02:00
Alejandro Celaya
111fc3c37d Updated changelog 2021-04-18 17:09:06 +02:00
Alejandro Celaya
e9a5284dde Encapsulated logic to get rid of nested ifs 2021-04-18 17:07:56 +02:00
Alejandro Celaya
b277f431c2 Added test covering imported short URLs with visits 2021-04-18 12:44:02 +02:00
Alejandro Celaya
c8b8947b1f Allowed to import visits to existing already imported short URLs 2021-04-18 11:58:59 +02:00
Alejandro Celaya
9a78d1585d Ensured only pending visits are imported when processing a short URL which already has imported visits 2021-04-11 20:00:08 +02:00
Alejandro Celaya
09414a8834 Allowed to optionally import visits from other shlink instance 2021-04-11 13:30:12 +02:00
Alejandro Celaya
1efa973507 Updated ImportedLinksProcessor to support importing visits if provided 2021-04-11 11:44:10 +02:00
Alejandro Celaya
e23cd6a856 Removed old MySQL connection options 2021-04-11 11:44:10 +02:00
Alejandro Celaya
743bb7a6ee Updated ShortUrl importing to take metadata into account 2021-04-11 11:44:10 +02:00
Alejandro Celaya
086efe3c63 Merge pull request #1064 from KetchupBomb/develop
Feature/show API key info in short-url CLI
2021-04-11 11:42:51 +02:00
Alejandro Celaya
d751df70fd Updated changelog 2021-04-11 11:30:43 +02:00
Alejandro Celaya
334d95c843 Improved test covering ListSHortUrlsCommand with optional tags 2021-04-11 11:29:42 +02:00
Alejandro Celaya
5ddac7866b Ensured short URL transformation happens only once per short URL when listing from CLI 2021-04-11 11:06:29 +02:00
Alejandro Celaya
a896fbbb90 Fixed coding styles 2021-04-11 10:50:35 +02:00
Alejandro Celaya
a478699fe8 Merge pull request #1068 from acelaya-forks/feature/dependency-persistence
Feature/dependency persistence
2021-04-10 12:15:31 +02:00
Alejandro Celaya
6387e50276 Updated changelog 2021-04-10 12:03:40 +02:00
Alejandro Celaya
28c06de685 Fixed issue when trying to persist several short URLs which include the same new tag/domain at once 2021-04-10 11:59:43 +02:00
Alejandro Celaya
823573cea7 Updated PersistenceShortUrlRelationResolver to prevent duplicated tags 2021-04-10 10:16:09 +02:00
KetchupBomb
5d0f306bcc Feature/show API key info in short-url CLI 2021-04-10 07:10:22 +00:00
Alejandro Celaya
f30e922074 Merge pull request #1065 from acelaya-forks/feature/split-db-update-and-location
Feature/split db update and location
2021-04-08 17:13:29 +02:00
Alejandro Celaya
96ff0bffda Updated changelog 2021-04-08 17:00:57 +02:00
Alejandro Celaya
d9b675fc8b Updated to an installer version with support to download the GeoLite db file 2021-04-08 16:56:55 +02:00
Alejandro Celaya
104b7390da Updated docker entry point so that it tries to download the GeoLite2 db file when the license key was provided 2021-04-08 14:32:19 +02:00
Alejandro Celaya
7b4456e73f Ensured events triggered as a result of a new visit are never skipped 2021-04-08 14:09:26 +02:00
Alejandro Celaya
86230d9bf3 Removed duplicated code during CLI command tests 2021-04-08 13:44:24 +02:00
Alejandro Celaya
1f8994ca8b Created DownloadGeoLiteDbCommandTest 2021-04-08 13:34:14 +02:00
Alejandro Celaya
f7b6f4ba19 Created new command containing the logic to download the GeoLite2 db file 2021-04-08 13:12:37 +02:00
Alejandro Celaya
74ea5969be Created new listener to update the GeoLite db after a visit occurs 2021-04-07 16:29:29 +02:00
Alejandro Celaya
c4718e7523 Extended error handling on LocateVisit handler 2021-04-07 12:53:53 +02:00
Alejandro Celaya
5de706e0fe Fixed LocateVisitTest 2021-04-07 11:52:50 +02:00
Alejandro Celaya
77d06b4b03 Renamed argument to have a more clear intention 2021-04-07 11:48:01 +02:00
Alejandro Celaya
b4d137375a Flipped events triggered when locating a visit, so that geolocation is done synchronously 2021-04-07 11:35:02 +02:00
Alejandro Celaya
0621ae7735 Ensured visits tracking is run transactionally together with the event dispatched afterwards 2021-04-07 11:33:23 +02:00
Alejandro Celaya
3a6a1f25a7 Updated to latest doctrine/orm without security issues 2021-04-06 17:34:31 +02:00
Alejandro Celaya
731dc64f44 Merge pull request #1061 from acelaya-forks/feature/update-mercure
Updated to symfony/mercure 0.5
2021-04-02 09:59:31 +02:00
Alejandro Celaya
d72b9cf646 Updated to symfony/mercure 0.5 2021-04-02 09:46:02 +02:00
Alejandro Celaya
0f0c4dc549 Fixed comment 2021-03-30 18:18:38 +02:00
Alejandro Celaya
ea0820d881 Merge pull request #1060 from LeagueRaINi/patch-1
Create volume for /etc/shlink/data
2021-03-30 18:11:50 +02:00
RaINi_
312f20d2f1 Create volume for /etc/shlink/data
Makes it so shlink can be used as a docker service without losing ur data every time
2021-03-29 12:46:45 +02:00
Alejandro Celaya
f8289fa4be Merge pull request #1054 from acelaya-forks/feature/migrations-fix
Updated to latest migrations patch and removed workaround
2021-03-14 12:45:23 +01:00
Alejandro Celaya
554209d644 Updated to latest migrations patch and removed workaround 2021-03-14 12:28:30 +01:00
Alejandro Celaya
4ce44034cb Ensured API key name appears in the proper color in the console, for disabled or expired API keys 2021-03-14 10:20:05 +01:00
Alejandro Celaya
221b62ea57 Merge pull request #1053 from acelaya-forks/feature/api-key-improvements
Feature/api key improvements
2021-03-14 10:14:45 +01:00
Alejandro Celaya
0a5c265b12 Extracted ApiKey metadata to the ApiKeyMeta object 2021-03-14 09:59:35 +01:00
Alejandro Celaya
9b55389538 First steps to create ApiKeyMeta 2021-03-14 09:15:52 +01:00
Alejandro Celaya
60a8d6e986 Merge pull request #1052 from acelaya-forks/feature/api-test-logs
Feature/api test logs
2021-03-14 09:15:10 +01:00
Alejandro Celaya
d7523bcb57 Reduced duplication by creating a function that builds test logger config 2021-03-14 09:01:11 +01:00
Alejandro Celaya
562110fac4 Updated changelog 2021-03-14 08:55:39 +01:00
Alejandro Celaya
d104265f04 Updated CONTRIBUTING file, explaining how the logs are dumped during API tests 2021-03-14 08:54:05 +01:00
Alejandro Celaya
4439685403 Fixed logs generated by shlink during API tests 2021-03-14 08:49:38 +01:00
Alejandro Celaya
9feb72235a Added config to log in filesystem while running API tests 2021-03-14 08:33:00 +01:00
Alejandro Celaya
c372a498cc Fixed merge conflicts 2021-03-12 16:34:00 +01:00
Alejandro Celaya
be35349350 Fixed typo 2021-03-12 16:22:53 +01:00
Alejandro Celaya
771fd74978 Merge pull request #1049 from acelaya-forks/feature/mysql-migrations-error
Feature/mysql migrations error
2021-03-12 16:22:13 +01:00
Alejandro Celaya
3ba9ee7bf1 Updated changelog 2021-03-12 11:56:41 +01:00
Alejandro Celaya
a0062a62e8 Ensured all migrations are non-transactional, which allows woring around an issue in doctrine-migrations 2021-03-12 11:52:43 +01:00
Alejandro Celaya
0f2bd77ebc Fixed dependencies pinned to older versions 2021-03-12 08:54:23 +01:00
Alejandro Celaya
744b368cc1 Updated changelog 2021-03-08 19:50:43 +01:00
Alejandro Celaya
a03c4519c9 Updated CONTRIBUTING doc 2021-03-08 07:00:25 +01:00
Alejandro Celaya
66327881d5 Merge pull request #1045 from KetchupBomb/develop
Feature/name api keys
2021-03-07 23:14:53 +01:00
KetchupBomb
b93b14986e Feature/name api keys 2021-03-07 21:30:37 +00:00
Alejandro Celaya
1ade4e9917 Updated CONTRIBUTING doc mentioning API tests are run using Postgres 2021-03-07 09:22:04 +01:00
Alejandro Celaya
65f2ab6720 Changed approach to ensure the default value for the version while building the docker image is latest 2021-03-01 21:17:32 +01:00
Alejandro Celaya
7d38ba12bd Merge pull request #1042 from acelaya-forks/feature/fix-latest-docker-version
Ensured latest docker image is built with SHLINK_VERSION=latest
2021-03-01 17:21:30 +01:00
Alejandro Celaya
8128e85b6b Ensured latest docker image is built with SHLINK_VERSION=latest 2021-03-01 17:04:16 +01:00
Alejandro Celaya
3d99819be4 Merge pull request #1040 from acelaya-forks/feature/endroid-4.0
Feature/endroid 4.0
2021-02-28 16:56:11 +01:00
Alejandro Celaya
a2ca1618ea Updated changelog 2021-02-28 16:42:25 +01:00
Alejandro Celaya
b244c56862 Updated to endroid/qr-code 4 2021-02-28 16:41:52 +01:00
Alejandro Celaya
c931874bac Merge pull request #1038 from acelaya-forks/feature/happyr-spec-2
Feature/happyr spec 2
2021-02-26 20:47:29 +01:00
Alejandro Celaya
1b168ac3d2 Updated changelog 2021-02-26 20:34:04 +01:00
Alejandro Celaya
0fc123b249 Fixed coding styles 2021-02-26 20:28:41 +01:00
Alejandro Celaya
c622804950 Fixed unit tests 2021-02-26 20:27:41 +01:00
Alejandro Celaya
e093480a5b Fixed API tests 2021-02-26 20:24:57 +01:00
Alejandro Celaya
1498b72966 Updated to happyr/doctrine-specification 2, with some fixes 2021-02-26 20:01:16 +01:00
Alejandro Celaya
51e1c7cd50 Merge pull request #1035 from shlinkio/develop
Release 2.6.1
2021-02-22 22:18:02 +01:00
Alejandro Celaya
40040b627f Added v2.6.1 to changelog 2021-02-22 22:02:45 +01:00
Alejandro Celaya
b752f8a357 Updated to latest mezzio-swoole to fix warning when stopping shlink with swoole 2021-02-20 11:26:42 +01:00
Alejandro Celaya
5b93cf42b1 Merge pull request #1032 from acelaya-forks/feature/twitter-validation
Feature/twitter validation
2021-02-18 21:47:43 +01:00
Alejandro Celaya
fa8145df9f Updated changelog 2021-02-18 21:35:11 +01:00
Alejandro Celaya
5ddb6a7f99 Added e2e tests covering shortening of twitter URLs with url validatio enabled 2021-02-18 21:33:30 +01:00
Alejandro Celaya
8ad34357d3 Added User-Agent to UrlValidator, so that remote servers don't consider Shlink a bot 2021-02-18 21:27:46 +01:00
Alejandro Celaya
81eb2684bf Merge pull request #1027 from acelaya-forks/feature/remove-non-inclusive-terms
Feature/remove non inclusive terms
2021-02-16 17:31:37 +01:00
Alejandro Celaya
d2c0745efa Updated changelog 2021-02-16 15:32:11 +01:00
Alejandro Celaya
3f2d38a86a Removed all uses of the 'whitelist' term 2021-02-16 15:28:03 +01:00
Alejandro Celaya
4df4db05f4 Merge pull request #1025 from acelaya-forks/feature/wrong-skip-migration
Feature/wrong skip migration
2021-02-15 22:51:45 +01:00
Alejandro Celaya
6526fda960 Updated changelog 2021-02-15 22:22:07 +01:00
Alejandro Celaya
32fdb257a3 Fixed migration that could be incorrectly skipped due to wrong condition being used 2021-02-15 22:16:58 +01:00
Alejandro Celaya
9247cd874e Fixed wrong indentation in changelog 2021-02-14 08:30:17 +01:00
Alejandro Celaya
4ceb42b88d Small readme improvement 2021-02-14 08:28:37 +01:00
Alejandro Celaya
3d99fc1708 Merge pull request #1023 from shlinkio/develop
Release 2.6.0
2021-02-13 18:04:09 +01:00
Alejandro Celaya
656346bd04 Ensured mezzio-swoole config provider is dynamically loaded 2021-02-13 17:48:03 +01:00
Alejandro Celaya
6b5217ece2 Added v2.6.0 to changelog 2021-02-13 15:33:56 +01:00
Alejandro Celaya
0a2b388f6b Updated to stable shlink-installer 5.4 2021-02-13 14:57:15 +01:00
Alejandro Celaya
25b3de84ec Fixed pattern to resolve release artifacts 2021-02-13 14:33:36 +01:00
Alejandro Celaya
5c4e348078 Ensured repo si cloned durin publish workflow 2021-02-13 14:18:49 +01:00
Alejandro Celaya
2ac84ac8c4 Ensured generated dist files do not conflict 2021-02-13 14:12:38 +01:00
Alejandro Celaya
f0249346b0 Fixed version numbers 2021-02-13 14:05:31 +01:00
Alejandro Celaya
86651d7992 Merge pull request #1022 from acelaya-forks/feature/mutiple-dist-files
Feature/mutiple dist files
2021-02-13 14:04:42 +01:00
Alejandro Celaya
5cd5fb0071 Updated changelog 2021-02-13 13:49:53 +01:00
Alejandro Celaya
e3bf046c30 Documented new system with multiple dist files 2021-02-13 13:44:52 +01:00
Alejandro Celaya
d9af0a5547 Improved publish-release workflow to generate files for all supported PHP versions and with/without swoole 2021-02-13 13:29:38 +01:00
Alejandro Celaya
ede7551856 Updated build script so that it allows building a dist file for non-swoole envs 2021-02-13 12:56:41 +01:00
Alejandro Celaya
a2030b6c27 Updated to shlink-event-dispatcher 2.1 2021-02-13 11:39:51 +01:00
Alejandro Celaya
9a951589dc Updated year in license 2021-02-13 09:38:34 +01:00
Alejandro Celaya
c766cfad89 Updated to shlink-common 3.5 2021-02-12 23:40:29 +01:00
Alejandro Celaya
bd25572e08 Merge pull request #1021 from acelaya-forks/feature/migrate-command-timeout
Feature/migrate command timeout
2021-02-12 23:35:46 +01:00
Alejandro Celaya
4e00c950cc Created ProcessRunnerTest 2021-02-12 23:23:34 +01:00
Alejandro Celaya
d932f0a204 Increased timeout on db commands to 10 minutes 2021-02-12 22:59:40 +01:00
Alejandro Celaya
08507272ed Merge pull request #1019 from acelaya-forks/feature/simplified-content-length
Removed mezzio-helpers and used ContentLengthMiddleware from shlink-c…
2021-02-12 09:55:20 +01:00
Alejandro Celaya
9c48e6578d Removed mezzio-helpers and used ContentLengthMiddleware from shlink-common 2021-02-12 09:24:13 +01:00
Alejandro Celaya
db6c83eefd Merge pull request #1017 from acelaya-forks/feature/not-found-tracking
Feature/not found tracking
2021-02-11 22:55:08 +01:00
Alejandro Celaya
cc68cb944f Updated changelog 2021-02-11 22:43:23 +01:00
Alejandro Celaya
a0d8d237d7 Gitignored helper file 2021-02-11 22:23:30 +01:00
Alejandro Celaya
7d6d8e3a68 Added support to publish orphan visits in mercure 2021-02-11 22:12:38 +01:00
Alejandro Celaya
cc42f037c7 Merge branch 'develop' into feature/not-found-tracking 2021-02-11 13:53:21 +01:00
Alejandro Celaya
f4623ed028 Merge branch 'develop' of github.com:shlinkio/shlink into develop 2021-02-11 13:52:58 +01:00
Alejandro Celaya
bec467c703 Fixed issue with swoole 4.6.3 2021-02-11 13:52:36 +01:00
Alejandro Celaya
bd09b1571a Updated shlink-installer with support for orphan visits tracking option 2021-02-10 20:42:42 +01:00
Alejandro Celaya
3ed6953d0b Merge branch 'develop' of github.com:shlinkio/shlink into feature/not-found-tracking 2021-02-10 20:26:33 +01:00
Alejandro Celaya
2fc6fb0a9a Added option to disable orphan visitstracking 2021-02-10 20:09:25 +01:00
Alejandro Celaya
4b73bd907e Updated changelog 2021-02-10 08:23:29 +01:00
Alejandro Celaya
a18486cc2e Created OrphanVisits API test 2021-02-09 23:56:46 +01:00
Alejandro Celaya
82f4e22f69 Created OrphanVisitsActionTest 2021-02-09 23:41:51 +01:00
Alejandro Celaya
3497165ebd Created OrphanVisitsPaginatorAdapterTest 2021-02-09 23:34:29 +01:00
Alejandro Celaya
d5794a3dcb Created OrphanVisitDataTransformerTest 2021-02-09 23:09:42 +01:00
Alejandro Celaya
bd9ec53e7b Added test for VisitsStatsHelper::orphanVisits 2021-02-09 23:09:42 +01:00
Alejandro Celaya
5d98316c4e Created new REST API action to list orphan visits 2021-02-09 23:09:42 +01:00
Alejandro Celaya
dcf2526aad Documented swagger for new orphan visits endpoint 2021-02-09 23:09:42 +01:00
Alejandro Celaya
85dd023c0e Created methods to get orphan visits lists 2021-02-09 23:09:42 +01:00
Alejandro Celaya
1fbcb44136 Enhanced VisitsTrackerTest 2021-02-09 23:09:42 +01:00
Alejandro Celaya
ab9042db24 Ensured orphan visits are located ASAP when using swoole 2021-02-09 23:09:42 +01:00
Alejandro Celaya
b01487ac91 Ensured IP address is resolved when tracking orphan visits 2021-02-09 23:09:42 +01:00
Alejandro Celaya
5278d7668c Added orphan visits count to visits stats endpoint 2021-02-09 23:09:42 +01:00
Alejandro Celaya
f7215fc2c5 Documented ADR decision outcome 2021-02-09 23:09:42 +01:00
Alejandro Celaya
d2e0413a48 Added NotFoundTrackerMiddlewareTest 2021-02-09 23:09:42 +01:00
Alejandro Celaya
0e165bc7e0 Created NotFoundTypeResolverMiddlewareTest 2021-02-09 23:09:42 +01:00
Alejandro Celaya
55e7f7ccb0 Improved VisitRepository tests 2021-02-09 23:09:42 +01:00
Alejandro Celaya
15061d3e0d Created new middlewares to track not found visits 2021-02-09 23:09:42 +01:00
Alejandro Celaya
36be44e7b5 Moved VisitsTracker service to Visit namespace 2021-02-09 23:09:42 +01:00
Alejandro Celaya
1b4e62b823 Separated methods to track visits and list visits 2021-02-09 23:09:42 +01:00
Alejandro Celaya
12b07bb0ac Created named constructors for Visit entity and added tracking of the visited URL 2021-02-09 23:09:42 +01:00
Alejandro Celaya
f5666c9451 Added new columns for extra tracking in visits table 2021-02-09 23:09:42 +01:00
Alejandro Celaya
23cffce861 Updated Visit entity so that the short URL is nullable 2021-02-09 23:09:42 +01:00
Alejandro Celaya
a1fb44f2a6 Added ADR for not-found visits tracking 2021-02-09 23:09:42 +01:00
Alejandro Celaya
4d5dd8c8de Merge pull request #1012 from acelaya-forks/feature/swoole-update
Updated to swoole 4.6.3
2021-02-09 23:08:42 +01:00
Alejandro Celaya
1c492881e1 Updated to swoole 4.6.3 2021-02-09 22:55:30 +01:00
Alejandro Celaya
d310c53cce Merge pull request #1007 from acelaya-forks/feature/php-8.0.2
Updated docker images to PHP 8.0.2
2021-02-07 10:17:51 +01:00
Alejandro Celaya
2289eebd91 Updated docker images to PHP 8.0.2 2021-02-07 09:24:01 +01:00
Alejandro Celaya
e259bd62ab Merge pull request #1006 from acelaya-forks/feature/qr-margin
Feature/qr margin
2021-02-07 08:49:10 +01:00
Alejandro Celaya
9f512705fa Documented margin param on QR code endpoint 2021-02-07 08:35:52 +01:00
Alejandro Celaya
383fde488b Added support to define the margin when generating the QR codes 2021-02-07 08:32:12 +01:00
Alejandro Celaya
b54350674c Merge pull request #1005 from acelaya-forks/feature/fix-string-epoch
Feature/fix string epoch
2021-02-06 22:23:09 +01:00
Alejandro Celaya
1e2b88496c Updated changelog 2021-02-06 21:51:05 +01:00
Alejandro Celaya
919b567d46 Added tests covering new logic to parse GeolLite 2 build epoch param 2021-02-06 21:49:49 +01:00
Alejandro Celaya
da65c05c4f Added double check when parsing build epoch from the GeoLite db file in case it is not an integer 2021-02-06 21:38:09 +01:00
Alejandro Celaya
2f8ca6cf11 Merge pull request #1004 from acelaya-forks/feature/import-csv
Feature/import csv
2021-02-06 21:04:23 +01:00
Alejandro Celaya
7121ff340a Updated changelog 2021-02-06 20:47:26 +01:00
Alejandro Celaya
37f4d18d34 Updated to shlink-importer v2.2 2021-02-06 20:45:45 +01:00
Alejandro Celaya
a8b424003c Merge pull request #1003 from acelaya-forks/feature/title
Feature/title
2021-02-05 18:54:22 +01:00
Alejandro Celaya
de4e677f18 Fixed database started for API tests in GitHub workflow 2021-02-05 18:33:36 +01:00
Alejandro Celaya
bc632fd644 Updated changelog 2021-02-05 18:26:22 +01:00
Alejandro Celaya
d386e1405c Ensure request is not performed if both title resolution and URL validation are disabled 2021-02-05 18:22:54 +01:00
Alejandro Celaya
608742c2e2 Added helper service to avoid code duplication when resolving short URLs titles 2021-02-05 17:59:34 +01:00
Alejandro Celaya
71e91a541f Allowed to resolve title during short URL edition if it has to 2021-02-04 23:02:26 +01:00
Alejandro Celaya
ed18f10b94 Added support to order short URLs by title 2021-02-04 22:07:54 +01:00
Alejandro Celaya
4330a09793 Removed use of deprecated approach for ordering in ListShort 2021-02-04 21:33:26 +01:00
Alejandro Celaya
16873201e9 Added support to search short URLs by title 2021-02-04 21:27:16 +01:00
Alejandro Celaya
2640c7b43c Updated to a shlink-importer version that supports titles 2021-02-04 15:24:27 +01:00
Alejandro Celaya
7824dddef7 Added tracking to tell if short URL titles were autogenerated or not 2021-02-03 19:22:47 +01:00
Alejandro Celaya
7192480751 Update installer version 2021-02-03 18:26:50 +01:00
Alejandro Celaya
1da66f272c Added AUTO_RESOLVE_TITLES env var for the docker image 2021-02-03 13:41:37 +01:00
Alejandro Celaya
0ef1e347e7 Enhanced UrlShortenerTest 2021-02-03 13:28:51 +01:00
Alejandro Celaya
bfba05c863 Enhanced UrlValidatorTest 2021-02-03 11:53:08 +01:00
Alejandro Celaya
71f85350da Fixed regex to parse title from URL to consider possible attributes 2021-02-03 11:28:40 +01:00
Alejandro Celaya
8b54098299 Added option to automatically resolve url titles 2021-02-03 11:07:47 +01:00
Alejandro Celaya
356e68ca3e Documented new title prop in swagger docs 2021-02-02 21:20:09 +01:00
Alejandro Celaya
430c407106 Added support for an optional title field in short URLs 2021-02-02 21:20:09 +01:00
Alejandro Celaya
31a7212a71 Improvements in CONTRIBUTING doc 2021-02-02 21:19:38 +01:00
Alejandro Celaya
36a172308a Merge pull request #998 from acelaya-forks/feature/fix-base-path-with-domain
Feature/fix base path with domain
2021-02-01 23:32:16 +01:00
Alejandro Celaya
e20df481a4 Updated changelog 2021-02-01 23:20:48 +01:00
Alejandro Celaya
8fa0c95f5a Ensured base path is honored when stringifying short URLs with a custom domain 2021-02-01 23:18:52 +01:00
Alejandro Celaya
4b4a859722 Created ShortUrlStringifierTest 2021-02-01 23:18:52 +01:00
Alejandro Celaya
9cddedcdba Extracted logic to stringify ShortUrls to its own service 2021-02-01 23:18:52 +01:00
Alejandro Celaya
01aebd90d5 Added 988 link in changelog 2021-02-01 10:45:31 +01:00
Alejandro Celaya
c00105607c Merge pull request #997 from Roy-Orbison/patch-1
Allow serving of 0-byte, real files
2021-02-01 10:36:49 +01:00
Roy-Orbison
79ff12a1b0 Allow serving of 0-byte, real files
Essential for many HTTP challenges for domain verification, SSL cert issuance, etc.
2021-02-01 14:47:11 +10:30
Alejandro Celaya
e30c9c86ff Merge pull request #995 from acelaya-forks/feature/improve-url-relations
Feature/improve url relations
2021-01-31 16:26:50 +01:00
Alejandro Celaya
c61e1e1c0e Updated EditShortUrlAction so that it returns the parsed short URL instead of an empty response 2021-01-31 13:21:23 +01:00
Alejandro Celaya
85bc5ce595 Moved transformer to constructor in some actions, to avoid creating it over and over 2021-01-31 13:12:56 +01:00
Alejandro Celaya
ef12e90ae7 Removed non-used deprecated method and added missing tests 2021-01-31 13:05:21 +01:00
Alejandro Celaya
6b0f6e4541 Updated changelog 2021-01-31 12:27:35 +01:00
Alejandro Celaya
cdfd14e63f Deprecated action and endpoint to edit short URL tags 2021-01-31 12:24:26 +01:00
Alejandro Celaya
977058d219 Updated short URL edition so that it supports editing tags 2021-01-31 12:12:21 +01:00
Alejandro Celaya
c58fa586e1 Removed use of deprecated methods in DB tests 2021-01-31 11:51:00 +01:00
Alejandro Celaya
1cd6fdeede Centralized logic to normalize tag names and removed references to deprecated setTags method in unit tests 2021-01-31 11:09:00 +01:00
Alejandro Celaya
09f25d78b7 Refactored API tests fixtures to avoid using deprecated methods 2021-01-31 11:01:38 +01:00
Alejandro Celaya
82091c7951 Added logic to resolve tags during short URL creation through ShortUrlRelationResolver 2021-01-31 10:53:18 +01:00
Alejandro Celaya
1081211439 Merge pull request #994 from acelaya-forks/feature/input-filter-improvements
Renamed ShortUrlInputFilter and added named constructors to it
2021-01-31 08:18:17 +01:00
Alejandro Celaya
7e90fd45a7 Renamed ShortUrlInputFilter and added named constructors to it 2021-01-31 07:47:58 +01:00
Alejandro Celaya
08f4a424e6 Merge pull request #993 from acelaya-forks/feature/short-url-meta-refactoring
Feature/short url meta refactoring
2021-01-30 23:26:49 +01:00
Alejandro Celaya
063ee9c195 Inlcuded tags as part of the ShortUrlMeta 2021-01-30 19:17:12 +01:00
Alejandro Celaya
3f2bd657e1 Used input factory methods from shlink-common when possible 2021-01-30 18:58:39 +01:00
Alejandro Celaya
903ef8e249 Normalized some filtering 2021-01-30 18:24:14 +01:00
Alejandro Celaya
07b12fac3c Refactored short URL creation so that the long URL is part of the ShortUrlMeta 2021-01-30 14:18:44 +01:00
Alejandro Celaya
56a2253535 Merge pull request #992 from acelaya-forks/feature/kebab-case-cli
Feature/kebab case cli
2021-01-30 11:37:24 +01:00
Alejandro Celaya
752ded2f80 Changed to kebab-case for CLI flags in command tests 2021-01-30 11:25:20 +01:00
Alejandro Celaya
248d5e2fe5 Updated changelog 2021-01-30 11:19:21 +01:00
Alejandro Celaya
158e981970 Deprecated camelCase options in rest of CLI commands 2021-01-30 11:17:13 +01:00
Alejandro Celaya
96d07c4b4e Deprecated camelCase options in some CLI commands 2021-01-30 10:54:11 +01:00
Alejandro Celaya
28afb8944f Merge pull request #991 from acelaya-forks/feature/php8-dockers
Feature/php8 dockers
2021-01-30 10:09:31 +01:00
Alejandro Celaya
0d59ebfe55 Recovered ARG to ENV in Dockerfile 2021-01-30 10:08:33 +01:00
Alejandro Celaya
bc38ecf6de Fixed image which checks if Dockerfile changed by making sure it fetches more commits 2021-01-30 09:54:47 +01:00
Alejandro Celaya
755a52b78e Updated official docker image to PHP 8 2021-01-30 09:45:47 +01:00
Alejandro Celaya
4c008f1672 Updated dev docker images to PHP 8 2021-01-30 09:31:08 +01:00
Alejandro Celaya
eb268fb856 Updated changelog 2021-01-24 23:26:28 +01:00
Alejandro Celaya
b0e390ced1 Merge pull request #985 from acelaya-forks/feature/php8-deps
Feature/php8 deps
2021-01-24 23:25:43 +01:00
Alejandro Celaya
741e8f625c No longer allow errors on any step during CI 2021-01-24 23:09:46 +01:00
Alejandro Celaya
17eb6dc4ce Updated remaining dependencies without PHP 8 support 2021-01-24 23:00:10 +01:00
Alejandro Celaya
db997fe6f5 Do not allow ignoring platform reqs anymore during CI 2021-01-24 22:59:19 +01:00
Alejandro Celaya
3b1fc2a27d Updated link to PHPUnit's xsd to use local one 2021-01-24 22:56:43 +01:00
Alejandro Celaya
0cbd965010 Fixed merge conflicts 2021-01-24 14:21:21 +01:00
Alejandro Celaya
f3c3979eec Merge pull request #984 from shlinkio/release/2.5.2
Release/2.5.2
2021-01-24 14:17:51 +01:00
Alejandro Celaya
bf26f5baa1 Added v2.5.2 to changelog 2021-01-24 14:05:09 +01:00
Alejandro Celaya
164462d536 Merge pull request #983 from acelaya-forks/feature/cors-allowed-methods
Feature/cors allowed methods
2021-01-24 14:04:23 +01:00
Alejandro Celaya
239af85dd4 Updated changelog 2021-01-24 13:51:29 +01:00
Alejandro Celaya
f585cfe02e Fixed CrossDomainMiddleware not inferring proper allowed methods 2021-01-24 13:49:57 +01:00
Alejandro Celaya
ef54caab85 Merge pull request #982 from acelaya-forks/feature/roles-adr
Feature/roles adr
2021-01-24 12:34:38 +01:00
Alejandro Celaya
aaaa3010ab Updated changelog 2021-01-24 12:32:19 +01:00
Alejandro Celaya
cfdf866c3f Added architectural decision record for the API key roles 2021-01-24 12:31:08 +01:00
Alejandro Celaya
2a1a386b9c Created ADR for API key roles 2021-01-24 10:56:15 +01:00
Alejandro Celaya
a4de8cee7d Merge pull request #981 from acelaya-forks/feature/cors-fix
Feature/cors fix
2021-01-24 09:54:14 +01:00
Alejandro Celaya
a9d6c463ed Updated changelog 2021-01-24 09:30:21 +01:00
Alejandro Celaya
b8a725d60c Added missing itemsPerPage param for short URLs endpoint to swagger docs 2021-01-24 09:27:40 +01:00
Alejandro Celaya
927fb51313 Removed Action sufix from API tests 2021-01-24 09:25:36 +01:00
Alejandro Celaya
76aa6502db Changed value returned in Access-Control-Allow-Origin so that it is always set to '*' 2021-01-24 09:22:46 +01:00
Alejandro Celaya
7d908b6545 Merge pull request #978 from acelaya-forks/feature/pagerfanta
Feature/pagerfanta
2021-01-23 14:55:55 +01:00
Alejandro Celaya
83a29d6ed0 Updated changelog 2021-01-23 14:38:58 +01:00
Alejandro Celaya
55ddc4ae75 Replaced laminas-paginator with pagerfanta 2021-01-23 14:37:34 +01:00
Alejandro Celaya
088e361228 Merge pull request #976 from acelaya-forks/feature/fix-qr-php8
Added package fixing PHP 8 error
2021-01-23 09:40:56 +01:00
Alejandro Celaya
80012b8ee8 Do not allow unit tests to fail 2021-01-23 06:16:04 +01:00
Alejandro Celaya
a61235a5d1 Removed dependency on acelaya/qrcode-detector-decoder 2021-01-23 06:07:16 +01:00
Alejandro Celaya
823242a6c2 Updated endroid 2021-01-23 06:01:12 +01:00
Alejandro Celaya
0670a4dc3c Added package fixing PHP 8 error 2021-01-23 05:46:15 +01:00
Alejandro Celaya
f57303f8c0 Merge pull request #974 from shlinkio/develop
Release 2.5.1
2021-01-21 20:10:57 +01:00
Alejandro Celaya
2eff9929d8 Merge pull request #973 from acelaya-forks/feature/inline-creation-fix
Feature/inline creation fix
2021-01-21 19:59:49 +01:00
Alejandro Celaya
92d7dc2595 Added v2.5.1 to changelog 2021-01-21 19:44:56 +01:00
Alejandro Celaya
4a5cc9a986 Added API test for single-step short URL creation action 2021-01-21 19:43:34 +01:00
Alejandro Celaya
da9896a28b Fixed single step shortening endpoint 2021-01-21 19:26:19 +01:00
Alejandro Celaya
b5b3a50bb2 Added missing mention to xml extension
Closes #970
2021-01-19 15:42:14 +01:00
Alejandro Celaya
ea99b88c44 Merge pull request #969 from acelaya-forks/feature/fix-role-name-length
Feature/fix role name length
2021-01-18 17:34:49 +01:00
Alejandro Celaya
45d162e71a Updated roleName col length in entity metadata definition 2021-01-18 17:22:09 +01:00
Alejandro Celaya
8132113ed9 Updated changelog 2021-01-18 17:16:38 +01:00
Alejandro Celaya
eef49478fc Fixed migrations so that api_key_roles index does not fail 2021-01-18 17:14:46 +01:00
Alejandro Celaya
60cdd8b198 Merge pull request #967 from shlinkio/develop
Release 2.5.0
2021-01-17 20:14:52 +01:00
Alejandro Celaya
47d86b58a3 Added v2.5.0 to CHANGELOG 2021-01-17 20:00:02 +01:00
Alejandro Celaya
e6663aeb20 Merge pull request #964 from acelaya-forks/feature/docs-improvements
Feature/docs improvements
2021-01-17 17:57:44 +01:00
Alejandro Celaya
b321af6d03 Updated changelog 2021-01-17 17:42:02 +01:00
Alejandro Celaya
78038b3141 Simplified docker image docs, linking to the website for anything other than the very basics 2021-01-17 17:40:47 +01:00
Alejandro Celaya
89fd782dd3 Simplified README, linking to the website for advanced info 2021-01-17 17:26:51 +01:00
Alejandro Celaya
37c68c39b0 Updated to stable shlink-common 2021-01-17 16:48:28 +01:00
Alejandro Celaya
1309290a2f Merge pull request #963 from acelaya-forks/feature/mezzio-swoole-3
Feature/mezzio swoole 3
2021-01-17 13:31:04 +01:00
Alejandro Celaya
3e2701f136 Updated how to copy mezzio helper script to dist file 2021-01-17 13:03:44 +01:00
Alejandro Celaya
5ad1a12457 Updated changelog 2021-01-17 11:43:21 +01:00
Alejandro Celaya
2e8f5202d0 Moved event objects to a sub-namespace inside Core\EventDispatcher 2021-01-17 11:42:35 +01:00
Alejandro Celaya
6b6d751d54 Updated to shlinkio/shlink-event-dispatcher 2 2021-01-17 11:40:30 +01:00
Alejandro Celaya
a9704c6e2f Improved mezzio-swoole helper script to ensure it only applies to mezzio:swoole commands 2021-01-14 20:23:44 +01:00
Alejandro Celaya
e3ff447152 Updated to mezzio-swoole 3 2021-01-14 20:19:38 +01:00
Alejandro Celaya
c5fc8fbf00 Simplified database tests by updating to shlinkio/shlink-test-utils 2 2021-01-13 20:21:24 +01:00
Alejandro Celaya
da9e9df4ba Merge pull request #960 from acelaya-forks/feature/api-roles-cli
Feature/api roles cli
2021-01-11 20:35:48 +01:00
Alejandro Celaya
1c75519f9b Displayed 'Admin' as default role in API keys list 2021-01-11 20:23:28 +01:00
Alejandro Celaya
fca19f265b Removed duplicated lines in GenerateKeyCommand 2021-01-11 20:14:18 +01:00
Alejandro Celaya
75dab92225 Improved tests covering ListKeysCommand 2021-01-11 17:01:01 +01:00
Alejandro Celaya
9e9d213f20 Added roles info to api key generation and api key list 2021-01-11 16:32:59 +01:00
Alejandro Celaya
c49a0ca040 Added list of roles to print after an API is generated 2021-01-11 15:20:26 +01:00
Alejandro Celaya
1f2e16184c Extracted function to render arrays from inside ValidationException 2021-01-10 20:28:52 +01:00
Alejandro Celaya
7a19b8765d Created RoleResolverTest 2021-01-10 20:24:13 +01:00
Alejandro Celaya
a639a4eb94 Added role capabilities to api-key:generate command 2021-01-10 20:14:06 +01:00
Alejandro Celaya
c9ff2b3834 Updated services required to initialize API keys with roles 2021-01-10 20:05:14 +01:00
Alejandro Celaya
95e51665b1 Merge pull request #958 from acelaya-forks/feature/api-key-permissions
Feature/api key permissions
2021-01-10 11:25:29 +01:00
Alejandro Celaya
91da241434 Updated changelog 2021-01-10 11:12:22 +01:00
Alejandro Celaya
5bec9f5b65 Extended swagger docs with errors on delete/rename tags 2021-01-10 11:07:17 +01:00
Alejandro Celaya
34bb023b7d Created API tests to cover deletion and renaming of tags with non-admin API keys 2021-01-10 10:28:00 +01:00
Alejandro Celaya
2be0050f3d Improved tag list api test to cover different API key cases 2021-01-10 10:17:27 +01:00
Alejandro Celaya
ff1af82ffd Improved tag visits api test to cover different API key cases 2021-01-10 10:00:00 +01:00
Alejandro Celaya
13cc70e6d4 Added more tags to more fixture short URLs in API keys 2021-01-10 09:54:19 +01:00
Alejandro Celaya
fa5934b8b6 Improved global visits api test to cover different API key cases 2021-01-10 09:36:10 +01:00
Alejandro Celaya
c8eb956778 Improved list domains api test to cover different API key cases 2021-01-10 09:32:19 +01:00
Alejandro Celaya
5283ee2c6b Moved common data provider for core unit tests to trait 2021-01-10 09:31:51 +01:00
Alejandro Celaya
c56d56d38c Added api tests to cover implicit domain when creating short URLs with proper API key 2021-01-10 09:09:56 +01:00
Alejandro Celaya
ea05259bbe Improved api tests where a short URL needs to be resolved, covering cases where API key lacks permissions 2021-01-10 09:02:05 +01:00
Alejandro Celaya
f17873b527 Added api tests for short URLs lists using API keys with permissions 2021-01-10 08:49:31 +01:00
Alejandro Celaya
f827186c77 Updated API test fixtures to include API keys with roles 2021-01-10 08:40:32 +01:00
Alejandro Celaya
380915948b Improved TagRepositoryTest 2021-01-09 18:00:08 +01:00
Alejandro Celaya
14eeb91c58 Added db test for VisitRepository::countVisits 2021-01-09 17:54:04 +01:00
Alejandro Celaya
01dceca9ef Enhanced ShorturlRepository::findOneMatching test to cover ApiKey use cases 2021-01-09 14:39:19 +01:00
Alejandro Celaya
ba32366b0b Added tagExists to TagRepositoryTest 2021-01-09 13:44:47 +01:00
Alejandro Celaya
bef1b13a33 Enhanced DomainRepositoryTest covering API key permissions 2021-01-09 13:16:33 +01:00
Alejandro Celaya
caa1ae0de8 Added all missing unit tests covering API key permissions 2021-01-09 12:38:06 +01:00
Alejandro Celaya
b0c4582f3f Used EntitySpecificationRepository as default entity repository 2021-01-09 10:56:02 +01:00
Alejandro Celaya
a8b68f07b5 Ensured delete/rename tags cannot be done with non-admin API keys 2021-01-06 17:31:49 +01:00
Alejandro Celaya
b5710f87e2 Created value object to wrap the renaming of a tag 2021-01-06 13:11:28 +01:00
Alejandro Celaya
041f231ff2 Implemented mechanism to add/remove roles from API keys 2021-01-06 10:59:08 +01:00
Alejandro Celaya
01b3c504f8 Ensured fixed commit for happyr/doctrine-specification is installed, until a stable v2.0 is released 2021-01-05 19:32:18 +01:00
Alejandro Celaya
f821dea06c Fixed typo on fixture 2021-01-05 19:29:42 +01:00
Alejandro Celaya
4b67d41362 Applied API role specs to short URL creation 2021-01-04 20:15:42 +01:00
Alejandro Celaya
19834f6715 Applied API role specs to domains list 2021-01-04 15:55:59 +01:00
Alejandro Celaya
262a06f624 Renamed method to be more consistent to what it actually does 2021-01-04 15:16:51 +01:00
Alejandro Celaya
a01e0ba337 Changed logic to list domains to centralize conditions in service 2021-01-04 15:02:37 +01:00
Alejandro Celaya
364be2420b Applied API role specs to short URL creation when findIfExists is provided 2021-01-04 13:54:38 +01:00
Alejandro Celaya
29cdfaed39 Changed ShortUrlMeta so that it expects an ApiKey instance instead of the key as string 2021-01-04 13:32:44 +01:00
Alejandro Celaya
24f7fb9c4f Applied API role specs to tags list without stats 2021-01-04 12:44:29 +01:00
Alejandro Celaya
68c601a5a8 Applied API role specs to global visits 2021-01-04 11:27:55 +01:00
Alejandro Celaya
8aa6bdb934 Applied API role specs to tag visits 2021-01-04 11:14:28 +01:00
Alejandro Celaya
4a1e7b761a Applied API role specs to short URL visits 2021-01-03 17:48:32 +01:00
Alejandro Celaya
25ee9b5daf Applied API role specs to single short URL tags edition 2021-01-03 16:50:47 +01:00
Alejandro Celaya
fff10ebee4 Applied API role specs to single short URL edition 2021-01-03 16:41:44 +01:00
Alejandro Celaya
65797b61a0 Applied API role specs to single short URL deletion 2021-01-03 14:03:10 +01:00
Alejandro Celaya
3e565d3830 Removed unnecesary if statements 2021-01-03 13:52:08 +01:00
Alejandro Celaya
dc08286a72 Applied API role specs to single short URL resolution 2021-01-03 13:33:07 +01:00
Alejandro Celaya
940383646b Applied API role specs to short URLs list 2021-01-03 13:05:21 +01:00
Alejandro Celaya
6e1d6ab795 Changed point in which specs are applied for tags list 2021-01-03 12:00:25 +01:00
Alejandro Celaya
df53e6c6f2 Created specs for API key roles 2021-01-02 20:08:49 +01:00
Alejandro Celaya
7e6882960e Added a system to set roles to API keys 2021-01-02 19:35:16 +01:00
Alejandro Celaya
ecf22ae4b6 Added happyr/doctrine-specification to support dunamically applying specs to queries 2021-01-02 17:14:42 +01:00
Alejandro Celaya
90551ff3bc Added used API key to request 2021-01-02 10:34:35 +01:00
Alejandro Celaya
598f2d8622 Merge pull request #950 from acelaya-forks/feature/run-parallel
Feature/run parallel
2021-01-01 11:32:21 +01:00
Alejandro Celaya
f3b4e94def Documented missing composer commands 2021-01-01 11:19:57 +01:00
Alejandro Celaya
6eb3dae8c3 Added dependency on composer parallel to speed-up dev commnds 2021-01-01 11:13:51 +01:00
Alejandro Celaya
09029dff37 Merge pull request #948 from acelaya-forks/feature/cors-improvements
Feature/cors improvements
2020-12-31 15:54:31 +01:00
Alejandro Celaya
9e7f2aea0d Updated changelog 2020-12-31 15:42:00 +01:00
Alejandro Celaya
850a5b412c Removed Access-Control-Expose-Headers header from CrossDomainM;iddleware, as it's actually not correct 2020-12-31 15:41:02 +01:00
Alejandro Celaya
84331135f7 Created API tests for CORS 2020-12-31 13:28:06 +01:00
Alejandro Celaya
202a7327d3 Updated more deps to increase PHP 8 compatibility 2020-12-24 10:37:07 +01:00
Alejandro Celaya
f42e2d87b3 Small update in docker docs 2020-12-22 16:12:39 +01:00
Alejandro Celaya
22124aced7 Updated more dependencies for PHP 8 compatibility 2020-12-22 09:34:58 +01:00
Alejandro Celaya
40676f2167 Removed scrutinizer coverage 2020-12-19 10:37:28 +01:00
Alejandro Celaya
d7b4720327 Merge pull request #936 from acelaya-forks/feature/php8-on-mutation
Added PHP 8 on mutation tests
2020-12-19 10:36:53 +01:00
Alejandro Celaya
3a4a2e4483 Replaced scrutinizer with codecov 2020-12-19 10:25:19 +01:00
Alejandro Celaya
71a83aa384 Added PHP 8 on mutation tests 2020-12-19 10:04:00 +01:00
Alejandro Celaya
291393eeeb Fixed branch for build badge 2020-12-13 18:07:13 +01:00
Alejandro Celaya
ea06c369b0 Merge pull request #933 from acelaya-forks/feature/ci-github-action
Feature/ci GitHub action
2020-12-13 17:56:50 +01:00
Alejandro Celaya
625c870417 Added step to build docker image, and deleted travis config file 2020-12-13 17:45:48 +01:00
Alejandro Celaya
a9e9f89799 Ensured code is cloned before using ocular to upload code coverage to scrutinizer during ci workflow 2020-12-13 17:31:22 +01:00
Alejandro Celaya
f2210ca0cb Added coverage driver to upload coverage job 2020-12-13 17:23:58 +01:00
Alejandro Celaya
1a42ca9239 Added missing dependency between upload coverage job and test jobs 2020-12-13 17:17:16 +01:00
Alejandro Celaya
53726bc679 Added steps to upload code coverage and delete artifacts to ci workflow 2020-12-13 13:34:22 +01:00
Alejandro Celaya
d8a7f3e08c Added mutation-tests step in ci workflow 2020-12-13 13:11:41 +01:00
Alejandro Celaya
ac5a22a3d0 Added static analysis and generation of code coverage artifacts 2020-12-13 12:59:06 +01:00
Alejandro Celaya
5dc2c1640a Added command to create mssql database for tests 2020-12-13 12:47:17 +01:00
Alejandro Celaya
7fe7354a27 Ensured mssql odbc installation is done as super user 2020-12-13 12:38:12 +01:00
Alejandro Celaya
ac85b913c2 Added other database test envs to ci workflow 2020-12-13 12:31:34 +01:00
Alejandro Celaya
0e58d1a242 Added pcov as code coverage driver in github action 2020-12-13 11:37:45 +01:00
Alejandro Celaya
5040f5b177 Changed condition to determine if tests are run in CI 2020-12-13 11:07:37 +01:00
Alejandro Celaya
77deb9c111 Created first version of the ci workflow 2020-12-13 10:44:02 +01:00
Alejandro Celaya
74bafefa68 Merge pull request #931 from acelaya-forks/feature/installer-update-option
Feature/installer update option
2020-12-11 22:00:27 +01:00
Alejandro Celaya
d564404bfe Updated changelog 2020-12-11 21:43:43 +01:00
Alejandro Celaya
b2658073b3 Created script to update config options 2020-12-11 21:42:40 +01:00
Alejandro Celaya
63bd95a123 Merge pull request #928 from acelaya-forks/feature/php8-support
Feature/php8 support
2020-12-06 12:00:45 +01:00
Alejandro Celaya
40105d7aaf Updated to latest swoole and pdo_sqlsrv extensions 2020-12-06 11:41:27 +01:00
Alejandro Celaya
c78991761f Fixed quotes in travis config 2020-12-06 11:29:23 +01:00
Alejandro Celaya
b7a0d319b3 Updated more dependencies to support PHP8 2020-12-04 18:50:00 +01:00
Alejandro Celaya
55bfa9776a Updated to shlinkio/shlink-event-dispatcher 1.6 2020-12-03 23:25:27 +01:00
Alejandro Celaya
d3a4ed607c Replaced --ignore-platform-reqs by --ignore-platform-req=php when running build on PHP 8 2020-12-03 22:27:25 +01:00
Alejandro Celaya
8c79619ff2 Updated to PHP8 compatible versions of symfony/mercure and pugx/shortid-php 2020-12-03 22:26:33 +01:00
Alejandro Celaya
6bedca4ee6 Added more tests covering unicode in custom slugs 2020-12-02 18:45:57 +01:00
Alejandro Celaya
9857f105ec Merge pull request #926 from acelaya-forks/feature/custom-slug-unicode
Feature/custom slug unicode
2020-12-02 12:12:31 +01:00
Alejandro Celaya
7ac1c32ad6 Fixed typo 2020-12-02 12:02:49 +01:00
Alejandro Celaya
6e9fa6553d Updated changelog 2020-12-02 12:01:35 +01:00
Alejandro Celaya
55ea8a6912 #896 Added support for unicode characters in custom slugs 2020-12-02 12:00:47 +01:00
Alejandro Celaya
179ddc5bd7 Merge pull request #925 from acelaya-forks/feature/db-socket-connection
Feature/db socket connection
2020-11-29 20:08:51 +01:00
Alejandro Celaya
bfd886604e Updated changelog 2020-11-29 19:50:39 +01:00
Alejandro Celaya
f34033aa9c Documented how to provide the unix socket to connect to mysql, maria and postgres databases 2020-11-29 19:46:34 +01:00
Alejandro Celaya
e54745b250 #833 Enabled unix socket option during installation 2020-11-29 14:01:26 +01:00
Alejandro Celaya
1975a35837 Updated to lcobucci/json 4.0 stable 2020-11-29 12:54:22 +01:00
Alejandro Celaya
5db66dcf0e Merge pull request #923 from acelaya-forks/feature/qr-codes-query-size
Feature/qr codes query size
2020-11-27 18:00:01 +01:00
Alejandro Celaya
cfdf2f9480 #917 Updated changelog 2020-11-27 17:50:09 +01:00
Alejandro Celaya
c13adb04ef #917 Documented QR endpoint with query size and path size 2020-11-27 17:47:52 +01:00
Alejandro Celaya
4f1ab977a1 #917 Added tests covering the different ways to provide sizes to the QR codes 2020-11-27 17:42:33 +01:00
Alejandro Celaya
fe59a5ad86 #917 Fixed cast to int on QR code action 2020-11-27 17:16:54 +01:00
Alejandro Celaya
a72dc16d85 #917 2020-11-27 17:05:13 +01:00
Alejandro Celaya
74108a19e5 Merge pull request #915 from acelaya-forks/feature/remove-plates
Feature/remove plates
2020-11-22 18:42:19 +01:00
Alejandro Celaya
abe0fc16df #912 Updated changelog 2020-11-22 18:13:12 +01:00
Alejandro Celaya
39bda5113b #912 Fixed unit tests 2020-11-22 18:11:31 +01:00
Alejandro Celaya
49ea5cc78b #912 Removed dependency on league/plates 2020-11-22 18:03:27 +01:00
Alejandro Celaya
8acde332b2 Merge pull request #914 from acelaya-forks/feature/mercure-10-compat
Feature/mercure 10 compat
2020-11-22 16:41:26 +01:00
Alejandro Celaya
600f7a7388 #869 Updated changelog 2020-11-22 16:27:24 +01:00
Alejandro Celaya
fd007ea4a9 #869 Updated dependencies to support mercure 0.10 2020-11-22 16:26:17 +01:00
Alejandro Celaya
d945c28a75 Merge pull request #911 from shlinkio/develop
Release 2.4.2
2020-11-22 11:01:00 +01:00
Alejandro Celaya
b66922b3d5 Ensured lcobucci/jwt stays in alpha 2020-11-22 10:44:13 +01:00
Alejandro Celaya
7d981434e1 Merge pull request #910 from acelaya-forks/feature/swoole-bug
Feature/swoole bug
2020-11-22 10:41:10 +01:00
Alejandro Celaya
c672d35b4a #827 Updated changelog 2020-11-22 10:26:18 +01:00
Alejandro Celaya
6259c73b33 #827 Fixed swoole config getting loaded on non-swoole contexts when running CLI command first 2020-11-22 10:24:06 +01:00
Alejandro Celaya
e4b00e832a Merge pull request #909 from acelaya-forks/feature/geolite-temp-dir
Feature/geolite temp dir
2020-11-21 12:48:28 +01:00
Alejandro Celaya
a452aeaf7e #899 Updated changelog 2020-11-21 12:38:14 +01:00
Alejandro Celaya
6e83b90028 #899 Changed temp directory in which geolite DB files are downloaded 2020-11-21 12:36:30 +01:00
Alejandro Celaya
45ffdce312 Merge pull request #908 from acelaya-forks/feature/domains-list
Feature/domains list
2020-11-21 09:46:16 +01:00
Alejandro Celaya
5485efc9ae #901 Fixed condition type 2020-11-21 08:51:30 +01:00
Alejandro Celaya
850360dd2b #901 Updated changelog 2020-11-21 08:45:57 +01:00
Alejandro Celaya
8d3ceaf462 #901 Ensured only domains in use are returned to lists 2020-11-21 08:44:28 +01:00
Alejandro Celaya
bb6c5de697 Merge pull request #907 from acelaya-forks/feature/missing-swagger-info
Feature/missing swagger info
2020-11-21 08:18:14 +01:00
Alejandro Celaya
ca4c1b00dc #904 Updated changelog 2020-11-21 08:16:22 +01:00
Alejandro Celaya
dda6d30c12 #904 Explicitly added missing Domains and Integrations tags to swagger docs 2020-11-21 08:13:29 +01:00
Alejandro Celaya
7bb40c74c1 Merge pull request #895 from shlinkio/develop
Release 2.4.1
2020-11-10 20:00:26 +01:00
Alejandro Celaya
4515a83e9b Fixed github action syntax 2020-11-10 19:06:50 +01:00
Alejandro Celaya
907a282b73 Merge pull request #894 from acelaya-forks/feature/docker-publish-action
Feature/docker publish action
2020-11-10 19:05:24 +01:00
Alejandro Celaya
5154638ddf Added v2.4.1 to changelog 2020-11-10 19:04:08 +01:00
Alejandro Celaya
52c9994eb4 #890 Migrated to official docker actions for docker-image-build workflow 2020-11-10 19:03:14 +01:00
Alejandro Celaya
912f287a27 Merge pull request #893 from acelaya-forks/feature/wrong-redirect-status
Feature/wrong redirect status
2020-11-10 18:59:09 +01:00
Alejandro Celaya
e99ab66afd Updated changelog 2020-11-10 18:33:33 +01:00
Alejandro Celaya
fb022eae68 #867 Changed use of deprecated functions by their replacements 2020-11-10 18:13:24 +01:00
Alejandro Celaya
259c52a698 #867 Ensured status code config is honored when doing not-found redirects 2020-11-10 18:08:25 +01:00
Alejandro Celaya
deeca582db #867 Small refactoring on NotFoundRedirecthandler 2020-11-10 17:30:14 +01:00
Alejandro Celaya
4dbcf6857e Merge pull request #892 from acelaya-forks/feature/fix-typehint
Feature/fix typehint
2020-11-10 17:28:10 +01:00
Alejandro Celaya
5190a03113 #846 Fixed base image used for PHP-FPM dev container 2020-11-10 16:08:22 +01:00
Alejandro Celaya
d60c3a4aa9 #891 Updated changelog 2020-11-10 15:51:04 +01:00
Alejandro Celaya
ce1c70fd7c #891 Fixed wrong return type hint on method inside migration when using postgres 2020-11-10 15:49:05 +01:00
Alejandro Celaya
29bb201581 Merge pull request #889 from shlinkio/develop
Release v2.4.0
2020-11-08 12:27:50 +01:00
Alejandro Celaya
006ec7c1d0 Added v2.4 to changelog 2020-11-08 12:14:41 +01:00
Alejandro Celaya
1bc9e0643d Merge pull request #888 from acelaya-forks/feature/simplify-auth-checks
Deleted everything related with authentication plugins, as shlink onl…
2020-11-07 13:02:51 +01:00
Alejandro Celaya
d6395a3de8 Deleted everything related with authentication plugins, as shlink only supports API key auth since v2.0.0 2020-11-07 12:53:14 +01:00
Alejandro Celaya
098751d256 Fixed link in changelog 2020-11-07 10:54:21 +01:00
Alejandro Celaya
8577d6bd99 Merge pull request #887 from acelaya-forks/feature/track-url-creator
Feature/track url creator
2020-11-07 10:40:43 +01:00
Alejandro Celaya
fe4e171ecb Removed unused mock 2020-11-07 10:30:25 +01:00
Alejandro Celaya
d99ea82761 Added migrations folder to the static analysis 2020-11-07 10:27:35 +01:00
Alejandro Celaya
27bc8d4823 Ensured API key is tracked when creating short URLs from the REST API 2020-11-07 10:23:08 +01:00
Alejandro Celaya
7c9f572eb1 Deleted old domain resolvers and added tests for new short url relation resolvers 2020-11-07 09:49:09 +01:00
Alejandro Celaya
2732b05834 Added mechanisms to be able to provide the API key when creating a short URL 2020-11-07 09:34:10 +01:00
Alejandro Celaya
97f89bcede Simplified transactional URL shortening 2020-11-06 20:05:57 +01:00
Alejandro Celaya
00255b04eb Added migration to create new author_api_key_id in short_urls 2020-11-06 19:43:05 +01:00
Alejandro Celaya
f90ea4bd98 Updated dependencies 2020-11-06 18:58:07 +01:00
Alejandro Celaya
0d7fb1163a Merge pull request #886 from acelaya-forks/feature/update-dependencies
Updated dependencies
2020-11-02 12:17:55 +01:00
Alejandro Celaya
cb340b5867 Updated phpunit configs to use new schema introduced in v9.3 2020-11-02 12:07:45 +01:00
Alejandro Celaya
1621f3a943 Updated dependencies 2020-11-02 11:53:14 +01:00
Alejandro Celaya
ae636aef5a Merge pull request #885 from acelaya-forks/feature/deprecate-create-tag
Feature/deprecate create tag
2020-11-02 11:17:30 +01:00
Alejandro Celaya
1346d7902e Updated changelog 2020-11-02 11:06:41 +01:00
Alejandro Celaya
544836b986 Deprecated tags creation 2020-11-02 11:05:14 +01:00
Alejandro Celaya
397f7d09e3 Merge pull request #884 from acelaya-forks/feature/missing-docker-extension
Feature/missing docker extension
2020-11-02 09:50:52 +01:00
Alejandro Celaya
efa707c676 Updated changelog 2020-11-02 09:25:17 +01:00
Alejandro Celaya
51c8b80489 Changed to for consistency in the Dockerfile 2020-11-02 09:24:14 +01:00
Alejandro Celaya
e71fb0ac7f Added gmp extension to docker images, as it seems to be required by geolite in some cases 2020-11-02 09:02:00 +01:00
Alejandro Celaya
681b7c836d Added swoole extension to publish-release github action 2020-11-01 11:47:04 +01:00
Alejandro Celaya
7c2c90fc49 Merge pull request #879 from acelaya-forks/feature/github-release-action
Feature/GitHub release action
2020-11-01 11:42:08 +01:00
Alejandro Celaya
ebe6a5f4aa Moved github release creation from travis to github action 2020-11-01 11:23:11 +01:00
Alejandro Celaya
65651e4bbd Updated changelog to more strictly endorse to keepachangelog spec 2020-11-01 11:22:29 +01:00
Alejandro Celaya
33190c07c7 Updated references from travis-ci.org to travis-ci.com 2020-10-31 08:25:03 +01:00
Alejandro Celaya
f651b0e5a1 Merge pull request #873 from acelaya-forks/feature/disable-platform-checks
Disabled platform checks in composer
2020-10-29 17:28:18 +01:00
Alejandro Celaya
c85eb84b4c Disabled platform checks in composer 2020-10-29 17:24:12 +01:00
Alejandro Celaya
86d428184e Merge pull request #866 from acelaya-forks/feature/composer-2
Updated to composer 2
2020-10-26 19:47:35 +01:00
Alejandro Celaya
c1529b7d6c Updated to composer 2 2020-10-25 17:59:37 +01:00
Alejandro Celaya
7ecc3aacc4 Merge pull request #865 from acelaya-forks/feature/importer
Feature/importer
2020-10-25 14:17:50 +01:00
Alejandro Celaya
b091bd4e2a Ensured composer 1 for now 2020-10-25 13:46:39 +01:00
Alejandro Celaya
90b4bc9b1a Updated changelog 2020-10-25 13:36:21 +01:00
Alejandro Celaya
de7096010e Created DoctrineBatchHelperTest 2020-10-25 13:30:18 +01:00
Alejandro Celaya
03a9697298 Created ImportedLinksProcessorTest 2020-10-25 13:20:34 +01:00
Alejandro Celaya
fdcf88de67 Added database tests for ShortUrlRepository::importedUrlExists 2020-10-25 12:06:48 +01:00
Alejandro Celaya
7c343f42c1 Improved how existing imported short URLs are checked by tracking its original short code 2020-10-25 11:57:26 +01:00
Alejandro Celaya
786e4f642b Moved short code uniqueness checks to external helper class that is used in UrlShortener and ImportedLinksProcessor 2020-10-25 11:16:42 +01:00
Alejandro Celaya
b1a073b1ab Ensured uniqueness on imported short URLs short code 2020-10-25 10:26:11 +01:00
Alejandro Celaya
2256f6a9e7 Added feedback to ImportedLinksProcessor 2020-10-24 15:09:46 +02:00
Alejandro Celaya
ec3e7212b2 Basic short-úrl import implementation 2020-10-24 13:55:54 +02:00
Alejandro Celaya
554d9b092f Added import_source column in ShortUrls 2020-10-23 12:59:39 +02:00
Alejandro Celaya
33d3837795 Added dependency on shlinkio/shlink-importer 2020-10-22 18:12:22 +02:00
Alejandro Celaya
0686ac2fb1 Merge pull request #857 from acelaya-forks/feature/php8
Feature/php8
2020-10-16 20:14:57 +02:00
Alejandro Celaya
ce3d267572 Updated changelog 2020-10-16 19:54:09 +02:00
Alejandro Celaya
4ec90e02c9 Updated to latest infection 2020-10-16 19:53:05 +02:00
Alejandro Celaya
e7bccb088d Updated to latest swoole and pdo_sqlsrv versions which are compatible with PHP8 2020-10-16 19:28:57 +02:00
Alejandro Celaya
cbc9f1257d Enabled Diactoros as module 2020-10-16 19:21:40 +02:00
Alejandro Celaya
c7f15b77fd Merge pull request #853 from dlondero/phpunit-static-assertions
PHPUnit static assertions
2020-10-04 09:44:18 +02:00
Daniel Londero
a8b0c46142 Fix typo 2020-10-04 00:35:29 +02:00
Daniel Londero
065d314608 Invoke PHPUnit's assertions statically 2020-10-04 00:35:14 +02:00
Alejandro Celaya
d426dbc684 Merge pull request #850 from acelaya-forks/feature/env-docker-port
Feature/env docker port
2020-10-03 12:12:25 +02:00
Alejandro Celaya
c6c78f383f Updated changelog 2020-10-03 11:56:09 +02:00
Alejandro Celaya
450eea64aa Added support for port option in SimplifiedConfigParser 2020-10-03 11:54:31 +02:00
Alejandro Celaya
c8d7413dd4 Documented support for PORT env var in Docker image 2020-10-03 11:52:27 +02:00
Alejandro Celaya
00a96e6215 Allowed to change swoole port in docker image by using the PORT env var 2020-10-03 11:49:25 +02:00
Alejandro Celaya
b15e90408f Merge pull request #849 from acelaya-forks/feature/domains-endpoint
Feature/domains endpoint
2020-09-27 12:59:54 +02:00
Alejandro Celaya
34c10c0bc9 Updated changelog 2020-09-27 12:50:03 +02:00
Alejandro Celaya
63a24342e3 Created unit test for ListDomainsCommand 2020-09-27 12:48:24 +02:00
Alejandro Celaya
073e4eeac8 Created command to list domains 2020-09-27 12:39:02 +02:00
Alejandro Celaya
06eda073bf Added API test for /domains endpoint 2020-09-27 10:23:17 +02:00
Alejandro Celaya
614e1c37f8 Added database test for Domainrepository 2020-09-27 10:18:49 +02:00
Alejandro Celaya
24aab5cc0e Created unit tests for new Domain-related elements 2020-09-27 10:11:41 +02:00
Alejandro Celaya
76d6d9a7a9 Created rest endpoint to list existing domains 2020-09-27 09:53:12 +02:00
Alejandro Celaya
8109ceb7eb Merge pull request #845 from acelaya-forks/feature/api-test-coverage
Feature/api test coverage
2020-09-26 11:33:36 +02:00
Alejandro Celaya
6163e34327 Directly run API tests on travis, because they get stuck when run through composer 2020-09-26 11:16:35 +02:00
Alejandro Celaya
84b291e310 Added message with exit code in API tests script 2020-09-26 11:07:02 +02:00
Alejandro Celaya
20cd5cd752 Updated changelog 2020-09-26 10:54:52 +02:00
Alejandro Celaya
d9d57743e6 Fixed code copverage on API tests being exported as Clover instead of PHP 2020-09-26 10:49:56 +02:00
Alejandro Celaya
cc57dcd01a Added code coverage to API tests 2020-09-26 10:43:50 +02:00
Alejandro Celaya
10fbf8f8ff Merge pull request #843 from acelaya-forks/feature/runtime-validation-flag
Feature/runtime validation flag
2020-09-24 22:29:32 +02:00
Alejandro Celaya
cfc9a1b772 Ensure string casting safety 2020-09-24 22:15:26 +02:00
Alejandro Celaya
2555424124 Updated changelog 2020-09-24 22:04:38 +02:00
Alejandro Celaya
405369824b Added hability to override URL validation from the CLI 2020-09-24 21:54:03 +02:00
Alejandro Celaya
cdd87f5962 Documented validateUrl params on create/edit short URL endpoints 2020-09-23 19:24:15 +02:00
Alejandro Celaya
d5eac3b1c3 Added validateUrl optional flag for create/edit short URLs 2020-09-23 19:19:17 +02:00
Alejandro Celaya
1f78f5266a Merge pull request #842 from acelaya-forks/feature/find-if-exists-performance
Feature/find if exists performance
2020-09-23 08:01:02 +02:00
Alejandro Celaya
aa0124f4e9 Moved API tests back to composer ci command 2020-09-23 07:49:59 +02:00
Alejandro Celaya
641f35ae05 Updated changelog 2020-09-23 07:46:25 +02:00
Alejandro Celaya
4e94f07050 Added tests for new ShortUrlRepository::findOneMatching method 2020-09-23 07:34:36 +02:00
Alejandro Celaya
460ca032d2 Drastically improved performance when creating new short URLs with findIfExists by moving logic to DB query 2020-09-23 00:22:29 +02:00
Alejandro Celaya
8d438aa6aa Merge pull request #841 from acelaya-forks/feature/svg-qr-codes
Feature/svg qr codes
2020-09-21 23:05:11 +02:00
Alejandro Celaya
504d08101a Updated changelog 2020-09-21 22:55:18 +02:00
Alejandro Celaya
4b7184ac85 Added tests for new QR code format 2020-09-21 22:54:05 +02:00
Alejandro Celaya
55d9f2a4a1 Added support to return the QR code in SVG format 2020-09-21 22:48:52 +02:00
Alejandro Celaya
319b790628 Merge pull request #840 from acelaya-forks/feature/extended-ordering-support
Feature/extended ordering support
2020-09-21 22:19:55 +02:00
Alejandro Celaya
ee563978ac Updated changelog 2020-09-21 22:06:41 +02:00
Alejandro Celaya
be71a6eeb4 Replaced colon by hyphen as the ordering field-dir separator as it's a valid URL character 2020-09-21 22:03:43 +02:00
Alejandro Celaya
25fbbee883 Added support to order short urls liusts using the <field>:<dir> notaiton as string 2020-09-20 13:21:21 +02:00
Alejandro Celaya
8dbd9ca33d Merge pull request #824 from shlinkio/develop
Release v2.3.0
2020-08-09 11:47:57 +02:00
Alejandro Celaya
cad8c7ed48 Added v2.3.0 to changelog 2020-08-09 11:42:26 +02:00
Alejandro Celaya
c11c731bef Merge pull request #823 from acelaya-forks/feature/docker-updates
Feature/docker updates
2020-08-09 11:41:16 +02:00
Alejandro Celaya
a79362d520 Updated changelog 2020-08-09 11:14:50 +02:00
Alejandro Celaya
c708df2029 Updated to latest docker 2020-08-09 11:13:14 +02:00
Alejandro Celaya
e0760c371a Merge pull request #821 from acelaya-forks/feature/slug-regex
Feature/slug regex
2020-08-09 10:55:32 +02:00
Alejandro Celaya
714a58945e Fixed access to magic method that no longer exists 2020-08-09 10:46:44 +02:00
Alejandro Celaya
87e8ae7af6 Moved custom salugs regex to constant 2020-08-09 10:24:59 +02:00
Alejandro Celaya
a66dca4f07 Merge branch 'develop' of github.com:shlinkio/shlink into develop 2020-07-31 21:44:18 +02:00
Alejandro Celaya
9853b0916f Merge pull request #817 from acelaya-forks/feature/gh-action-docker-build
Feature/gh action docker build
2020-07-31 21:43:21 +02:00
Alejandro Celaya
18afd92fc3 Fixed how docker image version is extracted from github ref 2020-07-31 21:32:06 +02:00
Alejandro Celaya
0474b32c34 Recovered real docker image on docker build script 2020-07-31 21:25:42 +02:00
Alejandro Celaya
ca6fb1c656 Merge pull request #15 from acelaya-forks/feature/gh-action-docker-build
Feature/gh action docker build
2020-07-31 20:42:30 +02:00
Alejandro Celaya
a7a69506a0 Fixed how docker credentials are read from secrets 2020-07-31 20:41:39 +02:00
Alejandro Celaya
a32651aab3 Replace -u by --username on docker login command 2020-07-31 20:30:30 +02:00
Alejandro Celaya
977af0ee43 Fixed pattern for tags on github action 2020-07-31 20:24:44 +02:00
Alejandro Celaya
53bbcd34a6 Replaced built image by lab one while testing functionality 2020-07-31 20:19:46 +02:00
Alejandro Celaya
1eb9ef0361 Moved docker image build to github actions 2020-07-31 20:17:14 +02:00
Alejandro Celaya
1ac05fd3a4 Update CONTRIBUTING.md 2020-07-26 22:10:26 +02:00
Alejandro Celaya
4aef0fa728 Merge pull request #813 from acelaya-forks/feature/php8-ci
Added Builds on PHP nightly
2020-07-24 11:00:43 +02:00
Alejandro Celaya
f4da1b0a2e Fixed wrong regexes in phpstan.neon 2020-07-23 16:53:28 +02:00
Alejandro Celaya
163839494b Added Builds on PHP nightly 2020-07-23 16:34:25 +02:00
Alejandro Celaya
8a811c5b33 Merge pull request #809 from acelaya-forks/feature/list-all-command
Feature/list all command
2020-07-14 15:50:29 +02:00
Alejandro Celaya
007139e4ff Updated changelog 2020-07-14 15:37:21 +02:00
Alejandro Celaya
6be0310933 Improved command flag description 2020-07-14 15:31:18 +02:00
Alejandro Celaya
5f9b629676 Added test for short URLs with all items 2020-07-14 13:28:38 +02:00
Alejandro Celaya
8e84b0e8ac Ensured page footer on list short URLs is not displayed when printing all URLs 2020-07-14 13:14:53 +02:00
Alejandro Celaya
3ff9e101a8 Added support to print all short URLs at once from CLI 2020-07-14 13:00:56 +02:00
Alejandro Celaya
71570af7db Merge pull request #808 from acelaya-forks/feature/trailing-question-mark
Fixed issue introduced with league/uri library
2020-07-10 23:36:16 +02:00
Alejandro Celaya
1401dd9156 Fixed issue introduced with league/uri library 2020-07-10 23:25:31 +02:00
Alejandro Celaya
36c12a69b1 Added project structure explanation to CONTRIBUTING doc 2020-07-08 15:38:12 +02:00
Alejandro Celaya
742e2d724e Updated comment on issue templates 2020-07-06 09:28:31 +02:00
Alejandro Celaya
f74851b0d8 Merge pull request #804 from acelaya-forks/feature/document-tests
Added project tests section to the CONTRIBUTING file
2020-07-01 16:38:46 +02:00
Alejandro Celaya
dd5dcf6ec1 Fixed typo 2020-07-01 16:38:19 +02:00
Alejandro Celaya
a448972e3c Added project tests section to the CONTRIBUTING file 2020-07-01 16:35:25 +02:00
Alejandro Celaya
f784a4f794 Merge pull request #799 from acelaya-forks/feature/guzzle7
Feature/guzzle7
2020-06-28 10:23:20 +02:00
Alejandro Celaya
554a66503f Updated changelog 2020-06-28 10:07:43 +02:00
Alejandro Celaya
73c6c52b2a Updated to guzzle 7 2020-06-28 10:06:49 +02:00
Alejandro Celaya
509672f4c7 Added intl to required PHP extensions 2020-06-27 16:42:17 +02:00
Alejandro Celaya
e4f01e4cf8 Merge pull request #797 from acelaya-forks/feature/deeplinks-support
Feature/deeplinks support
2020-06-27 11:26:35 +02:00
Alejandro Celaya
156eae56d0 Fixed typo in contributing doc 2020-06-27 11:16:59 +02:00
Alejandro Celaya
2df6e694ea Updated changelog 2020-06-27 11:15:17 +02:00
Alejandro Celaya
78b838f6b6 Used league/uri to validate URLs including deeplinks, and fixed tests 2020-06-27 11:14:10 +02:00
Alejandro Celaya
08950f6433 Replaced UriInterface by string when creating a short URL 2020-06-27 10:48:35 +02:00
Alejandro Celaya
a74e1df55c Merge pull request #796 from acelaya-forks/feature/contributing
Feature/contributing
2020-06-27 10:45:09 +02:00
Alejandro Celaya
bf1c6e3d43 Referenced CONTRIBUTING doc from README 2020-06-27 10:43:43 +02:00
Alejandro Celaya
d234e114db Added description on how to create pull requests to CONTRIBUTING file 2020-06-27 10:41:29 +02:00
Alejandro Celaya
035743ef6a Added minor imporovements to CONTRIBUTING file 2020-06-27 10:34:26 +02:00
Alejandro Celaya
c7c9ab71ff Created first draft of the contributing file 2020-06-26 21:22:54 +02:00
Alejandro Celaya
e107aa9ed8 Removed commented migrations option 2020-06-23 19:23:33 +02:00
Alejandro Celaya
e9191732bd Merge pull request #794 from acelaya-forks/feature/migrations3
Feature/migrations3
2020-06-21 13:21:14 +02:00
Alejandro Celaya
f44540f95e Updated changelog 2020-06-21 13:01:10 +02:00
Alejandro Celaya
6b3fd2ac83 Commented out name config option for migrations, since it makes it fail 2020-06-21 13:00:32 +02:00
Alejandro Celaya
eed353fedf Updated migration template 2020-06-21 12:29:56 +02:00
Alejandro Celaya
b4e58cc1bb Updated doctrine config for v3 2020-06-21 12:24:47 +02:00
Alejandro Celaya
56d690d9a6 Removed references to master branch 2020-06-21 12:21:39 +02:00
Alejandro Celaya
bffc044bc7 Fixed typo 2020-06-20 11:34:09 +02:00
Alejandro Celaya
58dd1c54f9 Merge pull request #792 from acelaya-forks/feature/configurable-redirect
Feature/configurable redirect
2020-06-20 11:33:48 +02:00
Alejandro Celaya
5c163490c7 Allowed new redirect config options to be pased as env vars to the docker image 2020-06-20 11:21:37 +02:00
Alejandro Celaya
f2f07be11f Updated to latest installer, supporting redirects customizations 2020-06-20 11:07:15 +02:00
Alejandro Celaya
0bea843e7f Added test covering how redirects config works 2020-06-20 09:50:56 +02:00
Alejandro Celaya
83cc11030d Updated changelog 2020-06-20 09:30:23 +02:00
Alejandro Celaya
cb70dc5389 Removed stuff from local config file which already comes on third party config 2020-06-20 09:20:01 +02:00
Alejandro Celaya
68db52679b Added support to serve redirects with status 301 and Cache-Control 2020-06-17 19:01:56 +02:00
Alejandro Celaya
186168b26c Merge pull request #789 from acelaya-forks/feature/simplified-travis-config
Simplified travis configuration, by removing all env vars checks
2020-06-10 18:05:31 +02:00
Alejandro Celaya
e9c64b46b7 Removed condition from travis that is now implicit 2020-06-10 17:54:41 +02:00
Alejandro Celaya
f476cfc30f Simplified travis configuration, by removing all env vars checks 2020-06-10 17:51:20 +02:00
Alejandro Celaya
3706d6c82d Merge pull request #783 from acelaya-forks/feature/extended-mutation-checks
Feature/extended mutation checks
2020-06-09 12:11:56 +02:00
Alejandro Celaya
248209ab41 Updated changelog 2020-06-08 23:30:19 +02:00
Alejandro Celaya
2867a9b7b0 Added commands to run infection checks on database tests 2020-06-08 23:26:27 +02:00
Alejandro Celaya
68919c19b8 Added deprecation in BodyParserMiddleware 2020-06-08 23:25:54 +02:00
Alejandro Celaya
ee1aa42900 Improved titles on error templates 2020-06-08 23:25:54 +02:00
Alejandro Celaya
c3de39d313 Merge pull request #787 from shlinkio/develop
Release v2.2.2
2020-06-08 23:09:28 +02:00
Alejandro Celaya
8ecc9c69a2 Added v2.2.2 to changelog 2020-06-08 22:49:40 +02:00
Alejandro Celaya
e814f3afcf Merge pull request #784 from acelaya-forks/feature/tag-visits-many-short-urls
Feature/tag visits many short urls
2020-06-08 22:48:52 +02:00
Alejandro Celaya
a4eda9d761 Moved execution of API tests outside composer script 2020-06-08 22:38:51 +02:00
Alejandro Celaya
f3f3ef5c18 Removed unused import 2020-06-08 18:37:45 +02:00
Alejandro Celaya
296134078c Updated changelog 2020-06-08 18:37:45 +02:00
Alejandro Celaya
527faf27a8 Changed how visits for a tag are fetched, avoiding thousands of values to be loaded in memory 2020-06-08 18:37:22 +02:00
Alejandro Celaya
9c339b9c4f Merge pull request #785 from acelaya-forks/feature/improve-custom-slugs
Improved custom slug sluggification, allowing valid URL characters
2020-06-08 18:36:36 +02:00
Alejandro Celaya
f274cafa7c Updated changelog 2020-06-08 18:10:34 +02:00
Alejandro Celaya
371f246c41 Improved custom slug sluggification, allowing valid URL characters 2020-06-08 18:08:53 +02:00
Alejandro Celaya
95ae540799 Defined docker image to build in a var 2020-05-17 10:19:54 +02:00
Alejandro Celaya
f340e0e76e Temporary disabled ARM docker images to reduce build times 2020-05-17 09:37:05 +02:00
Alejandro Celaya
14e0766f72 Merge pull request #773 from acelaya-forks/feature/temporal-build-fix
Going back to single travis job for docker image building
2020-05-16 22:18:03 +02:00
Alejandro Celaya
17f3897746 Going back to single travis job for docker image building 2020-05-16 22:01:20 +02:00
Alejandro Celaya
3c3a30cc0e Merge pull request #772 from acelaya-forks/feature/separate-docker-builds
Separated docker builds in different platforms
2020-05-16 15:15:47 +02:00
Alejandro Celaya
726811f91f Separated docker builds in different platforms 2020-05-16 15:06:37 +02:00
Alejandro Celaya
75f5da5846 Fixed docker install in travis 2020-05-16 14:05:39 +02:00
Alejandro Celaya
489c739be2 Updated condition to run docker publish 2020-05-16 14:00:03 +02:00
Alejandro Celaya
9d6f14c81a Merge pull request #771 from acelaya-forks/feature/build-time-improvements
Changed travis build so that docker image publishing runs on its own …
2020-05-16 13:50:54 +02:00
Alejandro Celaya
788f9635dd Fixed travis config syntax error 2020-05-16 13:40:59 +02:00
Alejandro Celaya
09aa4cc977 Changed travis build so that docker image publishing runs on its own separated job 2020-05-16 13:28:29 +02:00
Alejandro Celaya
9252cc269b Merge pull request #770 from acelaya-forks/feature/multi-arch-improvements
Feature/multi arch improvements
2020-05-16 11:35:56 +02:00
Alejandro Celaya
65e6676c00 Removed docker image building on non-PR builds 2020-05-16 11:25:50 +02:00
Alejandro Celaya
135b62a9cc Documented multi-architecture on docker image 2020-05-16 10:39:47 +02:00
Alejandro Celaya
2ea58acde2 Updated changelog 2020-05-16 10:28:09 +02:00
Alejandro Celaya
e1085f3ef5 Merge pull request #756 from Starbix/multi-arch
Add multi arch support
2020-05-16 10:22:59 +02:00
Cédric Laubacher
f1db195a06 Merge branch 'develop' into multi-arch 2020-05-15 20:37:41 +02:00
Cédric Laubacher
fa646b0176 Add multi arch support 2020-05-15 18:32:35 +02:00
Alejandro Celaya
21ef1dfee8 Merge pull request #765 from acelaya-forks/feature/fix-dates-match
Feature/fix dates match
2020-05-11 13:27:38 +02:00
Alejandro Celaya
5ef548bc2a Updated changelog with v2.2.1 2020-05-11 13:19:01 +02:00
Alejandro Celaya
1fa9896524 Fixed error when trying to match creteria on a Short URL with dates 2020-05-11 13:12:55 +02:00
Alejandro Celaya
cb6756d801 Merge pull request #763 from shlinkio/develop
Release 2.2.0
2020-05-09 11:10:31 +02:00
Alejandro Celaya
cf605407ad Used definitive dependency versions for shlink-common and shlñink-installer 2020-05-09 10:56:07 +02:00
Alejandro Celaya
1a4eee1c81 Merge pull request #762 from acelaya-forks/feature/visits-by-tag
Feature/visits by tag
2020-05-09 10:52:33 +02:00
Alejandro Celaya
4c5cd88041 Updated changelog 2020-05-09 10:38:18 +02:00
Alejandro Celaya
4d346d1fea Created API test for tags visits endpoint 2020-05-09 10:31:39 +02:00
Alejandro Celaya
7f39e6d768 Created TagVisitsActionTest 2020-05-09 10:22:07 +02:00
Alejandro Celaya
9b9de8e290 Updated VisitsTrackerTest 2020-05-09 10:14:26 +02:00
Alejandro Celaya
e1e3c7f061 Created paginator adapter tests 2020-05-09 10:10:48 +02:00
Alejandro Celaya
3218f8c283 Added Created endpoint to serve visits by tag 2020-05-09 09:53:45 +02:00
Alejandro Celaya
f0acce1be0 Updated to latest common 2020-05-09 09:34:59 +02:00
Alejandro Celaya
dd4b4277c9 Added test for VisitRepository tag methods 2020-05-08 20:11:37 +02:00
Alejandro Celaya
baf77b6ffb Implemented methods to get paginated list of visits by tag, reusing methods used for short code filtering 2020-05-08 19:55:05 +02:00
Alejandro Celaya
5be882a31b Improved parameter definition in some private queries in VisitRepository 2020-05-08 19:41:21 +02:00
Alejandro Celaya
ae060f3b13 Merge pull request #761 from acelaya-forks/feature/optional-obfuscation
Feature/optional obfuscation
2020-05-08 16:03:11 +02:00
Alejandro Celaya
e8ab664561 Updated changelog 2020-05-08 15:54:50 +02:00
Alejandro Celaya
f4bf3551f6 Updated shlink-installer to a version supporting IP anonymization param 2020-05-08 15:50:16 +02:00
Alejandro Celaya
8f06e4b20f Replaced references to obfuscate by anonymize 2020-05-08 15:43:09 +02:00
Alejandro Celaya
bfdd6e0c50 Ensured SimplifiedConfigParser properly handles obfuscate_remote_addr option 2020-05-08 13:21:49 +02:00
Alejandro Celaya
ba13d99a71 Allowed remote addr obfuscation to be configured on docker image by using the OBFUSCATE_REMOTE_ADDR env var 2020-05-08 13:19:40 +02:00
Alejandro Celaya
eac468514b Allow to determine if remote addresses should be obfuscated at configuration level 2020-05-08 13:10:58 +02:00
Alejandro Celaya
7da00fbc8c Updated Visit entity so that the address can be optionally obfuscated 2020-05-08 12:58:49 +02:00
Alejandro Celaya
4b7c54d7a9 Merge pull request #760 from acelaya-forks/feature/list-tags-command
Updated ListTagsCommand so that it displays extended information
2020-05-08 12:57:35 +02:00
Alejandro Celaya
c336bb1901 Updated ListTagsCommand so that it displays extended information 2020-05-08 12:39:02 +02:00
Alejandro Celaya
fbb1c449da Merge pull request #759 from acelaya-forks/feature/improved-tags-endpoint
Feature/improved tags endpoint
2020-05-08 12:17:32 +02:00
Alejandro Celaya
252cc7f49d Updated changelog 2020-05-08 11:53:26 +02:00
Alejandro Celaya
00cac4ba72 Created rest test for list tags action 2020-05-08 11:51:28 +02:00
Alejandro Celaya
91aaffc6db Updated ListTagsActionTest 2020-05-08 11:32:06 +02:00
Alejandro Celaya
2e269bcacd Updated TagServiceTest 2020-05-08 11:14:39 +02:00
Alejandro Celaya
bdd14427d9 Added tests for TagRepository::findTagsWithInfo 2020-05-08 11:09:28 +02:00
Alejandro Celaya
06c59fe2dd Fixed invalid imports after class refactoring 2020-05-08 10:29:24 +02:00
Alejandro Celaya
9a78fd1a26 Fixed definition of inversed many to many entity relationship 2020-05-08 10:25:33 +02:00
Alejandro Celaya
626c92460b Enhanced list tags endpoint so that it can also return stats foir every tag 2020-05-08 10:15:33 +02:00
Alejandro Celaya
7e0a14493e Documented updates on the tags endpoint to return more detailed information 2020-05-08 10:14:38 +02:00
Alejandro Celaya
8d23e60d3a Merge pull request #758 from acelaya-forks/feature/non-stable-alpha
Ensured stable tag is not pushed when building docker image for alpha or beta versions
2020-05-07 10:57:52 +02:00
Alejandro Celaya
5f0293bc21 Ensured stable tag is not pushed when building docker image for alpha or beta versions 2020-05-07 10:45:53 +02:00
Alejandro Celaya
afe7381263 Merge pull request #757 from acelaya-forks/feature/docker-img-impr
Feature/docker img impr
2020-05-07 10:31:32 +02:00
Alejandro Celaya
b75922f1d3 Updated changelog 2020-05-07 10:17:34 +02:00
Alejandro Celaya
d9ae83a92b Updated everything related with dependencies in docker images 2020-05-07 10:16:20 +02:00
Alejandro Celaya
22cc9ace4d Merge pull request #755 from acelaya-forks/feature/fix-logged-remote-ip
Feature/fix logged remote ip
2020-05-05 13:04:02 +02:00
Alejandro Celaya
53a37feafe Updated changelogs 2020-05-05 12:54:08 +02:00
Alejandro Celaya
0cab51b01b Enforced mezzio-swoole 2.6.4 or greater 2020-05-05 12:51:47 +02:00
Alejandro Celaya
5f258b6a28 Merge pull request #752 from acelaya-forks/feature/travis-db-tests
Feature/travis db tests
2020-05-04 22:06:04 +02:00
Alejandro Celaya
cc41c51f77 Removed duplicated pdo_sqlsrv enabling on travis config 2020-05-04 21:55:18 +02:00
Alejandro Celaya
5f42266cf2 Moved ms odbc commands to a script 2020-05-04 21:48:54 +02:00
Alejandro Celaya
522d8ed236 Ensured some commands are run as sudo during travis CI 2020-05-04 21:33:19 +02:00
Alejandro Celaya
78359c28c7 Added MS ODBC package installation to travis 2020-05-04 21:22:41 +02:00
Alejandro Celaya
13bb48d068 Installed pdo_sqlsrv extension in travis 2020-05-04 21:12:49 +02:00
Alejandro Celaya
f6d9a83202 Moved initial ci databases to specific docker-compose file 2020-05-04 21:00:09 +02:00
Alejandro Celaya
dfdae96da5 Added commands to initially create all testing database for all database engines in travis 2020-05-04 20:34:28 +02:00
Alejandro Celaya
9f13063b1f Fixed docker-compose command run in travis 2020-05-04 20:02:48 +02:00
Alejandro Celaya
1e8c36b5f1 Updated changelog 2020-05-04 19:55:52 +02:00
Alejandro Celaya
e747a0b250 Updated how database tests are run in travis, so that all DB engines are covered 2020-05-04 19:55:03 +02:00
Alejandro Celaya
79b8834c61 Merge pull request #748 from acelaya-forks/feature/visits-perf-improvements
Feature/visits perf improvements
2020-05-03 20:11:40 +02:00
Alejandro Celaya
313b6a59b9 Updated changelog 2020-05-03 20:02:50 +02:00
Alejandro Celaya
d5288f756e Fixed entity mapping for visits without a visit location 2020-05-03 19:52:40 +02:00
Alejandro Celaya
867659ea25 Created index on visits.date column 2020-05-03 19:15:26 +02:00
Alejandro Celaya
74ad3553cb Hardcoded types on date fields when filtering visits lists 2020-05-03 19:02:13 +02:00
Alejandro Celaya
8b0ce8e6f3 Improved performance when loading visits chuncks at high offsets 2020-05-03 18:20:01 +02:00
Alejandro Celaya
0e4bccc4bb Cached result of the count query on VisitsPaginatorAdapter 2020-05-03 10:44:01 +02:00
Alejandro Celaya
c4ae89a279 Removed DISTINCT when counting visits for a short URL 2020-05-03 10:22:00 +02:00
Alejandro Celaya
80d41db901 Improved performance on query that returns the list of visits for a short URL 2020-05-02 22:47:59 +02:00
Alejandro Celaya
6c30fc73ee Added swoole reverse proxy container 2020-05-02 12:04:42 +02:00
Alejandro Celaya
56932e4ea6 Disabled swoole coroutines 2020-05-01 18:24:48 +02:00
Alejandro Celaya
84b38c4940 Merge pull request #745 from acelaya-forks/feature/general-visits
Feature/general visits
2020-05-01 12:16:22 +02:00
Alejandro Celaya
aece9e68ba Removed logger dependency from rest actions 2020-05-01 12:08:44 +02:00
Alejandro Celaya
d067f52ac2 Updated changelog 2020-05-01 11:58:59 +02:00
Alejandro Celaya
b5947d1642 Created more unit tests 2020-05-01 11:57:46 +02:00
Alejandro Celaya
3232ab401f Documented new visits endpoint 2020-05-01 11:44:55 +02:00
Alejandro Celaya
1ef10f11cb Created new action to get default visit stats 2020-05-01 11:40:02 +02:00
Alejandro Celaya
5beaab85ac Renamed GetVisitsAction to ShortUrlVisitsAction 2020-05-01 11:17:07 +02:00
Alejandro Celaya
4498386f56 Fixed merge conflicts 2020-04-30 20:26:00 +02:00
Alejandro Celaya
a30f796100 Merge pull request #743 from acelaya-forks/feature/geolite-license
Feature/geolite license
2020-04-30 19:34:44 +02:00
Alejandro Celaya
93a2c83652 Enabled GeoLite installer config option 2020-04-29 20:31:06 +02:00
Alejandro Celaya
4d4423413d Added GEOLITE_LICENSE_KEY env var to basic docker example, to encourage using it 2020-04-29 19:44:08 +02:00
Alejandro Celaya
a1c74c4038 Updated changelog 2020-04-29 19:31:10 +02:00
Alejandro Celaya
f71bb5e307 Added support for GEOLITE_LICENSE_KEY env var for docker image 2020-04-29 19:27:35 +02:00
Alejandro Celaya
9190996e54 Added support for geolite_license_key config option 2020-04-29 19:26:34 +02:00
Alejandro Celaya
af8b6b7f96 Documented how to pass a GEOLITE license key 2020-04-29 19:24:18 +02:00
Alejandro Celaya
704958994d Merge pull request #738 from acelaya-forks/feature/health-fix
Feature/health fix
2020-04-25 20:07:09 +02:00
Alejandro Celaya
a6864bca7c Updated changelog 2020-04-25 20:00:01 +02:00
Alejandro Celaya
15a8305209 Fixed random 503 responses from the HealthAction when the database connection injected on it has expired 2020-04-25 19:58:49 +02:00
Alejandro Celaya
469b70d708 Merge pull request #737 from acelaya-forks/feature/installation-error
Fixed error when cleaning metadata cache during installation with APC…
2020-04-25 19:30:06 +02:00
Alejandro Celaya
4f988d223b Fixed error when cleaning metadata cache during installation with APCu enabled 2020-04-25 19:13:47 +02:00
Alejandro Celaya
e95abc4efb Merge pull request #736 from acelaya-forks/feature/mercure-proxy
Configured an nginx container acting as a reverse proxy for the mercu…
2020-04-25 13:56:07 +02:00
Alejandro Celaya
4917e53acd Configured an nginx container acting as a reverse proxy for the mercure container 2020-04-25 13:44:09 +02:00
Alejandro Celaya
45db4c321a Merge pull request #731 from acelaya-forks/feature/fix-local-sqlite-tests
Ensured mysql config is not loaded for sqlite test envs
2020-04-18 14:06:44 +02:00
Alejandro Celaya
e6d914cfe1 Ensured mysql config is not loaded for sqlite test envs 2020-04-18 14:01:24 +02:00
Alejandro Celaya
85714c931d Merge pull request #730 from acelaya-forks/feature/fix-mysql-buffered-error
Feature/fix mysql buffered error
2020-04-18 13:29:24 +02:00
Alejandro Celaya
66a7f279c2 Updated changelog 2020-04-18 13:22:51 +02:00
Alejandro Celaya
7c6827ea9f Added MYSQL_ATTR_USE_BUFFERED_QUERY driver option with value true for mysql/maria connections 2020-04-18 13:21:46 +02:00
Alejandro Celaya
078c8ea011 Changed default mercure token duration to 1 day 2020-04-18 11:29:49 +02:00
Alejandro Celaya
655fd58a9d Added async API spec file 2020-04-16 22:44:08 +02:00
Alejandro Celaya
6ba6b951bf Changed mercure topics to be dash-cased 2020-04-16 22:25:12 +02:00
Alejandro Celaya
8e0e11f3b3 Merge pull request #727 from acelaya-forks/feature/mercure-improvement
Feature/mercure improvement
2020-04-14 21:16:16 +02:00
Alejandro Celaya
18b12ab1e6 Updated NotifyVisitToMercure to send both an update for all short URLs and one specific short URL 2020-04-14 20:57:25 +02:00
Alejandro Celaya
3908f63b0d Updated to latest installer version 2020-04-14 20:30:05 +02:00
Alejandro Celaya
ca2c32fa8c Removed no-longer used dependencies 2020-04-14 20:24:36 +02:00
Alejandro Celaya
a3a3ac1859 Added missing escaped characters 2020-04-13 13:23:26 +02:00
Alejandro Celaya
f5e0d0c2b1 Merge pull request #726 from acelaya-forks/feature/mercure-integration
Feature/mercure integration
2020-04-13 10:03:12 +02:00
Alejandro Celaya
ba0678946f Updated installer to use a version supporting mercure options 2020-04-13 09:38:18 +02:00
Alejandro Celaya
934fa937b5 Updated config parsers for docker image to accept new mercure env vars and configs 2020-04-12 20:41:23 +02:00
Alejandro Celaya
8d888cb43d Documented how to use a mercure hub when using the docker image 2020-04-12 18:39:28 +02:00
Alejandro Celaya
7f888c49b4 Created MercureUpdatesGeneratorTest 2020-04-12 18:01:13 +02:00
Alejandro Celaya
e97dfbfdda Created NotifyVisitToMercureTest 2020-04-12 17:50:40 +02:00
Alejandro Celaya
b858d79b9e Fixed mercure hub URL returned by MercureInfoAction 2020-04-12 17:50:09 +02:00
Alejandro Celaya
72d8edf4ff Created event listener that notifies mercure hub for new visits 2020-04-12 17:05:59 +02:00
Alejandro Celaya
31db97228d Created MercureInfoActionTest 2020-04-12 14:22:23 +02:00
Alejandro Celaya
2ffbf03cf8 Created action to get mercure integration info 2020-04-12 13:59:10 +02:00
Alejandro Celaya
85440c1c5f Improved mercure-related configs 2020-04-12 12:21:05 +02:00
Alejandro Celaya
69962f1fe8 Added package to handle JWTs 2020-04-11 18:10:56 +02:00
Alejandro Celaya
10cad33248 Added configuration for mercure integration 2020-04-11 18:10:56 +02:00
Alejandro Celaya
0c9deca3f8 Added symfony/mercure package and a container for development 2020-04-11 18:10:56 +02:00
Alejandro Celaya
e1cd4a6ee3 Merge pull request #724 from acelaya-forks/feature/clean-tasks
Created decorator for database connection closing and reopening for s…
2020-04-11 18:09:26 +02:00
Alejandro Celaya
f915b97606 Created decorator for database connection closing and reopening for swoole tasks 2020-04-11 18:00:40 +02:00
Alejandro Celaya
e775b0f12f Merge pull request #722 from shlinkio/develop
Release 2.1.3
2020-04-09 12:50:46 +02:00
Alejandro Celaya
3ee5853b32 Merge pull request #721 from acelaya-forks/feature/qr-code-links
Feature/qr code links
2020-04-09 12:40:05 +02:00
Alejandro Celaya
832a24e4c7 Updated changelog 2020-04-09 12:33:00 +02:00
Alejandro Celaya
551368c30d Ensured QR code action respects configured domain 2020-04-09 12:31:03 +02:00
Alejandro Celaya
9f24b8eb76 Merge pull request #720 from acelaya-forks/feature/db-conn-recovery-task-workers
Feature/db conn recovery task workers
2020-04-09 12:01:47 +02:00
Alejandro Celaya
4c83ae2b22 Updated changelog 2020-04-09 11:55:47 +02:00
Alejandro Celaya
28e0fb049b Added check to ensure DB connection is gracefully recovered on swoole task workers 2020-04-09 11:54:54 +02:00
Alejandro Celaya
f79a369884 Merge pull request #719 from acelaya-forks/feature/handle-HEAD-requests
Feature/handle head requests
2020-04-09 00:06:28 +02:00
Alejandro Celaya
34c7b870a7 Removed unnecessary service registration, as it comes preregistered from third party config provider 2020-04-08 23:56:39 +02:00
Alejandro Celaya
ec9f874bb9 Updated changelog 2020-04-08 23:53:23 +02:00
Alejandro Celaya
1980d35691 Ensured redirect requests are not tracked when request is performed using method HEAD 2020-04-08 23:51:57 +02:00
Alejandro Celaya
ec8cbf82e5 Added HEAD request implicit handling 2020-04-08 17:27:26 +02:00
Alejandro Celaya
2b1011de52 Merge pull request #714 from acelaya-forks/feature/metadata-cache-clear
Feature/metadata cache clear
2020-04-06 21:08:46 +02:00
Alejandro Celaya
fa9ace83ad Fixed incorrect use of tilde 2020-04-06 20:59:10 +02:00
Alejandro Celaya
a9a53a9652 Ensured entities metadata cache is cleared during installation and docker start-up 2020-04-06 20:52:33 +02:00
Alejandro Celaya
afca8b2a62 Merge pull request #704 from shlinkio/develop
Release v2.1.2
2020-03-29 13:23:41 +02:00
Alejandro Celaya
daeb293fb9 Merge pull request #703 from acelaya-forks/feature/infection-0.16
Feature/infection 0.16
2020-03-29 13:14:07 +02:00
Alejandro Celaya
1ca50a4a8a Updated changelog 2020-03-29 13:08:21 +02:00
Alejandro Celaya
c6602a81ab Updated to infection 0.16 2020-03-29 13:07:27 +02:00
Alejandro Celaya
46da0e7824 Merge pull request #702 from acelaya-forks/feature/fix-tags-filtering
Feature/fix tags filtering
2020-03-29 13:00:06 +02:00
Alejandro Celaya
e790a38cea Updated changelog 2020-03-29 12:54:09 +02:00
Alejandro Celaya
11879ea377 Ensured tags are not sluggified when using them to filter short URL lists 2020-03-29 12:51:39 +02:00
Alejandro Celaya
7105add009 Merge pull request #701 from acelaya-forks/feature/fix-migration
Fixed query in migration for postgres
2020-03-29 12:25:19 +02:00
Alejandro Celaya
af61fdb52d Updated changelog 2020-03-29 12:15:52 +02:00
Alejandro Celaya
2b4fc354db Fixed query in migration for postgres 2020-03-29 12:13:52 +02:00
Alejandro Celaya
5b72001a8c Merge pull request #699 from shlinkio/develop
V2.1.1
2020-03-28 20:14:35 +01:00
Alejandro Celaya
7c79906ac4 Merge pull request #698 from acelaya-forks/feature/2.1.1
Feature/2.1.1
2020-03-28 20:03:09 +01:00
Alejandro Celaya
e30a724529 Make sure dist files include the htaccess file 2020-03-28 19:54:02 +01:00
Alejandro Celaya
73f97ea874 Ensured releases are published to github before the docker image is built 2020-03-28 19:48:06 +01:00
Alejandro Celaya
09c155b7d3 Merge pull request #695 from shlinkio/develop
v2.1.0
2020-03-28 12:23:41 +01:00
Alejandro Celaya
1e2d115768 Merge pull request #694 from acelaya-forks/feature/process-retry
Feature/process retry
2020-03-28 12:06:09 +01:00
Alejandro Celaya
53ba58d7e9 Moved initialization of the io object in LocateVisitsCommand to the initialize method 2020-03-28 10:37:41 +01:00
Alejandro Celaya
2a30afbe7d Updated changelog 2020-03-28 10:29:12 +01:00
Alejandro Celaya
4d39c7041b Improved LocateVisitsCommandtest so that it covers all possible workflows 2020-03-28 10:23:34 +01:00
Alejandro Celaya
c012b4740d Updated VisitLocator test so that it covers all public methods 2020-03-28 10:01:09 +01:00
Alejandro Celaya
55778eb810 Ensured old visit locations are deleted when relocating a visit that has already been located 2020-03-28 09:27:45 +01:00
Alejandro Celaya
fb8ab0b5fe Implemented how to reprocess the locations of all existing visits 2020-03-28 09:12:15 +01:00
Alejandro Celaya
fcce18b059 Changed VisitLocator signature so that it expects an object implementing an interface instead of two arbitrary callbacks 2020-03-28 08:05:15 +01:00
Alejandro Celaya
43a3d469e7 Improved how visits with some conditions are fetched from the database, so all internal logic is 100% transparent regardless the purpose 2020-03-27 22:01:26 +01:00
Alejandro Celaya
f730c24ecb Created method to return visits with empty location 2020-03-26 22:56:53 +01:00
Alejandro Celaya
b8522b8c17 Created new method to locate empty visits 2020-03-26 22:37:46 +01:00
Alejandro Celaya
b0d96040be Merge pull request #691 from Lynnesbian/develop
Update sample Nginx config to point to PHP 7.4
2020-03-25 08:49:36 +01:00
Lynne
5554675d03 Update sample Nginx config to point to PHP 7.4 2020-03-25 16:48:44 +10:00
Alejandro Celaya
c88401ef29 Added isEmpty column to VisitLocation 2020-03-23 20:42:03 +01:00
Alejandro Celaya
75f77ed929 Merge pull request #689 from acelaya-forks/feature/fake-class-constant
Moved hardcoded class alias to a namespaced constant
2020-03-22 17:50:57 +01:00
Alejandro Celaya
4539ab2dcf Moved hardcoded class alias to a namespaced constant 2020-03-22 17:42:56 +01:00
Alejandro Celaya
9ad0561cac Merge pull request #688 from acelaya-forks/feature/edit-long-url
Feature/edit long url
2020-03-22 17:38:00 +01:00
Alejandro Celaya
774052a983 Updated changelog 2020-03-22 17:31:16 +01:00
Alejandro Celaya
3beb27acc2 Added API tests for the edition of the longURL 2020-03-22 17:30:01 +01:00
Alejandro Celaya
5432eb7b77 Added URL validation to ShortUrl edition, as long URL can now be edited 2020-03-22 17:22:52 +01:00
Alejandro Celaya
181ff16409 Registered PersistenceDomainResolver as a service to avoid instantiating a new one on every ShortUrl creation 2020-03-22 17:05:59 +01:00
Alejandro Celaya
682a0768b7 Moved check for URL validation config option to the UrlValidator itself 2020-03-22 16:58:28 +01:00
Alejandro Celaya
d29ebb706e Documented longUrl param on PATCH short URL endpoint 2020-03-22 14:06:13 +01:00
Alejandro Celaya
4e6836c605 Long URLs can now be edited on existing short URLs 2020-03-22 14:04:01 +01:00
Alejandro Celaya
59c0d36c0b Merge pull request #687 from acelaya-forks/feature/real-ip-geolocation
Feature/real ip geolocation
2020-03-22 11:55:02 +01:00
Alejandro Celaya
e10b2884c0 Added more exclussions to dockerignore 2020-03-22 11:33:00 +01:00
Alejandro Celaya
8fb54e815e Ensured scrutinizer build ignores platform requirements when installing dependencies 2020-03-22 11:27:03 +01:00
Alejandro Celaya
3a14483568 Updated changelog 2020-03-22 11:13:33 +01:00
Alejandro Celaya
fdd8efc12d Added test covering case in which the original address is provided when locating visits 2020-03-22 11:12:30 +01:00
Alejandro Celaya
3fef4b4a28 Ensured non-obfuscated IP address is passed to event listener which geolocates it 2020-03-22 10:48:27 +01:00
Alejandro Celaya
cea50a860e Improved docker image generation 2020-03-22 10:01:34 +01:00
Alejandro Celaya
f9318bb1b3 Merge pull request #686 from acelaya-forks/feature/reduce-docker-image
Feature/reduce docker image
2020-03-21 16:21:25 +01:00
Alejandro Celaya
d22f020eb5 Ensured more non-prod files are ignored/deleted from the final docker image 2020-03-21 16:11:56 +01:00
Alejandro Celaya
c556d8123b Fixed name of the build arg passed when building docker for a specific tag 2020-03-21 15:43:52 +01:00
Alejandro Celaya
a592833bd0 Merge pull request #685 from acelaya-forks/feature/fix-docker-build
Ensured docker build happens in all branches
2020-03-21 15:36:18 +01:00
Alejandro Celaya
881da3db3b Ensured docker build happens in all branches 2020-03-21 15:31:14 +01:00
Alejandro Celaya
32eb9924e5 Merge pull request #684 from acelaya-forks/feature/travis-docker-build
Feature/travis docker build
2020-03-21 15:14:14 +01:00
Alejandro Celaya
d2c06dd0ab Initialized typed nullable props as null in all entities 2020-03-21 14:38:24 +01:00
Alejandro Celaya
75b8ed813f Enforced Swoole 4.4.15 to be installed during travis build, to match production one 2020-03-21 14:25:19 +01:00
Alejandro Celaya
f811002c2b Small adjustments on docker build 2020-03-21 09:37:31 +01:00
Alejandro Celaya
ca1b17863c Split Dockerfile into multiple stages, making the build be independent and then the released image just copy files from it 2020-03-21 09:10:15 +01:00
Alejandro Celaya
644f5be6fe Added scripts and configs to build docker image on travis 2020-03-21 08:42:13 +01:00
Alejandro Celaya
65fbb1dfb3 Merge pull request #680 from acelaya-forks/feature/non-interactive-db-commands
Feature/non interactive db commands
2020-03-15 17:32:57 +01:00
Alejandro Celaya
8597966187 Updated changelog 2020-03-15 17:26:34 +01:00
Alejandro Celaya
6ddd70d21d Added --no-interaction to commands run internally from shlink DB commands 2020-03-15 17:25:39 +01:00
Alejandro Celaya
d32112fe7e Updated shlink packages and installed shlink-config 2020-03-15 17:14:37 +01:00
Alejandro Celaya
da858f0353 Merge branch 'develop' of github.com:shlinkio/shlink into develop 2020-03-10 21:45:57 +01:00
Alejandro Celaya
ba8b041698 Updated API docs links 2020-03-10 21:45:20 +01:00
Alejandro Celaya
d9fee5582a Added docker pulls badge to main readme file 2020-03-07 08:44:12 +01:00
Alejandro Celaya
c9f17d54ee Merge pull request #676 from acelaya-forks/feature/bar-slug
Feature/bar slug
2020-03-06 20:09:59 +01:00
Alejandro Celaya
f5c1e12db4 Added more tests covering invalid custom slugs 2020-03-06 20:01:41 +01:00
Alejandro Celaya
18ceafeb60 Ensured only empty strings are checked while verifying empty value on custom slug 2020-03-06 19:25:05 +01:00
Alejandro Celaya
67e93a6874 Ensured empty values cannot be provided as the custom slug 2020-03-06 19:20:33 +01:00
Alejandro Celaya
f6a83a3062 Merge pull request #670 from acelaya-forks/feature/base-url-redirect
Feature/base url redirect
2020-02-25 18:06:47 +01:00
Alejandro Celaya
8a0e902bdd Updated changelog 2020-02-25 18:02:38 +01:00
Alejandro Celaya
590fc3fc92 Added tests covering redirect simplified config parsing 2020-02-25 18:01:06 +01:00
Alejandro Celaya
0d54b7696f Merge pull request #669 from jpatters/fix/base_url_redirect_to
fixed incorrect configuration option for base_url_redirect_to
2020-02-25 17:58:58 +01:00
Jordan Patterson
6b1dadc35c fixed incorrect configuration option for base_url_redirect_to 2020-02-25 06:47:02 -08:00
Alejandro Celaya
86009543ed Merge pull request #662 from acelaya-forks/feature/rest-request-id
Feature/rest request
2020-02-21 19:54:30 +01:00
Alejandro Celaya
b728a78673 Updated changelog 2020-02-21 19:47:30 +01:00
Alejandro Celaya
fb89cb80ac Added formatting to swoole logs, to avoid duplicating the date 2020-02-19 19:48:48 +01:00
Alejandro Celaya
d0a986dd5a Added request ID to logs with monolog 2020-02-19 19:37:47 +01:00
Alejandro Celaya
bb231e668b Registered middleware generating request ID 2020-02-19 18:58:25 +01:00
Alejandro Celaya
f53fa5c90f Merge pull request #660 from acelaya-forks/feature/short-codes-length
Feature/short codes length
2020-02-18 20:42:37 +01:00
Alejandro Celaya
1f3e0d1f73 Updated changelog 2020-02-18 20:35:41 +01:00
Alejandro Celaya
33a404f051 Updated CLI command to create short URLs so that it respects configs for short code length 2020-02-18 20:34:48 +01:00
Alejandro Celaya
51e130c7a0 Added env var that can be used to define default short codes length on docker image 2020-02-18 19:34:01 +01:00
Alejandro Celaya
343ee04acb Created middleware which injects default short code length from config when a value was not explicitly provided 2020-02-18 19:21:34 +01:00
Alejandro Celaya
9372d1739a Enforced short URLs length to be 4 at least 2020-02-18 18:57:24 +01:00
Alejandro Celaya
13555366e3 Short code lengths can now be customized 2020-02-18 18:54:40 +01:00
Alejandro Celaya
8162dafe16 Added separator in readme before MaxMind reference 2020-02-16 12:18:23 +01:00
Alejandro Celaya
0b6602b275 Merge pull request #659 from acelaya-forks/feature/phpunit9
Feature/phpunit9
2020-02-15 21:21:00 +01:00
Alejandro Celaya
2cf9f64e8e Updated changelog 2020-02-15 21:14:55 +01:00
Alejandro Celaya
37c0a813db Updated to PHPUnit 9 2020-02-15 21:14:14 +01:00
Alejandro Celaya
a9269811dc Added command to run api tests with code coverage 2020-02-15 20:55:04 +01:00
Alejandro Celaya
0b353737ea Merge pull request #658 from acelaya-forks/feature/mssql
Feature/mssql
2020-02-15 20:39:20 +01:00
Alejandro Celaya
a3fc1513e1 Updated Installer to include the one supporting MsSQL 2020-02-15 20:28:32 +01:00
Alejandro Celaya
5886d73093 Documented support for Microsoft SQL Server 2020-02-14 19:55:24 +01:00
Alejandro Celaya
12adce9ac2 Updated changelog 2020-02-14 19:51:58 +01:00
Alejandro Celaya
d8cbf0512b Added missing env var which fixes issues with mssql driver on alpine 2020-02-14 19:44:11 +01:00
Alejandro Celaya
2bb2c2cde3 Documented how to use mssql with the docker image 2020-02-14 19:27:21 +01:00
Alejandro Celaya
27fd9c5988 Added MSSQL driver to prod docker image 2020-02-14 19:20:54 +01:00
Alejandro Celaya
542673fcb0 Updated development docker images 2020-02-14 19:11:29 +01:00
Alejandro Celaya
e60d80bb16 Merge pull request #655 from shlinkio/develop
Release v2.0.5
2020-02-09 18:07:55 +01:00
Alejandro Celaya
bb9e57fa8b Added support for mssql on dev env 2020-02-09 18:01:11 +01:00
Alejandro Celaya
1d4bea68af Updated changelog 2020-02-09 17:59:01 +01:00
Alejandro Celaya
d2f9f5fd5e Merge pull request #654 from acelaya-forks/feature/domain-docs
Feature/domain docs
2020-02-08 19:02:39 +01:00
Alejandro Celaya
f13c3364eb Updated changelog 2020-02-08 18:52:48 +01:00
Alejandro Celaya
ac04bedead Documented how Shlink behaves when using multiple domains 2020-02-08 18:52:02 +01:00
Alejandro Celaya
67a66cefa6 Merge pull request #653 from acelaya-forks/feature/remove-default-domain-from-body
Feature/remove default domain from body
2020-02-08 12:38:20 +01:00
Alejandro Celaya
43db066cb4 Updated changelog 2020-02-08 12:31:25 +01:00
Alejandro Celaya
faec758fba Added test to ensure default domain is ignored if provided when creatin a short URL 2020-02-08 12:30:47 +01:00
Alejandro Celaya
ccec6e03aa Updated middleware which drops default domain so that it is capable of doing it from parsed body too 2020-02-08 12:22:07 +01:00
Alejandro Celaya
3f08b38558 Merge pull request #652 from acelaya-forks/feature/fix-logs-permissions
Feature/fix logs permissions
2020-02-08 11:58:09 +01:00
Alejandro Celaya
1ee5f64738 Updated changelog 2020-02-08 11:51:39 +01:00
Alejandro Celaya
d22169803f Ensured any user can write in generated log files 2020-02-08 11:50:25 +01:00
Alejandro Celaya
57807c4360 Merge pull request #647 from shlinkio/develop
Release v2.0.4
2020-02-02 20:23:09 +01:00
Alejandro Celaya
6e1d07b0cc Merge pull request #646 from acelaya-forks/feature/search-on-domains
Feature/search on domains
2020-02-02 20:14:27 +01:00
Alejandro Celaya
0c0349fa39 Fixed version on changelog 2020-02-02 20:09:30 +01:00
Alejandro Celaya
8d8a0f2484 Updated changelog 2020-02-02 20:08:22 +01:00
Alejandro Celaya
8ff913aaf2 Ensured search terms are applied to the domain too 2020-02-02 20:07:19 +01:00
Alejandro Celaya
f7d54abb2b Merge pull request #645 from acelaya-forks/feature/multi-domain-fixes
Feature/multi domain fixes
2020-02-02 19:28:21 +01:00
Alejandro Celaya
ce990c67e3 Fixed coding styles 2020-02-02 19:19:35 +01:00
Alejandro Celaya
907b8453c6 Updated changelog 2020-02-02 19:16:53 +01:00
Alejandro Celaya
8a0ba11f79 Added one more test case for not found URLs on API tests 2020-02-02 19:15:14 +01:00
Alejandro Celaya
0c1ecd3caa Created DropDefaultDomainFromQueryMiddlewareTest 2020-02-02 19:13:32 +01:00
Alejandro Celaya
c07c37f7bd Created middleware to drop domain from query when it is the default one 2020-02-02 19:03:43 +01:00
Alejandro Celaya
fe652c67f4 Covered with API tests getting invalid short URLs by short code and domain 2020-02-02 13:15:08 +01:00
Alejandro Celaya
297985cf01 Ensured trying to fetch a short URL for any operation through the API results in 404 if it does not match with porovided domain 2020-02-02 12:58:26 +01:00
Alejandro Celaya
10f79ec01d Created new repository method which will look for short URLs without doing domain fallback 2020-02-02 12:44:35 +01:00
Alejandro Celaya
e87d4d61bc Added API test for editing tags with and without domain 2020-02-02 10:53:49 +01:00
Alejandro Celaya
e58f2a384e Added API test for visits with and without domain 2020-02-02 10:46:38 +01:00
Alejandro Celaya
881002634a Added API tests for short URL deletion with domain 2020-02-02 10:28:10 +01:00
Alejandro Celaya
aa80c2bb82 Updated API tests so that fixture short URLs are created with matching short codes and different domains 2020-02-02 09:51:17 +01:00
Alejandro Celaya
75cd9774b7 Added optional domain query param to documentation for all rest endpoints that need it 2020-02-02 09:15:43 +01:00
Alejandro Celaya
1a8e4cdfd7 Exposed domain on short URLs 2020-02-02 08:57:04 +01:00
Alejandro Celaya
6858dc4785 Updated setting short URL tags so that it accepts providing the domain 2020-02-01 22:59:21 +01:00
Alejandro Celaya
5d1d9dcac3 Allowed domain to be provided when editing short URL meta 2020-02-01 22:54:21 +01:00
Alejandro Celaya
732bb06c62 Updated short URL deletion so that it accepts the domain 2020-02-01 18:06:50 +01:00
Alejandro Celaya
5f00d8b732 Added domain flag to GetVisitsCommand 2020-02-01 17:56:43 +01:00
Alejandro Celaya
a3ff545d43 Improved VisitsRepositoryTest to cover fetching visits for URL with domain 2020-02-01 17:44:37 +01:00
Alejandro Celaya
279bd12a2d Ensured domain can be passed when fetching visits for a short URL 2020-02-01 17:34:16 +01:00
Alejandro Celaya
1b2a0d674f Fixed correct short URL being tracked when domain exists 2020-02-01 13:03:48 +01:00
Alejandro Celaya
fd82de31c0 Fixed the way ShortUrlIdentifier is created from requests, on different request scopes 2020-02-01 12:54:10 +01:00
Alejandro Celaya
327d35fe57 Created DTO used to transfer props needed to uniquely identify a short URL 2020-02-01 11:47:01 +01:00
Alejandro Celaya
e18187f04e Merge pull request #636 from acelaya-forks/feature/postgres-schema-support
Feature/postgres schema support
2020-01-29 11:02:23 +01:00
Alejandro Celaya
bd2f488e2c Updated entity mappings so that schema an table prefixes can be eventually provided 2020-01-29 10:53:06 +01:00
Alejandro Celaya
96350c8b8f Updated entities mapping config so that they return a function 2020-01-29 10:06:42 +01:00
Alejandro Celaya
a737eed5c5 Merge pull request #634 from acelaya-forks/feature/simplify-error-logs
Updated to shlink-common 2.6
2020-01-28 18:23:37 +01:00
Alejandro Celaya
9b2ccaeb7b Updated to shlink-common 2.6 2020-01-28 18:11:39 +01:00
Alejandro Celaya
304979273f Merge pull request #633 from acelaya-forks/feature/list-filtering-dto
Feature/list filtering dto
2020-01-28 13:05:24 +01:00
Alejandro Celaya
7add41d560 Ensured BC on dates for short urls params 2020-01-28 12:57:21 +01:00
Alejandro Celaya
51ebe57ac8 Updated changelog 2020-01-28 12:12:50 +01:00
Alejandro Celaya
6ff5a532ea Added extra API test covering complex order by for short URL lists 2020-01-28 11:20:48 +01:00
Alejandro Celaya
fccd92497a Added last check on ShortUrlsOrdering which makes sure everything keeps behaving as it used to 2020-01-28 11:17:54 +01:00
Alejandro Celaya
452bfea088 Created DTOs with implicit validation to wrap short URLs lists params 2020-01-28 10:49:55 +01:00
Alejandro Celaya
240d2588f9 Extracted some private functions ase helper global functions 2020-01-28 09:41:48 +01:00
Alejandro Celaya
eca7800487 Merge pull request #632 from shlinkio/develop
Release v2.0.3
2020-01-27 11:44:43 +01:00
Alejandro Celaya
b9e58b9300 Merge pull request #631 from acelaya-forks/feature/permission-denied
Feature/permission denied
2020-01-27 11:37:37 +01:00
Alejandro Celaya
54918db9ef Updated changelog 2020-01-27 11:31:44 +01:00
Alejandro Celaya
b07a603456 Updated dependencies 2020-01-27 11:30:29 +01:00
Alejandro Celaya
4fb2c64fa8 Merge pull request #630 from acelaya-forks/feature/fetch-not-visitable-url
Feature/fetch not visitable url
2020-01-26 20:00:47 +01:00
Alejandro Celaya
258c4102be Updated changelog 2020-01-26 19:55:03 +01:00
Alejandro Celaya
b9c7f8e8d4 Added unit tests for ShortUrlresolver 2020-01-26 19:53:18 +01:00
Alejandro Celaya
f32e7cc7c4 Removed tests checking domain logic from ShortUrlRepositoryTest 2020-01-26 19:25:41 +01:00
Alejandro Celaya
4ebd48b2b0 Created new service to resolve short URLs 2020-01-26 19:21:51 +01:00
Alejandro Celaya
f71bd84a20 Merge pull request #629 from acelaya-forks/feature/reset-meta
Feature/reset meta
2020-01-26 09:49:36 +01:00
Alejandro Celaya
33b45eb620 Updated changelog 2020-01-26 09:37:43 +01:00
Alejandro Celaya
1f9a912c04 Added API tests covering the edition of short URL meta with resetted values 2020-01-26 09:29:04 +01:00
Alejandro Celaya
45151cdde6 Standardized how the ShortUrlMeta object is created by exposing a single named constructor 2020-01-26 08:42:51 +01:00
Alejandro Celaya
8ca45eb388 Merge pull request #627 from acelaya-forks/feature/remote-ip-order
Feature/remote ip order
2020-01-24 21:28:39 +01:00
Alejandro Celaya
b7a34a6640 Updated changelog 2020-01-24 21:21:13 +01:00
Alejandro Celaya
8ec686f4e2 Updated order in which headers for remote IP detection are inspected 2020-01-24 21:19:40 +01:00
Alejandro Celaya
43fc655218 Merge pull request #618 from shlinkio/develop
Release v2.0.2
2020-01-12 11:02:10 +01:00
Alejandro Celaya
f5a30c4c2d Merge pull request #617 from acelaya-forks/feature/fix-urls-with-hash
Feature/fix urls with hash
2020-01-12 10:38:25 +01:00
Alejandro Celaya
af1dd78b2c Fixed typo 2020-01-12 10:32:03 +01:00
Alejandro Celaya
fc95986f0e Updated changelog for v2.0.2 2020-01-12 10:30:14 +01:00
Alejandro Celaya
c52794aed6 Replaced standard http_build_query by guzzle's build_query, which keeps params with no value 2020-01-12 10:28:44 +01:00
Alejandro Celaya
15a72e2a88 Updated local config files which were not fulfilling the project's coding standards 2020-01-12 10:06:45 +01:00
Alejandro Celaya
94af588a3c Merge pull request #616 from acelaya-forks/feature/successful-options-req
Feature/successful options req
2020-01-12 09:36:18 +01:00
Alejandro Celaya
0a4f3bc0f5 Updated changelog 2020-01-11 20:38:10 +01:00
Alejandro Celaya
09e3464426 Ensured CrossDomainMiddleware always returns empty responses with success status on OPTIONS requests 2020-01-11 20:36:17 +01:00
Alejandro Celaya
7fcc4ebd57 Merge pull request #613 from shlinkio/develop
Releasing v2.0.1
2020-01-10 19:56:56 +01:00
Alejandro Celaya
b246815529 Merge pull request #612 from acelaya-forks/feature/avoid-nulls
Feature/avoid nulls
2020-01-10 19:51:02 +01:00
Alejandro Celaya
ad1334f289 Created database migration which ensures no nulls are present 2020-01-10 19:44:35 +01:00
Alejandro Celaya
49bccf9a06 Updated changelog 2020-01-10 19:20:44 +01:00
Alejandro Celaya
1a8bf54e8b Merge pull request #611 from acelaya-forks/feature/db-migrate-syntax-error
Feature/db migrate syntax error
2020-01-10 19:17:45 +01:00
Alejandro Celaya
96bb0321eb Updated casting type so that it is dynamic 2020-01-10 19:08:23 +01:00
Alejandro Celaya
37f0abf86f Fixed use of hardcoded quotes on database migration, making it crash on postgres 2020-01-10 18:40:49 +01:00
Alejandro Celaya
f9119a38b3 Updated changelog 2020-01-10 16:04:35 +01:00
Alejandro Celaya
8465a9da31 Merge pull request #608 from acelaya-forks/feature/missing-upgrade+info
Added missing information in upgrading document
2020-01-09 07:48:27 +01:00
Alejandro Celaya
b6b0d09647 Added missing information in upgrading document 2020-01-09 07:37:59 +01:00
Alejandro Celaya
3d2932782d Merge pull request #604 from shlinkio/develop
Release v2
2020-01-08 19:46:53 +01:00
Alejandro Celaya
fa2fede604 Updated docker docs 2020-01-08 19:37:12 +01:00
Alejandro Celaya
3aded3bc5f Updated changelog tagging v2.0.0 2020-01-08 19:17:02 +01:00
Alejandro Celaya
2d4cc912b7 Required proxy-manager 2.6 2020-01-07 18:27:32 +01:00
Alejandro Celaya
c0881f9292 Merge pull request #603 from acelaya-forks/feature/versioned-health
Feature/versioned health
2020-01-07 18:15:17 +01:00
Alejandro Celaya
302a77b9dd Updated changelog 2020-01-07 18:10:09 +01:00
Alejandro Celaya
2b544ad141 Refactored Rest ConfigProvider so that it appends the health action with and without version 2020-01-07 18:07:51 +01:00
Alejandro Celaya
36d5e057d0 Ensured the health action is registered bit with and without version 2020-01-06 23:32:43 +01:00
Alejandro Celaya
96eb6a80e1 Merge pull request #599 from acelaya-forks/feature/update-shlink-packages
Feature/update shlink packages
2020-01-06 23:19:52 +01:00
Alejandro Celaya
9c5f5a46b5 Replaced use of deprecated class by a non-deprecated one 2020-01-06 23:08:14 +01:00
Alejandro Celaya
886f63d3e4 Workarounded doctrine-dbal issue by creating new columns instead of changing column types 2020-01-06 22:57:10 +01:00
Alejandro Celaya
7748dd7cef Ensured latitude and longitude are set as float in DB 2020-01-06 22:31:00 +01:00
Alejandro Celaya
2e0f8067aa Enabled redis config option 2020-01-05 17:04:22 +01:00
Alejandro Celaya
4fadd523f1 Updated config to read redis from config.redis 2020-01-05 16:45:14 +01:00
Alejandro Celaya
abe54c67d8 Updated changelog 2020-01-04 13:21:37 +01:00
Alejandro Celaya
f3f35218c3 Updated to installer v4 2020-01-04 13:18:28 +01:00
Alejandro Celaya
b9eb9cb6d9 Updated all shlink packages but installer to their latest version 2020-01-03 11:38:21 +01:00
Alejandro Celaya
40c014b663 Fixed merge conflicts 2020-01-02 22:58:40 +01:00
Alejandro Celaya
70f1db4e94 Merge pull request #597 from acelaya-forks/hotfix/1.21.1
Updated URL from which GeoLite DB is downloaded
2020-01-02 22:55:45 +01:00
Alejandro Celaya
2fff38d51a Added v1.21.1 to changelog 2020-01-02 22:49:17 +01:00
Alejandro Celaya
32de74b23e Updated URL from which GeoLite DB is downloaded 2020-01-02 22:46:56 +01:00
Alejandro Celaya
c96d24cc0b Merge pull request #595 from acelaya-forks/feature/laminas
Feature/laminas
2020-01-01 21:26:33 +01:00
Alejandro Celaya
824ee55d38 Updated changelog 2020-01-01 21:16:26 +01:00
Alejandro Celaya
86e701dccc Updated local config file 2020-01-01 21:15:23 +01:00
Alejandro Celaya
2151b97bec Project migrated from zend to laminas 2020-01-01 21:13:09 +01:00
Alejandro Celaya
18312b0624 Merge pull request #593 from acelaya-forks/feature/coding-standard-2.1
Feature/coding standard 2.1
2020-01-01 20:56:47 +01:00
Alejandro Celaya
a67cf4fb85 Updated changelog 2020-01-01 20:49:29 +01:00
Alejandro Celaya
50100c251e Updated to coding standard v2.1 2020-01-01 20:48:31 +01:00
Alejandro Celaya
1070482629 Merge pull request #591 from acelaya-forks/feature/upgrading-doc
Feature/upgrading doc
2020-01-01 11:31:58 +01:00
Alejandro Celaya
d205405dcc Updated DeprecatedConfigParser to remove the secret key 2020-01-01 11:27:09 +01:00
Alejandro Celaya
16d9c3b93f Updated changelog 2020-01-01 11:19:07 +01:00
Alejandro Celaya
52ecef0311 Created upgrade doc explaining how to upgrade from Shlinnk 1.x to 2.x 2020-01-01 11:17:44 +01:00
Alejandro Celaya
f172146f27 Merge pull request #590 from acelaya-forks/feature/remove-deprecations
Feature/remove deprecations
2019-12-31 23:51:27 +01:00
Alejandro Celaya
ee986912d4 Updated changelog 2019-12-31 23:44:42 +01:00
Alejandro Celaya
0e04968bc2 Changed latitude and longitude to float 2019-12-31 23:37:49 +01:00
Alejandro Celaya
0cf1d8d375 Changed validate_url to have default value of false 2019-12-31 16:30:59 +01:00
Alejandro Celaya
339121fbb1 Removed PathVersionMiddleware as routes without version are not longer supported 2019-12-31 16:26:00 +01:00
Alejandro Celaya
f99ca464de Removed old command aliases 2019-12-31 16:08:08 +01:00
Alejandro Celaya
5c90a7c7a7 Removed remaining deprecated elements 2019-12-31 16:05:02 +01:00
Alejandro Celaya
434b56fa8c Removed several deprecated components 2019-12-31 15:38:37 +01:00
Alejandro Celaya
78b484e657 Deleted everything related with previews generation 2019-12-31 13:40:38 +01:00
Alejandro Celaya
9d36534230 Merge pull request #589 from acelaya-forks/feature/problem-details-upgrade
Updated to problem-details 1.1, removing custom code
2019-12-30 22:48:24 +01:00
Alejandro Celaya
bd6243b2ac Updated to problem-details 1.1, removing custom code 2019-12-30 22:42:29 +01:00
Alejandro Celaya
416857e129 Updated changelog 2019-12-29 23:32:33 +01:00
Alejandro Celaya
8cd81d0441 Merge pull request #578 from acelaya-forks/feature/php-74-requirement
Feature/php 74 requirement
2019-12-29 23:29:42 +01:00
Alejandro Celaya
bf0d9ab7d9 Removed not needed null check 2019-12-29 23:19:00 +01:00
Alejandro Celaya
bfeb915cd2 Replaced regular callbacks by arrow functions when possible 2019-12-29 23:16:55 +01:00
Alejandro Celaya
a830420d75 Added property types to all non-deprecated classes 2019-12-29 22:48:40 +01:00
Alejandro Celaya
b904c6d00d Added property types to some classes 2019-12-29 22:27:00 +01:00
Alejandro Celaya
050050a9eb Updated base image for all docerfiles to use PHP 7.4.1 2019-12-29 16:34:43 +01:00
Alejandro Celaya
9e48dc4137 Updated more references to now unsupported PHP versions 2019-12-29 16:09:05 +01:00
Alejandro Celaya
2bd9bb233c Updated development assets and required PHP 7.4 2019-12-29 16:09:05 +01:00
Alejandro Celaya
e92d437456 Merge pull request #588 from shlinkio/develop
Develop to master
2019-12-29 15:55:01 +01:00
Alejandro Celaya
fd6151040e Merge pull request #587 from acelaya-forks/feature/visit-webhook
Feature/visit webhook
2019-12-29 14:36:40 +01:00
Alejandro Celaya
b4e3dd7b4e Updated changelog with v1.21.0 2019-12-29 14:15:50 +01:00
Alejandro Celaya
8667544b3a Updated to installer v3.3 2019-12-29 14:09:51 +01:00
Alejandro Celaya
664569a52b Added visits_webhooks option to SimplifiedConfigParser 2019-12-28 16:42:21 +01:00
Alejandro Celaya
3c9da80962 Documented how to provide visits webhooks to docker image via env vars 2019-12-28 16:35:16 +01:00
Alejandro Celaya
583985e7ce Moved VisitLocated as a regular event, since async tasks cannot trigger other async tasks 2019-12-28 13:50:41 +01:00
Alejandro Celaya
b17bcb6c93 Updated LocateShortUrlVisit so that it dispatches a VisitLocated event 2019-12-28 13:07:11 +01:00
Alejandro Celaya
4886825564 Improved NotifyVisitToWebHooksTest to kill more mutants 2019-12-28 10:43:13 +01:00
Alejandro Celaya
79cd3ba912 Created NotifyVisitToWebhooksTest 2019-12-27 20:32:21 +01:00
Alejandro Celaya
21a3d4b66b Updated NotifyVisitToWebHooks so that it waits for all requests to finish 2019-12-27 17:07:20 +01:00
Alejandro Celaya
562b0a0868 Used PSR3 logger preprocessor format instead of sprintf when possible 2019-12-27 16:15:14 +01:00
Alejandro Celaya
25243a10ec Moved common bootstrapping code to run.php script 2019-12-27 14:02:43 +01:00
Alejandro Celaya
3fdba53995 Added basic implementation for new webhook events 2019-12-27 13:37:59 +01:00
Alejandro Celaya
34d8b396a4 Fixed merge conflicts 2019-12-23 11:17:20 +01:00
Alejandro Celaya
c560e1fda2 Merge pull request #586 from acelaya-forks/hotfix/1.20.3
Hotfix/1.20.3
2019-12-23 11:06:29 +01:00
Alejandro Celaya
3634236214 Fixed some comments 2019-12-23 11:00:38 +01:00
Alejandro Celaya
6de0cba0b0 Updated changelog 2019-12-23 10:50:03 +01:00
Alejandro Celaya
35f5f4851e Moved class alias to container.php to avoid it from being lost after configuration is cached 2019-12-23 10:38:06 +01:00
Alejandro Celaya
3a8f4de3bb Merge pull request #584 from acelaya-forks/feature/guzzle-fix
Feature/guzzle fix
2019-12-21 16:38:34 +01:00
Alejandro Celaya
d67321f187 Removed workarounds from UrlValidator that were required for guzzle 6.5.0 2019-12-21 16:09:29 +01:00
Alejandro Celaya
7c52d0ec19 Required at least guzzle 6.5.1 2019-12-21 16:02:12 +01:00
Alejandro Celaya
ea08ab9758 Merge pull request #583 from acelaya-forks/feature/improve-docs
Updated documentation, adding more sub-sections and trying to explain…
2019-12-19 11:41:36 +01:00
Alejandro Celaya
9c06803a31 Updated documentation, adding more sub-sections and trying to explain everything even better 2019-12-19 11:39:41 +01:00
Alejandro Celaya
9222dcbc2e Merge pull request #581 from acelaya-forks/feature/improve-dockers
Feature/improve dockers
2019-12-18 15:38:03 +01:00
Alejandro Celaya
75b91dc26b Hardcoded different creation dates for fixture short URLs to avoid random API test failures 2019-12-18 15:26:23 +01:00
Alejandro Celaya
4334ea295d Added missing local config 2019-12-18 15:00:39 +01:00
Alejandro Celaya
03eeef7f52 Updated changelog 2019-12-18 14:55:37 +01:00
Alejandro Celaya
0747137679 Added php ini config for docker image 2019-12-18 14:54:48 +01:00
Alejandro Celaya
0152f6fa1a Added dev php config and removed .env dependencies 2019-12-17 21:20:24 +01:00
Alejandro Celaya
9f2ede0b84 Merge pull request #579 from acelaya-forks/feature/readme-logo
Feature/readme logo
2019-12-17 13:46:46 +01:00
Alejandro Celaya
748786d599 Updated project header image 2019-12-17 13:44:22 +01:00
Alejandro Celaya
18f0fb556a Added project logo to readme file 2019-12-17 13:40:08 +01:00
Alejandro Celaya
685b3f86b3 Merge pull request #572 from alesub/date-filters
Date filters for short urls list endpoint
2019-12-17 10:33:46 +01:00
Alejandro Celaya
524914fd35 Updated changelog 2019-12-17 10:14:18 +01:00
Alejandro Celaya
f7d09bf173 Slight refactoring on ListSHortUrlsCommand 2019-12-17 10:11:54 +01:00
Alejandro Celaya
4b113e5781 Added tests covering how orderBy is parsed on ListShortUrlsCommand 2019-12-17 10:06:54 +01:00
Alejandro Celaya
5616579131 Added startDate and endDate params to ListShortUrlsCommand 2019-12-17 09:59:54 +01:00
Alejandro Celaya
8142801f1f Updated ListShortUrlsAction api test so that it covers filtering use cases 2019-12-16 23:03:32 +01:00
Alejandro Celaya
35eeaf4282 Improved repository tests covering fetching and counting filtered short URL lists 2019-12-16 22:17:33 +01:00
Alejandro Celaya
8ad8b08aa4 Improved ListShortUrlsActionTest covering different scenarios in which date ranges are provided 2019-12-16 21:55:48 +01:00
Alejandro Celaya
839ca31821 Ensured date range filtering is also passed to the count function on ShortUrlRepository 2019-12-16 21:46:27 +01:00
Alejandro Celaya
03a92e5556 Fixed trailing method comma which is not compatible with PHP 7.2 2019-12-16 15:22:03 +01:00
Alejandro Celaya
99fd5f937e Fixed existing tests and coding styles 2019-12-16 15:16:18 +01:00
Alejandro Medina
d7ffcd903d Add date filter fields to short urls documentation 2019-12-14 18:42:02 -03:00
Alejandro Medina
a28e7987e6 fixup! Add date range filter to list urls endpoint parameters 2019-12-14 18:32:58 -03:00
Alejandro Medina
f17c46bbed Add date range filter to short url service 2019-12-14 15:10:09 -03:00
Alejandro Medina
27008505e5 Add date range filter to short url service interface 2019-12-14 15:03:39 -03:00
Alejandro Medina
f9ba322547 Add date range filter to list urls endpoint parameters 2019-12-14 13:55:03 -03:00
Alejandro Medina
661efcb51f Add date range filter to short url repository adapter 2019-12-14 12:01:56 -03:00
Alejandro Medina
5928f28699 Add date range filter to short url repository 2019-12-14 11:58:52 -03:00
Alejandro Medina
1183d65184 Add date range filter to short url repository interface 2019-12-14 11:58:08 -03:00
Alejandro Celaya
fd53e49508 Merge pull request #574 from shlinkio/feature/php-7.4-build
Replaced PHP 7.4 snapshot by regular 7.4
2019-12-14 11:47:10 +01:00
Alejandro Celaya
c484e32641 Replaced PHP 7.4 snapshot by regular 7.4 2019-12-14 10:57:29 +01:00
Alejandro Celaya
c1741c99be Merge pull request #571 from acelaya-forks/bugfix/docker-version
Bugfix/docker version
2019-12-09 18:31:08 +01:00
Alejandro Celaya
a03179743d Updated changelog 2019-12-09 18:18:03 +01:00
Alejandro Celaya
83b9160ab1 Updated docker image build script so that it sets shlink version to 'latest' when source branch is develop 2019-12-09 18:16:57 +01:00
Alejandro Celaya
83757ed390 Merge pull request #568 from acelaya-forks/feature/guzzle-update
Updated to guzzle 6.5 and removed custom code
2019-12-07 21:13:17 +01:00
Alejandro Celaya
843e943251 Updated to guzzle 6.5 and removed custom code 2019-12-07 21:01:14 +01:00
Alejandro Celaya
a0a1d3de72 Used stable docker tag on every docker run example 2019-12-07 09:31:46 +01:00
Alejandro Celaya
e5f262869c Improved tag conflict docs and tests 2019-12-06 23:40:54 +01:00
Alejandro Celaya
a070a68a57 Fixed merge conflicts 2019-12-06 23:34:50 +01:00
Alejandro Celaya
3479bbbb36 Merge pull request #567 from acelaya-forks/hotfix/v1.20.2
Hotfix/v1.20.2
2019-12-06 23:09:20 +01:00
Alejandro Celaya
e1a1a0652f Merge pull request #566 from acelaya-forks/bugfix/date-parsing
Bugfix/date parsing
2019-12-06 22:52:22 +01:00
Alejandro Celaya
3e9b775114 Fixed failing test 2019-12-06 22:45:15 +01:00
Alejandro Celaya
57c91aca3c Updated changelog with v1.20.2 2019-12-06 22:40:08 +01:00
Alejandro Celaya
05a64b8d9e Ensured dates parsing does not mask actual validation errors 2019-12-06 22:38:22 +01:00
Alejandro Celaya
30780f9c5f Merge pull request #565 from acelaya-forks/bugfix/control-rename-tag
Bugfix/control rename tag
2019-12-06 21:13:54 +01:00
Alejandro Celaya
3455df9214 Updated changelog 2019-12-06 21:06:47 +01:00
Alejandro Celaya
27aa8f9875 Handled rename tag error from command 2019-12-06 21:04:52 +01:00
Alejandro Celaya
05451e3d1a Handled tag conflict from rename tag action 2019-12-06 21:03:27 +01:00
Alejandro Celaya
b9b3295b52 Ensured a specific exception is thrown from TagService when trying to rename a tag to the name of another tag which already exists 2019-12-06 20:44:41 +01:00
Alejandro Celaya
f62ed66e26 Created TagConflictException 2019-12-06 10:20:56 +01:00
Alejandro Celaya
e2a9a989ab Merge pull request #563 from acelaya-forks/bugfix/missing-yaml
Bugfix/missing yaml
2019-12-06 09:59:09 +01:00
Alejandro Celaya
4af27650cd Updated changelog 2019-12-06 09:52:23 +01:00
Alejandro Celaya
76a603104d Migrated migrations config file from yaml to plain PHP 2019-12-06 09:50:37 +01:00
Alejandro Celaya
03825469ca Merge pull request #559 from acelaya-forks/feature/msi-80
Feature/msi 80
2019-12-01 12:42:57 +01:00
Alejandro Celaya
058cdf7a82 Enforced a min msi of 80% 2019-12-01 12:34:26 +01:00
Alejandro Celaya
7f43890713 Improved CreateShortUrlAction test so that it cover more mutants 2019-12-01 12:26:31 +01:00
Alejandro Celaya
57070ef155 Improved Rest's ConfigProvider test to kill more mutants 2019-12-01 12:04:31 +01:00
Alejandro Celaya
fc5904e743 Improved BodyParserMiddlewareTest to kill more mutants 2019-12-01 10:58:48 +01:00
Alejandro Celaya
46c0620236 More test improvements trying to increase mutation score 2019-12-01 10:47:56 +01:00
Alejandro Celaya
1bf56b658b Improved domain exception tests to cover more possible mutants 2019-12-01 10:24:42 +01:00
Alejandro Celaya
8cc4d3e6d5 Merge pull request #558 from acelaya-forks/feature/monolog2
Feature/monolog2
2019-11-30 18:22:44 +01:00
Alejandro Celaya
3080c49caf Bringing back allowing failures on PHP 7.4 2019-11-30 18:15:09 +01:00
Alejandro Celaya
ed94ec39c4 Updated changelog 2019-11-30 18:09:38 +01:00
Alejandro Celaya
6bcdd5e6c8 Cleaned last beats of to make everything BC 2019-11-30 18:08:30 +01:00
Alejandro Celaya
cf3d763731 Replaced monolog-cascade by MonologFactory 2019-11-30 17:59:04 +01:00
Alejandro Celaya
e558bb17cb Updated dependencies 2019-11-30 17:21:36 +01:00
Alejandro Celaya
5d76a55c46 Updated how monolog handlers are registered so that it is possible to overwrite them via local config 2019-11-30 09:28:30 +01:00
Alejandro Celaya
4401824716 Updated changelog 2019-11-29 19:43:34 +01:00
Alejandro Celaya
df23f20d31 Merge pull request #554 from acelaya-forks/feature/problem-details
Feature/problem details
2019-11-29 19:38:08 +01:00
Alejandro Celaya
6c37905c15 Fixed cross-domain headers being lost when ProblemDetailsMiddleware throws an error 2019-11-29 19:24:04 +01:00
Alejandro Celaya
4685572def Added version param to endpoints 2019-11-29 19:09:03 +01:00
Alejandro Celaya
3cf1657d54 Simplified invalidElements to be a plain list of keys when a ValidationException is cast into a problem details error 2019-11-29 18:55:27 +01:00
Alejandro Celaya
60d3c09da5 Updated API docs to reference the use of application/problem+json 2019-11-28 19:37:31 +01:00
Alejandro Celaya
5055ddf995 Updated CLI commands to just print exception messages when possible 2019-11-28 18:47:34 +01:00
Alejandro Celaya
d83d2f82bd Added more strict checks on API errors tests 2019-11-27 20:48:35 +01:00
Alejandro Celaya
5266743a0c Added as much additional data as possible to exceptions 2019-11-27 20:18:36 +01:00
Alejandro Celaya
fffb2872ef Replaced hardcoded error response by the use of a problem details action 2019-11-26 22:18:55 +01:00
Alejandro Celaya
3b56fc3760 Refactored and fixed unit tests 2019-11-26 22:12:52 +01:00
Alejandro Celaya
5213faa0a1 Converted VerifyAuthenticationException into a problem details exception 2019-11-26 22:03:40 +01:00
Alejandro Celaya
6f4e5175da Converted MissingAuthenticationException into a problem details exception 2019-11-26 21:43:29 +01:00
Alejandro Celaya
f502eb0195 Added new test for the case in which an invalid URL is provided 2019-11-26 21:33:22 +01:00
Alejandro Celaya
509c9fe2e8 Improved AuthenticationMiddleware API tests 2019-11-26 21:29:25 +01:00
Alejandro Celaya
13e795d25d Updated ValidationException's base exception 2019-11-26 20:58:38 +01:00
Alejandro Celaya
a28ef1f176 Converted EntityDoesNotExistException into a problem details exception renamed as TagNotFoundException 2019-11-25 19:15:46 +01:00
Alejandro Celaya
0c5eec7e95 Replaced the use of EntityDoesNotExistException by ShorturlNotFoundException where applicable 2019-11-25 18:54:25 +01:00
Alejandro Celaya
310032e303 Converted DeleteShortUrlException into a problem details exception 2019-11-24 23:56:02 +01:00
Alejandro Celaya
32b3c72bdf Converted ValidationException into a problem details exception 2019-11-24 23:45:40 +01:00
Alejandro Celaya
c1eee2246b Converted NonUniqueSlugException into a problem details exception 2019-11-24 23:32:37 +01:00
Alejandro Celaya
0d7d53ab5b Converted InvalidUrlException into a problem details exception 2019-11-24 23:24:53 +01:00
Alejandro Celaya
2f1de4a162 Renamed InvalidShortCodeException to ShortCodeNotFoundException 2019-11-24 23:15:55 +01:00
Alejandro Celaya
cdd36b6712 Created BackwardsCompatibleProblemDetailsMiddlewareTest 2019-11-24 13:24:52 +01:00
Alejandro Celaya
6f0afe269d Moved InvalidShortCode exception handling to problem details 2019-11-24 12:41:12 +01:00
Alejandro Celaya
09321eaa93 Updated InvalidShortCodeException to implement ProblemDetails 2019-11-23 13:41:07 +01:00
Alejandro Celaya
850259290a Covered new use case on NotFoundRedirectHandlerTest 2019-11-23 10:28:58 +01:00
Alejandro Celaya
1bafe54a75 Split NotFoundHandler into two different middlewares 2019-11-23 10:25:12 +01:00
Alejandro Celaya
89e373f775 Moved NotFoundHandler to ErrorHandler namespace 2019-11-23 10:11:34 +01:00
Alejandro Celaya
74854b3dac Added zend problem details to the project 2019-11-22 19:49:14 +01:00
Alejandro Celaya
4e5ab21a47 Removed whoops dev dependency 2019-11-22 18:03:11 +01:00
Alejandro Celaya
a0510d6a69 Removed content-based-error-handler in preparation for the problem details module 2019-11-22 18:01:38 +01:00
Alejandro Celaya
6ddb60d047 Improved ValidationException to avoid polluting the message with invalid data but keeping it on the string representation 2019-11-21 20:07:57 +01:00
Alejandro Celaya
ad592a563c Updated testing utils library 2019-11-21 19:22:04 +01:00
Alejandro Celaya
b3b67b051d Created API tests for errors when updating tags 2019-11-21 19:03:34 +01:00
Alejandro Celaya
8607d58e18 Created API tests for errors when editting short URL tags 2019-11-21 18:49:55 +01:00
Alejandro Celaya
34e60ec5b8 Created API tests for errors when getting short URL visits 2019-11-20 20:58:16 +01:00
Alejandro Celaya
d044e1a5b7 Created API tests for errors when resolving short URLs 2019-11-20 20:44:03 +01:00
Alejandro Celaya
9096318968 Created API tests for errors when deleting short URLs 2019-11-20 20:38:19 +01:00
Alejandro Celaya
ba6e8c4092 Created API tests for errors when editing a short URL 2019-11-20 20:31:18 +01:00
Alejandro Celaya
98b6dba05d Removed generic error handling from action that will usually be handled by ErrorHandler middleware 2019-11-20 20:21:02 +01:00
Alejandro Celaya
84c4631124 Deleted specific factory by replacing it by ConfigAbstractFactory 2019-11-20 20:18:21 +01:00
Alejandro Celaya
a7d308c585 Merge pull request #553 from acelaya-forks/feature/doctrine-2.7
Updated to latest doctrine versions, solving deprecations
2019-11-20 20:12:02 +01:00
Alejandro Celaya
af0ed6135e Updated to latest doctrine versions, solving deprecations 2019-11-20 20:03:06 +01:00
Alejandro Celaya
115ca0da0f Added v1.20.1 to changelog 2019-11-17 11:29:54 +01:00
Alejandro Celaya
673b545a83 Merge pull request #551 from acelaya-forks/feature/non-shared-locker
Feature/non shared locker
2019-11-17 11:21:27 +01:00
Alejandro Celaya
d030fd1aa6 Updated GeolocationDbUpdater to always use a local lock even if redis config is provided 2019-11-17 11:09:37 +01:00
Alejandro Celaya
7c1e40be88 Updated docker docs regarding image versioning 2019-11-17 10:38:05 +01:00
Alejandro Celaya
b739619532 Merge pull request #550 from acelaya-forks/feature/fix-db-silent-errors
Feature/fix db silent errors
2019-11-17 10:08:57 +01:00
Alejandro Celaya
372b83d92f Updated changelog 2019-11-17 10:02:03 +01:00
Alejandro Celaya
4e3b5419d5 Created small helper composer command 2019-11-17 10:00:29 +01:00
Alejandro Celaya
c34d5a35e2 Updated database commands so that internal commands are run with mustRun 2019-11-17 09:52:45 +01:00
Alejandro Celaya
a959b5bf02 Merge pull request #549 from acelaya-forks/feature/use-own-test-domains
Replaced third party domains used in tests by custom shlink domains
2019-11-16 13:47:37 +01:00
Alejandro Celaya
45ac2c3c51 Replaced third party domains used in tests by custom shlink domains 2019-11-16 13:37:53 +01:00
Alejandro Celaya
f6bddc6f24 Merge pull request #548 from acelaya-forks/feature/redirect-to-idn
Handled IDN domains also on internal redirections when validating a URL
2019-11-16 12:46:02 +01:00
Alejandro Celaya
6b8fc3228e Handled IDN domains also on internal redirections when validating a URL 2019-11-16 12:38:45 +01:00
Alejandro Celaya
8cf1a95df5 Swoole is no longer experimental 2019-11-16 10:59:56 +01:00
Alejandro Celaya
b3ea2969c5 Merge pull request #547 from acelaya-forks/feature/support-idn
Feature/support idn
2019-11-16 10:32:49 +01:00
Alejandro Celaya
054bbb8d5a Updated changelog 2019-11-16 10:22:00 +01:00
Alejandro Celaya
19c1b29f59 Added tests for UrlValidator 2019-11-16 10:19:25 +01:00
Alejandro Celaya
264b8c2a9e Added support for IDN 2019-11-16 10:06:55 +01:00
Alejandro Celaya
ec33b95f97 Brought intl extension back to docker images and kept as a requirement 2019-11-16 09:46:42 +01:00
Alejandro Celaya
4437d5305f Merge pull request #546 from acelaya-forks/feature/image-version
Feature/image version
2019-11-15 22:24:42 +01:00
Alejandro Celaya
f20f01e22e Removed Intl from docker image 2019-11-15 22:23:07 +01:00
Alejandro Celaya
1ee30fe5dc Updated dev docker images 2019-11-15 22:05:34 +01:00
Alejandro Celaya
4dc026d7fc Merge pull request #544 from Starbix/master
Update dependencies and baseimage
2019-11-15 22:01:14 +01:00
Cédric Laubacher
1e862a8ee8 Readd specific alpine version 2019-11-15 21:42:07 +01:00
Alejandro Celaya
5ece2d1939 Merge pull request #539 from acelaya-forks/feature/forward-query
Feature/forward query
2019-11-15 20:43:11 +01:00
Alejandro Celaya
146e9100be Updated changelog 2019-11-15 20:30:36 +01:00
Cédric Laubacher
0c854edc6b Use specific PHP version 2019-11-15 19:16:29 +01:00
Cédric Laubacher
07d031e7b9 Update Dockerfile 2019-11-15 17:55:06 +01:00
Alejandro Celaya
705dc2ec39 Added forward of query string from short URLs to long one 2019-11-13 21:04:44 +01:00
Alejandro Celaya
3b9221c7d2 Ensured options for short.url:list command have required values 2019-11-13 20:24:59 +01:00
Alejandro Celaya
576d602ed0 Merge pull request #537 from acelaya-forks/feature/installer-3.1
Updated to installer 3.1
2019-11-10 13:15:30 +01:00
Alejandro Celaya
9df8bd63d4 Updated to installer 3.1 2019-11-10 13:07:57 +01:00
Alejandro Celaya
99c4802367 Fixed docker docs line break 2019-11-10 12:14:00 +01:00
Alejandro Celaya
94dc6f2053 Merge pull request #536 from acelaya-forks/feature/simplified-config-workers
Added workers nums handling to simplified config parser
2019-11-10 12:11:41 +01:00
Alejandro Celaya
d4005da35c Added workers nums handling to simplified config parser 2019-11-10 12:04:14 +01:00
Alejandro Celaya
cbe2c362d5 Merge pull request #535 from acelaya-forks/feature/api-test-script
Updated API tests script so that it throws the same exit code returne…
2019-11-09 12:15:09 +01:00
Alejandro Celaya
8bf79db66a Fixed typo 2019-11-09 12:08:22 +01:00
Alejandro Celaya
b87964f716 Updated API tests script so that it throws the same exit code returned by phpunit 2019-11-09 11:25:33 +01:00
Alejandro Celaya
b0a574f578 Merge pull request #533 from acelaya-forks/feature/custom-workers
Feature/custom workers
2019-11-09 11:17:03 +01:00
Alejandro Celaya
92dc3019de Updated changelog 2019-11-09 11:08:28 +01:00
Alejandro Celaya
d8f92cb2be Added web worker num and task worker num to docker image config 2019-11-09 11:05:54 +01:00
Alejandro Celaya
bf24660ddb Merge pull request #526 from acelaya-forks/feature/enhanced-not-found-redirect
Feature/enhanced not found redirect
2019-11-02 21:24:34 +01:00
Alejandro Celaya
b66268867a Updated to shlink-installer 3 2019-11-02 21:15:26 +01:00
Alejandro Celaya
9abaa243e0 Some extra minor improvements 2019-11-02 19:08:07 +01:00
Alejandro Celaya
7030138ff4 Updated changelog 2019-11-02 18:57:16 +01:00
Alejandro Celaya
906dfe60f8 Simplified code to render not-foubnd templates by infering the template to be used inside NotFoundHandler 2019-11-02 18:49:24 +01:00
Alejandro Celaya
01f60614ef Removed hardcoded route names for core routes and used action class names instead 2019-11-02 18:36:15 +01:00
Alejandro Celaya
eeb5306883 Moved all logic to redirect to specific URLs when a 404 is found to the NotFoundHandler 2019-11-02 18:33:26 +01:00
Alejandro Celaya
24c3a3e84c Defined new options for new redirect configuration 2019-11-02 17:23:21 +01:00
Alejandro Celaya
8b9663aea0 Created DeprecatedConfigParserTest 2019-11-02 17:04:49 +01:00
Alejandro Celaya
b59f4e2805 Defined new configs for not found redirects 2019-11-02 11:30:09 +01:00
Alejandro Celaya
6293d57fde Merge pull request #523 from acelaya-forks/feature/refactorings
Feature/refactorings
2019-11-01 17:31:43 +01:00
Alejandro Celaya
39ac2efe26 Updated to latest shlink-common with bug fixes 2019-11-01 17:16:56 +01:00
Alejandro Celaya
1f449e8ce1 Disabled coroutines on swoole during API tests 2019-11-01 10:10:43 +01:00
Alejandro Celaya
ad906000c7 Removed typehint making phpstan throw false positive 2019-11-01 10:04:25 +01:00
Alejandro Celaya
5361f33cc1 Some more refactorings 2019-11-01 09:52:56 +01:00
Alejandro Celaya
1937f3ea22 Trying to automatically persist tags 2019-10-26 09:01:51 +02:00
Alejandro Celaya
f4e9d0c8fe Merge pull request #517 from acelaya-forks/feature/too-long-lock
Updated to shlink-ip-geolocation v1.1
2019-10-25 20:12:54 +02:00
Alejandro Celaya
9b767ee9f3 Updated to shlink-ip-geolocation v1.1 2019-10-25 20:00:26 +02:00
Alejandro Celaya
43cb91bf52 Merge pull request #516 from acelaya-forks/feature/qr-code-with-domain
Feature/qr code with domain
2019-10-22 20:03:37 +02:00
Alejandro Celaya
f784ee5b28 Fixed unit tests 2019-10-22 19:52:28 +02:00
Alejandro Celaya
cd6f067fe5 Ensured domain is taken into account when generating QR codes 2019-10-22 19:43:53 +02:00
Alejandro Celaya
6d366188c9 Added github funding 2019-10-22 19:37:35 +02:00
Alejandro Celaya
c4ca59dcb0 Merge pull request #515 from acelaya-forks/feature/host-and-port
Feature/host and port
2019-10-20 11:14:44 +02:00
Alejandro Celaya
74675ad314 Updated changelog 2019-10-20 10:30:51 +02:00
Alejandro Celaya
b5e4da847a Allowed port number on domain field when creating shotr URLs 2019-10-20 10:30:11 +02:00
Alejandro Celaya
232bf5a68b Merge pull request #513 from acelaya-forks/feature/fix-long-urls
Feature/fix long urls
2019-10-20 10:15:38 +02:00
Alejandro Celaya
67958a78d3 Updated changelog 2019-10-20 09:55:00 +02:00
Alejandro Celaya
b8cdc29d8f Increased long URL size in DB to 2048 characters 2019-10-20 09:53:11 +02:00
Alejandro Celaya
30e4ddb950 Updated to latest infection version 2019-10-20 09:42:46 +02:00
Alejandro Celaya
a61a7db275 Merge pull request #510 from acelaya-forks/feature/update-common
Updated common and qr-code
2019-10-15 19:17:44 +02:00
Alejandro Celaya
0f5e4e7fa2 Updated common and qr-code 2019-10-15 19:06:37 +02:00
Alejandro Celaya
eb17eae781 Merge pull request #506 from acelaya-forks/feature/improved-shortcodes
Feature/improved shortcodes
2019-10-11 12:51:24 +02:00
Alejandro Celaya
740a65f880 Updated references to SHORTCODE_CHARS in docker docs 2019-10-11 11:41:14 +02:00
Alejandro Celaya
5bd7b53e0a Added more tests for new logics 2019-10-11 11:28:53 +02:00
Alejandro Celaya
9538f474de Added logic to check if a short code is in use and regenerate it otherwise 2019-10-11 11:09:33 +02:00
Alejandro Celaya
8f2e78c946 Moved logic to generate random short codes to external function 2019-10-11 09:35:09 +02:00
Alejandro Celaya
2f09ff456c Updated logic to generate random short codes, increasing entropy 2019-10-11 09:14:25 +02:00
Alejandro Celaya
c8d950e04d Merge pull request #504 from acelaya-forks/feature/mariadb
Feature/mariadb
2019-10-06 12:37:22 +02:00
Alejandro Celaya
0f6a0da7a4 Added MariaDB to documentation 2019-10-06 12:27:11 +02:00
Alejandro Celaya
4300fb225f Ensured tests on maria DB are not run on travis, since it would conflict with MySQL 2019-10-06 12:23:02 +02:00
Alejandro Celaya
159021e87c Added MariaDB to issue templates 2019-10-06 11:39:53 +02:00
Alejandro Celaya
9dc6ea9eeb Documented how to use maria db with docker image 2019-10-06 11:38:23 +02:00
Alejandro Celaya
42e84e526e Added mariadb container for development environment 2019-10-06 11:21:41 +02:00
Alejandro Celaya
700ee40109 Merge pull request #503 from acelaya-forks/feature/update-coding-standard
Feature/update coding standard
2019-10-05 18:07:12 +02:00
Alejandro Celaya
4909bd9550 Updated changelog 2019-10-05 17:29:07 +02:00
Alejandro Celaya
e0d20bf8ff Updated to coding styles v2 2019-10-05 17:26:10 +02:00
Alejandro Celaya
09a5284675 Merge pull request #501 from acelaya-forks/feature/v1.19-final
Updated changelog adding final release 1.19.0
2019-10-05 11:09:12 +02:00
Alejandro Celaya
1112f3acdd Updated changelog adding final release 1.19.0 2019-10-05 11:08:50 +02:00
Alejandro Celaya
05e3071db2 Merge pull request #500 from acelaya-forks/feature/multiple-domains
Feature/multiple domains
2019-10-04 23:39:11 +02:00
Alejandro Celaya
403773bc17 Documented new feature in CHANGELOG 2019-10-04 21:46:41 +02:00
Alejandro Celaya
636df2a736 Read request's authority when tracking a visit and passed it down 2019-10-04 21:36:54 +02:00
Alejandro Celaya
baf3093893 Added support for domain param to command and action to resolve a short URL 2019-10-04 21:17:02 +02:00
Alejandro Celaya
8d3a49a319 Fixed issue with postgres when fetching resultset ordering by nullable column 2019-10-04 18:07:26 +02:00
Alejandro Celaya
eced1af21d Added more database cases covering different combinations of finding short URL by short code and domain 2019-10-04 17:34:34 +02:00
Alejandro Celaya
49c3c9bec1 Ensured domain is taken into account when looking for a short URL 2019-10-04 17:21:22 +02:00
Alejandro Celaya
2ffaabe594 Added option to define domain to GenerateShortUrlCommand 2019-10-02 20:29:13 +02:00
Alejandro Celaya
f31dc6c6e5 Added missing return type hints 2019-10-02 20:15:14 +02:00
Alejandro Celaya
f067d0e831 Allowed to provide the domain when creating a short URL 2019-10-02 20:13:25 +02:00
Alejandro Celaya
a892f72425 Added migration to make the combination of slug+domain unique 2019-10-02 20:01:15 +02:00
Alejandro Celaya
25f64a2fc4 Added check for domain when matching an existing short URL 2019-10-01 22:15:11 +02:00
Alejandro Celaya
fd1fe90731 Created tests for new domain resolvers 2019-10-01 22:00:46 +02:00
Alejandro Celaya
495643f4f1 Ensured domain is taken into account when checking if a slug is in use 2019-10-01 21:42:35 +02:00
Alejandro Celaya
8da6b336f5 Added API test which checks short URLs with a domain are parsed as such 2019-10-01 20:24:11 +02:00
Alejandro Celaya
d0bb86ca8f Added simple way to resolve domains from entity manager when creating a short URL 2019-10-01 20:16:27 +02:00
Alejandro Celaya
1085809fa5 Moved code to convert a ShortUrl into a full link as string to the entity itself 2019-09-30 20:01:36 +02:00
Alejandro Celaya
7b1857dcda Added entities config for domains 2019-09-30 19:42:27 +02:00
Alejandro Celaya
6f38790d47 Created migration which adds domains table 2019-09-30 19:15:14 +02:00
Alejandro Celaya
a81ac85af6 Merge pull request #498 from acelaya-forks/feature/improved-issue-templates
Feature/improved issue templates
2019-09-29 09:38:53 +02:00
Alejandro Celaya
8f4d5b6fce Added funding config file 2019-09-29 09:30:18 +02:00
Alejandro Celaya
8468a48eaa Added generic issue template 2019-09-29 09:23:37 +02:00
Alejandro Celaya
fc0885e5d5 Removed shlink set-up info from feature request issue template 2019-09-29 09:21:56 +02:00
Alejandro Celaya
e1a9e347c3 Merge pull request #496 from acelaya-forks/feature/installer2
Feature/installer2
2019-09-28 09:45:09 +02:00
Alejandro Celaya
1b0e3b686d Ignored false positive in phpstan 2019-09-28 09:35:59 +02:00
Alejandro Celaya
a09208582e Updated changelog 2019-09-28 09:31:41 +02:00
Alejandro Celaya
df1de020d1 Updated to shlink installer 2 2019-09-28 09:30:20 +02:00
Alejandro Celaya
9b363368a2 Merge pull request #490 from acelaya-forks/feature/issue-template
Feature/issue template
2019-09-17 20:17:51 +02:00
Alejandro Celaya
9fac69675a Updated how shlink info is requested to users on issue templates 2019-09-17 20:10:27 +02:00
Alejandro Celaya
1d2cfde7f7 Created individual issue templates 2019-09-17 20:04:04 +02:00
Alejandro Celaya
452612ee00 Merge pull request #485 from acelaya-forks/feature/base-path
Feature/base path
2019-09-13 20:54:45 +02:00
Alejandro Celaya
8d74e0c3ff Fixed undefined-index errors in BasePathPrefixerTest 2019-09-13 20:46:49 +02:00
Alejandro Celaya
0a1786c89a Added support for basepath on docker image 2019-09-13 20:36:40 +02:00
Alejandro Celaya
bc07d77d06 Removed duplicated code from BasePathPrefixer 2019-09-13 20:22:41 +02:00
Alejandro Celaya
6e38457655 Created BasePathPrefixerTest 2019-09-13 20:17:30 +02:00
Alejandro Celaya
d7a3aeb0a2 Created a config prost-processor which adds the base path on every applicable configuration 2019-09-13 20:03:53 +02:00
Alejandro Celaya
76541d5563 Merge pull request #484 from acelaya-forks/feature/disable-asking-for-lang
Ensured installer does not ask for the locale
2019-09-13 19:02:34 +02:00
Alejandro Celaya
28b5d8445e Ensured installer does not ask for the locale 2019-09-13 18:51:51 +02:00
Alejandro Celaya
d17533fd0f Merge pull request #483 from acelaya-forks/feature/remoive-translations
Feature/remoive translations
2019-09-12 20:30:45 +02:00
Alejandro Celaya
01d62b7aea Removed escape characters no longer needed in templates 2019-09-12 19:45:24 +02:00
Alejandro Celaya
bd97804ca6 Updated changelog 2019-09-12 08:10:41 +02:00
Alejandro Celaya
7b0ccc9f69 Removed references to anything related with translations 2019-09-12 08:09:17 +02:00
Alejandro Celaya
fdb98fa2a9 Added service aliases that were removed from shlink-common 2019-09-11 20:25:04 +02:00
Alejandro Celaya
fb684bd788 Merge pull request #476 from acelaya-forks/feature/fix-log-fields-error
Feature/fix log fields error
2019-08-24 10:40:31 +02:00
Alejandro Celaya
05acf4eb2a Updated changelog 2019-08-24 10:27:42 +02:00
Alejandro Celaya
56d0383170 Increased referer length to 1024 and ensured values are cropped before trying to insert in database 2019-08-24 10:25:43 +02:00
Alejandro Celaya
b31236958b Added colors to tests run with phpunit 2019-08-20 18:46:33 +02:00
Alejandro Celaya
3ffa46fb26 Added prefer-dist flag to composer execution on docker build 2019-08-17 17:19:33 +02:00
Alejandro Celaya
217003381a Fixed version set during docker image build 2019-08-17 16:05:47 +02:00
Alejandro Celaya
234190f493 Merge pull request #472 from acelaya-forks/feature/docker-image
Feature/docker image
2019-08-16 20:50:16 +02:00
Alejandro Celaya
209e3e9e14 Updated travis to only build docker image in one of the envs 2019-08-16 20:49:24 +02:00
Alejandro Celaya
872241f497 Fixed travis config using invalid structure 2019-08-16 20:27:04 +02:00
Alejandro Celaya
cb7a66c59b Updated changelog 2019-08-16 19:48:23 +02:00
Alejandro Celaya
924383ccc8 Updated docker image build so that it sets shlink's version 2019-08-16 19:42:39 +02:00
Alejandro Celaya
65d1301195 Simplified build script to exclude everything from dockerignore for rsync 2019-08-16 19:30:40 +02:00
Alejandro Celaya
57c0490d84 Updated travis config to test docker image building when the dockerfile has changed 2019-08-16 19:13:35 +02:00
Alejandro Celaya
b927e44107 Ensured all composer-related files are deleted from docker image 2019-08-16 18:55:35 +02:00
Alejandro Celaya
6433a67d52 Added all docker stuff to the project 2019-08-16 18:38:26 +02:00
Alejandro Celaya
1cc2cfaec7 Merge pull request #466 from acelaya-forks/feature/fix-7.4-build
Updated build from PHP 7.4 to 7.4snapshot
2019-08-15 20:01:29 +02:00
Alejandro Celaya
3fa24c5d81 Updated build from PHP 7.4 to 7.4snapshot 2019-08-15 19:44:17 +02:00
Alejandro Celaya
a5c96f41b3 Merge pull request #465 from acelaya/feature/external-event-dispatcher
Feature/external event dispatcher
2019-08-12 21:03:53 +02:00
Alejandro Celaya
9fac291df4 Updated changelog 2019-08-12 20:55:10 +02:00
Alejandro Celaya
971b7967de Installed EventDispatcher module from external library 2019-08-12 20:54:30 +02:00
Alejandro Celaya
b3a4adeba4 Merge pull request #464 from acelaya/feature/external-ip-geolocation-module
Moved IpGeolocation module to external library
2019-08-12 20:12:29 +02:00
Alejandro Celaya
b732f1df0d Moved IpGeolocation module to external library 2019-08-12 20:00:15 +02:00
Alejandro Celaya
4395732c5e Merge pull request #463 from acelaya/feature/remove-interop-container
Removed use of Interop container
2019-08-12 19:12:47 +02:00
Alejandro Celaya
6720d12ab8 Removed use of Interop container 2019-08-12 18:59:02 +02:00
Alejandro Celaya
456765e55b Merge pull request #462 from acelaya/feature/external-shlink-common
Feature/external shlink common
2019-08-12 18:43:34 +02:00
Alejandro Celaya
a6009c89d3 Updated changelog 2019-08-12 18:35:59 +02:00
Alejandro Celaya
d767c415d1 Deleted local Common module and used external one 2019-08-12 18:34:52 +02:00
Alejandro Celaya
d88f535444 Added config directorios to phpstan inspections 2019-08-12 17:58:04 +02:00
Alejandro Celaya
0c7dd18b7c Merge pull request #461 from acelaya/feature/test-utils-external
Used TestUtils module from external library
2019-08-11 21:30:38 +02:00
Alejandro Celaya
0e535123ae Used TestUtils module from external library 2019-08-11 21:22:27 +02:00
Alejandro Celaya
8ce23b80bd Merge pull request #460 from acelaya/feature/drop-duplicated-code
Used class from shlink-installer instead of duplicated local version
2019-08-11 20:35:51 +02:00
Alejandro Celaya
d96023d063 Used class from shlink-installer instead of duplicated local version 2019-08-11 20:34:55 +02:00
Alejandro Celaya
d734d1a3b3 Merge pull request #459 from acelaya/feature/preview-generator-module
Created PreviewGenerator module
2019-08-11 20:01:34 +02:00
Alejandro Celaya
095f075ca9 Moved PreviewGenerationException to PreviewGenerator module 2019-08-11 19:47:15 +02:00
Alejandro Celaya
ef70e44a17 Registered Preview generator module 2019-08-11 19:43:06 +02:00
Alejandro Celaya
27a6f35534 Updated changelog 2019-08-11 19:40:30 +02:00
Alejandro Celaya
47ea4218d0 Created PreviewGenerator module 2019-08-11 19:38:46 +02:00
Alejandro Celaya
1fd677df5a Merge pull request #457 from acelaya/feature/test-utils-module
Created TestUtils module
2019-08-11 16:38:27 +02:00
Alejandro Celaya
7c349e42fd Created TestUtils module 2019-08-11 16:30:46 +02:00
Alejandro Celaya
da88ec6807 Merge pull request #456 from acelaya/feature/common-module
Feature/common module
2019-08-11 15:18:28 +02:00
Alejandro Celaya
cb715c0877 Decoupled Common module from any other module 2019-08-11 14:29:22 +02:00
Alejandro Celaya
97a362617d Added new API test for Options requests 2019-08-11 14:21:35 +02:00
Alejandro Celaya
24e708b7e1 Removered registered options middleware 2019-08-11 14:02:25 +02:00
Alejandro Celaya
583a684b03 Created SluggerFilterTest 2019-08-11 13:54:21 +02:00
Alejandro Celaya
fe8465261f Moved ResponseUtilsTrait to Response subnamespace 2019-08-11 13:48:19 +02:00
Alejandro Celaya
334cc231dc Final changes done on Common module 2019-08-11 13:44:42 +02:00
Alejandro Celaya
848d574f68 Moved too concrete class from Common to Core 2019-08-11 13:33:42 +02:00
Alejandro Celaya
8f929c0ee3 Dropped Integrations module and created LICENSE files for new modules 2019-08-11 13:20:18 +02:00
Alejandro Celaya
15bd839940 Improved README files 2019-08-11 13:06:10 +02:00
Alejandro Celaya
0323e0d17d Simplified IpAddressMiddlewareFactory and decoupled from Core module 2019-08-11 10:22:19 +02:00
Alejandro Celaya
5fa4fa0225 Moved some elements in Common module to more proper locations 2019-08-10 23:58:21 +02:00
Alejandro Celaya
986c165815 Moved RuntimeException to IpGeolocation module 2019-08-10 23:30:47 +02:00
Alejandro Celaya
53243d1764 Moved WrongIpException to IpGeolocation module 2019-08-10 23:26:39 +02:00
Alejandro Celaya
4aed8e6b59 Moved ShlinkTable class to CLI module 2019-08-10 23:16:34 +02:00
Alejandro Celaya
16653d60ed Enhanced CacheFactory to support redis and allow optional APCu 2019-08-10 17:44:09 +02:00
Alejandro Celaya
c9be89647c Updated RedisFactory so that it loads redis config from cache.redis too 2019-08-10 17:12:22 +02:00
Alejandro Celaya
406f947096 Merge pull request #454 from acelaya/feature/ip-geolocation-module
Feature/ip geolocation module
2019-08-10 16:30:04 +02:00
Alejandro Celaya
64916dafac Fixed coding styles 2019-08-10 14:16:19 +02:00
Alejandro Celaya
02ca843944 Created function to abstract how to load config from a glob pattern 2019-08-10 14:09:42 +02:00
Alejandro Celaya
3520ab6b18 Moved Ip resolvers to the Resolver subnamespace 2019-08-10 13:56:06 +02:00
Alejandro Celaya
30314fd532 Moved all ip-geolocation related stuff to its own module 2019-08-10 13:43:52 +02:00
Alejandro Celaya
4a3e495be7 Merge pull request #453 from acelaya/feature/php-7.4
Added PHP 7.4 to the build matrix, but allowing it to fail
2019-08-09 18:44:43 +02:00
Alejandro Celaya
ccfd993042 Added PHP 7.4 to the build matrix, but allowing it to fail 2019-08-09 18:26:07 +02:00
Alejandro Celaya
bfd2f5b7cf Merge pull request #452 from acelaya/feature/deprecated-previews
Deprecated previews generation
2019-08-09 18:23:53 +02:00
Alejandro Celaya
b7cc460844 Deprecated previews generation 2019-08-09 18:12:33 +02:00
Alejandro Celaya
c17c4c1319 Merge pull request #448 from acelaya/feature/improve-msi
Feature/improve msi
2019-08-08 17:19:13 +02:00
Alejandro Celaya
5967dd97c5 Updated changelog 2019-08-08 17:08:22 +02:00
Alejandro Celaya
0c26198b55 Improved tests to reach 75% MSI 2019-08-08 17:06:20 +02:00
Alejandro Celaya
a304cca3b6 Improved ListShortUrlsActionTest 2019-08-08 16:43:47 +02:00
Alejandro Celaya
564b65c8ca Created ValidationExceptionTest 2019-08-08 16:20:37 +02:00
Alejandro Celaya
9de0cf5c03 Merge pull request #447 from acelaya/feature/fix-command-error
Feature/fix command error
2019-08-08 14:58:23 +02:00
Alejandro Celaya
1349079f59 Updated TaskRunner and ListenerProvider so that they are lazyly created, preventing the Swoole server to be created more than once 2019-08-08 14:12:54 +02:00
Alejandro Celaya
38016b3ba3 Created delegator factory that injects logger on services implementing LoggerAware, and used it for locks factory 2019-08-08 13:42:14 +02:00
Alejandro Celaya
8db9962282 Updated proxy-manager version to ensure v2.3 or higher is notinstalled 2019-08-08 10:01:21 +02:00
Alejandro Celaya
dca3fb35c7 Improved build script 2019-08-08 09:56:53 +02:00
Alejandro Celaya
8484449d66 Merge pull request #445 from acelaya/feature/redis-missings
Feature/redis missings
2019-08-07 18:58:35 +02:00
Alejandro Celaya
6b8ca3e611 Updated SimplifiedConfigParser so that it properly converts the redis_servers keys and aliases the store as a side effect 2019-08-07 18:45:28 +02:00
Alejandro Celaya
73fd348490 Ensured Redis lock store is wrapped into a retry adapter 2019-08-07 17:37:24 +02:00
Alejandro Celaya
04389fc8b0 Added support in RedisFactory to provide servers as a comma-separated string 2019-08-07 17:01:09 +02:00
Alejandro Celaya
b0bb77ca81 Merge pull request #444 from acelaya/feature/redis-support
Feature/redis support
2019-08-07 16:31:47 +02:00
Alejandro Celaya
22598e75e8 Updated changelog 2019-08-07 16:20:23 +02:00
Alejandro Celaya
0f8dd1effb Added post processing mapping to define the lock store to be used 2019-08-07 16:16:53 +02:00
Alejandro Celaya
2c4a8543db Added redis container to docker compose 2019-08-07 16:07:40 +02:00
Alejandro Celaya
7aa246b550 Created RedisFactoryTest 2019-08-07 16:07:17 +02:00
Alejandro Celaya
1e294fe1bc Created RedisFactory which will create the redis adapter for the redis lock 2019-08-07 14:17:15 +02:00
Alejandro Celaya
dcfb12f454 Moved some classes to proper namespaces 2019-08-07 13:50:38 +02:00
Alejandro Celaya
685ee51e1f Made commands run indocker to use the shlink_php container instead of the shlink_swoole 2019-08-07 11:05:21 +02:00
Alejandro Celaya
8407fee96d Ensured generated installation config is not loaded on test envs 2019-08-07 10:59:05 +02:00
Alejandro Celaya
7c881377a9 Removed extra spaces 2019-08-06 21:18:01 +02:00
Alejandro Celaya
acf2961f9e Merge pull request #442 from acelaya/feature/locked-migrations-command
Feature/locked migrations command
2019-08-06 21:16:11 +02:00
Alejandro Celaya
f5faeb8f68 Updated changelog 2019-08-06 21:09:56 +02:00
Alejandro Celaya
8985a6932f Created MigrateDatabaseCommandTest 2019-08-06 21:06:14 +02:00
Alejandro Celaya
c04f0af56f Created command to run migrations with a lock 2019-08-06 20:48:48 +02:00
Alejandro Celaya
1341d4fe57 Merge pull request #440 from acelaya/feature/locked-installation
Feature/locked installation
2019-08-06 20:31:51 +02:00
Alejandro Celaya
bc3fc59b1e Fixed error on new database creation command when database platform is sqlite 2019-08-06 20:16:16 +02:00
Alejandro Celaya
e04838eaa2 Updated readme cli help 2019-08-06 18:56:47 +02:00
Alejandro Celaya
5d5d89afb9 Updated changelog 2019-08-06 18:49:32 +02:00
Alejandro Celaya
749671c230 Created CreateDatabaseCommandTest 2019-08-06 18:40:32 +02:00
Alejandro Celaya
e79c41d753 Created NoDbNameConnectionFactoryTest 2019-08-06 17:30:28 +02:00
Alejandro Celaya
a575f2eced Created new service which is the database connection but without the dbname, and used in in create db command 2019-08-05 18:48:33 +02:00
Alejandro Celaya
1aba77c752 Enforced fixed shlink-installer version 2019-08-05 10:27:38 +02:00
Alejandro Celaya
b68e262eac Implemented how the CreateDatabaseCommand checks if the database tables exist 2019-08-05 10:16:58 +02:00
Alejandro Celaya
f78fa58cf1 Updated CreateDatabaseCommand to create the empty database if it does not exist 2019-08-05 10:08:59 +02:00
Alejandro Celaya
3916b06e7c Added improvements and new steps to CreateDatabaseCommand 2019-08-04 21:31:37 +02:00
Alejandro Celaya
7fa1f1c63c Created empoty locked command to create shlink database 2019-08-04 11:30:35 +02:00
Alejandro Celaya
7ed85e8916 Moved locking logic for CLI commands to a common abstract class 2019-08-04 11:16:46 +02:00
Alejandro Celaya
94e1e6a7b6 Merge pull request #437 from acelaya/feature/decorate-em
Feature/decorate em
2019-08-02 20:13:58 +02:00
Alejandro Celaya
3cba3f7a4b Removed error which no longer needs to be supressed from phpstan 2019-08-02 19:56:24 +02:00
Alejandro Celaya
bfd2ce782c Created ReopeningEntityManagerTest 2019-08-02 19:53:19 +02:00
Alejandro Celaya
f99053d251 Created ReopeningEntityManagerDelegatorTest 2019-08-02 19:33:31 +02:00
Alejandro Celaya
bdc93a45b5 Created EntityManagerDecorator to handle the automatic reopening, and removed this behavior from ClosDbConnectionMiddleware 2019-08-02 19:28:10 +02:00
Alejandro Celaya
a771743756 Merge pull request #433 from acelaya/feature/coding-standard
Updated to coding-standard library v1.2.2
2019-08-01 20:00:55 +02:00
Alejandro Celaya
aff1df32f2 Updated to coding-standard library v1.2.2 2019-08-01 19:49:54 +02:00
Alejandro Celaya
3562afc2bd Merge pull request #432 from acelaya/feature/extended-ip-addresses
Feature/extended ip addresses
2019-08-01 18:42:53 +02:00
Alejandro Celaya
ac08ed7cf9 Updated changelog 2019-08-01 18:31:18 +02:00
Alejandro Celaya
9cb316bdfa Added more headers to inspect while looking for the remote IP address 2019-08-01 18:27:43 +02:00
Alejandro Celaya
6682b52159 Merge pull request #431 from acelaya/feature/close-db-on-error
Feature/close db on error
2019-07-31 21:19:08 +02:00
Alejandro Celaya
f5878a5e7b Ensured EntityManager is reopened by CloseDbConnectionMiddleware after an error closed it 2019-07-31 20:54:41 +02:00
Alejandro Celaya
406de16a0d Ensured database connection is closed even if an error is thrown during dispatch process 2019-07-31 20:08:46 +02:00
Alejandro Celaya
a73a59f184 Merge pull request #425 from SirFlip/master
Update wkhtmltoimage shlinkio/shlink#424
2019-07-31 16:28:30 +02:00
Hannes Filip
cca667cf46 Update wkhtmltoimage shlinkio/shlink#424 2019-07-31 16:03:32 +02:00
Alejandro Celaya
e6a63a9b85 Added missing explicit dependency 2019-07-25 23:05:51 +02:00
Alejandro Celaya
22630c7656 Merge pull request #421 from acelaya/bugfix/db-reader-proxy
Bugfix/db reader proxy
2019-07-23 22:27:40 +02:00
Alejandro Celaya
c9ec3b3b42 Fixed composer commands to be more aqurate based on their name 2019-07-23 22:17:49 +02:00
Alejandro Celaya
a6727c5382 Fixed coding styles 2019-07-23 22:09:38 +02:00
Alejandro Celaya
9fe2111d62 Updated changelog 2019-07-23 22:06:09 +02:00
Alejandro Celaya
173bfbd300 Updated tests to fit current implementations 2019-07-23 22:04:01 +02:00
Alejandro Celaya
999beef349 Fixed GeolocationDbUpdater so that it does not try to interact with the reader if the file does not exist, preventing later errors 2019-07-23 17:07:40 +02:00
Alejandro Celaya
c6fdd8a59f Improvements and ensured LocateVisitsCommand does not swallow exceptions 2019-07-23 16:41:32 +02:00
Alejandro Celaya
0ec7e8c41b Merge pull request #417 from acelaya/feature/swoole-tasks
Feature/swoole tasks
2019-07-20 12:35:43 +02:00
Alejandro Celaya
89e4ed5573 Update docs 2019-07-20 12:27:28 +02:00
Alejandro Celaya
4c76df91ce Added ConfigProviderTest for EventDispatcher module 2019-07-20 12:16:31 +02:00
Alejandro Celaya
a1c7e7d5da Updated tests 2019-07-20 12:11:07 +02:00
Alejandro Celaya
f28540a53e Updated GeolocationDbUpdater so that it handles a lock which prevents the db to be updated in parallel 2019-07-20 11:30:26 +02:00
Alejandro Celaya
e0e522c3f5 Updated LocateShortUrlVisit listener so that it updates geolite db is needed 2019-07-20 11:21:00 +02:00
Alejandro Celaya
37e286df48 Created more tests 2019-07-20 10:47:12 +02:00
Alejandro Celaya
bc99ee6ebe Created EventListenerTaskTest 2019-07-19 21:16:09 +02:00
Alejandro Celaya
7e8126a421 Added AsyncEventListenerTest 2019-07-19 21:06:34 +02:00
Alejandro Celaya
af4ee8f7ec Created TaskRunnerTest 2019-07-19 20:59:06 +02:00
Alejandro Celaya
af40e8de5c Improved ListenerProviderFactoryTest 2019-07-19 20:28:56 +02:00
Alejandro Celaya
d086131630 Moved all event-dispatching stuff to its own module 2019-07-19 19:54:39 +02:00
Alejandro Celaya
bccc177414 Created task running system based on event listener which are transparently cast into tasks 2019-07-18 19:07:07 +02:00
Alejandro Celaya
0dfadcbb4a Added package to delegate the execution of event listeners to a swoole task worker 2019-07-14 10:46:31 +02:00
Alejandro Celaya
4380b62715 Fixed event handler not being properly registered as a service 2019-07-13 15:47:19 +02:00
Alejandro Celaya
91698034e7 Added event dispatcher to track when a short URL is visited 2019-07-13 12:04:21 +02:00
Alejandro Celaya
014eb2a924 Merge pull request #415 from acelaya/feature/get-meta
Feature/get meta
2019-07-08 19:01:22 +02:00
Alejandro Celaya
96357a57d2 Updated changelog 2019-07-08 18:51:20 +02:00
Alejandro Celaya
c7cfdffaf6 Documented new meta param on swagger docs 2019-07-08 18:42:53 +02:00
Alejandro Celaya
46a27a9d0a Added meta property to ShortUrlDataTransformer 2019-07-08 18:23:38 +02:00
Alejandro Celaya
35950a6294 Added release title to changelog 2019-05-13 20:07:33 +02:00
Alejandro Celaya
c104eee2b1 Merge pull request #408 from acelaya/feature/improve-logs
Renamed Swoole logger to Access logger
2019-05-13 19:30:39 +02:00
Alejandro Celaya
f0972c6220 Removed optional dependency constraints used for no longer support PHP versions 2019-05-13 19:21:59 +02:00
Alejandro Celaya
42a5145895 Renamed Swoole logger to Access logger 2019-05-13 19:16:14 +02:00
Alejandro Celaya
8d412e7d4c Merge pull request #407 from acelaya/feature/edit-patch
Feature/edit patch
2019-05-05 10:22:52 +02:00
Alejandro Celaya
f45e34cfcf Documented deprecated endpoint 2019-05-05 09:52:49 +02:00
Alejandro Celaya
320c8e2d6b Ensured accepted methods on CORS requests are dynamically fetched from route match when possible 2019-05-05 09:45:35 +02:00
Alejandro Celaya
988de0b96e Updated edit short URL endpoint to be used with patch instead of put 2019-05-05 09:21:57 +02:00
Alejandro Celaya
25a785dfa7 Merge pull request #404 from acelaya/feature/config-post-processor
Feature/config post processor
2019-04-18 10:59:50 +02:00
Alejandro Celaya
c993bbd993 Updated changelog 2019-04-18 10:47:26 +02:00
Alejandro Celaya
479760c0ee Created config post processor that parses a simplified config to what shlink expects 2019-04-18 10:37:38 +02:00
Alejandro Celaya
e186237410 Merge pull request #403 from acelaya/feature/tweaks
Removed superfluous option from command tester
2019-04-14 22:28:00 +02:00
Alejandro Celaya
4084e3f0d8 Removed superfluous option from command tester 2019-04-14 22:20:58 +02:00
Alejandro Celaya
dddf64031f Merge pull request #402 from acelaya/feature/update-db-on-process
Feature/update db on process
2019-04-14 18:15:40 +02:00
Alejandro Celaya
8f1477e893 Updated changelog 2019-04-14 18:07:23 +02:00
Alejandro Celaya
4866fe241e Updated LocateVisitsCommand to update the database if needed 2019-04-14 18:00:19 +02:00
Alejandro Celaya
6613cb5c60 Updated amount of days to wait for the GeoLite2 database to be updated 2019-04-14 13:18:03 +02:00
Alejandro Celaya
0f48dd567f Registered GeolocationDbUpdater service and added callable which is invoked when db is going to be updated 2019-04-14 11:19:21 +02:00
Alejandro Celaya
b24511b7b5 Created service that updated GeoLite database when it is older than 7 days 2019-04-14 10:54:01 +02:00
Alejandro Celaya
df40199134 Renamed common config files so that they have the same preffix 2019-04-14 10:25:32 +02:00
Alejandro Celaya
935562acc9 Created exception to handle cases in which downloading a new geolite db fails 2019-04-14 10:10:20 +02:00
Alejandro Celaya
feb67e76f0 Updated commands 2019-04-14 09:10:00 +02:00
Alejandro Celaya
fdbe93f0fb Merge pull request #401 from acelaya/feature/templates
Feature/templates
2019-04-14 09:07:04 +02:00
Alejandro Celaya
f27058e255 Updated lang files 2019-04-14 08:59:55 +02:00
Alejandro Celaya
6ddbbb4ba0 Restyled error templates and removed copyright 2019-04-14 08:57:48 +02:00
Alejandro Celaya
ef32f2c129 Merge pull request #400 from acelaya/feature/simplify-cache
Dropped support for all caches other than APCu and Array
2019-04-11 22:56:54 +02:00
Alejandro Celaya
760bb2db2a Removed redis from dockerfiles for dev 2019-04-11 22:39:55 +02:00
Alejandro Celaya
68f38fd9fe Dropped support for all caches other than APCu and Array 2019-04-11 22:36:50 +02:00
Alejandro Celaya
5c6829fb62 Merge pull request #398 from acelaya/feature/issue-template
Created issue template with some reminders
2019-04-11 22:11:21 +02:00
Alejandro Celaya
91c48919c6 Excluded gihub dir from build 2019-04-11 22:01:35 +02:00
Alejandro Celaya
72313800fa Created issue template with some reminders 2019-04-11 21:57:12 +02:00
Alejandro Celaya
478d5a16fd Merge pull request #395 from acelaya/feature/drop-php7.1
Feature/drop php7.1
2019-04-09 22:51:17 +02:00
Alejandro Celaya
b8909d8043 Updated changelog 2019-04-09 22:43:01 +02:00
Alejandro Celaya
c2c659b0fe Dropped support for PHP 7.1 2019-04-09 22:40:15 +02:00
Alejandro Celaya
20c3bde036 Merge pull request #387 from acelaya/feature/fix-check-exists
Feature/fix check exists
2019-03-30 08:04:44 +01:00
Alejandro Celaya
e77e37076f Updated changelog 2019-03-30 07:48:54 +01:00
Alejandro Celaya
734fdf83c1 Added test covering the case in which fetching existing short URLs, more than one result is found 2019-03-30 07:45:57 +01:00
Alejandro Celaya
2906d42f97 Updated how existing short URLs are checked, so that not only the first one matching the slug or url is checked 2019-03-30 07:36:57 +01:00
Alejandro Celaya
0135f205df Updated changelog 2019-03-17 17:54:57 +01:00
Alejandro Celaya
781c6e94a0 Merge pull request #381 from acelaya/feature/update-db-errors
Feature/update db errors
2019-03-16 11:25:32 +01:00
Alejandro Celaya
1d64dc8a26 Updated changelog 2019-03-16 11:11:39 +01:00
Alejandro Celaya
34ff831473 Added support to ignore errors in UpdateDbCommand 2019-03-16 11:08:12 +01:00
Alejandro Celaya
3734160cb4 Used phpcov v6 stable 2019-03-16 10:31:13 +01:00
Alejandro Celaya
21234cacfb Merge pull request #380 from acelaya/feature/reload-swoole
Feature/reload swoole
2019-03-16 10:29:13 +01:00
Alejandro Celaya
eb4dc85006 Updated to expressive swoole 2.4 2019-03-16 10:15:21 +01:00
Alejandro Celaya
249b8a4768 Added config to reload swoole during development 2019-03-16 09:57:09 +01:00
Alejandro Celaya
1a1868c7f4 Merge pull request #374 from acelaya/feature/migrations-v2
Feature/migrations v2
2019-03-09 18:54:51 +01:00
Alejandro Celaya
487659d5b4 Updated changelog 2019-03-09 18:47:58 +01:00
Alejandro Celaya
f46de4d3e1 Updated to doctrine migrations 2 2019-03-09 18:45:58 +01:00
Alejandro Celaya
6314315db7 Merge pull request #370 from acelaya/feature/extended-db-tests
Feature/extended db tests
2019-03-05 21:10:16 +01:00
Alejandro Celaya
a22beeed08 Replaced localhost name by 127.0.0.1 for databases when in travis 2019-03-05 21:01:52 +01:00
Alejandro Celaya
840e377245 Added execution of db tests with mysql and postgres to travis 2019-03-05 20:50:32 +01:00
Alejandro Celaya
6fa255386b Defined config to run database tests against mysql and postgres 2019-03-05 20:36:35 +01:00
Alejandro Celaya
f563e777cc Merge pull request #369 from acelaya/feature/postgres-query-error
Feature/postgres query error
2019-03-05 14:26:36 +01:00
Alejandro Celaya
a63447b12b Updated changelog 2019-03-05 14:17:47 +01:00
Alejandro Celaya
0f81c3ab92 Fixed error when using postgres in a SELECT count query where a ORDER BY was added by mistake 2019-03-05 13:50:44 +01:00
Alejandro Celaya
425f254453 Added posgres container for development 2019-03-05 13:39:45 +01:00
Alejandro Celaya
a9d9ec5bf9 Merge pull request #365 from acelaya/feature/coding-styles
Feature/coding styles
2019-02-26 23:06:08 +01:00
Alejandro Celaya
0c5c752ffe Updated changelog 2019-02-26 22:58:03 +01:00
Alejandro Celaya
4b556cd79f Updated to shlinkio coding standard 1.1.0 2019-02-26 22:56:43 +01:00
Alejandro Celaya
3d32a90f8e Merge pull request #364 from acelaya/bugfix/non-locatable-addresses
Bugfix/non locatable addresses
2019-02-26 22:53:07 +01:00
Alejandro Celaya
0b4c334163 Fixed typo 2019-02-26 22:42:33 +01:00
Alejandro Celaya
312fc0984b Fixed mutation score by provideing more tests 2019-02-26 22:41:04 +01:00
Alejandro Celaya
30bf1c2641 Added tests for new cases with non-locatable addresses 2019-02-26 22:31:07 +01:00
Alejandro Celaya
2d1d7357a3 Given more semantic cases in which a visit cannot be located 2019-02-26 21:39:45 +01:00
Alejandro Celaya
c70077c525 Merge pull request #361 from acelaya/feature/paginated-visits
Feature/paginated visits
2019-02-23 10:09:46 +01:00
Alejandro Celaya
d2fad0128f Fixed bug missing unprocessed visits while iterating and updating, while drastically improving the performance 2019-02-23 09:58:02 +01:00
Alejandro Celaya
62133c994f Tagged v1.16 in changelog 2019-02-23 08:30:35 +01:00
Alejandro Celaya
091ea974eb Simplified implementation iterating unlocated visits 2019-02-23 07:29:07 +01:00
Alejandro Celaya
955ae00036 Updated changelog 2019-02-22 19:54:23 +01:00
Alejandro Celaya
7d4de590e5 Created ImplicitLoopPaginatorTest 2019-02-22 19:53:10 +01:00
Alejandro Celaya
292937b962 Updated VisitRepository::findUnlocatedVisits methods so that it paginates the amount of elements loaded in memory 2019-02-22 19:31:03 +01:00
Alejandro Celaya
08bd4f131c Merge pull request #359 from acelaya/feature/memory-leak
Feature/memory leak
2019-02-20 18:09:00 +01:00
Alejandro Celaya
38cc83a4ee Removed uneeded inline type hints 2019-02-17 20:32:18 +01:00
Alejandro Celaya
687a1cc9c7 Reduced amount of dead lines in tests 2019-02-17 20:28:34 +01:00
Alejandro Celaya
1bcd03b150 Renamed method 2019-02-17 13:21:07 +01:00
Alejandro Celaya
e2abe23895 Defined stricter model to represent one geo location 2019-02-17 13:01:21 +01:00
Alejandro Celaya
5c5dde48de Ensured install and update script change to the project dir 2019-02-17 10:51:22 +01:00
Alejandro Celaya
d9f11e190f Merge pull request #357 from acelaya/feature/phpstan0.11
Feature/phpstan0.11
2019-02-17 10:19:14 +01:00
Alejandro Celaya
1ab2d7a240 Increased scrutinizer timeout while waiting for code coverage, from 5 min to 10 min 2019-02-17 10:12:13 +01:00
Alejandro Celaya
580050cb7d Updated to phpstan 0.11 2019-02-17 10:06:34 +01:00
Alejandro Celaya
eab5659163 Added status codes returned by CLI commands 2019-02-16 23:21:40 +01:00
Alejandro Celaya
397b350cfc Merge pull request #356 from acelaya/feature/deprecated-commands
Deprecated commands to generate secret and charset
2019-02-16 23:20:55 +01:00
Alejandro Celaya
c0130c997a Deprecated commands to generate secret and charset 2019-02-16 22:53:49 +01:00
Alejandro Celaya
fd7f1b32dd Merge pull request #354 from acelaya/feature/infection
Feature/infection
2019-02-16 22:25:13 +01:00
Alejandro Celaya
0e286d8261 Temporarely downgrading phpstan 2019-02-16 22:17:01 +01:00
Alejandro Celaya
ce7d2d1fb0 Fixed coding styles 2019-02-16 22:04:11 +01:00
Alejandro Celaya
2175b8a7bb Improved tests to increase MSI to 70% 2019-02-16 21:58:14 +01:00
Alejandro Celaya
6c0893cdf8 Improved tests to increase MSI to 69% 2019-02-16 21:24:32 +01:00
Alejandro Celaya
25927a296d Merge pull request #353 from acelaya/feature/testing-tools
Updated testing tools
2019-02-16 20:50:22 +01:00
Alejandro Celaya
ee4db44fe8 Fixed phpcov dep not properly resolved on PHP 7.1 envs 2019-02-16 20:39:46 +01:00
Alejandro Celaya
b8cb38ae5c Updated testing tools 2019-02-16 10:53:45 +01:00
Alejandro Celaya
899bfdce2b Merge pull request #352 from acelaya/feature/configure-installer
Updated required shlink-installer version and added config for instal…
2019-02-10 22:05:03 +01:00
Alejandro Celaya
456960e1f0 Updated required shlink-installer version and added config for installer plugins 2019-02-10 21:57:29 +01:00
Alejandro Celaya
04e03e9b6e Merge pull request #348 from acelaya/feature/external-installer
Feature/external installer
2019-02-06 23:56:10 +01:00
Alejandro Celaya
a7283da016 Updated changelog 2019-02-06 23:31:37 +01:00
Alejandro Celaya
672321abab Removed class which is now part of the installer package 2019-02-04 20:16:29 +01:00
Alejandro Celaya
2059b4050b Removed installer and used external package instead 2019-02-04 20:14:59 +01:00
Alejandro Celaya
171b43c517 Fixed some configs 2019-02-04 19:43:21 +01:00
Alejandro Celaya
ccb7c8f8d9 Merge pull request #345 from acelaya/bugfix/charset-installation
Bugfix/charset installation
2019-02-03 13:19:23 +01:00
Alejandro Celaya
abbc66ac07 Unified config for installer tool 2019-02-03 13:12:17 +01:00
Alejandro Celaya
2d18ef5cee Updated installer so that it no longer asks for a charset and instead just generates one 2019-02-03 13:02:12 +01:00
Alejandro Celaya
79c132219b Merge pull request #343 from acelaya/feature/allow-check-duplicates
Feature/allow check duplicates
2019-02-03 12:22:22 +01:00
Alejandro Celaya
04d4d4a8d7 Updated GenerateShortUrlCommand to accept the findIfExists flag 2019-02-03 12:11:22 +01:00
Alejandro Celaya
a918113ba0 Documented new findIfExists flag 2019-02-03 11:24:26 +01:00
Alejandro Celaya
810b25ff14 Added API tests covering creating short URLs with new findIfExists param 2019-02-03 11:01:38 +01:00
Alejandro Celaya
c4fd8d5120 Implemented feature to optionally return an existing short url when all provided params match an existing one 2019-02-03 09:40:32 +01:00
Alejandro Celaya
772494f46f Moved process of sluggifying custom slug to a filter 2019-02-03 08:17:27 +01:00
Alejandro Celaya
594e7da256 Created new findIfExists meta param 2019-02-02 11:05:28 +01:00
Alejandro Celaya
49668547d7 Fixed typo 2019-02-02 11:05:28 +01:00
Alejandro Celaya
4c46aaead8 Improved API tests and added test for short URLs creation 2019-02-02 11:05:28 +01:00
Alejandro Celaya
d61f5faf59 Refactored UrlShortener public method to receibe DTOs instead of primitive params 2019-02-02 11:05:28 +01:00
Alejandro Celaya
5756609531 Deleted deprecated constant 2019-02-02 11:05:28 +01:00
Alejandro Celaya
ea1b285d52 Little refactopring on tests config file 2019-02-02 11:05:28 +01:00
Alejandro Celaya
bc61b55b94 Merge pull request #344 from acelaya/feature/update-dev-docker
Updated docker containers used in development
2019-02-02 11:04:39 +01:00
Alejandro Celaya
48f6a96da8 Updated docker containers used in development 2019-02-02 10:53:34 +01:00
Alejandro Celaya
967f1657d2 Merge pull request #340 from acelaya/bugfix/preview-error
Bugfix/preview error
2019-01-28 11:00:23 +01:00
Alejandro Celaya
f90a323374 Updated changelog 2019-01-28 10:53:24 +01:00
Alejandro Celaya
d289c62532 Fixed config file being deleted by mistake by build script 2019-01-28 10:52:05 +01:00
Alejandro Celaya
05695e8cd6 Merge pull request #339 from acelaya/feature/api-test
Feature/api test
2019-01-27 12:49:59 +01:00
Alejandro Celaya
d6a7a6ce66 Created new API test 2019-01-27 12:36:22 +01:00
Alejandro Celaya
05c7672de3 Improved API tests by adding fixtures 2019-01-27 12:14:22 +01:00
Alejandro Celaya
ce515767ce Updated changelog 2019-01-27 10:56:14 +01:00
Alejandro Celaya
76d8fd1023 Improved how API tests are executed 2019-01-27 10:54:04 +01:00
Alejandro Celaya
558e259b84 Minor refactorings 2019-01-27 10:30:38 +01:00
Alejandro Celaya
f467bed24c Used multiple commands with && instead of composer array for API tests command 2019-01-27 10:15:48 +01:00
Alejandro Celaya
fa753ad6fb Added api test to test:ci command 2019-01-26 11:04:50 +01:00
Alejandro Celaya
22d61fead7 Prepared configs for API tests 2019-01-26 10:19:20 +01:00
Alejandro Celaya
c4af1471f0 Simplified and united configs for tests 2019-01-26 09:42:08 +01:00
Alejandro Celaya
87ba7a7179 Updated structure for tests config files 2019-01-26 09:09:57 +01:00
Alejandro Celaya
e7c5cf0846 Merge pull request #337 from acelaya/feature/db-tests
Feature/db tests
2019-01-21 21:34:30 +01:00
Alejandro Celaya
1aaedb8d90 Udated changelog 2019-01-21 21:27:16 +01:00
Alejandro Celaya
284de28f76 Removed duplicated code to define testing database connection params 2019-01-20 22:08:32 +01:00
Alejandro Celaya
687d8d91a9 Changed references to functional tests by database tests 2019-01-20 21:49:07 +01:00
Alejandro Celaya
771087c6c6 Happy 2019! 2019-01-05 08:41:48 +01:00
Alejandro Celaya
1fd3e6365e Merge pull request #331 from acelaya/feature/health
Feature/health
2018-12-29 14:51:08 +01:00
Alejandro Celaya
28989296eb Updated changelog 2018-12-29 14:45:20 +01:00
Alejandro Celaya
fd8d73af38 Documented health endpoint 2018-12-29 14:39:31 +01:00
Alejandro Celaya
144a5415da Handled connection exceptions in Health action 2018-12-29 13:50:42 +01:00
Alejandro Celaya
d58e24bce5 Created health action related tests 2018-12-29 11:54:28 +01:00
Alejandro Celaya
0f86123ccb Finished health action implementation 2018-12-29 11:54:28 +01:00
Alejandro Celaya
3f65ef998c Created HealthAction 2018-12-29 11:54:28 +01:00
Alejandro Celaya
29d49dfbf4 Merge pull request #332 from acelaya/feature/php7.3
Do not allow failures on PHP 7.3 build
2018-12-29 11:53:44 +01:00
Alejandro Celaya
701d17f6f2 Do not allow failures on PHP 7.3 build 2018-12-29 11:43:28 +01:00
Alejandro Celaya
642431c43e Reverted to diactoros v2.0.1 while a bug is fixed 2018-12-29 11:13:23 +01:00
Alejandro Celaya
3c5b47784d Merge pull request #329 from PeterDaveHello/Update-Travis-CI-Config
Drop deprecated Travis CI container-based env config
2018-12-29 09:36:02 +01:00
Peter Dave Hello
64d7fe8bbf Drop deprecated Travis CI container-based env config
Ref: https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures
2018-12-29 16:20:18 +08:00
Alejandro Celaya
32070b1fa7 Do not use ServerRequestFactory::fromGlobals in tests 2018-12-25 23:19:36 +01:00
Alejandro Celaya
8b3324e143 Merge pull request #327 from PeterDaveHello/Add-Table-of-Contents
Add Table of Contents in README.md
2018-12-25 10:52:21 +01:00
Peter Dave Hello
f40a5a029c Add Table of Contents in README.md 2018-12-25 14:12:16 +08:00
Alejandro Celaya
eac82a602c Merge pull request #325 from acelaya/feature/dql
Feature/dql
2018-12-19 17:47:10 +01:00
Alejandro Celaya
d1312e0934 Added unreleased changes to changelog 2018-12-19 14:37:47 +01:00
Alejandro Celaya
58dbee10c5 Used DQL for non-dynamic query in VisitRepository 2018-12-19 14:36:03 +01:00
Alejandro Celaya
f8207994dc Removed superfluous method docs 2018-12-19 14:31:52 +01:00
Alejandro Celaya
2030401859 Migrated non-dynamic query to DQL in ShortUrlRepository 2018-12-19 14:29:43 +01:00
Alejandro Celaya
8966cf9910 Merge pull request #323 from acelaya/feature/docker-build
Feature/docker build
2018-12-16 19:40:32 +01:00
Alejandro Celaya
4eb4df9ca2 Updated changelog 2018-12-16 13:19:44 +01:00
Alejandro Celaya
32861b1c72 Added new travis deployment which will build the docker image 2018-12-16 13:19:17 +01:00
Alejandro Celaya
7248ca2e9b Merge pull request #324 from acelaya/feature/entities-config
Moved entities mappings from annotations to external config files
2018-12-16 13:18:19 +01:00
Alejandro Celaya
a6ec93f883 Updated changelog 2018-12-16 12:14:13 +01:00
Alejandro Celaya
a28c1d17c5 Moved entities mappings from annotations to external config files 2018-12-16 12:08:03 +01:00
Alejandro Celaya
fb705b44a4 Merge pull request #318 from acelaya/feature/document-non-rest
Feature/document non rest
2018-12-09 16:35:59 +01:00
Alejandro Celaya
a32bab9fd0 Updated changelog 2018-12-09 16:25:24 +01:00
Alejandro Celaya
6396e7f964 Added other of non-rest endpoints 2018-12-09 15:43:56 +01:00
Alejandro Celaya
c898cef277 Documented first non-rest endpoint 2018-12-09 15:18:10 +01:00
Alejandro Celaya
baeba54b06 Merge branch 'master' of github.com:shlinkio/shlink 2018-12-09 14:22:40 +01:00
Alejandro Celaya
f5ee5bf7fb Documented that swoole server needs to be restarted when it is being used ot serve shlink 2018-12-09 14:22:21 +01:00
Alejandro Celaya
73605414f9 Merge pull request #316 from acelaya/feature/symfony-42
Feature/symfony 42
2018-12-08 14:30:20 +01:00
Alejandro Celaya
6045c371e1 Updated changelog 2018-12-08 14:12:50 +01:00
Alejandro Celaya
97a9289d5f Created ShlinkTableTest 2018-12-08 14:11:14 +01:00
Alejandro Celaya
1983fc9b67 Added current page message in list short urls CLI command 2018-12-08 12:16:39 +01:00
Alejandro Celaya
bb40d84212 Used ShlinkTable on every location rendering a CLI table 2018-12-08 12:12:11 +01:00
Alejandro Celaya
46a35c553e Created class to wrap CLI table rendering behavior 2018-12-08 11:32:16 +01:00
Alejandro Celaya
080943e810 Updated how Symfony commands are used to fulfill API from v4.2 2018-12-08 10:34:04 +01:00
Alejandro Celaya
62fb3863c6 Merge pull request #315 from acelaya/feature/config
Updated how config is imported and merged, so that it includes any co…
2018-12-07 20:56:57 +01:00
Alejandro Celaya
2db03a163d Updated how config is imported and merged, so that it includes any config file in json format from config/params dir 2018-12-07 20:48:20 +01:00
Alejandro Celaya
9e3dd82efe Merge pull request #314 from acelaya/feature/fix-context
Feature/fix context
2018-12-07 20:30:53 +01:00
Alejandro Celaya
9f1989bfef Updated changelog 2018-12-07 19:49:17 +01:00
Alejandro Celaya
c0bdd8fc77 Removed concept of execution context and piped CloseDbConnectionMiddleware always 2018-12-07 19:46:46 +01:00
Alejandro Celaya
8a23c90e46 Merge pull request #313 from acelaya/feature/favicon
Feature/favicon
2018-12-07 09:45:55 +01:00
Alejandro Celaya
9095e5b057 Enabled static files with swoole, otherwise, robots.txt and favicon.ico are never served when running shlink with swoole 2018-12-07 09:38:07 +01:00
Alejandro Celaya
52c18115af Updated changelog 2018-12-07 09:18:56 +01:00
Alejandro Celaya
737137b19f Added favicon 2018-12-07 09:17:31 +01:00
Alejandro Celaya
7b78bee135 Merge pull request #311 from acelaya/feature/improvements
Feature/improvements
2018-12-07 02:55:27 +01:00
Alejandro Celaya
accda36a7b Updated default secret_key value 2018-12-07 02:49:50 +01:00
Alejandro Celaya
69dd9eb067 Updated readme mentioning docker image 2018-12-07 02:41:06 +01:00
Alejandro Celaya
a562bc661d Improved CacheFactory class 2018-12-06 21:05:11 +01:00
Alejandro Celaya
258f12f684 Merge pull request #303 from acelaya/feature/expressive-swoole-2.2
Feature/expressive swoole 2.2
2018-12-05 21:46:48 +01:00
Alejandro Celaya
4dc8d77a5a Updated changelog 2018-12-05 21:29:16 +01:00
Alejandro Celaya
7c5825d1bc Removed custom AccessLogFactory by updating to zend-expressive-swoole 2.2 2018-12-05 21:26:19 +01:00
Alejandro Celaya
6ba4d8e947 Merge pull request #299 from acelaya/feature/repository-tests
Improved repository tests
2018-12-02 19:24:19 +01:00
Alejandro Celaya
3faf6e967f Updated changelog adding v1.15 2018-12-02 19:15:58 +01:00
Alejandro Celaya
a7a5667301 Improved repository tests 2018-12-02 19:13:49 +01:00
Alejandro Celaya
d4924897b2 Merge pull request #298 from acelaya/feature/document-swoole
Feature/document swoole
2018-12-02 10:10:00 +01:00
Alejandro Celaya
f2d39ca55a Added missing comma 2018-12-02 10:05:33 +01:00
Alejandro Celaya
743d052f55 Documented how to serve shlink using swoole 2018-12-02 09:56:52 +01:00
Alejandro Celaya
17dbab5ee8 Created config file examples to serve shlink using different approaches 2018-12-02 09:41:25 +01:00
Alejandro Celaya
8cb5e07c7b Merge pull request #297 from acelaya/feature/remove-helpers
Removed non-needed services from expressive-helpers
2018-12-01 21:59:24 +01:00
Alejandro Celaya
e9972783d2 Removed non-needed services from expressive-helpers 2018-12-01 21:53:46 +01:00
Alejandro Celaya
84f6080a38 Merge pull request #296 from acelaya/feature/fix-lowercase
Feature/fix lowercase
2018-12-01 21:47:40 +01:00
Alejandro Celaya
1b5c1e4e52 Updated changelog 2018-12-01 21:40:11 +01:00
Alejandro Celaya
d7e89ebdae Ensured custom slugs are case sensitive 2018-12-01 21:38:29 +01:00
Alejandro Celaya
aa413dab6d Configured improvements introduced in expressive swoole 2.1 2018-11-29 21:14:24 +01:00
Alejandro Celaya
b876870bd8 Encapsulated in VisitsParams how the itemsPerPage param is handled 2018-11-29 08:02:22 +01:00
Alejandro Celaya
05e56cc845 Merge pull request #293 from acelaya/feature/visits-pagination
Feature/visits pagination
2018-11-28 21:00:37 +01:00
Alejandro Celaya
d6c158ce98 Updated changelog 2018-11-28 20:55:07 +01:00
Alejandro Celaya
1d4ef4e9a4 Ensured pagination params in visits list are properly parsed to integer 2018-11-28 20:53:04 +01:00
Alejandro Celaya
4d2684be52 Updated swagger docs for visits including everything related to pagination 2018-11-28 20:46:52 +01:00
Alejandro Celaya
6947805b5c Updated to zend-expressive-swoole 2.0.1 removing all workarounds 2018-11-28 20:43:44 +01:00
Alejandro Celaya
d0e0aea0f1 Updated visits to support pagination 2018-11-28 20:39:08 +01:00
Alejandro Celaya
b0f250ed8a Created factory method to build VisitParams from a raw dataset 2018-11-28 19:58:45 +01:00
Alejandro Celaya
45254606d4 Added DTO used to pass filtering params to VisitsTracker 2018-11-27 21:09:27 +01:00
Alejandro Celaya
03ee46d903 Merge pull request #290 from acelaya/feature/coding-standard
Updated project to use external coding standard
2018-11-26 20:53:51 +01:00
Alejandro Celaya
c4afc7a923 Updated project to use external coding standard 2018-11-26 20:46:43 +01:00
Alejandro Celaya
afa2a5b0f0 Merge pull request #284 from acelaya/feature/swoole
Feature/swoole
2018-11-25 22:12:50 +01:00
Alejandro Celaya
b40057d423 Fixed typo in changelog 2018-11-25 21:33:25 +01:00
Alejandro Celaya
282ffef200 Ensured different loggers are used for swoole and for the app regular logs 2018-11-25 17:14:03 +01:00
Alejandro Celaya
22b02de405 Updated swoole docker image so that it retries the start command until status code is 0 2018-11-25 12:44:49 +01:00
Alejandro Celaya
f0330e9ae3 Ensured CloseDbConnectionMiddleware clears the entity manager 2018-11-24 13:24:43 +01:00
Alejandro Celaya
0c26490e3f Added info about swoole in changelog 2018-11-24 13:18:50 +01:00
Alejandro Celaya
cfaecd93e4 Added swoole extension to travis 2018-11-24 13:11:26 +01:00
Alejandro Celaya
ccbc6c7a75 Created middleware which closes DB connection after every request 2018-11-24 12:55:00 +01:00
Alejandro Celaya
2fc2ad98aa Updated config so that shlink logger dynamically uses standard output when running with swoole 2018-11-24 09:38:00 +01:00
Alejandro Celaya
16590b2dbb Prepared project to support both swoole and regular app servers with fast cgi 2018-11-24 08:43:48 +01:00
Alejandro Celaya
f40349479e Used more strict types in UrlShortener private methods 2018-11-24 07:52:57 +01:00
Alejandro Celaya
9f60c8dffe Merge pull request #280 from acelaya/feature/oneliner-type
Feature/oneliner type
2018-11-20 19:42:23 +01:00
Alejandro Celaya
5abd9d1a40 Made test properties to be private instead of protected 2018-11-20 19:37:22 +01:00
Alejandro Celaya
0ae5a53d86 Enforced property types comments in one line 2018-11-20 19:30:27 +01:00
Alejandro Celaya
15a70d0157 Merge pull request #278 from acelaya/feature/del-translations
Feature/del translations
2018-11-18 20:30:53 +01:00
Alejandro Celaya
ededb68ef1 Added changelog for unreleased changes 2018-11-18 20:20:30 +01:00
Alejandro Celaya
09add5fbff Moved locale middleware to before the not found handler, so that it never gets executed otherwise 2018-11-18 20:15:37 +01:00
Alejandro Celaya
e30f49a791 Simplified error templates 2018-11-18 20:04:12 +01:00
Alejandro Celaya
64737b741b Removed CLI language param from installation 2018-11-18 19:55:23 +01:00
Alejandro Celaya
d4d65bdf37 Added missing X-Api-Key header to cross domain middleware 2018-11-18 17:03:50 +01:00
Alejandro Celaya
90732a4fad Removed translations from Rest module 2018-11-18 16:28:04 +01:00
Alejandro Celaya
c5015f5828 Removed translations from CLI module 2018-11-18 16:02:52 +01:00
Alejandro Celaya
aa77c944d8 Merge pull request #277 from acelaya/feature/increase-msi
Feature/increase msi
2018-11-17 19:37:11 +01:00
Alejandro Celaya
b8faa6714a Increased MSI to 65% (for sure this time) 2018-11-17 19:32:31 +01:00
Alejandro Celaya
f48f98f4d7 Updated changelog for v1.14.1 2018-11-17 19:27:00 +01:00
Alejandro Celaya
79b2a0839f Increased MSI to 65% 2018-11-17 19:23:49 +01:00
Alejandro Celaya
6094d17718 Increased MSI to 64% 2018-11-17 18:40:53 +01:00
Alejandro Celaya
d2ed7d6417 Increased MSI to 62% 2018-11-17 18:06:21 +01:00
Alejandro Celaya
a705ef21a9 Increased MSI to 61% 2018-11-17 17:36:22 +01:00
Alejandro Celaya
67e465c479 Merge pull request #276 from acelaya/feature/locking
Feature/locking
2018-11-17 14:33:58 +01:00
Alejandro Celaya
ed3883b52c Updated translations 2018-11-17 14:29:54 +01:00
Alejandro Celaya
71ea0bcb5e Updated changelog with locking capabilities 2018-11-17 14:24:38 +01:00
Alejandro Celaya
dd2cffeee9 Reused ProcessVisitsCommand name as the lock name 2018-11-17 14:16:45 +01:00
Alejandro Celaya
1ceabf3bc3 Added locking capabilities to process visits command 2018-11-17 14:11:16 +01:00
Alejandro Celaya
17fcd637f2 Merge pull request #275 from acelaya/feature/doctrine-performance
Feature/doctrine performance
2018-11-17 09:59:53 +01:00
Alejandro Celaya
d44bc4b182 Added small hint in README 2018-11-17 09:49:44 +01:00
Alejandro Celaya
4760406221 Updated changelog 2018-11-17 09:47:14 +01:00
Alejandro Celaya
0aae0d888c Moved visits iteration logic from command to service to allow lazy loading of entries in resultset 2018-11-17 09:42:15 +01:00
Alejandro Celaya
1bc01057f3 Reduced the number of arguments in private method 2018-11-17 08:02:42 +01:00
Alejandro Celaya
c1906606c6 Updated VisitService to have a method which locates visits and allows entity manager to be cleared 2018-11-17 07:47:42 +01:00
Alejandro Celaya
1363194909 Improved code in LoggerFactory 2018-11-17 07:31:51 +01:00
Alejandro Celaya
d945e0c31b Updated CLI help in README file 2018-11-16 17:17:25 +01:00
Alejandro Celaya
0af7b75af5 Merge pull request #269 from acelaya/feature/missing-resp-examples
Feature/missing resp examples
2018-11-16 17:07:38 +01:00
Alejandro Celaya
36a42cb064 Added missing entries for v1.14.0 2018-11-16 17:02:40 +01:00
Alejandro Celaya
4db0acc0e7 Updated swagger response schemas and added missing response examples 2018-11-16 16:58:21 +01:00
Alejandro Celaya
8f4800aa47 Merge pull request #268 from acelaya/feature/phpstan-fix
feature/phpstan-fix
2018-11-16 16:57:30 +01:00
Alejandro Celaya
4745a37549 Used a lower level on phpstan to avoid errors produced by Symfony 4.1.5 new phpdocs 2018-11-16 16:44:48 +01:00
Alejandro Celaya
8fc949898b Excluded GeoLite2 db from build process 2018-11-12 21:51:14 +01:00
Alejandro Celaya
d4758b0e91 Merge pull request #258 from acelaya/feature/geolocation
Feature/geolocation
2018-11-12 21:46:33 +01:00
Alejandro Celaya
a07e4b17be Updated docs 2018-11-12 21:37:04 +01:00
Alejandro Celaya
b9dd975bc6 Updated changelog with new geolocation service 2018-11-12 21:34:45 +01:00
Alejandro Celaya
9964d3e24b Added progress bar to command downloading new GeoLite2 database file 2018-11-12 21:30:30 +01:00
Alejandro Celaya
58e8c8e182 Updated spanish translations 2018-11-12 21:04:02 +01:00
Alejandro Celaya
c7339f6cfa Created an EmptyIpLocationResolver which always returns an empty resolution and can be used as a fallback while resolving IP addresses 2018-11-12 20:58:14 +01:00
Alejandro Celaya
1aa78f766a Added step to download GeoLite2 db during installation 2018-11-12 20:51:53 +01:00
Alejandro Celaya
bf56e6adaf Created UpdateDbCommandTest 2018-11-12 20:37:30 +01:00
Alejandro Celaya
e915b7e499 Updated GeoLite2 db reader service so that it is lazily created 2018-11-12 20:22:42 +01:00
Alejandro Celaya
de0470d200 Created command to update GeoLite2 database 2018-11-12 20:06:12 +01:00
Alejandro Celaya
3d7cf6992e Created service to update geolite2 database file 2018-11-11 21:28:42 +01:00
Alejandro Celaya
06db082e3f Updated translations 2018-11-11 21:28:42 +01:00
Alejandro Celaya
4a383cecaf Set chain IP resolver as the default IP resolver 2018-11-11 21:28:42 +01:00
Alejandro Celaya
9a0f9207be Fixed region resolved in GeoLite2 2018-11-11 21:28:42 +01:00
Alejandro Celaya
0e3a0a1eec Created chain IP resolver which wrapps multiple resolver to fallback until one is capable of resolving an address 2018-11-11 21:28:42 +01:00
Alejandro Celaya
fd6d180eba Created chainIpLocationResolver 2018-11-11 21:28:42 +01:00
Alejandro Celaya
d152e2ef9a Removed the concept of API limits in IP location resolvers 2018-11-11 21:28:42 +01:00
Alejandro Celaya
b530cf4461 Created new namespace for IP geolocation elements 2018-11-11 21:28:42 +01:00
Alejandro Celaya
bbe85cde31 Migrated to GeoLite2 for IP location resolution 2018-11-11 21:28:42 +01:00
Alejandro Celaya
2c3cbe7146 Installed geoip2 and added to docs 2018-11-11 21:28:42 +01:00
Alejandro Celaya
2358308f4d Merge pull request #259 from acelaya/feature/infection
Updated to infection v0.11
2018-11-11 21:28:12 +01:00
Alejandro Celaya
58bff4fa73 Updated to infection v0.11 2018-11-11 21:24:11 +01:00
Alejandro Celaya
098f7afc70 Merge pull request #255 from acelaya/feature/user-agent-length
Updated user agent column in visits table to have a length of 512
2018-11-10 19:07:22 +01:00
Alejandro Celaya
4070b1e23d Updated user agent column in visits table to have a length of 512 2018-11-10 19:01:59 +01:00
Alejandro Celaya
d9d4c8a70c Merge pull request #252 from acelaya/feature/redirect-not-found
Feature/redirect not found
2018-11-04 12:19:03 +01:00
Alejandro Celaya
05abe49d8b Updated changelog 2018-11-04 12:11:36 +01:00
Alejandro Celaya
a71245b883 Improved UrlShortenerConfigCustomizerTest covering new config options 2018-11-04 12:05:22 +01:00
Alejandro Celaya
057f88a36a Added new not found short url config to installer 2018-11-04 11:58:35 +01:00
Alejandro Celaya
32fcdd9d94 Ensured phpcov is run with phpdbg in travis pipeline 2018-11-03 12:15:25 +01:00
Alejandro Celaya
313927827d Updated RedirectAction so that it makes use of the not found short url options 2018-11-03 12:10:02 +01:00
Alejandro Celaya
358b2b661e Deprecated ci composer command, since it does the same as check, but slower 2018-11-03 11:40:57 +01:00
Alejandro Celaya
3eddacdff8 Created options to enable redirection to external page when short code is not found 2018-11-03 11:37:43 +01:00
Alejandro Celaya
95d4cde649 Merge pull request #251 from acelaya/feature/improve-infection
Feature/improve infection
2018-11-03 11:07:20 +01:00
Alejandro Celaya
d1d947bf12 Disabled xdebug in travis env 2018-11-03 11:02:52 +01:00
Alejandro Celaya
40815e5b38 Ensured phpunit is run using phpdbg, to avoid the requirement on xdebug 2018-11-03 11:02:19 +01:00
Alejandro Celaya
8fc1d23e03 Created needed commands and updated pipeline config file to run infection using an existing code coverage report 2018-11-03 10:58:46 +01:00
Alejandro Celaya
5ec8c229a1 Merge pull request #250 from acelaya/feature/functional
Feature/functional
2018-11-02 12:19:07 +01:00
Alejandro Celaya
2412ec2195 Updated changelog 2018-11-02 12:08:43 +01:00
Alejandro Celaya
bfb96b0ae8 Fixed coding style 2018-11-02 12:07:13 +01:00
Alejandro Celaya
f64920e510 Replaced some array_map by Functional\map 2018-11-02 12:05:01 +01:00
Alejandro Celaya
664dc333ac Used select_keys function in place of custom pick function 2018-11-02 11:08:20 +01:00
Alejandro Celaya
521f6f2b18 Added functional-php library 2018-11-02 10:54:42 +01:00
Alejandro Celaya
6986d03c53 Merge pull request #248 from acelaya/feature/fix-anemic-model
Feature/fix anemic model
2018-10-28 16:27:14 +01:00
Alejandro Celaya
e6e38e3ca2 Added change to changelog 2018-10-28 16:22:30 +01:00
Alejandro Celaya
951d08f914 Improved public API in Visit entity, reducing anemic model 2018-10-28 16:20:54 +01:00
Alejandro Celaya
8e1e8ba7de Improved public API in ShortUrl entity, reducing anemic model 2018-10-28 16:00:54 +01:00
Alejandro Celaya
877b098b09 Improved public API in ApiKey entity, reducing anemic model 2018-10-28 15:24:41 +01:00
Alejandro Celaya
e046eddda9 Improved public API in VisitLocation entity, reducing anemic model 2018-10-28 15:13:45 +01:00
Alejandro Celaya
084b1169d7 Improved public API in Tag entity, avoiding anemic model 2018-10-28 14:38:43 +01:00
Alejandro Celaya
f7ceeff05a Added task to changelog 2018-10-28 09:15:26 +01:00
Alejandro Celaya
e0d41a2b8a Merge pull request #246 from acelaya/feature/enforce-global-imports
Feature/enforce global imports
2018-10-28 09:12:46 +01:00
Alejandro Celaya
6b9f9f0f44 Added scrutinizer config to enforce using the new environment 2018-10-28 09:05:20 +01:00
Alejandro Celaya
025135b8c6 Added all missing use statements from global functions and constants 2018-10-28 08:34:02 +01:00
Alejandro Celaya
77d810b735 Replaced all FQ global function and constants by explicit imports 2018-10-28 08:24:06 +01:00
Alejandro Celaya
e1222de05b Explicitly imported global functions in UrlShortener 2018-10-28 08:07:33 +01:00
Alejandro Celaya
459f807e67 Added link to shlink CLI help when mentioning CLI available commands 2018-10-20 13:09:41 +02:00
Alejandro Celaya
32df1370a6 Updated changelog 2018-10-20 13:08:03 +02:00
Alejandro Celaya
f18f8c89ec Merge pull request #244 from acelaya/feature/psr-logs
Feature/psr logs
2018-10-20 13:06:20 +02:00
Alejandro Celaya
787b791651 Replaced hardcoded exceptions concatenations by PSR approach 2018-10-20 12:50:10 +02:00
Alejandro Celaya
2eca0da852 Updated logger to properly format exceptions using processors 2018-10-20 12:37:35 +02:00
Alejandro Celaya
9e49604ce2 Replaced usages of mt_rand by random_int 2018-10-20 09:21:26 +02:00
Alejandro Celaya
5f85c61d6a Merge pull request #243 from acelaya/feature/snake-case-table
Feature/snake case table
2018-10-20 09:20:48 +02:00
Alejandro Celaya
cd58855e1f Updated changelog 2018-10-20 09:10:27 +02:00
Alejandro Celaya
13c64b0db0 Fixed coding styles 2018-10-20 09:10:27 +02:00
Alejandro Celaya
55e021ba20 Added snake case column names to VisitLocation entity 2018-10-20 09:10:27 +02:00
Alejandro Celaya
26fd61a3ed Created migrations to rename camel case columns to snake case 2018-10-20 09:10:27 +02:00
Alejandro Celaya
46482522bb Merge pull request #242 from acelaya/feature/functions-as-object
Moved global functions to handle array paths to a wrapper class
2018-10-20 08:59:40 +02:00
Alejandro Celaya
98e3e22896 Moved global functions to handle array paths to a wrapper class 2018-10-20 08:00:33 +02:00
Alejandro Celaya
15d49e97c0 Deleted ocular.phar before building assets for deployment 2018-10-18 21:53:24 +02:00
Alejandro Celaya
d5e7ce38ac Updated changelog 2018-10-18 21:47:00 +02:00
Alejandro Celaya
162d0560db Merge pull request #238 from acelaya/feature/fix-ip-address
Feature/fix ip address
2018-10-18 21:44:15 +02:00
Alejandro Celaya
1de05047ca Merge pull request #235 from tivyhosting/master
Improved update instructions + command fix
2018-10-18 21:28:13 +02:00
tivyhosting
2af5de1199 Made required fixes. 2018-10-18 12:06:07 -07:00
Alejandro Celaya
e66a724d2b Added fix on IP addresses discovery to changelog 2018-10-18 20:34:55 +02:00
Alejandro Celaya
9f4c2ac8d7 Inlined instructions to enable apcu and memcached in travis 2018-10-18 20:26:44 +02:00
Alejandro Celaya
44f0011445 Moved logic to create a visitor from a request to the visitor itself 2018-10-18 20:24:25 +02:00
Alejandro Celaya
545094cddf Used middleware from library to actually find visitor IP addresses 2018-10-18 20:19:29 +02:00
Alejandro Celaya
99f45d8853 Installed and registered new middleware to process IP addresses from request 2018-10-18 19:53:50 +02:00
Alejandro Celaya
c25b5f9938 Allowed failures on PHP 7.3 until a fix is found 2018-10-18 19:36:03 +02:00
Alejandro Celaya
db1304c11a Added unreleased changes to changelog 2018-10-18 19:24:02 +02:00
Alejandro Celaya
57714b373c Added php 7.3 to the travis build matrix 2018-10-18 19:23:07 +02:00
Alejandro Celaya
5be7f839f3 Ensured visits with empty remote address are not tried to be located 2018-10-18 19:22:24 +02:00
tivyhosting
aa441eb58b Update README.md 2018-10-16 11:00:25 -07:00
tivyhosting
e6b6a40fa6 added CLI info 2018-10-16 10:59:33 -07:00
tivyhosting
f6dde6f4c1 Improved update instructions + command fix 2018-10-16 10:56:15 -07:00
Alejandro Celaya
36ab475578 Merge pull request #232 from acelaya/feature/float-locations
Feature/float locations
2018-10-16 18:34:07 +02:00
Alejandro Celaya
a74fe62da6 Added v1.13.1 to changelog 2018-10-16 18:27:56 +02:00
Alejandro Celaya
1e4de7fec4 Forced explicit string casting when hydrating a VisitLocation from an array 2018-10-16 18:25:03 +02:00
Alejandro Celaya
47117d1fb7 Added version 1.13 to changelog 2018-10-06 20:03:19 +02:00
Alejandro Celaya
cb8ef408a4 Merge pull request #227 from acelaya/feature/visits-threshold-config
Feature/visits threshold config
2018-10-06 12:22:44 +02:00
Alejandro Celaya
e5f21a88fa Fixed typo 2018-10-06 12:13:55 +02:00
Alejandro Celaya
0458c4f798 Updated changelog 2018-10-06 12:08:51 +02:00
Alejandro Celaya
75f6160432 Improved ApplicationConfigCustomizer while asking for visits threshold 2018-10-06 12:02:06 +02:00
Alejandro Celaya
5337eb48e7 Added missing type hint 2018-10-06 11:43:34 +02:00
Alejandro Celaya
86c30ee731 Added new visits_threshold config to installation 2018-10-06 11:41:26 +02:00
Alejandro Celaya
d68dc38959 Merge pull request #224 from acelaya/feature/config-params
Feature/config params
2018-10-06 11:25:56 +02:00
Alejandro Celaya
0525639329 Created CustomizableAppConfigTest 2018-10-06 11:19:02 +02:00
Alejandro Celaya
0d9c7282df Used constants when possible when parsing app config 2018-10-06 11:12:42 +02:00
Alejandro Celaya
3b95925217 Fixed consig customizer tests 2018-10-06 10:05:25 +02:00
Alejandro Celaya
fa595f7aa3 Fixed non-existing keys not being set with default values in imported config 2018-10-06 09:40:18 +02:00
Alejandro Celaya
ff80f32f72 Created json_encode function which always maps to array and converts errors into exceptions 2018-10-05 19:19:44 +02:00
Alejandro Celaya
e55dbef2fc Replaced in_array by contains 2018-10-05 18:52:42 +02:00
Alejandro Celaya
ebf2e459e8 Refactored Databa config customizer so that it uses new structure 2018-10-05 18:43:39 +02:00
Alejandro Celaya
1b5081ae21 Refactored Language and UrlShortener config customizers 2018-10-03 18:55:20 +02:00
Alejandro Celaya
d5736756f7 Ensured asking for previous shlink path is a mandatory question when updating shlink 2018-09-30 18:26:52 +02:00
Alejandro Celaya
757cf2e193 Updated ApplicationConfigCustomizer to support new keys in the future 2018-09-30 18:20:27 +02:00
Alejandro Celaya
3a75ac0486 Merge pull request #222 from acelaya/feature/required-installation-config
Feature/required installation config
2018-09-30 14:10:02 +02:00
Alejandro Celaya
3c3ef6fa05 Fixed installer tests 2018-09-30 11:14:38 +02:00
Alejandro Celaya
3282bfd03b Ensured symfony/console stays in v4.1.4, since the next one throws a lot of phpstan errors 2018-09-30 11:02:01 +02:00
Alejandro Celaya
0813df6b29 Added unreleased entry to Changelog with already merged tasks from v1.13 mi8lestone 2018-09-30 10:52:11 +02:00
Alejandro Celaya
df74a04085 Fixed coding style 2018-09-30 09:47:47 +02:00
Alejandro Celaya
8323b87076 Ensured required config options cannot be left empty 2018-09-30 09:40:43 +02:00
Alejandro Celaya
48f01921e1 Used modern PHP features in CustomizableAppCOnfig 2018-09-30 09:04:00 +02:00
Alejandro Celaya
ae9d99257e Merge pull request #221 from acelaya/feature/chronos
Migrated from standard datetime objects to chronos objects
2018-09-29 13:02:43 +02:00
Alejandro Celaya
0183c8a4b7 Migrated from standard datetime objects to chronos objects 2018-09-29 12:52:32 +02:00
Alejandro Celaya
9a2ca35e6e Merge pull request #220 from acelaya/feature/installer-module
Feature/installer module
2018-09-29 10:24:22 +02:00
Alejandro Celaya
2edb48e314 Documented where the installer command has to be run 2018-09-29 10:15:39 +02:00
Alejandro Celaya
a81fd497d4 Updated Rest translations 2018-09-29 10:09:12 +02:00
Alejandro Celaya
49cca5cd69 Removed FQCN 2018-09-29 10:07:10 +02:00
Alejandro Celaya
f92cff6241 Removed not used translator config 2018-09-29 10:05:13 +02:00
Alejandro Celaya
1b4343ffc2 Moved update and install duplicated code to common config file 2018-09-29 10:00:17 +02:00
Alejandro Celaya
d5392a5f59 Added missing void return type hint 2018-09-29 09:55:13 +02:00
Alejandro Celaya
a65ce649ac Created new Installer module and moved everything from CLI there 2018-09-29 09:52:32 +02:00
Alejandro Celaya
d5dc6cea99 Merge pull request #218 from acelaya/feature/api-key
Feature/api key
2018-09-29 09:05:37 +02:00
Alejandro Celaya
5ecfe9f0f0 Implemented ApiKeyHeaderPlugin 2018-09-29 08:34:47 +02:00
Alejandro Celaya
0f5fb066d1 Converted AuthenticationpluginManager in a plain plugin manager and encasulated in new service adding extra behavior 2018-09-29 08:16:40 +02:00
Alejandro Celaya
8e61639598 Created system of authentication plugins 2018-09-28 22:08:01 +02:00
Alejandro Celaya
e88468d867 Renamed CheckAuthenticationMiddleware to just AuthenticationMiddleware 2018-09-24 23:07:10 +02:00
Alejandro Celaya
bc46e2f509 Defined API key authentication type in swagger docs 2018-09-24 23:07:10 +02:00
Alejandro Celaya
2241279bb6 Merge pull request #217 from acelaya/feature/deprecated-endpoints
Noticed that old endpoints will keep working
2018-09-24 23:05:38 +02:00
Alejandro Celaya
25ffbed756 Fixed references to short codes where actually short URLs are being managed 2018-09-24 23:01:15 +02:00
Alejandro Celaya
8784843a7a Noticed that old endpoints will keep working 2018-09-24 22:49:30 +02:00
Alejandro Celaya
a964e2b3c9 Added note in readme file that travis is the one creating Github releases 2018-09-24 19:47:00 +02:00
Alejandro Celaya
7f7efd45ab Merge pull request #215 from acelaya/feature/automatic-release
Automatic release
2018-09-24 19:44:10 +02:00
Alejandro Celaya
af8f5afef8 Added automatic release generation to travis config 2018-09-24 19:38:22 +02:00
Alejandro Celaya
dcfaed437c Improved build process to not require parent dir, sudo and exclude dirs 2018-09-24 19:35:45 +02:00
Alejandro Celaya
47e2322e33 Merge pull request #213 from acelaya/feature/rename-rest-actions
Feature/rename rest actions
2018-09-20 21:03:43 +02:00
Alejandro Celaya
00e7d57245 Improved API descriptions 2018-09-20 20:53:57 +02:00
Alejandro Celaya
d53a3222d0 Changed documented paths on short URL-related endpoints from short-code to short-url 2018-09-20 20:52:27 +02:00
Alejandro Celaya
80fe3a73e2 More classes renamed and fixes for usage of the short code concept in place of short URL 2018-09-20 20:38:51 +02:00
Alejandro Celaya
7ab993b764 Created and registered middleware which replaces short-code from short-url on rest paths 2018-09-20 20:27:34 +02:00
Alejandro Celaya
622edd2ed1 Renamed rest middlewares to use the short-url concept instead of the short-code concept 2018-09-20 20:00:53 +02:00
Alejandro Celaya
1f5faee356 Renamed rest actions to use the short-url concept instead of the short-code concept 2018-09-20 19:55:24 +02:00
Alejandro Celaya
076b0cf867 Merge pull request #209 from acelaya/feature/cli-refactoring
CLI Refactoring
2018-09-16 19:28:05 +02:00
Alejandro Celaya
d4168bebc6 Ensured install tool knows the install command is the only one 2018-09-16 18:48:10 +02:00
Alejandro Celaya
13c3629cd6 Updated few translations 2018-09-16 18:37:54 +02:00
Alejandro Celaya
1eff9801e8 Updated references to short code and replaced them to short URL where appropriate 2018-09-16 18:36:02 +02:00
Alejandro Celaya
92858aebd6 Merge pull request #204 from acelaya/master
Updated changelog with v1.12
2018-09-15 18:52:38 +02:00
Alejandro Celaya
1910724a98 Updated changelog with v1.12 2018-09-15 18:47:10 +02:00
Alejandro Celaya
ff8441fa95 Merge pull request #199 from acelaya/feature/delete-short-codes
Delete short URLs
2018-09-15 18:20:06 +02:00
Alejandro Celaya
9d8fb055b1 Updated translations 2018-09-15 18:03:54 +02:00
Alejandro Celaya
9651b3d692 Created command to delete short URLs 2018-09-15 17:57:12 +02:00
Alejandro Celaya
9d10c8627a Created migration fixing cascade delete on visits table 2018-09-15 13:20:13 +02:00
Alejandro Celaya
929d7670cb Documented delete short URLs endpoint in swagger 2018-09-15 13:07:52 +02:00
Alejandro Celaya
5714a8f884 Created action to delete short URLs 2018-09-15 12:56:17 +02:00
Alejandro Celaya
159529937d Created specific service to delete short URLs 2018-09-15 11:54:58 +02:00
Alejandro Celaya
394d9ff4d2 Defined config and implementation to delete short URLs 2018-09-15 11:01:28 +02:00
Alejandro Celaya
07165f344f Normalized entities adding missing type hints and removing superfluous comments 2018-09-15 10:03:42 +02:00
Alejandro Celaya
4f2146dd9c Replaced commands namespace shortcode by short-code, using the old one as an alias 2018-09-14 19:38:52 +02:00
Alejandro Celaya
5b9784cd9e Merge pull request #195 from acelaya/feature/gdpr
Fix GDPR compliance
2018-09-14 19:30:14 +02:00
Alejandro Celaya
9d9b61cf14 Fixed message displayed during installation process 2018-09-14 19:18:10 +02:00
Alejandro Celaya
9d7db96e4b Added country name to console comand that lists visits 2018-09-14 19:12:23 +02:00
Alejandro Celaya
3d0bca2781 Finally dropped the hashing of the address 2018-09-14 19:04:40 +02:00
Alejandro Celaya
ffb54c4f7a Fixed typehint 2018-09-13 23:52:22 +02:00
Alejandro Celaya
a01031303f Created migration which parses existing IP addresses, generating hashes and droping already used IPs 2018-09-13 23:50:09 +02:00
Alejandro Celaya
7808f6d182 Added remoteAddrHash field to Visit entity 2018-09-13 22:46:28 +02:00
Alejandro Celaya
a0c3b9412f Updated system to obfuscate IP addresses before persisting them 2018-09-13 22:36:28 +02:00
Alejandro Celaya
c32e2053c3 Merge pull request #194 from acelaya/feature/create-url-resp
Updated short URL creation responses to include more information
2018-09-12 20:49:03 +02:00
Alejandro Celaya
a33151248d Removed duplicated code by using a utils trait 2018-09-12 20:40:32 +02:00
Alejandro Celaya
038ba3b006 Fixed wrong typehint 2018-09-12 20:34:36 +02:00
Alejandro Celaya
f3c92f4110 Updated short URL creation responses to include more information 2018-09-12 20:32:58 +02:00
Alejandro Celaya
17779dbbc6 Merge pull request #192 from acelaya/feature/non-unique-long-urls
Ensured same long URL can be used multiple times for different short URLs
2018-09-11 20:44:40 +02:00
Alejandro Celaya
c2dd5b8c47 Ensured same long URL can be used multiple times for different short URLs 2018-09-11 19:44:33 +02:00
Alejandro Celaya
fcb9121e5a Merge pull request #191 from acelaya/feature/how-to-release
Added release instructions to readme file
2018-09-11 19:28:41 +02:00
Alejandro Celaya
0af1004860 Ordered gitignore placing all composer-related files together 2018-09-11 19:25:13 +02:00
Alejandro Celaya
917f668cf3 Added release instructions to readme file, and improved how to build instructions 2018-09-11 19:17:29 +02:00
Alejandro Celaya
436499b7c4 Merge pull request #186 from robwent/robots-txt
Adds robots.txt and disallows all
2018-09-09 18:50:53 +02:00
Robert Went
66af9866f0 Adds robots.txt and disallows all 2018-09-09 17:41:57 +01:00
Alejandro Celaya
3703dedad9 Merge pull request #184 from acelaya/master
Improved documentation in README file
2018-09-09 18:28:35 +02:00
Alejandro Celaya
37502151ef Updated date in license 2018-09-09 18:23:36 +02:00
Alejandro Celaya
3816a10de3 Improved documentation in README file 2018-09-09 18:20:12 +02:00
Alejandro Celaya
bdda6067ab Replaced hardcoded donate link by short URL 2018-09-02 08:05:39 +02:00
Alejandro Celaya
0f62af241f Updated badges and added donate badge 2018-08-30 19:43:11 +02:00
Alejandro Celaya
987919e87a Merge pull request #179 from acelaya/feature/1.11.0
v1.11.0
2018-08-13 16:40:37 +02:00
Alejandro Celaya
0c03a4b7ff Added v1.11.0 to changelog 2018-08-13 16:29:40 +02:00
Alejandro Celaya
5d6d13c95f Updated API docs including new response structure 2018-08-13 16:17:43 +02:00
Alejandro Celaya
563021bdc1 Updated resolve short url action to return all data for that short url 2018-08-11 10:40:44 +02:00
Alejandro Celaya
2d6d35a398 Added shortUrl field to serialized ShortUrl objects, both from CLI and REST 2018-08-10 23:14:45 +02:00
Alejandro Celaya
30297ac5ac Merge pull request #176 from acelaya/feature/1.10.2
feature/1.10.2
2018-08-04 16:51:01 +02:00
Alejandro Celaya
416c56dee2 Added new spanish translations 2018-08-04 16:37:54 +02:00
Alejandro Celaya
6b968a6843 Updated changelog including v1.10.2 2018-08-04 16:28:12 +02:00
Alejandro Celaya
080965e166 Improved ShortUrlRepositoryTest covering listing case with filter by tag and search term at the same time 2018-08-04 16:21:01 +02:00
Alejandro Celaya
c7239aaca2 Fixed duplicated join with same table performed while filtering short codes by search term and tags 2018-08-04 16:15:09 +02:00
Alejandro Celaya
110e8cb78d Added test to cover new IP resolution API limits 2018-08-04 15:50:02 +02:00
Alejandro Celaya
ed859767a8 Updated IpLocation resolver to be able to provide limits in order to apply sleeps 2018-08-02 23:02:48 +02:00
Alejandro Celaya
d54b823c88 Merge branch 'develop' 2018-08-02 17:56:38 +02:00
Alejandro Celaya
0ae44d3331 Merge pull request #168 from acelaya/feature/1.10.1
Feature/1.10.1
2018-08-02 17:55:25 +02:00
Alejandro Celaya
8063e643a3 Updated changelog with version 1.10.1 2018-08-01 20:58:48 +02:00
Alejandro Celaya
3883ed15c4 Fixed short codes DB length too short 2018-08-01 20:40:24 +02:00
Alejandro Celaya
a79c1f580e Fixed visits count multiplied by the number of tags when ordering and filtering by text 2018-08-01 20:31:54 +02:00
Alejandro Celaya
f4b569c245 Improved code 2018-08-01 20:28:05 +02:00
Alejandro Celaya
899771cc2e Fixed geolocation by switching to different API 2018-07-31 20:24:13 +02:00
Alejandro Celaya
863803b614 Fixed tests failing with new typehints 2018-07-31 19:59:41 +02:00
Alejandro Celaya
5be5e0bc60 Fixed coding styles 2018-07-31 19:53:59 +02:00
Alejandro Celaya
0b8e305533 Improved error management in process visits command 2018-07-31 19:42:33 +02:00
Alejandro Celaya
39d79366a3 Documented date range params for visits endpoint 2018-07-30 20:28:41 +02:00
Alejandro Celaya
d5b78f2a7e Fixed date fields not properly parsed depending if originally they were datetimes or strings 2018-07-28 18:57:24 +02:00
Alejandro Celaya
b2a63f734a Simplified how built shlink version is found out 2018-07-26 20:35:02 +02:00
Alejandro Celaya
82f41de87b Added build step which sets shlink's version 2018-07-26 18:44:04 +02:00
Alejandro Celaya
af4c66d40a Added version placeholder in place of hardcoded version in config 2018-07-26 18:42:53 +02:00
Alejandro Celaya
975260f126 Merge pull request #164 from shlinkio/develop
Develop
2018-07-09 18:48:28 +02:00
Alejandro Celaya
bd678b41f7 Merge pull request #163 from acelaya/develop
v1.10.0
2018-07-09 18:41:28 +02:00
Alejandro Celaya
66898b6ddc Added v1.10.0 to changelog 2018-07-09 18:40:48 +02:00
Alejandro Celaya
5eee683978 Added release datesto changelog 2018-07-09 17:48:23 +02:00
Alejandro Celaya
e92446df9b Updated changelog to use the keepachangelog format 2018-07-09 17:30:25 +02:00
Alejandro Celaya
63a69b05a1 Added Zend expressive swoole config provider to global config when present 2018-07-04 20:40:38 +02:00
Alejandro Celaya
c79ca1d13c Fixed phpstan issues 2018-07-04 20:28:05 +02:00
Alejandro Celaya
87c4851d7e Simplified ListKeysCommand reducing cyclomatic complexity on nested callbacks 2018-07-04 20:24:13 +02:00
Alejandro Celaya
a125c93ca3 Updated to phpstan 0.10 and infection 0.9 2018-07-04 12:08:27 +02:00
Alejandro Celaya
a8465094c1 Merge branch 'develop' 2018-06-18 20:49:32 +02:00
Alejandro Celaya
16f7359ac6 Merge pull request #156 from acelaya/feature/1.9.1
Improved paginator properties
2018-06-18 20:48:41 +02:00
Alejandro Celaya
f9f4817ee2 Aded v1.9.1 to changelog 2018-06-18 20:40:50 +02:00
Alejandro Celaya
c7e49f223f Fixed filtered lists not being properly paginated 2018-06-18 20:38:25 +02:00
Alejandro Celaya
6e79b4ba7b Fixed php binary used in child commands while installkation not properly inherited 2018-06-18 20:14:51 +02:00
Alejandro Celaya
f78a7f12a9 Improved paginator properties 2018-06-17 18:29:40 +02:00
Alejandro Celaya
b3664597b0 Merge branch 'develop' 2018-05-07 11:27:13 +02:00
Alejandro Celaya
8cfb4f61ca Merge pull request #148 from acelaya/feature/1.9.0
Version 1.9.0
2018-05-07 11:26:27 +02:00
Alejandro Celaya
b0dbb2dae4 Updated CreateShortCodeContentNegotiationMiddleware so that query parameter takes precedence over Accept header 2018-05-07 11:17:10 +02:00
Alejandro Celaya
7c6da4985d Updated build script to delete more development-specific files 2018-05-07 11:09:32 +02:00
Alejandro Celaya
386b0dfb7b Updated changelog 2018-05-07 11:03:28 +02:00
Alejandro Celaya
1437ff48ce Ensured all core actions log errors 2018-05-07 10:58:49 +02:00
Alejandro Celaya
63294f20ee Updated language files 2018-05-06 12:36:07 +02:00
Alejandro Celaya
d8acc3c247 Removed unused use statement 2018-05-06 12:34:21 +02:00
Alejandro Celaya
52d8ffa212 Improved CreateShortCodeContentNegotiationMiddleware sho that it takes into account the case in which an error is returned from next middleware 2018-05-06 12:28:22 +02:00
Alejandro Celaya
98ad2816e8 Documented new endpoint to create short URLs in a single step 2018-05-06 12:19:08 +02:00
Alejandro Celaya
9d890f4227 Created CreateShortCodeContentNegotiationMiddleware 2018-05-03 19:04:40 +02:00
Alejandro Celaya
0932d04907 Fixed tests namespaces to match their subject under test 2018-05-03 18:34:45 +02:00
Alejandro Celaya
1f78b5c524 Improved CreateShortCodeContentNegotiationMiddleware so that it can determine the format based on a query partameter 2018-05-03 18:32:32 +02:00
Alejandro Celaya
59f10619ba Created middleware used with short codes creation actions to handle content negotiation 2018-05-03 18:26:31 +02:00
Alejandro Celaya
334710e92c Added middleware which injects the content-length header in the response if not present 2018-05-03 18:25:57 +02:00
Alejandro Celaya
75b8175824 Fixed coding styles in config file 2018-05-03 18:05:16 +02:00
Alejandro Celaya
8a74ef2a33 Moved action to subnamespace 2018-05-03 18:04:00 +02:00
Alejandro Celaya
d05ac5ce9d Moved action to subnamespace 2018-05-03 18:03:10 +02:00
Alejandro Celaya
3100fffa2b Moved action to subnamespace 2018-05-03 18:02:45 +02:00
Alejandro Celaya
6bbacb1017 Moved action to subnamespace 2018-05-03 18:01:57 +02:00
Alejandro Celaya
4403dc5df9 Moved action to subnamespace 2018-05-03 18:00:32 +02:00
Alejandro Celaya
fdc637c23d Moved action to subnamespace 2018-05-03 17:59:28 +02:00
Alejandro Celaya
b99d662417 Created SingleStepCreateShortCodeActionTest 2018-05-03 17:57:43 +02:00
Alejandro Celaya
eb9a964c66 Removed unused use statement 2018-05-03 13:34:13 +02:00
Alejandro Celaya
e5ef8d7f8c Created action which allows short URLs to be created on a single API request 2018-05-03 13:21:43 +02:00
Alejandro Celaya
28650aee2b Fixed case sensitivity errors 2018-05-03 12:19:51 +02:00
Alejandro Celaya
a2294704e6 Split try catch to prevent undefined variables 2018-05-01 19:38:44 +02:00
Alejandro Celaya
e5e1aa2ff4 Defined abstract action which handles short codes generations 2018-05-01 19:35:12 +02:00
Alejandro Celaya
2f5290b9d3 Moved whitelisted routes in CheckAuthenticationMiddleware to external configuration 2018-05-01 18:36:42 +02:00
Alejandro Celaya
ef3c4aadf2 Moved most of rest routes config to their actions 2018-05-01 18:28:37 +02:00
Alejandro Celaya
c9ce56eea5 Added public method in AbstractRestAction which builds route definition 2018-05-01 18:16:44 +02:00
Alejandro Celaya
4fee656f96 Prepared version 1.9.0 2018-05-01 10:10:19 +02:00
Alejandro Celaya
d2a04259f5 Merge branch 'develop' 2018-04-07 09:06:45 +02:00
Alejandro Celaya
e504daa1ba Merge pull request #142 from acelaya/develop
Develop
2018-04-07 09:05:56 +02:00
Alejandro Celaya
8793a67ce9 Reduced the number of includes by pointing to dcotrine scripts with extension 2018-04-07 08:37:41 +02:00
Alejandro Celaya
b4ded374e9 Updated changelog 2018-04-07 08:32:06 +02:00
Alejandro Celaya
91d350b12f Removed path workaround in PathVersionMiddleware and simplified code 2018-04-07 08:31:03 +02:00
Alejandro Celaya
b3e25f28fd Added v1.8.1 to changelog 2018-04-07 08:25:01 +02:00
Alejandro Celaya
aca89f9abe Updated links to doctrine CLI scripts to avoid depending on symlinks 2018-04-07 08:21:34 +02:00
Alejandro Celaya
243075dd78 Merge branch 'develop' 2018-03-29 09:52:00 +02:00
Alejandro Celaya
7130425896 Merge pull request #133 from acelaya/feature/1.8.0
1.8.0
2018-03-29 09:50:58 +02:00
Alejandro Celaya
fe9ab20cbb Applied some improvements 2018-03-27 23:57:29 +02:00
Alejandro Celaya
6935b2ebe2 Updated system so that NotFoundDelegate is used 2018-03-26 20:37:04 +02:00
Alejandro Celaya
3dcc510da1 Updated to symfony 4 2018-03-26 20:32:12 +02:00
Alejandro Celaya
2f26c82fa6 Removed expressive migration tool from dev dependencies 2018-03-26 20:25:30 +02:00
Alejandro Celaya
9ddb60a882 Updated changelog including v1.8.0 2018-03-26 20:22:57 +02:00
Alejandro Celaya
210b08b61f Created PixelActionTest 2018-03-26 20:17:38 +02:00
Alejandro Celaya
42fe4bd5ce Created new action to track visits, which returns an empty pixel 2018-03-26 20:13:03 +02:00
Alejandro Celaya
1b2a0820e5 Updated to phpunit 7 and dropped dbunit dependency 2018-03-26 19:09:10 +02:00
Alejandro Celaya
6cf0155417 Updated minimum required MSI 2018-03-26 19:06:49 +02:00
Alejandro Celaya
9b8be3e5b8 Fixed phpstan errors 2018-03-26 19:05:26 +02:00
Alejandro Celaya
a27b01b895 Fixed tests 2018-03-26 19:02:41 +02:00
Alejandro Celaya
16dd1838aa Updated to expressive 3 2018-03-26 18:49:28 +02:00
Alejandro Celaya
f788d6872f Added infection to the build matrix 2018-03-26 18:16:59 +02:00
Alejandro Celaya
d0df007812 Dropped support for PHP 7.0 2018-03-26 18:16:59 +02:00
Alejandro Celaya
f60c217fae Merge pull request #136 from acelaya/feature/1.7.2
Feature/1.7.2
2018-03-26 18:13:48 +02:00
Alejandro Celaya
d3fc7d543a Updated changelog 2018-03-26 18:13:08 +02:00
Alejandro Celaya
4d0fc1da07 Fixed PathVersionMiddleware not being properly propagated 2018-03-26 17:53:22 +02:00
Alejandro Celaya
ee2233c6dd Updated PathVersionMiddleware to single-pass middleware 2018-03-26 17:36:58 +02:00
Alejandro Celaya
ea6e0d7c7f Merge branch 'develop' 2018-03-21 16:31:27 +01:00
Alejandro Celaya
d9d599eab4 Updated changelog 2018-03-21 16:31:00 +01:00
Alejandro Celaya
d1ba44e1b3 Merge pull request #128 from weirdan/upgrade-to-expressive-2.2
Upgrade to expressive 2.2
2018-03-21 16:27:09 +01:00
Bruce Weirdan
dff2ad3740 define property to please scrutinizer 2018-03-21 12:13:03 +02:00
Bruce Weirdan
f7e63710e4 updated tests to fix deprecations
also fixed cs errors in middleware-pipeline
2018-03-21 02:05:55 +02:00
Bruce Weirdan
d3b5cd5c57 fixed middleware deprecations 2018-03-21 01:46:26 +02:00
Alejandro Celaya
86ed83d25e Merge branch 'develop' 2018-02-03 10:23:18 +01:00
Alejandro Celaya
f96d0fe30a Merge pull request #124 from acelaya/feature/o-a-s-3
Feature/o a s 3
2018-02-03 10:14:32 +01:00
Alejandro Celaya
be406bd676 Removed no-longer used Authorization parameter 2018-02-03 10:13:10 +01:00
Alejandro Celaya
044278752b Fixed server 2018-02-03 10:09:42 +01:00
Alejandro Celaya
343d2ab44a Added domain 2018-02-03 10:07:37 +01:00
Alejandro Celaya
66992f644e Added default value for server 2018-02-03 10:06:04 +01:00
Alejandro Celaya
cf245524dd Added missing base path in server 2018-02-03 10:01:16 +01:00
Alejandro Celaya
ad520811a3 Fixed dynamic host 2018-02-03 09:55:53 +01:00
Alejandro Celaya
ee1e1d5688 Updated swagger docs to OAS3 2018-02-03 09:53:40 +01:00
Alejandro Celaya
8ef0e7c25b Merge pull request #121 from shlinkio/develop
Develop
2018-01-21 10:11:12 +01:00
Alejandro Celaya
c3d555ef3c Added missing null coalescing operator 2018-01-21 10:01:18 +01:00
Alejandro Celaya
bf8e14708b Merge pull request #116 from acelaya/feature/1.7.0
Feature/1.7.0
2018-01-21 10:00:11 +01:00
Alejandro Celaya
6ea59b1e4d Updated changelog 2018-01-21 09:43:01 +01:00
Alejandro Celaya
cf8b778711 Updated language files 2018-01-21 09:40:38 +01:00
Alejandro Celaya
1e79969c3b Made visits not to be tracked if query param has been provided 2018-01-14 09:24:33 +01:00
Alejandro Celaya
5fd34e03fc Added new app config param to allow disabling short URL visits tracking 2018-01-14 09:13:49 +01:00
Alejandro Celaya
ce9d6642d4 Fixed edit short code action not being properly registered 2018-01-07 21:13:06 +01:00
Alejandro Celaya
ecebdbbfa8 Updated API docs including new endpoint and updating params for short code creation 2018-01-07 20:54:02 +01:00
Alejandro Celaya
6f7ce709ca Fixed PhpStan error 2018-01-07 20:46:28 +01:00
Alejandro Celaya
84094a51a2 Implemented EditShortCodeAction 2018-01-07 20:45:05 +01:00
Alejandro Celaya
7ba9eb8e2c Fixed coding styles 2018-01-07 20:08:07 +01:00
Alejandro Celaya
e8a0c5484c Added test for ShortUrlMeta 2018-01-07 20:07:12 +01:00
Alejandro Celaya
0521227127 Tested new method to update short URLs metadata 2018-01-07 20:00:21 +01:00
Alejandro Celaya
fac9455a1e Created method to updated already created short URLs 2018-01-07 19:51:25 +01:00
Alejandro Celaya
3243ade4fd Improved error message when installation fails 2017-12-31 19:31:35 +01:00
Alejandro Celaya
da21eb4a5c Removed return type incompatible with PHP 7.0 2017-12-31 19:24:22 +01:00
Alejandro Celaya
5ec6d538db Improved and simplified ProcessVisitsCommand thanks to SymfonyStyle 2017-12-31 19:13:42 +01:00
Alejandro Celaya
08228d9d98 Improved and simplified RenameTagCommand thanks to SymfonyStyle 2017-12-31 19:10:27 +01:00
Alejandro Celaya
7856d64299 Improved and simplified ListTagsCommand thanks to SymfonyStyle 2017-12-31 19:08:10 +01:00
Alejandro Celaya
057bbae729 Improved and simplified DeleteTagCommand thanks to SymfonyStyle 2017-12-31 19:06:04 +01:00
Alejandro Celaya
09b161304c Improved and simplified CreateTagCommand thanks to SymfonyStyle 2017-12-31 19:03:41 +01:00
Alejandro Celaya
a60c45ca4d Simplified and improved ResolveUrlCommand with SymfonyStyle 2017-12-31 18:58:11 +01:00
Alejandro Celaya
89ed84ce28 Removed unused use statements 2017-12-31 18:38:25 +01:00
Alejandro Celaya
a6c547c4da Improved and simplified ListShortcodesCommand with SymfonyStyle 2017-12-31 18:37:39 +01:00
Alejandro Celaya
3e2c5abaa4 Improved GetVisitsCommand by using SymfonyStyle 2017-12-31 18:17:58 +01:00
Alejandro Celaya
c202b3e518 Improved GenerateShortcodeCommand by using SymfonyStyle 2017-12-31 18:12:43 +01:00
Alejandro Celaya
e15b67b5dc Improved GeneratePreviewCommand using SymfonyStyle 2017-12-31 18:04:11 +01:00
Alejandro Celaya
7ddc180487 Simplified InstallCommand 2017-12-31 17:59:50 +01:00
Alejandro Celaya
f3fbfc3692 Fixed phpstan error 2017-12-31 17:54:01 +01:00
Alejandro Celaya
b289e3bac2 Applied more improvements on InstallCommand with SymfonyStyle 2017-12-31 17:52:17 +01:00
Alejandro Celaya
4d4aafa6db Fixed config customizer tests 2017-12-31 17:45:27 +01:00
Alejandro Celaya
2705070063 Renamed tests 2017-12-31 17:22:25 +01:00
Alejandro Celaya
5e3770c105 Renamed ConfigCustomizerPluginManager to CongigCustomizerManager 2017-12-31 17:20:03 +01:00
Alejandro Celaya
0f0213aa87 Removed plugin suffix on config ustomizers 2017-12-31 17:18:54 +01:00
Alejandro Celaya
0e2ad0dbca Updated ConfigCustomizer api to expect a SymfonyStyle object instead of a set of input and output 2017-12-31 17:14:01 +01:00
Alejandro Celaya
d275316acd Applied SymfonyStyle to all installation config customizers 2017-12-31 17:07:39 +01:00
Alejandro Celaya
0a681f0efa Simplified UrlShortenerConfigCustomizerPlugin thanks to SymfonyStyle 2017-12-31 17:00:26 +01:00
Alejandro Celaya
b17f96043a Simplified and standardized DatabaseConfigCustomizerPlugin thanks to SymfonyStyle 2017-12-31 16:53:18 +01:00
Alejandro Celaya
6f9b727673 Merge branch 'feature/1.7.0' of github.com:acelaya/shlink into feature/1.7.0 2017-12-31 16:29:55 +01:00
Alejandro Celaya
79427d08d7 Added phpstan config file to export-ignore list 2017-12-30 21:39:18 +01:00
Alejandro Celaya
2ec807ba70 Increased phpstan required level 2017-12-30 21:36:33 +01:00
Alejandro Celaya
ede4525332 Refactored exceptions to properly use package exceptions 2017-12-30 21:35:26 +01:00
Alejandro Celaya
4dffc9f0c1 Improved and simplified all installation process thanks to symfony style 2017-12-28 15:52:10 +01:00
Alejandro Celaya
5de845c258 Improved GenerateSecretCommand by using SymfonyStyle 2017-12-28 15:17:12 +01:00
Alejandro Celaya
745ff51150 Ensured phpstan config is properly loaded in Ci envs 2017-12-28 15:07:14 +01:00
Alejandro Celaya
88b9f9fc56 Fixed GenerateCharsetCommandTest 2017-12-28 14:59:52 +01:00
Alejandro Celaya
fdbe076bf2 Added phpstan config file excluding a file that fails 2017-12-28 14:55:55 +01:00
Alejandro Celaya
0760550767 Removed unnecessary type hints 2017-12-28 09:48:34 +01:00
Alejandro Celaya
1b94083188 Improved GenerateCharsetCommand by using SymfonyStyle 2017-12-28 09:48:17 +01:00
Alejandro Celaya
1993d01110 Dimplified GenerateKeyCommand by using SymfonyStyle 2017-12-27 17:36:07 +01:00
Alejandro Celaya
37fb7e76d9 Simplified DisableKeyCommand using SymfonyStyle 2017-12-27 17:32:39 +01:00
Alejandro Celaya
cc3362837b Simplified ListKeysCommand using SymfonyStyle 2017-12-27 17:28:51 +01:00
Alejandro Celaya
2012cc453c Fixed PHPStan errors due to API inconsistency in EntityManager and EntityManagerInterface 2017-12-27 17:22:51 +01:00
Alejandro Celaya
ea80b6d48a Replaced vlucas/phpdotenv package by symfony/dotenv 2017-12-27 16:33:06 +01:00
Alejandro Celaya
db956a1f40 Fixed all possible PHPStan errors 2017-12-27 16:23:54 +01:00
Alejandro Celaya
4f3995ea80 Fixed phpstan errors in ListKeysCommand 2017-12-27 15:56:26 +01:00
Alejandro Celaya
e024ba5d94 Added phpstan to build matrix 2017-12-27 15:43:59 +01:00
Alejandro Celaya
af0ff0f65b Console commands are now lazy loaded 2017-12-27 15:37:26 +01:00
Alejandro Celaya
a9094dc0f6 Updated dependency constraints 2017-12-27 15:25:59 +01:00
Alejandro Celaya
aca90ef907 Merge pull request #111 from shlinkio/develop
Develop
2017-10-25 16:25:39 +02:00
Alejandro Celaya
ddfccea901 Updated changelog 2017-10-25 16:21:34 +02:00
Alejandro Celaya
6c6cfb4fc3 Fixed typo 2017-10-25 16:19:08 +02:00
Alejandro Celaya
482b792adf Merge branch 'develop' 2017-10-24 17:45:54 +02:00
Alejandro Celaya
d3a86f4fae Added v1.6.1 to CHANGELOG 2017-10-24 17:45:19 +02:00
Alejandro Celaya
6de1d1057b Created gitattributes file 2017-10-24 17:43:19 +02:00
Alejandro Celaya
d7e68d29de Merge branch 'develop' 2017-10-23 14:01:22 +02:00
Alejandro Celaya
b8f24c3584 Merge pull request #107 from acelaya/feature/1.6
Feature/1.6
2017-10-23 14:00:24 +02:00
Alejandro Celaya
26c455616b Ensured validate_url does not fail when importing config, and instead, it gets a default BC value 2017-10-23 13:56:07 +02:00
Alejandro Celaya
909ecc2387 Ensured build does not fail when trying to delete missing optional files 2017-10-23 13:44:50 +02:00
Alejandro Celaya
a9dff56a92 Updated config aggregator version 2017-10-23 13:33:23 +02:00
Alejandro Celaya
ef0dd416f9 Updated CHANGELOG 2017-10-23 13:30:26 +02:00
Alejandro Celaya
781ca39938 Fixed merge conflicts 2017-10-23 13:28:09 +02:00
Alejandro Celaya
ccb9d5e83a Merge pull request #105 from gogus/feature/url-validation-option
Added option for enable/disable URL Validation by response status code.
2017-10-23 13:18:30 +02:00
Alejandro Celaya
91f08c9ead Updated CHANGELOG 2017-10-23 13:09:10 +02:00
Alejandro Celaya
433a5a923d Improved ShortUrlRepositoryTest 2017-10-23 13:06:29 +02:00
Alejandro Celaya
501a933d2e Created ShortUrlRepositoryTest 2017-10-23 13:03:23 +02:00
Alejandro Celaya
633f3b728f Created composer command to generate merge pretty code coverage 2017-10-23 12:54:54 +02:00
Alejandro Celaya
be34600494 Updated CI process to generate a merged coverage file 2017-10-23 12:51:06 +02:00
Alejandro Celaya
9577a4da4b Refactored ShortUrlRepository to make it more readable 2017-10-23 12:36:03 +02:00
Alejandro Celaya
a24688b92a Created VisitRepositoryTest 2017-10-23 12:33:46 +02:00
Alejandro Celaya
91442a3379 Ensured same testing database is used to generate with entities and to run functional tests 2017-10-23 12:19:28 +02:00
Alejandro Celaya
0bd9f1e19f Removed wrong extension for travis 2017-10-23 12:09:07 +02:00
Alejandro Celaya
c233e807c2 Added sqlite extensions to PDO 2017-10-23 11:42:13 +02:00
Alejandro Celaya
a002c60183 Updated travis config so that it loads apcu extension 2017-10-23 11:37:16 +02:00
Alejandro Celaya
c522879c64 Updated composer check to ru functional tests too 2017-10-23 11:29:37 +02:00
Mikolaj Gogula
d04abd1f75 Added validate_url config key for development. 2017-10-23 11:28:04 +02:00
Alejandro Celaya
c2feffa50c First version of functional tests working 2017-10-23 11:21:00 +02:00
Alejandro Celaya
e282521040 Updated migrations to prevent duplication when running after orm schema tool 2017-10-23 11:11:26 +02:00
Alejandro Celaya
d7b7db670f Created first common elements for functional tests 2017-10-22 18:03:35 +02:00
Alejandro Celaya
5a500a00d7 Added another feature to CHANGELOG 2017-10-22 09:18:28 +02:00
Alejandro Celaya
9fb07f4039 Fixed tests 2017-10-22 09:17:19 +02:00
Alejandro Celaya
cb23d38b38 Used maxVisits field when creating or fetching a ShortUrl 2017-10-22 09:15:37 +02:00
Alejandro Celaya
af7c11665c Added max_visits field to short_urls 2017-10-22 09:00:32 +02:00
Alejandro Celaya
7f4678261e Added first tasks to the CHANGELOG 2017-10-21 20:27:19 +02:00
Alejandro Celaya
a1c8c51f70 Updated translations 2017-10-21 20:21:08 +02:00
Alejandro Celaya
6bbe66e8f1 Improved CreateShortcodeActiontest 2017-10-21 20:16:39 +02:00
Alejandro Celaya
5f0d281255 Updated create shortcode action to accept the custom slug 2017-10-21 20:09:30 +02:00
Alejandro Celaya
fd468cd4e9 Added support for custom slug in shortcode command 2017-10-21 17:32:05 +02:00
Alejandro Celaya
1f7a94794d Added option to provide custom slug when creating a short url 2017-10-21 17:19:02 +02:00
Alejandro Celaya
0232f68b91 Updated action and command to create short urls so that it accepts validity dates 2017-10-21 12:24:53 +02:00
Alejandro Celaya
070055a8b9 Fixed type hints 2017-10-21 11:59:31 +02:00
Alejandro Celaya
a3bbd06fe3 Updated UrlShortener so that it does not match a short code which is out of the validity dat erange 2017-10-21 11:58:20 +02:00
Alejandro Celaya
68b4cfbae0 Added valid_since and valid_until columns to shoirt_urls table 2017-10-21 11:39:27 +02:00
Alejandro Celaya
97a54aef06 Imported function in config file 2017-10-21 11:28:44 +02:00
Mikolaj Gogula
297c88c334 Change variable name for validation enabled. 2017-10-17 11:44:30 +02:00
Mikolaj Gogula
fef5390a62 Codestyle fixes. 2017-10-17 11:35:32 +02:00
Mikolaj Gogula
08d18b1dc1 Codestyle fixes. 2017-10-17 11:33:11 +02:00
Mikolaj Gogula
16a2349d86 Composer fixes. 2017-10-17 11:28:05 +02:00
Mikolaj Gogula
18d9815e88 Added option for enable/disable URL Validation by response status code. 2017-10-17 11:03:12 +02:00
Alejandro Celaya
c8346bc5f8 Added target php platform in composer.json to prevent building versions that cannot be executed in older versions 2017-10-16 18:23:13 +02:00
Alejandro Celaya
2d85a207d1 Removed comented translations 2017-10-13 12:31:44 +02:00
Alejandro Celaya
0df8f17e7b Added new translations 2017-10-13 12:30:54 +02:00
Alejandro Celaya
29645e77cf Created DottedAccessConfigAbstractFactory 2017-10-13 12:27:20 +02:00
Alejandro Celaya
ea76092681 Ensured a generic template is used to render generic 404 errors, and a more specific one to render 'invalid short url' errors 2017-10-13 12:22:19 +02:00
Alejandro Celaya
c12e13dfd7 Created NotFoundDelegateTest 2017-10-13 12:02:00 +02:00
Alejandro Celaya
566940349f Created default delegate that returns a JSON response when accepted type is json 2017-10-13 11:55:14 +02:00
Alejandro Celaya
391ef5c323 Added return typehint 2017-10-12 11:59:22 +02:00
Alejandro Celaya
70264be8e7 Fixed coding styles 2017-10-12 11:29:11 +02:00
Alejandro Celaya
6208f6f0d5 Improved Exception management to be more specific 2017-10-12 11:28:45 +02:00
Alejandro Celaya
c422a14c5c Improved coding styles 2017-10-12 10:13:20 +02:00
Alejandro Celaya
fbeb959317 Fixed tests 2017-10-12 10:03:43 +02:00
Alejandro Celaya
e53ffc8d43 Migrated templates to plates 2017-10-12 10:03:20 +02:00
Alejandro Celaya
453ca1728e Updated system to use plates instead of twig 2017-10-12 09:40:42 +02:00
Alejandro Celaya
d10583c7c5 Udated minimum PHP version and docker stuff 2017-10-12 09:24:47 +02:00
Alejandro Celaya
a9d213990e Merge branch 'feature/1.6' of github.com:acelaya/shlink into feature/1.6 2017-09-30 12:14:05 +02:00
Alejandro Celaya
6321cc0f2d Added security-advisories dependency 2017-09-30 12:13:47 +02:00
Alejandro Celaya
3e5f0b2451 Ensured a doctrine/cache version which requires PHP 7.1 is not installed 2017-09-30 12:13:47 +02:00
Alejandro Celaya
4ad167eb30 Ensured all doctrine components are not updated to latest releases, which require PHP 7.1 2017-09-30 12:13:47 +02:00
Alejandro Celaya
01a4f9f867 Removed any remaining reference to AnnotatedFactory 2017-09-30 12:13:47 +02:00
Alejandro Celaya
b93d65ddc1 Replaced more ussages of AnnotatedFactory by ConfigAbstractFactory 2017-09-30 12:13:47 +02:00
Alejandro Celaya
9ef9da0870 Replaced more ussages of AnnotatedFactory by ConfigAbstractFactory 2017-09-30 12:13:47 +02:00
Alejandro Celaya
ba2053bd3a Dropped AnnotatedFactory in commands and replaced by ConfigAbstractFactory 2017-09-30 12:13:47 +02:00
Alejandro Celaya
1260da85a7 Added PHP 7.2 to the build matrix 2017-09-30 12:13:12 +02:00
Alejandro Celaya
960c7a0835 Added security-advisories dependency 2017-08-19 19:41:07 +02:00
Alejandro Celaya
574f407a90 Ensured a doctrine/cache version which requires PHP 7.1 is not installed 2017-07-23 11:51:47 +02:00
Alejandro Celaya
abf802093c Ensured all doctrine components are not updated to latest releases, which require PHP 7.1 2017-07-23 08:42:57 +02:00
Alejandro Celaya
7ca22f8629 Removed any remaining reference to AnnotatedFactory 2017-07-22 14:20:40 +02:00
Alejandro Celaya
6300982b07 Replaced more ussages of AnnotatedFactory by ConfigAbstractFactory 2017-07-22 13:48:30 +02:00
Alejandro Celaya
54cb40f6ed Replaced more ussages of AnnotatedFactory by ConfigAbstractFactory 2017-07-22 13:41:41 +02:00
Alejandro Celaya
8256f0c757 Dropped AnnotatedFactory in commands and replaced by ConfigAbstractFactory 2017-07-22 13:33:32 +02:00
Alejandro Celaya
1009f9e7c6 Merge pull request #98 from shlinkio/develop
Develop
2017-07-16 10:08:38 +02:00
Alejandro Celaya
9c8eef12ba Merge pull request #97 from acelaya/feature/1.5
Feature/1.5
2017-07-16 10:01:50 +02:00
Alejandro Celaya
9260b3ac6b Fixed coding styles 2017-07-16 09:58:03 +02:00
Alejandro Celaya
ff98e1fb3d Added v1.5.0 to CHANGELOG 2017-07-16 09:43:35 +02:00
Alejandro Celaya
f3389d3738 Updated language files 2017-07-16 09:40:34 +02:00
Alejandro Celaya
a138f4153d Created DeleteTagsCommand 2017-07-16 09:35:24 +02:00
Alejandro Celaya
602e11d5e7 Added namespace to functions 2017-07-16 09:28:40 +02:00
Alejandro Celaya
3cd14153ca Created command to rename tag 2017-07-16 09:24:21 +02:00
Alejandro Celaya
095d8e73b8 Created ListTagsCommand 2017-07-16 09:13:25 +02:00
Alejandro Celaya
b37f303e76 Created CreateTagCommand 2017-07-16 09:09:11 +02:00
Alejandro Celaya
c8368c9098 Updated language files 2017-07-15 12:16:15 +02:00
Alejandro Celaya
8d0bac9478 Documented delete and edit tags endpoints 2017-07-15 12:13:59 +02:00
Alejandro Celaya
286c24f8c0 Improved TagServiceTest 2017-07-15 12:09:25 +02:00
Alejandro Celaya
963d26f59b Created UpdateTagAction 2017-07-15 12:04:12 +02:00
Alejandro Celaya
e07c464de8 Removed strict declarations 2017-07-15 09:15:45 +02:00
Alejandro Celaya
575509c45b Created CreateTagsActiontest 2017-07-15 09:12:07 +02:00
Alejandro Celaya
563e654b99 Created DeleteTagsActionTest 2017-07-15 09:10:09 +02:00
Alejandro Celaya
3e268e2012 Improved TagServiceTest 2017-07-15 09:05:02 +02:00
Alejandro Celaya
b2d9f2fc01 Added Create and Delete tag actions 2017-07-15 09:00:53 +02:00
Alejandro Celaya
6717102dd2 Updated tag actions namespace 2017-07-15 08:31:21 +02:00
Alejandro Celaya
1ba7fc81ac Created ListTagsCommand 2017-07-08 13:17:46 +02:00
Alejandro Celaya
caf4fa7fdd Documented list tags endpoint 2017-07-08 12:55:38 +02:00
Alejandro Celaya
5c7962966d Created ListTagsActionTest 2017-07-07 13:28:58 +02:00
Alejandro Celaya
95ec7e0afa Registered action to list tags 2017-07-07 13:12:45 +02:00
Alejandro Celaya
c37660f763 Created TagService 2017-07-07 12:49:41 +02:00
Alejandro Celaya
486ea10c3c Renamed EditTagsAction to EditShortcodeTagsAction 2017-07-07 11:45:20 +02:00
Alejandro Celaya
e0f18f8d1f Created InstallApplicationFactoryTest 2017-07-06 18:06:11 +02:00
Alejandro Celaya
a66f116d66 Created DatabaseConfigCustomizerPluginTest 2017-07-06 18:00:38 +02:00
Alejandro Celaya
dd099dc39c Removed declare strict types added by mistake 2017-07-06 17:49:05 +02:00
Alejandro Celaya
c05aeabdee Improved if statements reducing indentation 2017-07-06 17:38:16 +02:00
Alejandro Celaya
23922f6c7b Created UrlShortenerConfigCustomizerPluginTest 2017-07-06 17:28:32 +02:00
Alejandro Celaya
69a99949e1 Created LanguageConfigCustomizerPluginTest 2017-07-06 17:22:03 +02:00
Alejandro Celaya
d56cde72a3 Created ApplicationConfigCustomizerPluginTest 2017-07-06 17:12:32 +02:00
Alejandro Celaya
99ffff11c7 Created DefaultConfigCustomizerPluginFactoryTest 2017-07-06 13:43:36 +02:00
Alejandro Celaya
bb050cc1b6 Improved InstallCommandTest coverage 2017-07-06 13:38:15 +02:00
Alejandro Celaya
3547889ad5 Fixed InstallCommandTest 2017-07-06 10:04:35 +02:00
Alejandro Celaya
479e694478 Moved all configuration customization steps to individual plugins 2017-07-05 20:04:44 +02:00
Alejandro Celaya
2368b634e3 Moved command and app creation logic to a factory for install scripts 2017-07-05 18:12:03 +02:00
Alejandro Celaya
dcc09975a9 Abstracted filesystem manipulation in InstallCommand 2017-07-04 20:14:22 +02:00
Alejandro Celaya
102f5c4e12 Updated instalation script to import sqlte database file when importing the rets of the config 2017-07-04 20:01:42 +02:00
Alejandro Celaya
cc688fa3ce Implemented method to deserialize customizable config 2017-07-04 19:48:53 +02:00
Alejandro Celaya
e7f7cbcaac Improved installation command, reducing duplication and moving serialization logic to specific model 2017-07-03 20:46:35 +02:00
Alejandro Celaya
f9c56d7cb1 Added process to import previous configuration when updating shlink 2017-07-03 13:43:53 +02:00
Alejandro Celaya
1fe2e6f6bd Improved check on update and install commands 2017-07-03 13:17:44 +02:00
Alejandro Celaya
c3cc88f03e Fixed inspections 2017-07-03 13:11:45 +02:00
Alejandro Celaya
584e1f5643 Created common abstract command for update and install 2017-07-03 13:10:16 +02:00
Alejandro Celaya
04c479148a Updated build script so that generated zip contains one folder 2017-07-03 12:54:50 +02:00
Alejandro Celaya
c45cb7bacb Updated build script 2017-07-03 12:49:32 +02:00
Alejandro Celaya
17be221920 Added response examples to swagger docs 2017-04-16 10:45:52 +02:00
Alejandro Celaya
10da57572f Fixed date format returned by the API 2017-04-16 10:27:27 +02:00
Alejandro Celaya
52478ca60a Returned all allowed methods until fast route router is fixed 2017-04-14 13:27:41 +02:00
Alejandro Celaya
62b49dcb19 Set cross domain allow-methods header with the same value as the allow header 2017-04-14 12:55:59 +02:00
Alejandro Celaya
a365faef9c Removed requirement of OPTIONS on every route 2017-04-14 12:52:24 +02:00
Alejandro Celaya
5d2698e8a1 Created EmptyResponseImplicitOptionsMiddlewareFactoryTest 2017-04-13 09:52:17 +02:00
Alejandro Celaya
ec4a413a5b Removed options bypass in actions in favor of implicit options middleware 2017-04-13 09:45:31 +02:00
Alejandro Celaya
596d1ee797 Registered implicit options middleware 2017-04-13 09:43:11 +02:00
Alejandro Celaya
d117f82bcb Installed expressive tooling 2017-04-13 09:39:35 +02:00
Alejandro Celaya
18abe9d0f9 Merge branch 'develop' of github.com:shlinkio/shlink into develop 2017-04-13 09:34:52 +02:00
Alejandro Celaya
b53e51de33 Merge branch 'develop' 2017-03-25 10:13:11 +01:00
Alejandro Celaya
9478c71af1 Merge pull request #90 from acelaya/feature/expressive-2
Feature/expressive 2
2017-03-25 10:11:46 +01:00
Alejandro Celaya
a2c4eebec8 Updated CHANGELOG 2017-03-25 10:09:30 +01:00
Alejandro Celaya
2e5a7d76df Migrated rest actions to psr-15 middleware 2017-03-25 10:04:48 +01:00
Alejandro Celaya
288249d0b8 Renamed JsonErrorHandler to JsonErrorResponseGenerator 2017-03-25 09:46:29 +01:00
Alejandro Celaya
cd47aae902 Migrated CrossDomainMiddleware to psr-15 middleware 2017-03-25 09:44:34 +01:00
Alejandro Celaya
9bd18ee041 Migrated CheckAuthenticationMiddleware to psr-15 middleware 2017-03-25 09:37:13 +01:00
Alejandro Celaya
22c76df8e6 Migrated BodyParserMiddleware to psr-15 middleware 2017-03-25 09:22:00 +01:00
Alejandro Celaya
6c87436a96 Migrated QrCodeCacheMiddleware to psr-15 middleware 2017-03-24 23:34:17 +01:00
Alejandro Celaya
734dac9456 Migrated RedirectAction to psr-15 middleware 2017-03-24 23:24:11 +01:00
Alejandro Celaya
85ca366893 Migrated QrCodeAction to psr-15 middleware 2017-03-24 23:19:42 +01:00
Alejandro Celaya
46db736af8 Migrated PreviewAction to psr-15 middleware 2017-03-24 22:07:28 +01:00
Alejandro Celaya
7530048fbd Removed exception catch that used to return a 500, and now returns a 404 due to a behavior change 2017-03-24 21:59:45 +01:00
Alejandro Celaya
c3c03a3a3b Migrated LocaleMiddleware to psr-15 middleware 2017-03-24 21:49:31 +01:00
Alejandro Celaya
d1018b6da7 Fixed tests 2017-03-24 21:38:43 +01:00
Alejandro Celaya
fe7928ae0e Fixed JsonErrorHandler and prevented AuthorizationMiddleware to eat exceptions 2017-03-24 21:31:55 +01:00
Alejandro Celaya
f6c39285c9 Updated to expressive 2 and used new error handling system 2017-03-24 21:10:25 +01:00
Alejandro Celaya
0e2a289f9f Updated to phpunit 6 2017-03-24 20:34:18 +01:00
Alejandro Celaya
f7424da16b Merge branch 'develop' 2017-01-22 11:37:35 +01:00
Alejandro Celaya
2e10ee66b7 Merge pull request #87 from acelaya/feature/1.3.1
Feature/1.3.1
2017-01-22 11:36:04 +01:00
Alejandro Celaya
7e442671c3 Updated build script 2017-01-22 11:27:56 +01:00
Alejandro Celaya
ca646ec2b7 Updated changelog including v1.3.1 2017-01-22 11:17:44 +01:00
Alejandro Celaya
4df1af5fd8 Fixed searching short URLs list not querying tag names 2017-01-22 11:14:25 +01:00
Alejandro Celaya
b4548f3401 Added configs to enable fastroute cache 2017-01-22 11:07:18 +01:00
Alejandro Celaya
1819481710 Updated license year 2017-01-22 10:59:35 +01:00
Alejandro Celaya
e59ae654c0 Increased number of followed redirects to 15 2017-01-22 10:53:41 +01:00
Alejandro Celaya
a8bf699f2d Fixed error with non-registered service on latest expressive-twig-renderer version 2017-01-21 20:19:30 +01:00
Alejandro Celaya
de9d9d8667 Updated PathVersionMiddleware so that it is only applied to rest routes 2017-01-21 20:12:12 +01:00
Alejandro Celaya
869865f22a Added option to customize database hostname and port 2017-01-21 13:45:28 +01:00
Alejandro Celaya
29fd313337 Added memcached to php docker image 2017-01-21 13:33:51 +01:00
Alejandro Celaya
7781f07352 Added local entity manager config that allows db host name to be set 2017-01-21 09:16:00 +01:00
Alejandro Celaya
072371d459 Created docker-related files 2017-01-19 22:56:45 +01:00
Alejandro Celaya
51bf948458 Fixed schema definition on order by argument 2016-10-29 12:42:36 +02:00
Alejandro Celaya
48acded6ed Merge branch 'develop' 2016-10-23 10:30:36 +02:00
Alejandro Celaya
6821f5cf97 Merge branch 'develop' of https://github.com/shlinkio/shlink into develop 2016-10-23 10:30:11 +02:00
Alejandro Celaya
a15b17e08b Fixed regression bug while processing versionning for rest paths 2016-10-23 10:29:54 +02:00
Alejandro Celaya
275b17e1e8 Merge pull request #74 from acelaya/develop
Develop
2016-10-23 00:18:22 +02:00
Alejandro Celaya
27b08ff47b Merge branch 'develop' 2016-10-23 00:17:00 +02:00
Alejandro Celaya
bf7c760ca9 Updated changelog with last versions 2016-10-23 00:13:00 +02:00
Alejandro Celaya
8af9b0ee02 Tagged and summarized all endpoints in swagger docs 2016-10-23 00:07:31 +02:00
Alejandro Celaya
b225c03ef1 Improved swagger definition 2016-10-23 00:02:13 +02:00
Alejandro Celaya
8a12ed6b8c Separated swagger specification into multiple files 2016-10-22 23:44:14 +02:00
Alejandro Celaya
c3fd433446 Merge branch 'feature/67' into develop 2016-10-22 23:15:57 +02:00
Alejandro Celaya
0b9753582d Documented how to order results 2016-10-22 23:13:54 +02:00
Alejandro Celaya
9ac48bfbc5 Added support for ordering in shortcode:list command 2016-10-22 23:10:30 +02:00
Alejandro Celaya
85146e5676 Added support to order short URL lists 2016-10-22 23:02:12 +02:00
Alejandro Celaya
18ae541c93 Improved body parsing on BodyParserMiddleware 2016-10-22 22:17:04 +02:00
Alejandro Celaya
7a665ec26f Merge branch 'feature/72' into develop 2016-10-22 22:11:45 +02:00
Alejandro Celaya
e3cbac38ce Improved output on api-key:list command 2016-10-22 22:11:36 +02:00
Alejandro Celaya
31594d47b3 Created PathVersionMiddlewareTest 2016-10-22 18:52:40 +02:00
Alejandro Celaya
42f86a4a24 Added versioning to API endpoints, allowing not to pass the version which will default to v1 2016-10-22 18:46:53 +02:00
Alejandro Celaya
850ce152cd Merge branch 'feature/58' into develop 2016-10-22 13:16:13 +02:00
Alejandro Celaya
c22bbecdc5 Updated languages 2016-10-22 13:15:35 +02:00
Alejandro Celaya
230f2d155b Documented tags param in GET /short-codes endpoint 2016-10-22 13:13:50 +02:00
Alejandro Celaya
47a2c18c7e Added the ability to filter by tag in shotcodes:list command 2016-10-22 13:11:24 +02:00
Alejandro Celaya
52bb14bd66 Implemented filtering by tags in ListShortcodesAction 2016-10-22 13:04:17 +02:00
Alejandro Celaya
8b9caf02d2 Added tags param to paginable repository adapter 2016-10-22 12:57:24 +02:00
Alejandro Celaya
4580d11d32 Noticed in swagger docs that the searchTerm param is only available from v 1.3.0 of shlink 2016-10-22 12:50:35 +02:00
Alejandro Celaya
8610a158d4 Added searchTerm param to shortcode:list command 2016-10-22 12:48:24 +02:00
Alejandro Celaya
0a6030b35d Documented searchTerm query param for GET /short-codes endpoint 2016-10-22 12:43:22 +02:00
Alejandro Celaya
543c0e62d0 Added search term filtering to short codes list 2016-10-22 12:40:51 +02:00
Alejandro Celaya
4c76e17178 Changed swagger file format from yaml to json 2016-10-22 12:11:31 +02:00
Alejandro Celaya
611a314cdf Merge branch 'develop' 2016-08-29 13:07:25 +02:00
Alejandro Celaya
e7b4d24e5d Merge pull request #68 from acelaya/develop
Develop
2016-08-29 13:07:01 +02:00
Alejandro Celaya
cf60440288 Fixed possible PHP errors being missed while checking REST auth 2016-08-29 12:43:02 +02:00
Alejandro Celaya
15896045f3 Removed logic making visits to be returned for 2 days only if no start or end date were provided 2016-08-28 19:32:07 +02:00
Alejandro Celaya
a9f480ca99 Fixed error while checking an API key that doesn't exist 2016-08-28 09:46:11 +02:00
Alejandro Celaya
4bd67d5f98 Fixed cross domain middleware not exposing the Authorization header 2016-08-27 13:00:41 +02:00
Alejandro Celaya
924ba58f73 Added swagger documentation file 2016-08-26 11:51:51 +02:00
Alejandro Celaya
6eef694315 Merge branch 'develop' 2016-08-21 21:24:31 +02:00
Alejandro Celaya
fe4a4aef34 Updated changelog 2016-08-21 21:24:00 +02:00
Alejandro Celaya
b13c95cf1a Placed cross domain middleware as the first one for rest requests 2016-08-21 21:21:31 +02:00
Alejandro Celaya
c1c325588e Merge branch 'develop' 2016-08-21 19:16:36 +02:00
Alejandro Celaya
faad60f79e Merge branch 'develop' of https://github.com/shlinkio/shlink into develop 2016-08-21 19:16:21 +02:00
Alejandro Celaya
cbb5a02b95 Kept symlincs while generating the dist file 2016-08-21 19:16:06 +02:00
Alejandro Celaya
96faafd31e Merge branch 'develop' 2016-08-21 18:31:45 +02:00
Alejandro Celaya
7aa42ada54 Merge pull request #61 from acelaya/develop
Develop
2016-08-21 18:31:32 +02:00
Alejandro Celaya
3b1545a761 Added v1.2.0 to changelog 2016-08-21 18:26:28 +02:00
Alejandro Celaya
536309afb6 Merge pull request #4 from acelaya/feature/45
Feature/45
2016-08-21 18:20:56 +02:00
Alejandro Celaya
ad6ef22b72 Updated languages 2016-08-21 18:17:39 +02:00
Alejandro Celaya
4185015bef Improved tests 2016-08-21 18:15:25 +02:00
Alejandro Celaya
3376725152 Created EditTagsActiontest 2016-08-21 18:06:34 +02:00
Alejandro Celaya
d7b18776f1 Improved error response in edit tag request 2016-08-21 17:55:26 +02:00
Alejandro Celaya
1da285a63a Created action to set the togas for a short url 2016-08-21 16:52:26 +02:00
Alejandro Celaya
372488cbb4 Created middleware to parse PUT request bodies in rest requests 2016-08-21 13:52:15 +02:00
Alejandro Celaya
b6fee0ebaf Added option to set tags while creating short code from rest API 2016-08-21 13:07:12 +02:00
Alejandro Celaya
322180bde4 Added tag property to json serialization of ShortUrl 2016-08-21 12:48:31 +02:00
Alejandro Celaya
1cf6c93007 Added option to pass tags when creating a short code from the command line 2016-08-21 10:39:00 +02:00
Alejandro Celaya
2b89556c09 Allowed to display tags in the shortcode:list command 2016-08-21 10:17:17 +02:00
Alejandro Celaya
e3021120e3 Checked tables do not exist before creating them 2016-08-21 09:45:36 +02:00
Alejandro Celaya
2ca7ab4ccf Created new entity Tag and migration to create new tables 2016-08-21 09:41:21 +02:00
Alejandro Celaya
a2c2bc166c Removed wrong spaces 2016-08-20 19:11:20 +02:00
Alejandro Celaya
5f0baab2ac Created script to update an already existing system 2016-08-19 15:50:08 +02:00
Alejandro Celaya
ea083e30b6 Improved InstallCommand, adding migrations and removing code duplication 2016-08-19 15:15:53 +02:00
Alejandro Celaya
7d49c1760c Added doctrine migrations and remove platform specific code from entities 2016-08-19 14:51:34 +02:00
Alejandro Celaya
7c42835cc1 Improved error management on install command 2016-08-18 18:02:24 +02:00
Alejandro Celaya
f77273ef93 Merge pull request #3 from acelaya/feature/7
Feature/7
2016-08-18 17:30:57 +02:00
Alejandro Celaya
e52983c5d9 Updated translations 2016-08-18 17:28:04 +02:00
Alejandro Celaya
4615bbaaf7 CreatedPreviewActionTest 2016-08-18 17:23:40 +02:00
Alejandro Celaya
b432ed2c1d Created GeneratePreviewCommandTest 2016-08-18 17:10:40 +02:00
Alejandro Celaya
34174b2fbe Added tests for Image classes 2016-08-18 16:37:50 +02:00
Alejandro Celaya
fac519699a Used filesystem check instead of cache check for preview generation 2016-08-18 13:20:57 +02:00
Alejandro Celaya
2c91ded514 Improved PreviewGenerator by composing an ImageBuilder that creates new Image objects fore each URL 2016-08-18 12:21:26 +02:00
Alejandro Celaya
15247e832e Improved QR code generation route 2016-08-18 11:31:04 +02:00
Alejandro Celaya
60c68c914b Managed error while generating URL previews by throwing an exception 2016-08-18 11:17:17 +02:00
Alejandro Celaya
277406c3b8 Created action to return preview images 2016-08-18 11:10:15 +02:00
Alejandro Celaya
26adf48b48 Added wkhtmltopdf stuff and created preview generator service 2016-08-18 10:19:33 +02:00
Alejandro Celaya
20e43aac90 Added bin dir to code sniffer checks 2016-08-17 11:47:08 +02:00
Alejandro Celaya
56c9abcfd0 Fixed build script to generate the distributable file just with project files from the project root 2016-08-16 11:51:05 +02:00
Alejandro Celaya
5ca4bc928d Created specific factory for AppOptions to prevent circular dependency with cache 2016-08-15 23:40:49 +02:00
Alejandro Celaya
ffa6c0d2ca Merge branch 'feature/install' into develop 2016-08-15 11:34:48 +02:00
Alejandro Celaya
395311eaad Added InstallCommandTest 2016-08-15 11:34:35 +02:00
Alejandro Celaya
5bbc7de4af Fixed namespace in some tests 2016-08-15 11:01:55 +02:00
Alejandro Celaya
d5516c7269 Finished build script to compress dist project file 2016-08-15 10:18:13 +02:00
Alejandro Celaya
f852f9d398 Created htaccess 2016-08-15 10:03:39 +02:00
Alejandro Celaya
0d9f964687 Fixed bug on build script 2016-08-15 10:03:17 +02:00
Alejandro Celaya
00c56ca594 Fixed tests 2016-08-15 09:52:44 +02:00
Alejandro Celaya
9e4fb68265 Created build script 2016-08-15 09:45:09 +02:00
Alejandro Celaya
804d99ebf7 Created CLI scripts for Windows OS 2016-08-15 09:21:14 +02:00
Alejandro Celaya
4bbdccf981 Added symfony process to run initialization commands 2016-08-14 23:41:42 +02:00
Alejandro Celaya
1f3e31d100 Fixed working directory and paths in InstallCommand 2016-08-14 23:25:04 +02:00
Alejandro Celaya
2617ef1547 Added cli locale to installation generated config file 2016-08-14 23:10:07 +02:00
Alejandro Celaya
25380e4727 Moved console Application creation to factory 2016-08-14 23:08:26 +02:00
Alejandro Celaya
12322b7368 Improved config loading by using only one config provider object 2016-08-14 22:56:22 +02:00
Alejandro Celaya
a608f7d0f4 Minor name change 2016-08-14 21:28:21 +02:00
Alejandro Celaya
9a42d70604 Added custom config params to merged confg 2016-08-14 18:15:10 +02:00
Alejandro Celaya
fe708333b1 Fixed path while generating config file 2016-08-14 10:43:16 +02:00
Alejandro Celaya
566ee7ef6f Finished custom config command 2016-08-14 10:30:43 +02:00
Alejandro Celaya
56af58fcb8 Created installation script and installation command 2016-08-14 09:11:46 +02:00
Alejandro Celaya
cffa43a155 Created installation script and installation command 2016-08-14 09:09:23 +02:00
Alejandro Celaya
2b2c0b7c13 Merge branch 'feature/29' into develop 2016-08-12 18:01:38 +02:00
Alejandro Celaya
faa8019fc5 Redefined logger services so that the error handler uses Shlink's logger 2016-08-12 18:01:09 +02:00
Alejandro Celaya
a8ea458649 Fixed distributable local config file 2016-08-12 17:55:07 +02:00
Alejandro Celaya
8f4d305982 Added ErrorHandler package dependency and remove local files 2016-08-12 17:54:32 +02:00
911 changed files with 54416 additions and 8391 deletions

26
.dockerignore Normal file
View File

@@ -0,0 +1,26 @@
bin/rr
config/autoload/*local*
config/params/shlink_dev_env.*
data/infra
data/cache/*
data/log/*
data/locks/*
data/proxies/*
data/migrations_template.txt
data/GeoLite2-City*
data/database.sqlite
data/shlink-tests.db
CHANGELOG.md
CONTRIBUTING.md
UPGRADE.md
composer.lock
vendor
docs
indocker
docker-*
phpstan.neon
php*xml*
**/test*
build*
**/.*
!config/roadrunner/.rr.yml

View File

@@ -1,15 +0,0 @@
# Application
APP_ENV=
SECRET_KEY=
SHORTENED_URL_SCHEMA=
SHORTENED_URL_HOSTNAME=
SHORTCODE_CHARS=
# Language
DEFAULT_LOCALE=
CLI_LOCALE=
# Database
DB_USER=
DB_PASSWORD=
DB_NAME=

22
.gitattributes vendored Normal file
View File

@@ -0,0 +1,22 @@
/config/test export-ignore
/data/infra export-ignore
/docs export-ignore
/module/CLI/test export-ignore
/module/CLI/test-resources export-ignore
/module/Core/test export-ignore
/module/Core/test-db export-ignore
/module/Rest/test export-ignore
/module/Rest/test-api export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.phpstorm.meta.php export-ignore
.travis.yml export-ignore
build.sh export-ignore
CHANGELOG.md export-ignore
docker-compose.yml export-ignore
indocker export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
phpunit-api.xml export-ignore
phpunit-db.xml export-ignore
phpstan.neon

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: ['acelaya']
custom: ['https://slnk.to/donate']

71
.github/ISSUE_TEMPLATE/Bug.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Bug report
description: Something on Shlink is broken or not working as documented?
labels: ['bug']
body:
- type: input
validations:
required: true
attributes:
label: Shlink version
placeholder: x.y.z
- type: input
validations:
required: true
attributes:
label: PHP version
placeholder: x.y.z
- type: dropdown
validations:
required: true
attributes:
label: How do you serve Shlink
options:
- Self-hosted Apache
- Self-hosted nginx
- Self-hosted RoadRunner
- Docker image
- Other (explain in summary)
- type: dropdown
validations:
required: true
attributes:
label: Database engine
options:
- MySQL
- MariaDB
- PostgreSQL
- MicrosoftSQL
- SQLite
- type: input
validations:
required: true
attributes:
label: Database version
placeholder: x.y.z
- type: textarea
validations:
required: true
attributes:
label: Current behavior
value: '<!-- How is it actually behaving (and it should not)? -->'
- type: textarea
validations:
required: true
attributes:
label: Expected behavior
value: '<!-- How did you expect it to behave? -->'
- type: textarea
validations:
required: true
attributes:
label: Minimum steps to reproduce
value: |
<!--
Simple but detailed way to reproduce the bug:
* Avoid things like "create a kubernetes cluster", or anything related with cloud providers, as that is rarely the root cause.
* Avoid too vague steps or one-liners like "Update from v1 to v2".
* Providing the reproduction in the form of a self-contained docker-composer is desirable.
Failing in any of these will cause the issue to be closed as "not reproducible".
-->

View File

@@ -0,0 +1,16 @@
name: Feature request
description: Do you find Shlink is missing some important feature that would make it more useful?
labels: ['feature']
body:
- type: textarea
validations:
required: true
attributes:
label: Summary
value: '<!-- Describe the new feature you would like to request. -->'
- type: textarea
validations:
required: true
attributes:
label: Use case
value: '<!-- Explain why do you think this feature would be useful, and what problems would it help to solve. -->'

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Question - Support
about: Do you need help setting up or using Shlink?
url: https://github.com/orgs/shlinkio/discussions/new?category=help-wanted

47
.github/actions/ci-setup/action.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: CI setup
description: 'Sets up the environment to run CI actions for Shlink'
inputs:
install-deps:
description: 'Tells if dependencies should be installed with composer. Default value is "yes"'
required: true
default: 'yes'
php-version:
description: 'The PHP version to be setup'
required: true
php-extensions:
description: 'The PHP extensions to install'
required: false
extensions-cache-key:
description: 'The key used to cache PHP extensions. If empty value is provided, extension caching is disabled'
required: true
runs:
using: composite
steps:
- name: Setup cache environment
if: ${{ inputs.php-extensions }}
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ inputs.php-version }}
extensions: ${{ inputs.php-extensions }}
key: ${{ inputs.extensions-cache-key }}
- name: Cache extensions
if: ${{ inputs.php-extensions }}
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Use PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
tools: composer
extensions: ${{ inputs.php-extensions }}
coverage: xdebug
- name: Install dependencies
if: ${{ inputs.install-deps == 'yes' }}
run: composer install --no-interaction --prefer-dist ${{ inputs.php-version == '8.5' && '--ignore-platform-req=php' || '' }}
shell: bash

45
.github/workflows/ci-db-tests.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Database tests
on:
workflow_call:
inputs:
platform:
type: string
required: true
description: One of sqlite:ci, mysql, maria, postgres or ms
jobs:
db-tests:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3', '8.4', '8.5']
continue-on-error: ${{ matrix.php-version == '8.5' }}
env:
LC_ALL: C
steps:
- uses: actions/checkout@v4
- name: Install MSSQL ODBC
if: ${{ inputs.platform == 'ms' }}
run: sudo ./data/infra/ci/install-ms-odbc.sh
- name: Start database server
if: ${{ inputs.platform != 'sqlite:ci' }}
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_${{ inputs.platform }}
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
php-extensions: pdo_sqlsrv-5.12.0
extensions-cache-key: db-tests-extensions-${{ matrix.php-version }}-${{ inputs.platform }}
- name: Create test database
if: ${{ inputs.platform == 'ms' }}
run: docker compose exec -T shlink_db_ms /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Passw0rd!' -Q "CREATE DATABASE shlink_test;"
- name: Run tests
run: composer test:db:${{ inputs.platform }}
- name: Upload code coverage
uses: actions/upload-artifact@v4
if: ${{ matrix.php-version == '8.3' && inputs.platform == 'sqlite:ci' }}
with:
name: coverage-db
path: |
build/coverage-db
build/coverage-db.cov

View File

@@ -0,0 +1,12 @@
name: Test docker image build
on:
pull_request:
paths:
- 'Dockerfile'
jobs:
build-docker-image:
uses: shlinkio/github-actions/.github/workflows/docker-image-build-ci.yml@main
with:
platforms: 'linux/arm64/v8,linux/amd64'

42
.github/workflows/ci-tests.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Tests
on:
workflow_call:
inputs:
test-group:
type: string
required: true
description: One of unit, api or cli
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3', '8.4', '8.5']
continue-on-error: ${{ matrix.php-version == '8.5' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically
steps:
- uses: actions/checkout@v4
- name: Start postgres database server
if: ${{ inputs.test-group == 'api' }}
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_postgres
- name: Start maria database server
if: ${{ inputs.test-group == 'cli' }}
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_maria
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
- name: Download RoadRunner binary
if: ${{ inputs.test-group == 'api' }}
run: ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr
- run: composer test:${{ inputs.test-group }}:ci
- uses: actions/upload-artifact@v4
if: ${{ matrix.php-version == '8.3' }}
with:
name: coverage-${{ inputs.test-group }}
path: |
build/coverage-${{ inputs.test-group }}
build/coverage-${{ inputs.test-group }}.cov

102
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: Continuous integration
on:
pull_request:
paths-ignore:
- 'LICENSE'
- '.*'
- '*.md'
- '*.xml'
- '*.yml*'
- '*.neon'
push:
branches:
- main
- develop
- 2.x
paths-ignore:
- 'LICENSE'
- '.*'
- '*.md'
- '*.xml'
- '*.yml*'
- '*.neon'
jobs:
static-analysis:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3']
command: ['cs', 'stan', 'openapi:validate']
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }}
- run: composer ${{ matrix.command }}
unit-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: unit
cli-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: cli
api-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: api
db-tests:
strategy:
matrix:
platform: ['sqlite:ci', 'mysql', 'maria', 'postgres', 'ms']
uses: './.github/workflows/ci-db-tests.yml'
with:
platform: ${{ matrix.platform }}
upload-coverage:
needs:
- unit-tests
- api-tests
- cli-tests
- db-tests
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use PHP
uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: tests-extensions-${{ matrix.php-version }}
- uses: actions/download-artifact@v4
with:
path: build
- run: mv build/coverage-unit/coverage-unit.cov build/coverage-unit.cov
- run: mv build/coverage-db/coverage-db.cov build/coverage-db.cov
- run: mv build/coverage-api/coverage-api.cov build/coverage-api.cov
- run: mv build/coverage-cli/coverage-cli.cov build/coverage-cli.cov
- run: vendor/bin/phpcov merge build --clover build/clover.xml
- name: Publish coverage
uses: codecov/codecov-action@v4
with:
file: ./build/clover.xml
delete-artifacts:
needs:
- upload-coverage
runs-on: ubuntu-24.04
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: |
coverage-*

View File

@@ -0,0 +1,26 @@
name: Build and publish docker image
on:
push:
tags:
- 'v*'
jobs:
build-image:
strategy:
matrix:
include:
- runtime: 'rr'
platforms: 'linux/arm64/v8,linux/amd64'
- runtime: 'rr'
tag-suffix: 'roadrunner'
platforms: 'linux/arm64/v8,linux/amd64'
uses: shlinkio/github-actions/.github/workflows/docker-publish-image.yml@main
secrets: inherit
with:
image-name: shlinkio/shlink
version-arg-name: SHLINK_VERSION
platforms: ${{ matrix.platforms }}
tags-suffix: ${{ matrix.tag-suffix }}
extra-build-args: |
SHLINK_RUNTIME=${{ matrix.runtime }}

View File

@@ -0,0 +1,35 @@
name: Publish openapi spec
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3']
steps:
- uses: actions/checkout@v4
- name: Determine version
id: determine_version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
shell: bash
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: publish-openapi-spec-extensions-${{ matrix.php-version }}
- run: composer openapi:inline
- run: mkdir ${{ steps.determine_version.outputs.version }}
- run: mv docs/swagger/openapi-inlined.json ${{ steps.determine_version.outputs.version }}/open-api-spec.json
- name: Publish spec
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.OAS_PUBLISH_TOKEN }}
repository-name: 'shlinkio/shlink-open-api-specs'
branch: main
folder: ${{ steps.determine_version.outputs.version }}
target-folder: specs/${{ steps.determine_version.outputs.version }}
clean: false

50
.github/workflows/publish-release.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Publish release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
php-version: ['8.3', '8.4']
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }}
install-deps: 'no'
- run: ./build.sh ${GITHUB_REF#refs/tags/v}
- uses: actions/upload-artifact@v4
with:
name: dist-files-${{ matrix.php-version }}
path: build
publish:
needs: ['build']
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: build
- name: Publish release with assets
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALLOW_EMPTY_CHANGELOG: "true"
with:
args: |
build/*/shlink*_dist.zip
delete-artifacts:
needs: ['publish']
runs-on: ubuntu-24.04
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: dist-files-*

12
.gitignore vendored
View File

@@ -1,5 +1,15 @@
.idea
bin/rr
.pid
build
!docker/build
composer.lock
composer.phar
vendor/
.env
data/database.sqlite
data/shlink-tests.db
data/GeoLite2-City.*
data/infra/matomo
docs/mercure.html
.phpunit.result.cache
docs/swagger/openapi-inlined.json

View File

@@ -1,7 +1,8 @@
<?php
namespace PHPSTORM_META;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
/**
* PhpStorm Container Interop code completion
@@ -16,4 +17,7 @@ $STATIC_METHOD_TYPES = [
ContainerInterface::get('') => [
'' == '@',
],
ServiceLocatorInterface::build('') => [
'' == '@',
],
];

View File

@@ -1,6 +0,0 @@
tools:
external_code_coverage: true
checks:
php:
code_rating: true
duplication: true

View File

@@ -1 +0,0 @@
extension="memcached.so"

View File

@@ -1,27 +0,0 @@
language: php
branches:
only:
- master
- develop
php:
- 5.6
- 7
- 7.1
before_install: phpenv config-add .travis-php.ini
before_script:
- composer self-update
- composer install --no-interaction
script:
- mkdir build
- composer check
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
sudo: false

File diff suppressed because it is too large Load Diff

154
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,154 @@
# Contributing
This file will guide you through the process of getting to project up and running, in case you want to provide coding contributions.
You will also see how to ensure the code fulfills the expected code checks, and how to create a pull request.
## System dependencies
The project provides all its dependencies as docker containers through a `docker compose` configuration.
Because of this, the only actual dependencies are [docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/).
## Setting up the project
The first thing you need to do is fork the repository, and clone it in your local machine.
Then you will have to follow these steps:
* Copy the `config/params/shlink_dev_env.php.dist` in the same directory, but removing the `.dist` extension:
```
cp config/params/shlink_dev_env.php.dist config/params/shlink_dev_env.php
```
The `shlink_dev_env.php` file is gitignored, so you can customize it as you want. For example, by adding your own GeoLite license key.
* Start-up the project by running `docker compose up`.
The first time this command is run, it will create several containers that are used during development, so it may take some time.
It will also create some empty databases and install the project dependencies with composer.
* Run `./indocker bin/cli db:create` to create the initial database.
* Run `./indocker bin/cli db:migrate` to get database migrations up to date.
* Run `./indocker bin/cli api-key:generate` to get your first API key generated.
Once you finish this, you will have the project exposed in ports `8800` through RoadRunner and `8000` through nginx+php-fpm.
> Note: The `indocker` shell script is a helper tool used to run commands inside the main docker container.
## Project structure
This project is structured as a modular application, using [laminas/laminas-config-aggregator](https://github.com/laminas/laminas-config-aggregator) to merge the configuration provided by every module.
All modules are inside the `module` folder, and each one has its own `src`, `test` and `config` folders, with the source code, tests and configuration. They also have their own `ConfigProvider` class, which is consumed by the config aggregator.
This is a simplified version of the project structure:
```
shlink
├── bin
│ ├── cli
│ └── [...]
├── config
│ ├── autoload
│ ├── params
│ ├── config.php
│ ├── container.php
│ └── [...]
├── data
│ ├── cache
│ ├── locks
│ ├── log
│ └── proxies
├── docs
│ ├── adr
│ ├── async-api
│ └── swagger
├── module
│ ├── CLI
│ ├── Core
│ └── Rest
├── public
│ └── [...]
├── composer.json
└── README.md
```
The purposes of every folder are:
* `bin`: It contains the CLI tools. The `cli` one is the main entry point to run Shlink from the command line.
* `config`: Contains application-wide configurations, which are later merged with the ones provided by every module.
* `data`: Common git-ignored assets, like logs, caches, lock files, GeoLite DB files, etc. It's the only location where Shlink may need to write at runtime.
* `docs`: Any project documentation is stored here, like API spec definitions or architectural decision records.
* `module`: Contains a sub-folder for every module in the project. Modules contain the source code, tests and configurations for every context in the project.
* `public`: Few assets (like `favicon.ico` or `robots.txt`) and the web entry point are stored here. This web entry point is not used when serving the app with RoadRunner.
## Project tests
In order to ensure stability and no regressions are introduced while developing new features, this project has different types of tests.
* **Unit tests**: These are the simplest to run, and usually test individual pieces of code, replacing any external dependency by mocks.
The code coverage of unit tests is pretty high, and only components which work closer to the database, like entity repositories, are excluded because of their nature.
* **Database tests**: These are integration tests that run against a real database, and only cover components which work closer to the database.
Its purpose is to verify all the database queries behave as expected and return what's expected.
The project provides some tooling to run them against any of the supported database engines.
* **API tests**: These are E2E tests that spin up an instance of the app with RoadRunner, and test it from the outside by interacting with the REST API.
These are the best tests to catch regressions, and to verify everything behaves as expected.
They use Postgres as the database engine, and include some fixtures that ensure the same data exists at the beginning of the execution.
Since the app instance is run on a process different from the one running the tests, when a test fails it might not be obvious why. To help debugging that, the app will dump all its logs inside `data/log/api-tests`, where you will find the `shlink.log` and `access.log` files.
* **CLI tests**: These are E2E tests too, but they test console commands instead of REST endpoints.
They use Maria DB as the database engine, and include the same fixtures as the API tests, that ensure the same data exists at the beginning of the execution.
Depending on the kind of contribution, maybe not all kinds of tests are needed, but the more you provide, the better.
## Running code checks
* Run `./indocker composer cs` to check coding styles are fulfilled.
* Run `./indocker composer cs:fix` to fix coding styles (some may not be fixable from the CLI)
* Run `./indocker composer stan` to statically analyze the code with [phpstan](https://phpstan.org/). This tool is the closest to "compile" PHP and verify everything would work as expected.
* Run `./indocker composer test:unit` to run the unit tests.
* Run `./indocker composer test:db` to run the database integration tests.
This command runs the same test suite against all supported database engines in parallel. If you just want to run one of them, you can add one of `:sqlite`, `:mysql`, `:maria`, `:postgres`, `:mssql` at the end of the command.
For example, `test:db:postgres`.
* Run `./indocker composer test:api` to run API E2E tests. For these, the Postgres database engine is used.
* Run `./indocker composer test:cli` to run CLI E2E tests. For these, the Maria DB database engine is used.
* Run `./indocker composer ci` to run all previous commands together, parallelizing non-conflicting tasks as much as possible.
## Testing endpoints
The project provides a Swagger UI container for dev envs, which can be accessed in http://localhost:8005.
It will automatically load the contents of `docs/swagger`, so you can make any updates and they will get reflected.
## Pull request process
**Important!**: Before starting to work on a pull request, make sure you always [open an issue](https://github.com/shlinkio/shlink/issues/new/choose) first.
This is important because any contribution needs to be discussed first. Maybe there's someone else already working on something similar, or there are other considerations to have in mind.
Once everything is clear, to provide a pull request to this project, you should always start by creating a new branch, where you will make all desired changes.
The base branch should always be `develop`, and the target branch for the pull request should also be `develop`.
Before your branch can be merged, all the checks described in [Running code checks](#running-code-checks) have to be passing. You can verify that manually by running `./indocker composer ci`, or wait for the build to be run automatically after the pull request is created.
## Architectural Decision Records
The project includes logs for some architectural decisions, using the [adr](https://adr.github.io/) proposal.
If you are curious or want to understand why something has been built in some specific way, [take a look at them](docs/adr).

69
Dockerfile Normal file
View File

@@ -0,0 +1,69 @@
FROM php:8.4-alpine3.21 AS base
ARG SHLINK_VERSION=latest
ENV SHLINK_VERSION=${SHLINK_VERSION}
ARG SHLINK_RUNTIME=rr
ENV SHLINK_RUNTIME=${SHLINK_RUNTIME}
ENV USER_ID='1001'
ENV PDO_SQLSRV_VERSION='5.12.0'
ENV MS_ODBC_DOWNLOAD='7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8'
ENV MS_ODBC_SQL_VERSION='18_18.4.1.1'
ENV LC_ALL='C'
WORKDIR /etc/shlink
# Install required PHP extensions
RUN \
# Temp install dev dependencies needed to compile the extensions
# FIXME Deprecated image-related extensions. They can be removed with QR-code support
apk add --no-cache --virtual .dev-deps sqlite-dev postgresql-dev icu-dev libzip-dev zlib-dev libpng-dev linux-headers && \
docker-php-ext-install -j"$(nproc)" pdo_mysql pdo_pgsql intl calendar sockets bcmath zip gd && \
apk add --no-cache sqlite-libs && \
docker-php-ext-install -j"$(nproc)" pdo_sqlite && \
# Remove temp dev extensions, and install prod equivalents that are required at runtime
apk del .dev-deps && \
apk add --no-cache postgresql icu libzip libpng
# Install sqlsrv driver for x86_64 builds
RUN apk add --no-cache --virtual .phpize-deps ${PHPIZE_DEPS} unixodbc-dev && \
if [ $(uname -m) == "x86_64" ]; then \
wget https://download.microsoft.com/download/${MS_ODBC_DOWNLOAD}/msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
apk add --allow-untrusted msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
pecl install pdo_sqlsrv-${PDO_SQLSRV_VERSION} && \
docker-php-ext-enable pdo_sqlsrv && \
rm msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk ; \
fi; \
apk del .phpize-deps
# Install shlink
FROM base AS builder
COPY . .
COPY --from=composer:2 /usr/bin/composer ./composer.phar
RUN apk add --no-cache git && \
php composer.phar install --no-dev --prefer-dist --optimize-autoloader --no-progress --no-interaction && \
php composer.phar clear-cache && \
rm -r docker composer.* && \
sed -i "s/%SHLINK_VERSION%/${SHLINK_VERSION}/g" module/Core/src/Config/Options/AppOptions.php
# Prepare final image
FROM base
LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
COPY --from=builder --chown=${USER_ID} /etc/shlink .
RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink && \
if [ "$SHLINK_RUNTIME" == 'rr' ]; then \
php ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr ; \
fi;
# Expose default port
EXPOSE 8080
# Copy config specific for the image
COPY docker/docker-entrypoint.sh docker-entrypoint.sh
COPY docker/config/php.ini ${PHP_INI_DIR}/conf.d/
USER ${USER_ID}
ENTRYPOINT ["/bin/sh", "./docker-entrypoint.sh"]

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016 Alejandro Celaya
Copyright (c) 2016-2024 Alejandro Celaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

109
README.md
View File

@@ -1,9 +1,104 @@
# Shlink
![Shlink](https://raw.githubusercontent.com/shlinkio/shlink.io/main/public/images/shlink-hero.png)
[![Build Status](https://travis-ci.org/shlinkio/shlink.svg?branch=master)](https://travis-ci.org/shlinkio/shlink)
[![Code Coverage](https://scrutinizer-ci.com/g/shlinkio/shlink/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/shlinkio/shlink/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/shlinkio/shlink/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/shlinkio/shlink/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/shlinkio/shlink/v/stable.png)](https://packagist.org/packages/shlinkio/shlink)
[![License](https://poser.pugx.org/shlinkio/shlink/license.png)](https://packagist.org/packages/shlinkio/shlink)
[![Build Status](https://img.shields.io/github/actions/workflow/status/shlinkio/shlink/ci.yml?branch=develop&logo=github&style=flat-square)](https://github.com/shlinkio/shlink/actions/workflows/ci.yml?query=workflow%3A%22Continuous+integration%22)
[![Code Coverage](https://img.shields.io/codecov/c/gh/shlinkio/shlink/develop?style=flat-square)](https://app.codecov.io/gh/shlinkio/shlink)
[![Latest Stable Version](https://img.shields.io/github/release/shlinkio/shlink.svg?style=flat-square)](https://packagist.org/packages/shlinkio/shlink)
[![Docker pulls](https://img.shields.io/docker/pulls/shlinkio/shlink.svg?logo=docker&style=flat-square)](https://hub.docker.com/r/shlinkio/shlink/)
[![License](https://img.shields.io/github/license/shlinkio/shlink.svg?style=flat-square)](https://github.com/shlinkio/shlink/blob/main/LICENSE)
A PHP-based URL shortener application with analytics and management
[![Mastodon](https://img.shields.io/mastodon/follow/109329425426175098?color=%236364ff&domain=https%3A%2F%2Ffosstodon.org&label=follow&logo=mastodon&logoColor=white&style=flat-square)](https://fosstodon.org/@shlinkio)
[![Bluesky](https://img.shields.io/badge/follow-shlinkio-0285FF.svg?style=flat-square&logo=bluesky&logoColor=white)](https://bsky.app/profile/shlink.io)
[![Paypal donate](https://img.shields.io/badge/Donate-paypal-blue.svg?style=flat-square&logo=paypal&colorA=aaaaaa)](https://slnk.to/donate)
A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own domain.
## Table of Contents
- [Full documentation](#full-documentation)
- [Docker image](#docker-image)
- [Self-hosted](#self-hosted)
- [Download](#download)
- [Configure](#configure)
- [Using shlink](#using-shlink)
- [Contributing](#contributing)
## Full documentation
This document contains the very basics to get started with Shlink. If you want to learn everything you can do with it, visit the [full searchable documentation](https://shlink.io/documentation/).
## Docker image
You can learn how to use the official docker image by reading [the docs](https://shlink.io/documentation/install-docker-image/).
The idea is that you can just generate a container using the image and provide the custom config via env vars.
## Self-hosted
First, make sure the host where you are going to run shlink fulfills these requirements:
* PHP 8.3 or 8.4
* The next PHP extensions: json, curl, pdo, intl, gd and gmp/bcmath.
* apcu extension is recommended if you don't plan to use RoadRunner.
* xml extension is required if you want to generate QR codes in svg format.
* sockets and bcmath extensions are required if you want to integrate with a RabbitMQ instance.
* MySQL, MariaDB, PostgreSQL, MicrosoftSQL or SQLite.
* You will also need the corresponding pdo variation for the database you are planning to use: `pdo_mysql`, `pdo_pgsql`, `pdo_sqlsrv` or `pdo_sqlite`.
### Download
In order to run Shlink, you will need a built version of the project. There are two ways to get it.
* **Using a dist file**
The easiest way to install shlink is by using one of the pre-bundled distributable packages.
Go to the [latest version](https://github.com/shlinkio/shlink/releases/latest) and download the `shlink*_dist.zip` file that suits your needs. You will find one for every supported PHP version.
Finally, decompress the file in the location of your choice.
* **Building from sources**
If for any reason you want to build the project yourself, follow these steps:
* Clone the project with git (`git clone https://github.com/shlinkio/shlink.git`), or download it by clicking the **Clone or download** green button.
* Download the [Composer](https://getcomposer.org/download/) PHP package manager inside the project folder.
* Run `./build.sh 3.0.0`, replacing the version with the version number you are going to build (the version number is used as part of the generated dist file name, and to set the value returned when running `shlink -V` from the command line).
After that, you will have a dist file inside the `build` directory, that you need to decompress in the location of your choice.
> **Note**
>
> This is the process used when releasing new Shlink versions. After tagging the new version with git, the GitHub release is automatically created by a [GitHub workflow](https://github.com/shlinkio/shlink/actions?query=workflow%3A%22Publish+release%22), attaching the generated dist file to it.
### Configure
Despite how you built the project, you now need to configure it, by following these steps:
* If you are going to use MySQL, MariaDB, PostgreSQL or Microsoft SQL Server, create an empty database with the name of your choice.
* Recursively grant write permissions to the `data` directory. Shlink uses it to cache some information.
* Set up the application by running the `vendor/bin/shlink-installer install` script. It is a command line tool that will guide you through the installation process. **Take into account that this tool has to be run directly on the server where you plan to host Shlink. Do not run it before uploading/moving it there.**
* Generate your first API key by running `bin/cli api-key:generate`. You will need the key in order to interact with Shlink's API.
## Using shlink
Once shlink is installed, there are two main ways to interact with it:
* **The command line**: Try running `bin/cli` to see all the available commands.
All of them can be run with the `--help`/`-h` flag in order to see how to use them and all the available options.
It is probably a good idea to symlink the CLI entry point (`bin/cli`) to somewhere in your path, so that you can run shlink from any directory.
* **The REST API**: The complete docs on how to use the API can be found [here](https://shlink.io/documentation/api-docs), and a sandbox which also documents every endpoint can be found in the [API Spec](https://api-spec.shlink.io/) portal.
However, you probably don't want to consume the raw API yourself. That's why a nice [web client](https://github.com/shlinkio/shlink-web-client) is provided that can be directly used from [https://app.shlink.io](https://app.shlink.io), or hosted by yourself.
Both the API and CLI allow you to do mostly the same operations, except for API key management, which can be done from the command line interface only.
## Contributing
If you are trying to find out how to run the project in development mode or how to provide contributions, read the [CONTRIBUTING](CONTRIBUTING.md) doc.
---
> This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com)

186
UPGRADE.md Normal file
View File

@@ -0,0 +1,186 @@
# Upgrading
## From v3.x to v4.x
### General
* Swoole and Openswoole are no longer officially supported runtimes. The recommended alternative is RoadRunner.
* Dist files for swoole/openswoole are no longer published.
* Webhooks are no longer supported. Migrate to one of the other [real-time updates](https://shlink.io/documentation/advanced/real-time-updates/) mechanisms.
* When using RoadRunner, the amount of web workers, task workers and the port number can no longer be provided via config options. Use `WEB_WORKER_NUM`, `TASK_WORKER_NUM` and `PORT` env vars instead.
### Changes in URL shortener
* The short URLs `loosely` mode is no longer supported, as it was a typo. Use `loose` mode instead.
* QR codes URLs now work by default, even for short URLs that cannot be visited due to max visits or date range limitations.
If you want to keep previous behavior, pass `QR_CODE_FOR_DISABLED_SHORT_URLS=false` or the equivalent configuration option.
* Long URL title resolution is now enabled by default. You can still disable it by passing `AUTO_RESOLVE_TITLES=false` or the equivalent configuration option.
* Shlink no longer allows to opt-in for long URL verification. Long URLs are unconditionally considered correct during short URL creation/edition.
* Device long URLs have been migrated to the new Dynamic rule-based redirects system and will continue to work as expected, but the API surface has changed.
If you use shlink-web-client and rely on this feature when creating/updating short URLs, **DO NOT UPDATE YET**. Support for dynamic rule-based redirects will be added to shlink-web-client soon, in v4.1.0
### Changes in REST API
* REST API v1/v2 now behave like v3. This only affects error codes, which are now proper URIs.
* `INVALID_ARGUMENT` -> `https://shlink.io/api/error/invalid-data`
* `INVALID_SHORT_URL_DELETION` -> `https://shlink.io/api/error/invalid-short-url-deletion`
* `DOMAIN_NOT_FOUND` -> `https://shlink.io/api/error/domain-not-found`
* `FORBIDDEN_OPERATION` -> `https://shlink.io/api/error/forbidden-tag-operation`
* `INVALID_SLUG` -> `https://shlink.io/api/error/non-unique-slug`
* `INVALID_SHORTCODE` -> `https://shlink.io/api/error/short-url-not-found`
* `TAG_CONFLICT` -> `https://shlink.io/api/error/tag-conflict`
* `TAG_NOT_FOUND` -> `https://shlink.io/api/error/tag-not-found`
* `MERCURE_NOT_CONFIGURED` -> `https://shlink.io/api/error/mercure-not-configured`
* `INVALID_AUTHORIZATION` -> `https://shlink.io/api/error/missing-authentication`
* `INVALID_API_KEY` -> `https://shlink.io/api/error/invalid-api-key`
* Endpoints previously returning props like `"visitsCount": {number}` no longer do it. There should be an alternative `"visitsSummary": {}` object with the amount nested on it.
* It is no longer possible to order the short URLs list with `orderBy=visitsCount-ASC`/`orderBy=visitsCount-DESC`. Use `orderBy=visits-ASC`/`orderBy=visits-DESC` instead.
* It is no longer possible to get tags with stats using `GET /tags?withStats=true`. Use `GET /tags/stats` endpoint instead.
* The `deviceLongUrls` are ignored when calling `POST /short-urls` or `PATCH /short-urls/{shortCode}`. These should now be configured as dynamic rule-based redirects via `POST /short-urls/{shortCode}/redirect-rules`.
### Changes in Docker image
* Since openswoole is no longer supported, there are no longer image tags suffixed with `openswoole`. You should migrate to the default or `roadrunner` ones.
* The `non-root` docker tag is no longer published, as all docker images are now running without super-user permissions.
* Due to previous point, it is no longer possible to pass `ENABLE_PERIODIC_VISIT_LOCATE=true` in order to configure a cron job that locates visits periodically.
This was not really needed in the docker image, as visits are located on the fly.
### Changes in integrations
* Credentials in redis URLs should now be URL-encoded, as they are unconditionally url-decoded before being used. Previously, it was possible to customize this behavior via `REDIS_DECODE_CREDENTIALS=true|false`.
* Providing redis URIs in the form of `tcp://password@6.6.6.6:6379` is no longer supported. If you want to provide password with no username, do `tcp://:password@6.6.6.6:6379` instead.
## From v2.x to v3.x
### Changes in REST API
* The `type` property returned when trying to delete a URL that reached the visits threshold, when using the `DELETE /short-urls/{shortCode}` endpoint, is now `INVALID_SHORT_URL_DELETION` instead of `INVALID_SHORTCODE_DELETION`.
* The `INVALID_AUTHORIZATION` error no longer includes the `expectedTypes` property. Use `expectedHeaders` one instead.
* The `GET /rest/v2/short-urls` endpoint no longer allows ordering by `visitsCount`, `visitCount` or `originalUrl`. Use `visits` instead of the first two, and `longUrl` instead of the last one.
* The `GET /rest/v2/short-urls` endpoint no longer allows providing the ordering params with array notation, as in `/shortUrls?orderBy[longUrl]=DESC`. Instead, use the following notation `/shortUrls?orderBy=longUrl-DESC`.
* The `GET /rest/v2/short-urls` endpoint now has a default ordering of newest-to-oldest. Use `/shortUrls?orderBy=dateCreated-ASC` in order to keep the oldest-to-newest behavior.
* Requests expecting a body no longer support url-encoded payloads. Instead, always use JSON bodies with `Content-Type: application/json`.
* The next endpoints have been removed:
* `PUT /rest/v2/short-urls/{shortCode}/tags`: Use the `PATCH /rest/v2/short-urls/{shortCode}` endpoint to set the short URL tags.
* `POST /rest/v2/tags`: Use `POST /rest/v2/short-urls` or `PATCH /rest/v2/short-urls/{shortCodes}` to create new tags already attached to a short URL. Creating orphan tags makes no sense.
### Changes in CLI
* The next commands have been removed:
* `short-url:generate`: Use `short-url:create` instead.
* `tag:create`: Creating orphan tags makes no sense.
* Params in camelCase format are no longer supported. They all have an equivalent kebab-case replacement. (for example, from `--startDate` to `--start-date`).
* The `short-url:create` command no longer accepts the `--no-validate-url` flag. Now URLs are never validated, unless `--validate-url` is passed.
* The CLI installer tool entry-points have changed.
* `bin/install`: replaced by `vendor/bin/shlink-installer install`
* `bin/update`: replaced by `vendor/bin/shlink-installer update`
* `bin/set-option`: replaced by `vendor/bin/shlink-installer set-option`
### Changes in config
* The next env vars have been removed:
* `INVALID_SHORT_URL_REDIRECT_TO`: Replaced by `DEFAULT_INVALID_SHORT_URL_REDIRECT`.
* `REGULAR_404_REDIRECT_TO`: Replaced by `DEFAULT_REGULAR_404_REDIRECT`.
* `BASE_URL_REDIRECT_TO`: Replaced by `DEFAULT_BASE_URL_REDIRECT`.
* `SHORT_DOMAIN_HOST`: Replaced by `DEFAULT_DOMAIN`.
* `SHORT_DOMAIN_SCHEMA`: Replaced by `IS_HTTPS_ENABLED`.
* `USE_HTTPS`: Replaced by `IS_HTTPS_ENABLED`.
* `VALIDATE_URLS`: There's no replacement. URLs are not validated, unless explicitly requested during creation or edition.
* The next env vars behavior has changed:
* `DELETE_SHORT_URL_THRESHOLD`: Now, if this env var is not provided, the "visits threshold" won't be checked at all when deleting short URLs. Make sure you explicitly provide a value if you want to enable this feature.
* Environment variables now have precedence over configuration set via the installer tool.
### Other changes
* A default GeoLite2 license key is no longer provided. If you don't provide your own as explained in [the docs](https://shlink.io/documentation/geolite-license-key/), Shlink will not try to update the file anymore.
* The docker image no longer accepts providing configuration via json files mounted in the `config/params` folder. Only env vars are supported now.
* If you were manually serving Shlink with swoole, the entry script has to be changed from `/path/to/shlink/vendor/bin/mezzio-swoole start` to `/path/to/shlink/vendor/bin/laminas mezzio:swoole:start`
* The `GET /{shortCode}/qr-code/{size}` url has been removed. Use `GET /{shortCode}/qr-code?size={size}` instead.
* Regular swoole extension is no longer supported. Use openswoole instead, as a direct replacement. In most of the cases you just need to uninstall one and install the other, the rest is transparent.
## From v1.x to v2.x
### PHP 7.4 required
This new version takes advantage of several new features introduced in PHP 7.4.
Thanks to that, the code is more reliable and robust, and easier to maintain and improve.
However, that means that any previous PHP version is no longer supported.
### Preview generation
The ability to generate website previews has been completely removed and has no replacement.
The feature never properly worked, and it wasn't really useful. Because of that, the feature is no longer available on Shlink 2.x
Removing this feature has these implications:
* The `short-url:process-previews` CLI command no longer exists, and an error will be thrown if executed.
* The `/{shortCode}/preview` path is no longer valid, and will return a 404 status.
### Removed paths
These routes have been removed, but have a direct replacement:
* `/qr/{shortCode}[/{size}]` -> `/{shortCode}/qr-code[/{size}]`
* `PUT /rest/v{version}/short-urls/{shortCode}` -> `PATCH /rest/v{version}/short-urls/{shortCode}`
When using the old ones, a 404 status will be returned now.
### Removed command and route aliases
All the aliases for the CLI commands in the `short-urls` namespace have been removed. If you were using any of those commands with the `shortcode` or `short-code` prefixes, make sure to update them to use the `short-urls` prefix instead.
The same happens for all REST endpoints starting with `/short-code`. They were previously aliased to `/short-urls` ones, but they will return a 404 now. Make sure to update them accordingly.
### JWT authentication removed
Shlink's REST API no longer accepts authentication using a JWT token. The API key has to be passed now in the `x-api-key` header.
Removing this feature has these implications:
* Shlink will no longer introspect the `Authorization` header for Bearer tokens.
* The `POST /rest/v{version}/authenticate` endpoint no longer exists and will return a 404.
### API version is now required
Endpoints need to provide a version in the path now. Previously, not providing a version used to fall back to v1. Now, it will return a 404 status, as no route will match.
The only exception is the `/rest/health` endpoint, which will continue working without the version.
### API errors
Shlink v1.21.0 introduced support for API errors using the Problem Details format, as well as the v2 of the API.
For backwards compatibility reasons, requests performed to v1 continued to return the old `error` and `message` properties.
Starting with Shlink v2.0.0, both versions of the API will no longer return those two properties.
As a replacement, use `type` instead of `error`, and `detail` instead of `message`.
### Changes in models
The next REST API models have changed:
* **ShortUrl**: The `originalUrl` property was deprecated and has been removed. Use `longUrl` instead.
* **Visit**: The `remoteAddr` property was deprecated and has been removed. It has no replacement.
* **VisitLocation**: The `latitude` and `longitude` properties are no longer strings, but float.
### URL validation
Shlink can verify provided long URLs are valid before trying to shorten them. Starting with v2, it no longer does it by default and needs to be explicitly enabled instead of explicitly disabled.
### Removed config options
The `not_found_redirect_to` config option and the `NOT_FOUND_REDIRECT_TO` env var are no longer taken into consideration for the docker image.
Instead, use `invalid_short_url_redirect_to` and `INVALID_SHORT_URL_REDIRECT_TO` respectively.
### Migrated to Laminas
The project has been using Zend Framework components since the beginning. Since it has been re-branded as [Laminas](https://getlaminas.org/), this version updates to the new set of components.
Updating to Laminas components has these implications:
* If you were manually serving Shlink with swoole, the entry script has to be changed from `/path/to/shlink/vendor/bin/zend-expressive-swoole` to `/path/to/shlink/vendor/bin/mezzio-swoole`

15
bin/cli
View File

@@ -1,17 +1,10 @@
#!/usr/bin/env php
<?php
use Interop\Container\ContainerInterface;
use Symfony\Component\Console\Application as CliApp;
declare(strict_types=1);
use Symfony\Component\Console\Application;
use Zend\I18n\Translator\Translator;
/** @var ContainerInterface $container */
$container = include __DIR__ . '/../config/container.php';
/** @var Translator $translator */
$translator = $container->get('translator');
$translator->setLocale(env('CLI_LOCALE', 'en'));
/** @var Application $app */
$app = $container->get(CliApp::class);
$app = require __DIR__ . '/../config/cli-app.php';
$app->run();

12
bin/doctrine Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
/** @var EntityManager $app */
$em = require __DIR__ . '/../config/entity-manager.php';
ConsoleRunner::run(new SingleManagerProvider($em));

44
bin/roadrunner-worker.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;
use Mezzio\Application;
use Psr\Container\ContainerInterface;
use Shlinkio\Shlink\Common\Middleware\RequestIdMiddleware;
use Shlinkio\Shlink\EventDispatcher\RoadRunner\RoadRunnerTaskConsumerToListener;
use Spiral\RoadRunner\Http\PSR7Worker;
use function gc_collect_cycles;
use function Shlinkio\Shlink\Config\env;
(static function (): void {
/** @var ContainerInterface $container */
$container = include __DIR__ . '/../config/container.php';
$rrMode = env('RR_MODE');
$gcCollectCycles = env('GC_COLLECT_CYCLES', default: false);
if ($rrMode === 'http') {
// This was spin-up as a web worker
$app = $container->get(Application::class);
$worker = $container->get(PSR7Worker::class);
while ($req = $worker->waitRequest()) {
try {
$worker->respond($app->handle($req));
} catch (Throwable $e) {
$worker->getWorker()->error((string) $e);
} finally {
if ($gcCollectCycles) {
gc_collect_cycles();
}
}
}
} else {
$requestIdMiddleware = $container->get(RequestIdMiddleware::class);
$container->get(RoadRunnerTaskConsumerToListener::class)->listenForTasks(
fn (string $requestId) => $requestIdMiddleware->setCurrentRequestId($requestId),
);
}
})();

33
bin/test/run-api-tests.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env sh
export APP_ENV=test
export TEST_ENV=api
export TEST_RUNTIME="${TEST_RUNTIME:-"rr"}" # rr is the only runtime currently supported
export DB_DRIVER="${DB_DRIVER:-"postgres"}"
export GENERATE_COVERAGE="${GENERATE_COVERAGE:-"no"}"
[ "$GENERATE_COVERAGE" != 'no' ] && export XDEBUG_MODE=coverage
# Reset logs
OUTPUT_LOGS=data/log/api-tests/output.log
rm -rf data/log/api-tests
mkdir data/log/api-tests
touch $OUTPUT_LOGS
# Try to stop server just in case it hanged in last execution
[ "$TEST_RUNTIME" = 'rr' ] && bin/rr stop -f -w .
echo 'Starting server...'
[ "$TEST_RUNTIME" = 'rr' ] && bin/rr serve -p -w . -c=config/roadrunner/.rr.test.yml \
-o=logs.output="${PWD}/${OUTPUT_LOGS}" \
-o=logs.channels.http.output="${PWD}/${OUTPUT_LOGS}" \
-o=logs.channels.server.output="${PWD}/${OUTPUT_LOGS}" &
sleep 2 # Let's give the server a couple of seconds to start
vendor/bin/phpunit --order-by=random -c phpunit-api.xml --testdox --testdox-summary $*
TESTS_EXIT_CODE=$?
[ "$TEST_RUNTIME" = 'rr' ] && bin/rr stop -w .
# Exit this script with the same code as the tests. If tests failed, this script has to fail
exit $TESTS_EXIT_CODE

14
bin/test/run-cli-tests.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
export APP_ENV=test
export TEST_ENV=cli
export DB_DRIVER="${DB_DRIVER:-"maria"}"
export GENERATE_COVERAGE="${GENERATE_COVERAGE:-"no"}"
[ "$GENERATE_COVERAGE" != 'no' ] && export XDEBUG_MODE=coverage
vendor/bin/phpunit --order-by=random --testdox --testdox-summary -c phpunit-cli.xml $*
TESTS_EXIT_CODE=$?
# Exit this script with the same code as the tests. If tests failed, this script has to fail
exit $TESTS_EXIT_CODE

49
build.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -e
if [ "$#" -lt 1 ]; then
echo "Usage:" >&2
echo " $0 {version}" >&2
exit 1
fi
version=$1
phpVersion=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
distId="shlink${version}_php${phpVersion}_dist"
builtContent="./build/${distId}"
projectdir=$(pwd)
[[ -f ./composer.phar ]] && composerBin='./composer.phar' || composerBin='composer'
# Copy project content to temp dir
echo 'Copying project files...'
rm -rf "${builtContent}"
mkdir -p "${builtContent}"
rsync -av * "${builtContent}" \
--exclude=*docker* \
--exclude=Dockerfile \
--include=.htaccess \
--include=config/roadrunner/.rr.yml \
--exclude-from=./.dockerignore
cd "${builtContent}"
# Install dependencies
echo "Installing dependencies with $composerBin..."
${composerBin} self-update
${composerBin} install --no-dev --prefer-dist --optimize-autoloader --no-progress --no-interaction
# Delete development files
echo 'Deleting dev files...'
rm composer.*
# Update Shlink version
sed -i "s/%SHLINK_VERSION%/${version}/g" module/Core/src/Config/Options/AppOptions.php
# Compressing file
echo 'Compressing files...'
cd "${projectdir}"/build
rm -f ./${distId}.zip
zip -ry ./${distId}.zip ./${distId}
cd "${projectdir}"
rm -rf "${builtContent}"
echo 'Done!'

View File

@@ -1,72 +1,170 @@
{
"name": "shlinkio/shlink",
"type": "project",
"homepage": "http://shlink.io",
"homepage": "https://shlink.io",
"description": "A self-hosted and PHP-based URL shortener application with CLI and REST interfaces",
"license": "MIT",
"authors": [
{
"name": "Alejandro Celaya Alastrué",
"homepage": "http://www.alejandrocelaya.com",
"homepage": "https://www.alejandrocelaya.com",
"email": "alejandro@alejandrocelaya.com"
}
],
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-expressive": "^1.0",
"zendframework/zend-expressive-fastroute": "^1.1",
"zendframework/zend-expressive-twigrenderer": "^1.0",
"zendframework/zend-stdlib": "^2.7",
"zendframework/zend-servicemanager": "^3.0",
"zendframework/zend-paginator": "^2.6",
"zendframework/zend-config": "^2.6",
"zendframework/zend-i18n": "^2.7",
"mtymek/expressive-config-manager": "^0.4",
"acelaya/zsm-annotated-services": "^0.2.0",
"doctrine/orm": "^2.5",
"guzzlehttp/guzzle": "^6.2",
"symfony/console": "^3.0",
"firebase/php-jwt": "^4.0",
"monolog/monolog": "^1.21",
"theorchard/monolog-cascade": "^0.4",
"endroid/qrcode": "^1.7"
"php": "^8.3",
"ext-curl": "*",
"ext-gd": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"akrabat/ip-address-middleware": "^2.6",
"cakephp/chronos": "^3.1",
"doctrine/dbal": "^4.2",
"doctrine/migrations": "^3.8",
"doctrine/orm": "^3.3",
"donatj/phpuseragentparser": "^1.10",
"endroid/qr-code": "^6.0.5",
"friendsofphp/proxy-manager-lts": "^1.0",
"geoip2/geoip2": "^3.1",
"guzzlehttp/guzzle": "^7.9",
"hidehalo/nanoid-php": "^2.0",
"jaybizzle/crawler-detect": "^1.3",
"laminas/laminas-config-aggregator": "^1.17",
"laminas/laminas-diactoros": "^3.5",
"laminas/laminas-inputfilter": "^2.31",
"laminas/laminas-servicemanager": "^3.23",
"laminas/laminas-stdlib": "^3.20",
"matomo/matomo-php-tracker": "^3.3",
"mezzio/mezzio": "^3.20",
"mezzio/mezzio-fastroute": "^3.12",
"mezzio/mezzio-problem-details": "^1.15",
"mlocati/ip-lib": "^1.18.1",
"pagerfanta/core": "^3.8",
"ramsey/uuid": "^4.7",
"shlinkio/doctrine-specification": "^2.2",
"shlinkio/shlink-common": "^7.1",
"shlinkio/shlink-config": "^4.0",
"shlinkio/shlink-event-dispatcher": "^4.3",
"shlinkio/shlink-importer": "^5.6",
"shlinkio/shlink-installer": "^9.6",
"shlinkio/shlink-ip-geolocation": "^4.3",
"shlinkio/shlink-json": "^1.2",
"spiral/roadrunner": "^2025.1",
"spiral/roadrunner-cli": "^2.7",
"spiral/roadrunner-http": "^3.5",
"spiral/roadrunner-jobs": "^4.6",
"symfony/console": "^7.3",
"symfony/filesystem": "^7.3",
"symfony/lock": "^7.3.2",
"symfony/process": "^7.3",
"symfony/string": "^7.3"
},
"require-dev": {
"phpunit/phpunit": "^5.0",
"squizlabs/php_codesniffer": "^2.3",
"devizzent/cebe-php-openapi": "^1.1.2",
"devster/ubench": "^2.1",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-doctrine": "^2.0",
"phpstan/phpstan-phpunit": "^2.0.5",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/php-code-coverage": "^12.0",
"phpunit/phpcov": "^11.0",
"phpunit/phpunit": "^12.0.10",
"roave/security-advisories": "dev-master",
"filp/whoops": "^2.0",
"symfony/var-dumper": "^3.0",
"vlucas/phpdotenv": "^2.2"
"shlinkio/php-coding-standard": "~2.4.2",
"shlinkio/shlink-test-utils": "^4.3.1",
"symfony/var-dumper": "^7.3",
"veewee/composer-run-parallel": "^1.4"
},
"conflict": {
"symfony/var-exporter": ">=6.3.9,<=6.4.0"
},
"autoload": {
"psr-4": {
"Shlinkio\\Shlink\\CLI\\": "module/CLI/src",
"Shlinkio\\Shlink\\Rest\\": "module/Rest/src",
"Shlinkio\\Shlink\\Core\\": "module/Core/src",
"Shlinkio\\Shlink\\Common\\": "module/Common/src"
"Shlinkio\\Shlink\\Core\\": "module/Core/src"
},
"files": [
"module/Common/functions/functions.php"
"config/constants.php",
"module/Core/functions/array-utils.php",
"module/Core/functions/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"ShlinkioTest\\Shlink\\CLI\\": "module/CLI/test",
"ShlinkioCliTest\\Shlink\\CLI\\": "module/CLI/test-cli",
"ShlinkioTest\\Shlink\\Rest\\": "module/Rest/test",
"ShlinkioApiTest\\Shlink\\Rest\\": "module/Rest/test-api",
"ShlinkioDbTest\\Shlink\\Rest\\": "module/Rest/test-db",
"ShlinkioTest\\Shlink\\Core\\": "module/Core/test",
"ShlinkioTest\\Shlink\\Common\\": "module/Common/test"
}
"ShlinkioDbTest\\Shlink\\Core\\": "module/Core/test-db",
"ShlinkioApiTest\\Shlink\\Core\\": "module/Core/test-api"
},
"files": [
"config/test/constants.php"
]
},
"scripts": {
"check": [
"@cs",
"@test"
"ci": [
"@parallel cs stan openapi:validate test:unit:ci test:db:sqlite:ci test:db:postgres test:db:mysql test:db:maria test:db:ms",
"@parallel test:api:ci test:cli:ci"
],
"cs": "phpcs",
"cs-fix": "phpcbf",
"serve": "php -S 0.0.0.0:8000 -t public/",
"test": "phpunit --coverage-clover build/clover.xml",
"pretty-test": "phpunit --coverage-html build/coverage"
"cs": "phpcs -s",
"cs:fix": "phpcbf",
"stan": ["@putenv APP_ENV=test", "phpstan analyse"],
"test": [
"@parallel test:unit test:db",
"@parallel test:api test:cli"
],
"test:unit": ["@putenv COLUMNS=120", "phpunit --order-by=random --testdox --testdox-summary"],
"test:unit:ci": ["@putenv XDEBUG_MODE=coverage", "@test:unit --coverage-php=build/coverage-unit.cov"],
"test:unit:pretty": ["@putenv XDEBUG_MODE=coverage", "@test:unit --coverage-html build/coverage-unit/coverage-html"],
"test:db": "@parallel test:db:sqlite:ci test:db:mysql test:db:maria test:db:postgres test:db:ms",
"test:db:sqlite": ["@putenv APP_ENV=test", "phpunit --order-by=random --testdox --testdox-summary -c phpunit-db.xml"],
"test:db:sqlite:ci": ["@putenv XDEBUG_MODE=coverage", "@test:db:sqlite --coverage-php build/coverage-db.cov"],
"test:db:mysql": ["@putenv DB_DRIVER=mysql", "@test:db:sqlite"],
"test:db:maria": ["@putenv DB_DRIVER=maria", "@test:db:sqlite"],
"test:db:postgres": ["@putenv DB_DRIVER=postgres", "@test:db:sqlite"],
"test:db:ms": ["@putenv DB_DRIVER=mssql", "@test:db:sqlite"],
"test:api": "bin/test/run-api-tests.sh",
"test:api:sqlite": ["@putenv DB_DRIVER=sqlite", "@test:api"],
"test:api:mysql": ["@putenv DB_DRIVER=mysql", "@test:api"],
"test:api:maria": ["@putenv DB_DRIVER=maria", "@test:api"],
"test:api:mssql": ["@putenv DB_DRIVER=mssql", "@test:api"],
"test:api:ci": [
"@putenv GENERATE_COVERAGE=yes",
"@test:api",
"phpcov merge build/coverage-api --php build/coverage-api.cov && rm build/coverage-api/*.cov"
],
"test:api:pretty": [
"@putenv GENERATE_COVERAGE=yes",
"@test:api",
"phpcov merge build/coverage-api --html build/coverage-api/coverage-html && rm build/coverage-api/*.cov"
],
"test:cli": "bin/test/run-cli-tests.sh",
"test:cli:ci": [
"@putenv GENERATE_COVERAGE=yes",
"@test:cli",
"vendor/bin/phpcov merge build/coverage-cli --php build/coverage-cli.cov && rm build/coverage-cli/*.cov"
],
"test:cli:pretty": [
"@putenv GENERATE_COVERAGE=yes",
"@test:cli",
"phpcov merge build/coverage-cli --html build/coverage-cli/coverage-html && rm build/coverage-cli/*.cov"
],
"openapi:validate": "php-openapi validate docs/swagger/swagger.json",
"openapi:inline": "php-openapi inline docs/swagger/swagger.json docs/swagger/openapi-inlined.json",
"clean:dev": "rm -f data/database.sqlite && rm -f config/params/generated_config.php"
},
"config": {
"sort-packages": true,
"platform-check": false,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"veewee/composer-run-parallel": true
}
}
}

View File

@@ -1,2 +0,0 @@
local.php
*.local.php

View File

@@ -1,10 +0,0 @@
<?php
return [
'app_options' => [
'name' => 'Shlink',
'version' => '1.1.0',
'secret_key' => env('SECRET_KEY'),
],
];

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars;
return (static function (): array {
$redisServers = EnvVars::REDIS_SERVERS->loadFromEnv();
$redis = ['pub_sub_enabled' => $redisServers !== null && EnvVars::REDIS_PUB_SUB_ENABLED->loadFromEnv()];
$cacheRedisBlock = $redisServers === null ? [] : [
'redis' => [
'servers' => $redisServers,
'sentinel_service' => EnvVars::REDIS_SENTINEL_SERVICE->loadFromEnv(),
],
];
return [
'cache' => [
'namespace' => EnvVars::CACHE_NAMESPACE->loadFromEnv(),
...$cacheRedisBlock,
],
'redis' => $redis,
];
})();

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
use Laminas\ConfigAggregator\ConfigAggregator;
use Shlinkio\Shlink\Core\Config\EnvVars;
return (function () {
$isDev = EnvVars::isDevEnv();
return [
'debug' => $isDev,
// Disabling config cache for cli, ensures it's never used for RoadRunner, and also that console
// commands don't generate a cache file that's then used by php-fpm web executions
ConfigAggregator::ENABLE_CACHE => ! $isDev && PHP_SAPI !== 'cli',
];
})();

View File

@@ -1,23 +1,52 @@
<?php
use Shlinkio\Shlink\Common\ErrorHandler\ContentBasedErrorHandler;
use Zend\Expressive;
use Zend\Expressive\Container;
use Zend\Expressive\Router;
use Zend\Expressive\Template;
use Zend\Expressive\Twig;
use Zend\ServiceManager\Factory\InvokableFactory;
declare(strict_types=1);
use GuzzleHttp\Client;
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
use Laminas\ServiceManager\Factory\InvokableFactory;
use Mezzio\Application;
use Mezzio\Container;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Message\UploadedFileFactoryInterface;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Spiral\RoadRunner\Http\PSR7Worker;
use Spiral\RoadRunner\WorkerInterface;
use Symfony\Component\Filesystem\Filesystem;
return [
'dependencies' => [
'factories' => [
Expressive\Application::class => Container\ApplicationFactory::class,
Router\FastRouteRouter::class => InvokableFactory::class,
Template\TemplateRendererInterface::class => Twig\TwigRendererFactory::class,
PSR7Worker::class => ConfigAbstractFactory::class,
Filesystem::class => InvokableFactory::class,
],
'delegators' => [
Application::class => [
Container\ApplicationConfigInjectionDelegator::class,
],
],
'aliases' => [
Router\RouterInterface::class => Router\FastRouteRouter::class,
'Zend\Expressive\FinalHandler' => ContentBasedErrorHandler::class,
ClientInterface::class => Client::class,
],
'lazy_services' => [
'proxies_target_dir' => 'data/proxies',
'proxies_namespace' => 'ShlinkProxy',
'write_proxy_files' => EnvVars::isProdEnv(),
],
],
ConfigAbstractFactory::class => [
PSR7Worker::class => [
WorkerInterface::class,
ServerRequestFactoryInterface::class,
StreamFactoryInterface::class,
UploadedFileFactoryInterface::class,
],
],

View File

@@ -1,20 +1,80 @@
<?php
return [
'entity_manager' => [
'orm' => [
'proxies_dir' => 'data/proxies',
declare(strict_types=1);
use Doctrine\ORM\Events;
use Happyr\DoctrineSpecification\Repository\EntitySpecificationRepository;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Shlinkio\Shlink\Core\Visit\Listener\OrphanVisitsCountTracker;
use Shlinkio\Shlink\Core\Visit\Listener\ShortUrlVisitsCountTracker;
use function Shlinkio\Shlink\Core\ArrayUtils\contains;
return (static function (): array {
$driver = EnvVars::DB_DRIVER->loadFromEnv();
$useEncryption = (bool) EnvVars::DB_USE_ENCRYPTION->loadFromEnv();
$isMysqlCompatible = contains($driver, ['maria', 'mysql']);
$doctrineDriver = match ($driver) {
'postgres' => 'pdo_pgsql',
'mssql' => 'pdo_sqlsrv',
default => 'pdo_mysql',
};
$readCredentialAsString = static function (EnvVars $envVar): string|null {
$value = $envVar->loadFromEnv();
return $value === null ? null : (string) $value;
};
$charset = match ($driver) {
// This does not determine charsets or collations in tables or columns, but the charset used in the data
// flowing in the connection, so it has to match what has been set in the database.
'maria', 'mysql' => 'utf8mb4',
'postgres' => 'utf8',
default => null,
};
$driverOptions = match ($driver) {
'mssql' => ['TrustServerCertificate' => 'true'],
'maria', 'mysql' => ! $useEncryption ? [] : [
1007 => true, // PDO::MYSQL_ATTR_SSL_KEY: Require using SSL
1014 => false, // PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: Trust any certificate
],
'connection' => [
'driver' => 'pdo_mysql',
'user' => env('DB_USER'),
'password' => env('DB_PASSWORD'),
'dbname' => env('DB_NAME', 'shlink'),
'charset' => 'utf8',
'driverOptions' => [
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
'postgres' => ! $useEncryption ? [] : [
'sslmode' => 'require', // Require connections to be encrypted
'sslrootcert' => '', // Allow any certificate
],
default => [],
};
$connection = match ($driver) {
null, 'sqlite' => [
'driver' => 'pdo_sqlite',
'path' => 'data/database.sqlite',
],
default => [
'driver' => $doctrineDriver,
'dbname' => EnvVars::DB_NAME->loadFromEnv(),
'user' => $readCredentialAsString(EnvVars::DB_USER),
'password' => $readCredentialAsString(EnvVars::DB_PASSWORD),
'host' => EnvVars::DB_HOST->loadFromEnv(),
'port' => EnvVars::DB_PORT->loadFromEnv(),
'unix_socket' => $isMysqlCompatible ? EnvVars::DB_UNIX_SOCKET->loadFromEnv() : null,
'charset' => $charset,
'driverOptions' => $driverOptions,
],
};
return [
'entity_manager' => [
'orm' => [
'proxies_dir' => 'data/proxies',
'load_mappings_using_functional_style' => true,
'default_repository_classname' => EntitySpecificationRepository::class,
'listeners' => [
Events::onFlush => [ShortUrlVisitsCountTracker::class, OrphanVisitsCountTracker::class],
Events::postFlush => [ShortUrlVisitsCountTracker::class, OrphanVisitsCountTracker::class],
],
],
'connection' => $connection,
],
],
];
];
})();

View File

@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
use Laminas\Stratigility\Middleware\ErrorHandler;
use Mezzio\ProblemDetails\ProblemDetailsMiddleware;
use Shlinkio\Shlink\Common\Logger;
use function Shlinkio\Shlink\Core\toProblemDetailsType;
return [
'problem-details' => [
'default_types_map' => [
404 => toProblemDetailsType('not-found'),
500 => toProblemDetailsType('internal-server-error'),
],
],
'error_handler' => [
'listeners' => [Logger\ErrorLogger::class],
],
'dependencies' => [
'delegators' => [
ErrorHandler::class => [
Logger\ErrorHandlerListenerAttachingDelegator::class,
],
ProblemDetailsMiddleware::class => [
Logger\ErrorHandlerListenerAttachingDelegator::class,
],
],
],
];

View File

@@ -1,28 +0,0 @@
<?php
use Shlinkio\Shlink\Common\ErrorHandler\ContentBasedErrorHandler;
use Zend\Expressive\Container\WhoopsErrorHandlerFactory;
return [
'dependencies' => [
'invokables' => [
'Zend\Expressive\Whoops' => Whoops\Run::class,
'Zend\Expressive\WhoopsPageHandler' => Whoops\Handler\PrettyPageHandler::class,
],
],
'whoops' => [
'json_exceptions' => [
'display' => true,
'show_trace' => true,
'ajax_only' => true,
],
],
'error_handler' => [
'plugins' => [
'factories' => [
ContentBasedErrorHandler::DEFAULT_CONTENT => WhoopsErrorHandlerFactory::class,
],
],
],
];

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars;
return [
'geolite2' => [
'db_location' => __DIR__ . '/../../data/GeoLite2-City.mmdb',
'temp_dir' => __DIR__ . '/../../data',
'license_key' => EnvVars::GEOLITE_LICENSE_KEY->loadFromEnv(),
],
];

View File

@@ -0,0 +1,113 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\Installer\Config\Option;
use Shlinkio\Shlink\Installer\Util\InstallationCommand;
return [
'installer' => [
'enabled_options' => [
Option\Server\RuntimeConfigOption::class,
Option\Server\MemoryLimitConfigOption::class,
Option\Server\LogsFormatConfigOption::class,
Option\Database\DatabaseDriverConfigOption::class,
Option\Database\DatabaseNameConfigOption::class,
Option\Database\DatabaseHostConfigOption::class,
Option\Database\DatabasePortConfigOption::class,
Option\Database\DatabaseUserConfigOption::class,
Option\Database\DatabasePasswordConfigOption::class,
Option\Database\DatabaseUnixSocketConfigOption::class,
Option\Database\DatabaseUseEncryptionConfigOption::class,
Option\UrlShortener\ShortDomainHostConfigOption::class,
Option\UrlShortener\ShortDomainSchemaConfigOption::class,
Option\Redirect\BaseUrlRedirectConfigOption::class,
Option\Redirect\InvalidShortUrlRedirectConfigOption::class,
Option\Redirect\Regular404RedirectConfigOption::class,
Option\Visit\VisitsThresholdConfigOption::class,
Option\BasePathConfigOption::class,
Option\TimezoneConfigOption::class,
Option\Cache\CacheNamespaceConfigOption::class,
Option\Redis\RedisServersConfigOption::class,
Option\Redis\RedisSentinelServiceConfigOption::class,
Option\Redis\RedisPubSubConfigOption::class,
Option\UrlShortener\ShortCodeLengthOption::class,
Option\Mercure\EnableMercureConfigOption::class,
Option\Mercure\MercurePublicUrlConfigOption::class,
Option\Mercure\MercureInternalUrlConfigOption::class,
Option\Mercure\MercureJwtSecretConfigOption::class,
Option\UrlShortener\GeoLiteLicenseKeyConfigOption::class,
Option\UrlShortener\RedirectStatusCodeConfigOption::class,
Option\UrlShortener\RedirectCacheLifeTimeConfigOption::class,
Option\UrlShortener\RedirectCacheVisibilityConfigOption::class,
Option\UrlShortener\AutoResolveTitlesConfigOption::class,
Option\UrlShortener\ExtraPathModeConfigOption::class,
Option\UrlShortener\EnableMultiSegmentSlugsConfigOption::class,
Option\UrlShortener\EnableTrailingSlashConfigOption::class,
Option\UrlShortener\ShortUrlModeConfigOption::class,
Option\Robots\RobotsAllowAllShortUrlsConfigOption::class,
Option\Robots\RobotsUserAgentsConfigOption::class,
Option\Tracking\IpAnonymizationConfigOption::class,
Option\Tracking\OrphanVisitsTrackingConfigOption::class,
Option\Tracking\DisableTrackParamConfigOption::class,
Option\Tracking\DisableTrackingFromConfigOption::class,
Option\Tracking\DisableTrackingConfigOption::class,
Option\Tracking\DisableIpTrackingConfigOption::class,
Option\Tracking\DisableReferrerTrackingConfigOption::class,
Option\Tracking\DisableUaTrackingConfigOption::class,
Option\QrCode\DefaultSizeConfigOption::class,
Option\QrCode\DefaultMarginConfigOption::class,
Option\QrCode\DefaultFormatConfigOption::class,
Option\QrCode\DefaultErrorCorrectionConfigOption::class,
Option\QrCode\DefaultRoundBlockSizeConfigOption::class,
Option\QrCode\DefaultColorConfigOption::class,
Option\QrCode\DefaultBgColorConfigOption::class,
Option\QrCode\DefaultLogoUrlConfigOption::class,
Option\QrCode\EnabledForDisabledShortUrlsConfigOption::class,
Option\RabbitMq\RabbitMqEnabledConfigOption::class,
Option\RabbitMq\RabbitMqHostConfigOption::class,
Option\RabbitMq\RabbitMqUseSslConfigOption::class,
Option\RabbitMq\RabbitMqPortConfigOption::class,
Option\RabbitMq\RabbitMqUserConfigOption::class,
Option\RabbitMq\RabbitMqPasswordConfigOption::class,
Option\RabbitMq\RabbitMqVhostConfigOption::class,
Option\Matomo\MatomoEnabledConfigOption::class,
Option\Matomo\MatomoBaseUrlConfigOption::class,
Option\Matomo\MatomoSiteIdConfigOption::class,
Option\Matomo\MatomoApiTokenConfigOption::class,
Option\RealTimeUpdates\RealTimeUpdatesTopicsConfigOption::class,
Option\Cors\CorsAllowOriginConfigOption::class,
Option\Cors\CorsAllowCredentialsConfigOption::class,
Option\Cors\CorsMaxAgeConfigOption::class,
Option\TrustedProxiesConfigOption::class,
],
'installation_commands' => [
InstallationCommand::DB_CREATE_SCHEMA->value => [
'command' => 'bin/cli ' . Command\Db\CreateDatabaseCommand::NAME,
],
InstallationCommand::DB_MIGRATE->value => [
'command' => 'bin/cli ' . Command\Db\MigrateDatabaseCommand::NAME,
],
InstallationCommand::ORM_PROXIES->value => [
'command' => 'bin/doctrine orm:generate-proxies',
],
InstallationCommand::ORM_CLEAR_CACHE->value => [
'command' => 'bin/doctrine orm:clear-cache:metadata',
],
InstallationCommand::GEOLITE_DOWNLOAD_DB->value => [
'command' => 'bin/cli ' . Command\Visit\DownloadGeoLiteDbCommand::NAME,
],
InstallationCommand::API_KEY_GENERATE->value => [
'command' => 'bin/cli ' . Command\Api\GenerateKeyCommand::NAME,
],
InstallationCommand::API_KEY_CREATE->value => [
'command' => 'bin/cli ' . Command\Api\InitialApiKeyCommand::NAME,
],
],
],
];

View File

@@ -0,0 +1,61 @@
<?php
declare(strict_types=1);
use RKA\Middleware\IpAddress;
use RKA\Middleware\Mezzio\IpAddressFactory;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Shlinkio\Shlink\Core\Middleware\ReverseForwardedAddressesMiddlewareDecorator;
use function Shlinkio\Shlink\Core\splitByComma;
use const Shlinkio\Shlink\IP_ADDRESS_REQUEST_ATTRIBUTE;
return (static function (): array {
$trustedProxies = EnvVars::TRUSTED_PROXIES->loadFromEnv();
$proxiesIsHopCount = is_numeric($trustedProxies);
return [
// Configuration for RKA\Middleware\IpAddress
'rka' => [
'ip_address' => [
'attribute_name' => IP_ADDRESS_REQUEST_ATTRIBUTE,
'check_proxy_headers' => true,
// List of trusted proxies
'trusted_proxies' => $proxiesIsHopCount ? [] : splitByComma($trustedProxies),
// Amount of addresses to skip from the right, before finding the visitor IP address
'hop_count' => $proxiesIsHopCount ? (int) $trustedProxies : 0,
'headers_to_inspect' => [
'CF-Connecting-IP',
'X-Forwarded-For',
'X-Forwarded',
'Forwarded',
'True-Client-IP',
'X-Real-IP',
'X-Cluster-Client-Ip',
'Client-Ip',
],
],
],
'dependencies' => [
'factories' => [
IpAddress::class => IpAddressFactory::class,
],
'delegators' => [
// Make middleware decoration transparent to other parts of the code
IpAddress::class => [
fn ($c, $n, callable $callback) =>
// If trusted proxies have been provided, use original middleware verbatim, otherwise decorate
// with workaround
$trustedProxies !== null
? $callback()
: new ReverseForwardedAddressesMiddlewareDecorator($callback()),
],
],
],
];
})();

View File

@@ -1,8 +0,0 @@
<?php
return [
'debug' => true,
'config_cache_enabled' => false,
];

View File

@@ -0,0 +1,50 @@
<?php
declare(strict_types=1);
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
use Shlinkio\Shlink\Common\Cache\RedisFactory;
use Shlinkio\Shlink\Common\Lock\NamespacedStore;
use Shlinkio\Shlink\Common\Logger\LoggerAwareDelegatorFactory;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Symfony\Component\Lock;
use const Shlinkio\Shlink\LOCAL_LOCK_FACTORY;
return [
'locks' => [
'locks_dir' => __DIR__ . '/../../data/locks',
],
'dependencies' => [
'factories' => [
Lock\Store\FlockStore::class => ConfigAbstractFactory::class,
Lock\Store\RedisStore::class => ConfigAbstractFactory::class,
Lock\LockFactory::class => ConfigAbstractFactory::class,
LOCAL_LOCK_FACTORY => ConfigAbstractFactory::class,
NamespacedStore::class => ConfigAbstractFactory::class,
],
'aliases' => [
'lock_store' => EnvVars::REDIS_SERVERS->existsInEnv() ? 'redis_lock_store' : 'local_lock_store',
'redis_lock_store' => NamespacedStore::class,
'local_lock_store' => Lock\Store\FlockStore::class,
],
'delegators' => [
Lock\LockFactory::class => [
LoggerAwareDelegatorFactory::class,
],
],
],
ConfigAbstractFactory::class => [
Lock\Store\FlockStore::class => ['config.locks.locks_dir'],
Lock\Store\RedisStore::class => [RedisFactory::SERVICE_NAME],
NamespacedStore::class => [Lock\Store\RedisStore::class, 'config.cache.namespace'],
Lock\LockFactory::class => ['lock_store'],
LOCAL_LOCK_FACTORY => ['local_lock_store'],
],
];

View File

@@ -1,32 +1,80 @@
<?php
use Monolog\Handler\RotatingFileHandler;
declare(strict_types=1);
namespace Shlinkio\Shlink;
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
use Laminas\ServiceManager\Factory\InvokableFactory;
use Monolog\Level;
use Monolog\Logger;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Shlinkio\Shlink\Common\Logger\LoggerFactory;
use Shlinkio\Shlink\Common\Logger\LoggerType;
use Shlinkio\Shlink\Common\Middleware\AccessLogMiddleware;
use Shlinkio\Shlink\Common\Middleware\RequestIdMiddleware;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Shlinkio\Shlink\Core\EventDispatcher\Helper\RequestIdProvider;
use Shlinkio\Shlink\EventDispatcher\Util\RequestIdProviderInterface;
return [
use function Shlinkio\Shlink\Config\env;
use function Shlinkio\Shlink\Config\runningInRoadRunner;
'logger' => [
'formatters' => [
'dashed' => [
'format' => '[%datetime%] %channel%.%level_name% - %message% %context%' . PHP_EOL,
'include_stacktraces' => true,
return (static function (): array {
$isDev = EnvVars::isDevEnv();
$format = EnvVars::LOGS_FORMAT->loadFromEnv();
$buildCommonConfig = static fn (bool $addNewLine = false) => [
'level' => $isDev ? Level::Debug->value : Level::Info->value,
'processors' => [RequestIdMiddleware::class],
'formatter' => [
'type' => $format,
'add_new_line' => $addNewLine,
'line_format' =>
'[%datetime%] [%extra.' . RequestIdMiddleware::ATTRIBUTE . '%] %channel%.%level_name% - %message%',
],
];
// In dev env or the docker container, stream Shlink logs to stderr, otherwise send them to a file
$useStreamForShlinkLogger = $isDev || env('SHLINK_RUNTIME') !== null;
return [
'logger' => [
'Shlink' => $useStreamForShlinkLogger ? [
'type' => LoggerType::STREAM->value,
'destination' => 'php://stderr',
...$buildCommonConfig(),
] : [
'type' => LoggerType::FILE->value,
...$buildCommonConfig(),
],
'Access' => [
'type' => LoggerType::STREAM->value,
'destination' => 'php://stderr',
...$buildCommonConfig(! runningInRoadRunner()),
],
],
'handlers' => [
'rotating_file_handler' => [
'class' => RotatingFileHandler::class,
'level' => Logger::INFO,
'filename' => 'data/log/shlink_log.log',
'max_files' => 30,
'formatter' => 'dashed',
'dependencies' => [
'factories' => [
'Logger_Shlink' => [LoggerFactory::class, 'Shlink'],
'Logger_Access' => [LoggerFactory::class, 'Access'],
NullLogger::class => InvokableFactory::class,
RequestIdProvider::class => ConfigAbstractFactory::class,
],
'aliases' => [
'logger' => 'Logger_Shlink',
Logger::class => 'Logger_Shlink',
LoggerInterface::class => 'Logger_Shlink',
AccessLogMiddleware::LOGGER_SERVICE_NAME => 'Logger_Access',
RequestIdProviderInterface::class => RequestIdProvider::class,
],
],
'loggers' => [
'Shlink' => [
'handlers' => ['rotating_file_handler'],
],
ConfigAbstractFactory::class => [
RequestIdProvider::class => [RequestIdMiddleware::class],
],
],
];
];
})();

View File

@@ -1,14 +0,0 @@
<?php
use Monolog\Logger;
return [
'logger' => [
'handlers' => [
'rotating_file_handler' => [
'level' => Logger::DEBUG,
],
],
],
];

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
use Laminas\ServiceManager\Proxy\LazyServiceFactory;
use Shlinkio\Shlink\Common\Mercure\LcobucciJwtProvider;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Symfony\Component\Mercure\Hub;
use Symfony\Component\Mercure\HubInterface;
return [
// This config is used by shlink-common. Do not delete
'mercure' => [
'enabled' => EnvVars::MERCURE_ENABLED->loadFromEnv(),
'public_hub_url' => EnvVars::MERCURE_PUBLIC_HUB_URL->loadFromEnv(),
'internal_hub_url' => EnvVars::MERCURE_INTERNAL_HUB_URL->loadFromEnv(),
'jwt_secret' => EnvVars::MERCURE_JWT_SECRET->loadFromEnv(),
'jwt_issuer' => 'Shlink',
],
'dependencies' => [
'delegators' => [
LcobucciJwtProvider::class => [
LazyServiceFactory::class,
],
Hub::class => [
LazyServiceFactory::class,
],
],
'lazy_services' => [
'class_map' => [
LcobucciJwtProvider::class => LcobucciJwtProvider::class,
Hub::class => HubInterface::class,
],
],
],
];

View File

@@ -1,21 +1,85 @@
<?php
use Zend\Expressive\Container\ApplicationFactory;
declare(strict_types=1);
namespace Shlinkio\Shlink;
use Laminas\Stratigility\Middleware\ErrorHandler;
use Mezzio\ProblemDetails;
use Mezzio\Router;
use RKA\Middleware\IpAddress;
use Shlinkio\Shlink\Common\Middleware\AccessLogMiddleware;
use Shlinkio\Shlink\Common\Middleware\ContentLengthMiddleware;
use Shlinkio\Shlink\Common\Middleware\RequestIdMiddleware;
use Shlinkio\Shlink\Core\Geolocation\Middleware\IpGeolocationMiddleware;
return [
'middleware_pipeline' => [
'routing' => [
'error-handler' => [
'middleware' => [
ApplicationFactory::ROUTING_MIDDLEWARE,
AccessLogMiddleware::class,
ContentLengthMiddleware::class,
RequestIdMiddleware::class,
ErrorHandler::class,
Rest\Middleware\CrossDomainMiddleware::class,
],
],
'error-handler-rest' => [
'path' => '/rest',
'middleware' => [
ProblemDetails\ProblemDetailsMiddleware::class,
],
'priority' => 10,
],
'post-routing' => [
'pre-routing' => [
'middleware' => [
ApplicationFactory::DISPATCH_MIDDLEWARE,
Common\Middleware\CloseDbConnectionMiddleware::class,
],
],
'routing' => [
'middleware' => [
Router\Middleware\RouteMiddleware::class,
Router\Middleware\ImplicitHeadMiddleware::class,
],
],
'rest' => [
'path' => '/rest',
'middleware' => [
Router\Middleware\ImplicitOptionsMiddleware::class,
Rest\Middleware\BodyParserMiddleware::class,
Rest\Middleware\AuthenticationMiddleware::class,
],
],
'dispatch' => [
'middleware' => [
Router\Middleware\DispatchMiddleware::class,
],
],
'not-found-rest' => [
'path' => '/rest',
'middleware' => [
ProblemDetails\ProblemDetailsNotFoundHandler::class,
],
],
'not-found' => [
'middleware' => [
// These two middlewares are in front of other tracking actions.
// Putting them here for orphan visits tracking
IpAddress::class,
IpGeolocationMiddleware::class,
Core\ErrorHandler\NotFoundTypeResolverMiddleware::class,
Core\ShortUrl\Middleware\ExtraPathRedirectMiddleware::class,
Core\ErrorHandler\NotFoundTrackerMiddleware::class,
Core\ErrorHandler\NotFoundRedirectHandler::class,
Core\ErrorHandler\NotFoundTemplateHandler::class,
],
'priority' => 1,
],
],
];

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars;
return [
// This config is used by shlink-common. Do not delete
'rabbitmq' => [
'enabled' => (bool) EnvVars::RABBITMQ_ENABLED->loadFromEnv(),
'host' => EnvVars::RABBITMQ_HOST->loadFromEnv(),
'use_ssl' => (bool) EnvVars::RABBITMQ_USE_SSL->loadFromEnv(),
'port' => (int) EnvVars::RABBITMQ_PORT->loadFromEnv(),
'user' => EnvVars::RABBITMQ_USER->loadFromEnv(),
'password' => EnvVars::RABBITMQ_PASSWORD->loadFromEnv(),
'vhost' => EnvVars::RABBITMQ_VHOST->loadFromEnv(),
],
];

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
use Mezzio\Router\FastRouteRouter;
use Shlinkio\Shlink\Core\Config\EnvVars;
return [
'router' => [
'base_path' => EnvVars::BASE_PATH->loadFromEnv(),
'fastroute' => [
// Disabling config cache for cli, ensures it's never used for RoadRunner, and also that console
// commands don't generate a cache file that's then used by php-fpm web executions
FastRouteRouter::CONFIG_CACHE_ENABLED => EnvVars::isProdEnv() && PHP_SAPI !== 'cli',
FastRouteRouter::CONFIG_CACHE_FILE => 'data/cache/fastroute_cached_routes.php',
],
],
];

View File

@@ -0,0 +1,119 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;
use Fig\Http\Message\RequestMethodInterface;
use RKA\Middleware\IpAddress;
use Shlinkio\Shlink\Core\Action as CoreAction;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Shlinkio\Shlink\Core\Geolocation\Middleware\IpGeolocationMiddleware;
use Shlinkio\Shlink\Core\ShortUrl\Middleware\TrimTrailingSlashMiddleware;
use Shlinkio\Shlink\Rest\Action;
use Shlinkio\Shlink\Rest\ConfigProvider;
use Shlinkio\Shlink\Rest\Middleware;
use Shlinkio\Shlink\Rest\Middleware\Mercure\NotConfiguredMercureErrorHandler;
use function sprintf;
return (static function (): array {
$dropDomainMiddleware = Middleware\ShortUrl\DropDefaultDomainFromRequestMiddleware::class;
$overrideDomainMiddleware = Middleware\ShortUrl\OverrideDomainMiddleware::class;
$shortUrlRouteSuffix = EnvVars::SHORT_URL_TRAILING_SLASH->loadFromEnv() ? '[/]' : '';
return [
// The order of the routes defined here matters. Changing it might cause path conflicts
'routes' => [
// Rest
...ConfigProvider::applyRoutesPrefix([
Action\HealthAction::getRouteDef(),
// Visits and rules routes must go first, as they have a more specific path, otherwise, when
// multi-segment slugs are enabled, routes with a less-specific path might match first
// Visits.
Action\Visit\ShortUrlVisitsAction::getRouteDef([$dropDomainMiddleware]),
Action\ShortUrl\DeleteShortUrlVisitsAction::getRouteDef([$dropDomainMiddleware]),
Action\Visit\TagVisitsAction::getRouteDef(),
Action\Visit\DomainVisitsAction::getRouteDef(),
Action\Visit\GlobalVisitsAction::getRouteDef(),
Action\Visit\OrphanVisitsAction::getRouteDef(),
Action\Visit\DeleteOrphanVisitsAction::getRouteDef(),
Action\Visit\NonOrphanVisitsAction::getRouteDef(),
//Redirect rules
Action\RedirectRule\ListRedirectRulesAction::getRouteDef([$dropDomainMiddleware]),
Action\RedirectRule\SetRedirectRulesAction::getRouteDef([$dropDomainMiddleware]),
// Short URLs
Action\ShortUrl\CreateShortUrlAction::getRouteDef([
$dropDomainMiddleware,
$overrideDomainMiddleware,
Middleware\ShortUrl\DefaultShortCodesLengthMiddleware::class,
]),
Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([
Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class,
$overrideDomainMiddleware,
]),
Action\ShortUrl\EditShortUrlAction::getRouteDef([$dropDomainMiddleware]),
Action\ShortUrl\DeleteShortUrlAction::getRouteDef([$dropDomainMiddleware]),
Action\ShortUrl\ResolveShortUrlAction::getRouteDef([$dropDomainMiddleware]),
Action\ShortUrl\ListShortUrlsAction::getRouteDef(),
// Tags
Action\Tag\ListTagsAction::getRouteDef(),
Action\Tag\TagsStatsAction::getRouteDef(),
Action\Tag\DeleteTagsAction::getRouteDef(),
Action\Tag\UpdateTagAction::getRouteDef(),
// Domains
Action\Domain\ListDomainsAction::getRouteDef(),
Action\Domain\DomainRedirectsAction::getRouteDef(),
Action\MercureInfoAction::getRouteDef([NotConfiguredMercureErrorHandler::class]),
]),
// Non-rest
[
'name' => CoreAction\RobotsAction::class,
'path' => '/robots.txt',
'middleware' => [
CoreAction\RobotsAction::class,
],
'allowed_methods' => [RequestMethodInterface::METHOD_GET],
],
[
'name' => CoreAction\PixelAction::class,
'path' => '/{shortCode}/track',
'middleware' => [
IpAddress::class,
IpGeolocationMiddleware::class,
CoreAction\PixelAction::class,
],
'allowed_methods' => [RequestMethodInterface::METHOD_GET],
],
[
'name' => CoreAction\QrCodeAction::class,
'path' => '/{shortCode}/qr-code',
'middleware' => [
CoreAction\QrCodeAction::class,
],
'allowed_methods' => [RequestMethodInterface::METHOD_GET],
],
[
'name' => CoreAction\RedirectAction::class,
'path' => sprintf('/{shortCode}%s', $shortUrlRouteSuffix),
'middleware' => [
IpAddress::class,
IpGeolocationMiddleware::class,
TrimTrailingSlashMiddleware::class,
CoreAction\RedirectAction::class,
],
'allowed_methods' => [RequestMethodInterface::METHOD_GET],
],
],
];
})();

View File

@@ -1,12 +0,0 @@
<?php
return [
'twig' => [
'cache_dir' => 'data/cache/twig',
'extensions' => [
// extension service names or instances
],
],
];

View File

@@ -1,8 +0,0 @@
<?php
return [
'translator' => [
'locale' => env('DEFAULT_LOCALE', 'en'),
],
];

View File

@@ -1,14 +0,0 @@
<?php
use Shlinkio\Shlink\Core\Service\UrlShortener;
return [
'url_shortener' => [
'domain' => [
'schema' => env('SHORTENED_URL_SCHEMA', 'http'),
'hostname' => env('SHORTENED_URL_HOSTNAME'),
],
'shortcode_chars' => env('SHORTCODE_CHARS', UrlShortener::DEFAULT_CHARS),
],
];

View File

@@ -1,8 +0,0 @@
<?php
return [
'debug' => false,
'config_cache_enabled' => true,
];

12
config/cli-app.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Application as CliApp;
return (static function (): CliApp {
/** @var ContainerInterface $container */
$container = include __DIR__ . '/container.php';
return $container->get(CliApp::class);
})();

View File

@@ -1,11 +1,27 @@
<?php
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Interop\Container\ContainerInterface;
/** @var ContainerInterface $container */
$container = include __DIR__ . '/container.php';
/** @var EntityManager $em */
$em = $container->get(EntityManager::class);
declare(strict_types=1);
return ConsoleRunner::createHelperSet($em);
use Doctrine\Migrations\Configuration\EntityManager\ExistingEntityManager;
use Doctrine\Migrations\Configuration\Migration\ConfigurationArray;
use Doctrine\Migrations\DependencyFactory;
// This file is currently used by doctrine migrations only
return (static function () {
$migrationsConfig = [
'migrations_paths' => [
'ShlinkMigrations' => 'module/Core/migrations',
],
'table_storage' => [
'table_name' => 'migrations',
],
'custom_template' => 'data/migrations_template.txt',
];
$em = include __DIR__ . '/entity-manager.php';
return DependencyFactory::fromEntityManager(
new ConfigurationArray($migrationsConfig),
new ExistingEntityManager($em),
);
})();

View File

@@ -1,24 +1,42 @@
<?php
use Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\Common;
use Shlinkio\Shlink\Core;
use Shlinkio\Shlink\Rest;
use Zend\Expressive\ConfigManager\ConfigManager;
use Zend\Expressive\ConfigManager\ZendConfigProvider;
/**
* Configuration files are loaded in a specific order. First ``global.php``, then ``*.global.php``.
* then ``local.php`` and finally ``*.local.php``. This way local settings overwrite global settings.
*
* The configuration can be cached. This can be done by setting ``config_cache_enabled`` to ``true``.
*
* Obviously, if you use closures in your config you can't cache it.
*/
declare(strict_types=1);
return (new ConfigManager([
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
], 'data/cache/app_config.php'))->getMergedConfig();
namespace Shlinkio\Shlink;
use Laminas\ConfigAggregator;
use Laminas\Diactoros;
use Mezzio;
use Mezzio\ProblemDetails;
use Shlinkio\Shlink\Core\Config\EnvVars;
return (new ConfigAggregator\ConfigAggregator(
providers: [
Mezzio\ConfigProvider::class,
Mezzio\Router\ConfigProvider::class,
Mezzio\Router\FastRouteRouter\ConfigProvider::class,
ProblemDetails\ConfigProvider::class,
Diactoros\ConfigProvider::class,
Common\ConfigProvider::class,
Config\ConfigProvider::class,
Importer\ConfigProvider::class,
IpGeolocation\ConfigProvider::class,
EventDispatcher\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ConfigAggregator\PhpFileProvider('config/autoload/{,*.}global.php'),
// Test config should be loaded ONLY during tests
EnvVars::isTestEnv()
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
: new ConfigAggregator\ArrayProvider([]),
// Routes have to be loaded last
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
],
cachedConfigFile: 'data/cache/app_config.php',
postProcessors: [
Core\Config\PostProcessor\BasePathPrefixer::class,
Core\Config\PostProcessor\MultiSegmentSlugProcessor::class,
Core\Config\PostProcessor\ShortUrlMethodsProcessor::class,
],
))->getMergedConfig();

57
config/constants.php Normal file
View File

@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;
use Shlinkio\Shlink\Core\Util\RedirectStatus;
const DEFAULT_DELETE_SHORT_URL_THRESHOLD = 15;
const DEFAULT_SHORT_CODES_LENGTH = 5;
const MIN_SHORT_CODES_LENGTH = 4;
const DEFAULT_REDIRECT_STATUS_CODE = RedirectStatus::STATUS_302;
const DEFAULT_REDIRECT_CACHE_LIFETIME = 30;
const DEFAULT_REDIRECT_CACHE_VISIBILITY = 'private';
const LOCAL_LOCK_FACTORY = 'Shlinkio\Shlink\LocalLockFactory';
const LOOSE_URI_MATCHER = '/(.+)\:(.+)/i'; // Matches anything starting with a schema.
const IP_ADDRESS_REQUEST_ATTRIBUTE = 'remote_address';
const REDIRECT_URL_REQUEST_ATTRIBUTE = 'redirect_url';
/**
* List of ISO 3166-1 alpha-2 two-letter country codes https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
*/
const ISO_COUNTRY_CODES = [
'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ',
'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BQ', 'BA', 'BW', 'BV', 'BR',
'IO', 'BN', 'BG', 'BF', 'BI', 'CV', 'KH', 'CM', 'CA', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC',
'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CW', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO',
'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'SZ', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF',
'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY',
'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM',
'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'KR', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY',
'LI', 'LT', 'LU', 'MO', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX',
'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'NC', 'NZ', 'NI',
'NE', 'NG', 'NU', 'NF', 'MK', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH',
'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'BL', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC',
'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS',
'SS', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK',
'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'US', 'UM', 'UY', 'UZ', 'VU',
'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW',
];
/** @deprecated */
const DEFAULT_QR_CODE_SIZE = 300;
/** @deprecated */
const DEFAULT_QR_CODE_MARGIN = 0;
/** @deprecated */
const DEFAULT_QR_CODE_FORMAT = 'png';
/** @deprecated */
const DEFAULT_QR_CODE_ERROR_CORRECTION = 'l';
/** @deprecated */
const DEFAULT_QR_CODE_ROUND_BLOCK_SIZE = true;
/** @deprecated */
const DEFAULT_QR_CODE_ENABLED_FOR_DISABLED_SHORT_URLS = true;
/** @deprecated */
const DEFAULT_QR_CODE_COLOR = '#000000'; // Black
/** @deprecated */
const DEFAULT_QR_CODE_BG_COLOR = '#ffffff'; // White

View File

@@ -1,21 +1,45 @@
<?php
use Dotenv\Dotenv;
use Zend\ServiceManager\ServiceManager;
declare(strict_types=1);
use Laminas\ServiceManager\ServiceManager;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Symfony\Component\Lock;
use function Shlinkio\Shlink\Config\loadEnvVarsFromConfig;
use function Shlinkio\Shlink\Core\enumValues;
use const Shlinkio\Shlink\LOCAL_LOCK_FACTORY;
// Set current directory to the project's root directory
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
// If the Dotenv class exists, load env vars and enable errors
if (class_exists(Dotenv::class)) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
$dotenv = new Dotenv(__DIR__ . '/..');
$dotenv->load();
// Promote env vars from installer, dev config or test config
loadEnvVarsFromConfig(
EnvVars::isTestEnv() ? 'config/test/shlink_test_env.php' : 'config/params/*.php',
enumValues(EnvVars::class),
);
// This is one of the first files loaded. Set global configuration here
error_reporting(
// Set a less strict error reporting for prod, where deprecation warnings should be ignored
EnvVars::isProdEnv() ? E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED : E_ALL,
);
ini_set('memory_limit', EnvVars::MEMORY_LIMIT->loadFromEnv());
date_default_timezone_set(EnvVars::TIMEZONE->loadFromEnv());
// This class alias tricks the ConfigAbstractFactory to return Lock\Factory instances even with a different service name
// It needs to be placed here as individual config files will not be loaded once config is cached
if (! class_exists(LOCAL_LOCK_FACTORY)) {
class_alias(Lock\LockFactory::class, LOCAL_LOCK_FACTORY);
}
// Build container
$config = require __DIR__ . '/config.php';
$container = new ServiceManager($config['dependencies']);
$container->setService('config', $config);
return $container;
return (static function (): ServiceManager {
$config = require __DIR__ . '/config.php';
$container = new ServiceManager($config['dependencies']);
$container->setService('config', $config);
return $container;
})();

13
config/entity-manager.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Container\ContainerInterface;
return (static function (): EntityManagerInterface {
/** @var ContainerInterface $container */
$container = include __DIR__ . '/container.php';
return $container->get(EntityManager::class);
})();

3
config/params/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*
!.gitignore
!*.dist

View File

@@ -0,0 +1,77 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars;
return [
EnvVars::APP_ENV->value => 'dev',
// EnvVars::GEOLITE_LICENSE_KEY->value => '',
// URL shortener
EnvVars::DEFAULT_DOMAIN->value => 'localhost:8800',
EnvVars::IS_HTTPS_ENABLED->value => false,
// Database - MySQL
EnvVars::DB_DRIVER->value => 'mysql',
EnvVars::DB_USER->value => 'root',
EnvVars::DB_PASSWORD->value => 'root',
EnvVars::DB_NAME->value => 'shlink',
// EnvVars::DB_NAME->value => 'shlink_foo',
EnvVars::DB_HOST->value => 'shlink_db_mysql',
// Database - Maria
// EnvVars::DB_DRIVER->value => 'maria',
// EnvVars::DB_USER->value => 'root',
// EnvVars::DB_PASSWORD->value => 'root',
// EnvVars::DB_NAME->value => 'shlink_foo',
// EnvVars::DB_HOST->value => 'shlink_db_maria',
// Database - Postgres
// EnvVars::DB_DRIVER->value => 'postgres',
// EnvVars::DB_USER->value => 'postgres',
// EnvVars::DB_PASSWORD->value => 'root',
// EnvVars::DB_NAME->value => 'shlink_foo',
// EnvVars::DB_HOST->value => 'shlink_db_postgres',
// Database - MSSQL
// EnvVars::DB_DRIVER->value => 'mssql',
// EnvVars::DB_USER->value => 'sa',
// EnvVars::DB_PASSWORD->value => 'Passw0rd!',
// EnvVars::DB_NAME->value => 'shlink_foo',
// EnvVars::DB_HOST->value => 'shlink_db_ms',
// Matomo
// Dev matomo instance needs to be manually configured once before enabling the configuration below:
// 1. Go to http://localhost:8003 and follow the installation instructions.
// 2. Open data/infra/matomo/config/config.ini.php and replace `trusted_hosts[] = "localhost"` with
// `trusted_hosts[] = "localhost:8003"` (see https://github.com/matomo-org/matomo/issues/9549)
// 3. Go to http://localhost:8003/index.php?module=SitesManager&action=index and paste the ID for the site you just
// created into the `MATOMO_SITE_ID` var below.
// 4. Go to http://localhost:8003/index.php?module=UsersManager&action=userSecurity, scroll down, click
// "Create new token" and once generated, paste the token into the `MATOMO_API_TOKEN` var below.
// 5. Copy the config below and paste it in a new shlink-dev.local.env file.
EnvVars::MATOMO_ENABLED->value => false,
EnvVars::MATOMO_BASE_URL->value => 'http://shlink_matomo',
// EnvVars::MATOMO_SITE_ID->value => ,
// EnvVars::MATOMO_API_TOKEN->value => ,
// Mercure
EnvVars::MERCURE_ENABLED->value => true,
EnvVars::MERCURE_PUBLIC_HUB_URL->value => 'http://localhost:8002',
EnvVars::MERCURE_INTERNAL_HUB_URL->value => 'http://shlink_mercure_proxy',
EnvVars::MERCURE_JWT_SECRET->value => 'mercure_jwt_key_long_enough_to_avoid_error',
// RabbitMQ
EnvVars::RABBITMQ_ENABLED->value => true,
EnvVars::RABBITMQ_HOST->value => 'shlink_rabbitmq',
EnvVars::RABBITMQ_PORT->value => 5672,
EnvVars::RABBITMQ_USER->value => 'rabbit',
EnvVars::RABBITMQ_PASSWORD->value => 'rabbit',
// Redis
EnvVars::REDIS_PUB_SUB_ENABLED->value => true,
EnvVars::REDIS_SERVERS->value => 'tcp://shlink_redis:6379',
];

View File

@@ -0,0 +1,46 @@
version: '3'
rpc:
listen: tcp://127.0.0.1:6001
server:
command: 'php ../../bin/roadrunner-worker.php'
http:
address: '0.0.0.0:8080'
middleware: ['static']
static:
dir: '../../public'
forbid: ['.php', '.htaccess']
pool:
num_workers: 1
debug: true
jobs:
pool:
num_workers: 1
debug: true
timeout: 300
consume: ['shlink']
pipelines:
shlink:
driver: memory
config:
priority: 10
prefetch: 10
logs:
encoding: console
mode: development
channels:
http:
mode: 'off' # Disable logging as Shlink handles it internally
server:
encoding: console
level: info
metrics:
encoding: console
level: debug
jobs:
encoding: console
level: debug

View File

@@ -0,0 +1,50 @@
version: '3'
############################################################################################
# Routes here need to be relative to the project root, as API tests are run with `-w .` #
# See https://github.com/orgs/roadrunner-server/discussions/1440#discussioncomment-8486186 #
############################################################################################
rpc:
listen: tcp://127.0.0.1:6001
server:
command: 'php ./bin/roadrunner-worker.php'
http:
address: '0.0.0.0:9999'
middleware: ['static']
static:
dir: './public'
forbid: ['.php', '.htaccess']
pool:
num_workers: 1
debug: false
jobs:
pool:
num_workers: 1
debug: false
timeout: 300
consume: ['shlink']
pipelines:
shlink:
driver: memory
config:
priority: 10
prefetch: 10
logs:
encoding: console
mode: development
channels:
http:
mode: 'off' # Disable logging as Shlink handles it internally
server:
encoding: console
level: info
metrics:
level: panic
jobs:
encoding: console
level: panic

43
config/roadrunner/.rr.yml Normal file
View File

@@ -0,0 +1,43 @@
version: '3'
rpc:
listen: tcp://127.0.0.1:6001
server:
command: 'php -dopcache.enable_cli=1 -dopcache.validate_timestamps=0 ../../bin/roadrunner-worker.php'
http:
address: '${ADDRESS:-0.0.0.0}:${PORT:-8080}'
middleware: ['static']
static:
dir: '../../public'
forbid: ['.php', '.htaccess']
pool:
num_workers: ${WEB_WORKER_NUM:-0}
max_jobs: 250 # Restart worker after processing this amount of requests to mitigate memory leaks
jobs:
timeout: 300 # 5 minutes
pool:
num_workers: ${TASK_WORKER_NUM:-0}
max_jobs: 250 # Restart worker after processing this amount of jobs to mitigate memory leaks
consume: ['shlink']
pipelines:
shlink:
driver: memory
config:
priority: 10
prefetch: 10
logs:
encoding: ${LOGS_FORMAT:-console}
mode: production
channels:
http:
mode: 'off' # Disable logging as Shlink handles it internally
server:
encoding: ${LOGS_FORMAT:-console}
level: info
jobs:
encoding: ${LOGS_FORMAT:-console}
level: debug

14
config/run.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
use Mezzio\Application;
use Psr\Container\ContainerInterface;
return static function (): void {
/** @var ContainerInterface $container */
$container = include __DIR__ . '/container.php';
$app = $container->get(Application::class);
$app->run();
};

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\TestUtils;
use Doctrine\ORM\EntityManager;
use Psr\Container\ContainerInterface;
/** @var ContainerInterface $container */
$container = require __DIR__ . '/../container.php';
$testHelper = $container->get(Helper\TestHelper::class);
$config = $container->get('config');
$em = $container->get(EntityManager::class);
$httpClient = $container->get('shlink_test_api_client');
$testHelper->createTestDb(
createDbCommand: ['bin/cli', 'db:create'],
migrateDbCommand: ['bin/cli', 'db:migrate'],
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
);
ApiTest\ApiTestCase::setApiClient($httpClient);
ApiTest\ApiTestCase::setSeedFixturesCallback(fn () => $testHelper->seedFixtures($em, $config['data_fixtures'] ?? []));

View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\TestUtils;
use Doctrine\ORM\EntityManager;
use Psr\Container\ContainerInterface;
use function file_exists;
use function unlink;
/** @var ContainerInterface $container */
$container = require __DIR__ . '/../container.php';
$testHelper = $container->get(Helper\TestHelper::class);
$config = $container->get('config');
$em = $container->get(EntityManager::class);
// Delete old coverage in PHP, to avoid merging older executions with current one
$covFile = __DIR__ . '/../../build/coverage-cli.cov';
if (file_exists($covFile)) {
unlink($covFile);
}
$testHelper->createTestDb(
createDbCommand: ['bin/cli', 'db:create'],
migrateDbCommand: ['bin/cli', 'db:migrate'],
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
);
CliTest\CliTestCase::setSeedFixturesCallback(
static fn () => $testHelper->seedFixtures($em, $config['data_fixtures'] ?? []),
);

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\TestUtils;
use Psr\Container\ContainerInterface;
/** @var ContainerInterface $container */
$container = require __DIR__ . '/../container.php';
$container->get(Helper\TestHelper::class)->createTestDb(
createDbCommand: ['bin/cli', 'db:create'],
migrateDbCommand: ['bin/cli', 'db:migrate'],
dropSchemaCommand: ['bin/doctrine', 'orm:schema-tool:drop'],
runSqlCommand: ['bin/doctrine', 'dbal:run-sql'],
);
DbTest\DatabaseTestCase::setEntityManager($container->get('em'));

21
config/test/constants.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink;
const API_TESTS_HOST = '127.0.0.1';
const API_TESTS_PORT = 9999;
const ANDROID_USER_AGENT = 'Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) '
. 'Chrome/109.0.5414.86 Mobile Safari/537.36';
const IOS_USER_AGENT = 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 '
. '(KHTML, like Gecko) FxiOS/109.0 Mobile/15E148 Safari/605.1.15';
const WINDOWS_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
. 'Chrome/138.0.0.0 Safari/537.36 Edg/138.0.3351.95';
const LINUX_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) '
. 'HeadlessChrome/81.0.4044.113 Safari/537.36';
const MACOS_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) '
. 'Version/18.4 Safari/605.1.15';
const CHROMEOS_USER_AGENT = 'Mozilla/5.0 (X11; CrOS x86_64 16181.61.0) AppleWebKit/537.36 (KHTML, like Gecko) '
. 'Chrome/134.0.6998.198 Safari/537.36';

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Config\EnvVars;
return [
EnvVars::APP_ENV->value => 'test',
// URL shortener
EnvVars::DEFAULT_DOMAIN->value => 's.test',
EnvVars::IS_HTTPS_ENABLED->value => false,
];

View File

@@ -0,0 +1,149 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;
use GuzzleHttp\Client;
use Laminas\ConfigAggregator\ConfigAggregator;
use Laminas\Diactoros\Response\HtmlResponse;
use Laminas\ServiceManager\Factory\InvokableFactory;
use Mezzio\Router\FastRouteRouter;
use Monolog\Level;
use Shlinkio\Shlink\Common\Logger\LoggerType;
use Shlinkio\Shlink\TestUtils\ApiTest\CoverageMiddleware;
use Shlinkio\Shlink\TestUtils\CliTest\CliCoverageDelegator;
use Shlinkio\Shlink\TestUtils\Helper\CoverageHelper;
use Symfony\Component\Console\Application;
use function Laminas\Stratigility\middleware;
use function Shlinkio\Shlink\Config\env;
use function sleep;
use function sprintf;
use const ShlinkioTest\Shlink\API_TESTS_HOST;
use const ShlinkioTest\Shlink\API_TESTS_PORT;
$testEnv = env('TEST_ENV');
$isApiTest = $testEnv === 'api';
$isCliTest = $testEnv === 'cli';
$isE2eTest = $isApiTest || $isCliTest;
$coverageType = env('GENERATE_COVERAGE');
$generateCoverage = $coverageType === 'yes';
$coverage = $isE2eTest && $generateCoverage ? CoverageHelper::createCoverageForDirectories(
[
__DIR__ . '/../../module/Core/src',
__DIR__ . '/../../module/' . ($isApiTest ? 'Rest' : 'CLI') . '/src',
],
__DIR__ . '/../../build/coverage-' . $testEnv,
) : null;
$buildDbConnection = static function (): array {
$driver = env('DB_DRIVER', 'sqlite');
$isCi = env('CI', false);
$getCiMysqlPort = static fn (string $driver) => $driver === 'mysql' ? '3307' : '3308';
return match ($driver) {
'sqlite' => [
'driver' => 'pdo_sqlite',
'memory' => true,
],
'postgres' => [
'driver' => 'pdo_pgsql',
'host' => $isCi ? '127.0.0.1' : 'shlink_db_postgres',
'port' => $isCi ? '5434' : '5432',
'user' => 'postgres',
'password' => 'root',
'dbname' => 'shlink_test',
'charset' => 'utf8',
],
'mssql' => [
'driver' => 'pdo_sqlsrv',
'host' => $isCi ? '127.0.0.1' : 'shlink_db_ms',
'user' => 'sa',
'password' => 'Passw0rd!',
'dbname' => 'shlink_test',
'driverOptions' => [
'TrustServerCertificate' => 'true',
],
],
default => [ // mysql and maria
'driver' => 'pdo_mysql',
'host' => $isCi ? '127.0.0.1' : sprintf('shlink_db_%s', $driver),
'port' => $isCi ? $getCiMysqlPort($driver) : '3306',
'user' => 'root',
'password' => 'root',
'dbname' => 'shlink_test',
'charset' => 'utf8mb4',
],
};
};
$buildTestLoggerConfig = static fn (string $filename) => [
'level' => Level::Debug->value,
'type' => LoggerType::STREAM->value,
'destination' => sprintf('data/log/api-tests/%s', $filename),
'add_new_line' => true,
];
return [
'debug' => true,
ConfigAggregator::ENABLE_CACHE => false,
FastRouteRouter::CONFIG_CACHE_ENABLED => false,
'routes' => [
// This route is used to test that title resolution is skipped if the long URL times out
[
'name' => 'long_url_with_timeout',
'path' => '/api-tests/long-url-with-timeout',
'allowed_methods' => ['GET'],
'middleware' => middleware(static function () {
sleep(5); // Title resolution times out at 3 seconds
return new HtmlResponse('<title>The title</title>');
}),
],
],
'middleware_pipeline' => !$isApiTest ? [] : [
'capture_code_coverage' => [
'middleware' => new CoverageMiddleware($coverage),
'priority' => 9999,
],
],
'dependencies' => [
'services' => [
'shlink_test_api_client' => new Client([
'base_uri' => sprintf('http://%s:%s/', API_TESTS_HOST, API_TESTS_PORT),
'http_errors' => false,
]),
],
'factories' => [
TestUtils\Helper\TestHelper::class => InvokableFactory::class,
],
'delegators' => $isCliTest ? [
Application::class => [
new CliCoverageDelegator($coverage),
],
] : [],
],
'entity_manager' => [
'connection' => $buildDbConnection(),
],
'data_fixtures' => [
'paths' => [
// TODO These are used for other module's tests, so maybe should be somewhere else
__DIR__ . '/../../module/Rest/test-api/Fixtures',
],
],
'logger' => [
'Shlink' => $buildTestLoggerConfig('shlink.log'),
'Access' => $buildTestLoggerConfig('access.log'),
],
];

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -ex
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/24.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql18
# apt-get install unixodbc-dev

2
data/infra/database/.gitignore vendored Executable file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

2
data/infra/database_maria/.gitignore vendored Executable file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

2
data/infra/database_pg/.gitignore vendored Executable file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -0,0 +1,11 @@
<VirtualHost *:80>
ServerName s.test
DocumentRoot "/path/to/shlink/public"
<Directory "/path/to/shlink/public">
Options FollowSymLinks Includes ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

View File

@@ -0,0 +1,22 @@
server {
server_name s.test;
listen 80;
root /path/to/shlink/public;
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ /\.ht {
deny all;
}
}

View File

@@ -0,0 +1,17 @@
server {
listen 80 default_server;
error_log /home/shlink/www/data/infra/nginx/mercure_proxy.error.log;
location / {
proxy_pass http://shlink_mercure;
proxy_read_timeout 24h;
proxy_http_version 1.1;
proxy_set_header Connection "";
## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

2
data/infra/nginx/.gitignore vendored Executable file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

63
data/infra/php.Dockerfile Normal file
View File

@@ -0,0 +1,63 @@
FROM php:8.4-fpm-alpine3.21
MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com>
ENV APCU_VERSION='5.1.24'
ENV PDO_SQLSRV_VERSION='5.12.0'
ENV MS_ODBC_DOWNLOAD='7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8'
ENV MS_ODBC_SQL_VERSION='18_18.4.1.1'
RUN apk update
# Install common php extensions
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install calendar
RUN apk add --no-cache oniguruma-dev
RUN docker-php-ext-install mbstring
RUN apk add --no-cache sqlite-libs
RUN apk add --no-cache sqlite-dev
RUN docker-php-ext-install pdo_sqlite
RUN apk add --no-cache icu-dev
RUN docker-php-ext-install intl
RUN apk add --no-cache libzip-dev zlib-dev
RUN docker-php-ext-install zip
RUN apk add --no-cache libpng-dev
RUN docker-php-ext-install gd
RUN apk add --no-cache postgresql-dev
RUN docker-php-ext-install pdo_pgsql
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS linux-headers && \
docker-php-ext-install sockets && \
apk del .phpize-deps
RUN docker-php-ext-install bcmath
# Install APCu extension
ADD https://pecl.php.net/get/apcu-$APCU_VERSION.tgz /tmp/apcu.tar.gz
RUN mkdir -p /usr/src/php/ext/apcu \
&& tar xf /tmp/apcu.tar.gz -C /usr/src/php/ext/apcu --strip-components=1 \
&& docker-php-ext-configure apcu \
&& docker-php-ext-install apcu \
&& rm /tmp/apcu.tar.gz \
&& rm /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini \
&& echo extension=apcu.so > /usr/local/etc/php/conf.d/20-php-ext-apcu.ini
# Install xdebug and sqlsrv driver
RUN apk add --update linux-headers && \
wget https://download.microsoft.com/download/${MS_ODBC_DOWNLOAD}/msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
apk add --allow-untrusted msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc-dev && \
pecl install pdo_sqlsrv-${PDO_SQLSRV_VERSION} xdebug && \
docker-php-ext-enable pdo_sqlsrv xdebug && \
apk del .phpize-deps && \
rm msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk
# Install composer
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
# Make home directory writable by anyone
RUN chmod 777 /home

4
data/infra/php.ini Normal file
View File

@@ -0,0 +1,4 @@
display_errors=On
log_errors_max_len=0
zend.assertions=1
assert.exception=1

View File

@@ -0,0 +1,2 @@
user foo allcommands allkeys on >bar
requirepass barbar

View File

@@ -0,0 +1,68 @@
FROM php:8.4-alpine3.21
MAINTAINER Alejandro Celaya <alejandro@alejandrocelaya.com>
ENV PDO_SQLSRV_VERSION='5.12.0'
ENV MS_ODBC_DOWNLOAD='7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8'
ENV MS_ODBC_SQL_VERSION='18_18.4.1.1'
RUN apk update
# Install common php extensions
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install calendar
RUN apk add --no-cache oniguruma-dev
RUN docker-php-ext-install mbstring
RUN apk add --no-cache sqlite-libs
RUN apk add --no-cache sqlite-dev
RUN docker-php-ext-install pdo_sqlite
RUN apk add --no-cache icu-dev
RUN docker-php-ext-install intl
RUN apk add --no-cache libzip-dev zlib-dev
RUN docker-php-ext-install zip
RUN apk add --no-cache libpng-dev
RUN docker-php-ext-install gd
RUN apk add --no-cache postgresql-dev
RUN docker-php-ext-install pdo_pgsql
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS linux-headers && \
docker-php-ext-install sockets && \
apk del .phpize-deps
RUN docker-php-ext-install bcmath
# Install xdebug and sqlsrv driver
RUN apk add --update linux-headers && \
wget https://download.microsoft.com/download/${MS_ODBC_DOWNLOAD}/msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
apk add --allow-untrusted msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk && \
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc-dev && \
pecl install pdo_sqlsrv-${PDO_SQLSRV_VERSION} xdebug && \
docker-php-ext-enable pdo_sqlsrv xdebug && \
apk del .phpize-deps && \
rm msodbcsql${MS_ODBC_SQL_VERSION}-1_amd64.apk
# Install composer
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
# Make home directory writable by anyone
RUN chmod 777 /home
VOLUME /home/shlink
WORKDIR /home/shlink
# Expose roadrunner port
EXPOSE 8080
CMD \
# Install dependencies if the vendor dir does not exist
if [[ ! -d "./vendor" ]]; then /usr/local/bin/composer install ; fi && \
# Download roadrunner binary
if [[ ! -f "./bin/rr" ]]; then ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr ; fi && \
# Create env file if it does not exist yet
if [[ ! -f "./config/params/shlink_dev_env.php" ]]; then cp ./config/params/shlink_dev_env.php.dist ./config/params/shlink_dev_env.php ; fi && \
# Run with `exec` so that signals are properly handled
exec ./bin/rr serve -c config/roadrunner/.rr.dev.yml

21
data/infra/vhost.conf Normal file
View File

@@ -0,0 +1,21 @@
server {
listen 80 default_server;
server_name shlink.local;
root /home/shlink/www/public;
index index.php;
charset utf-8;
error_log /home/shlink/www/data/infra/nginx/shlink.error.log;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
root /home/shlink/www/public;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass shlink_php:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}

2
data/locks/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace <namespace>;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class <className> extends AbstractMigration
{
public function up(Schema $schema): void
{
<up>
}
public function down(Schema $schema): void
{
<down>
}
public function isTransactional(): bool
{
return ! ($this->connection->getDatabasePlatform() instanceof MySQLPlatform);
}
}

0
data/proxies/.gitignore vendored Normal file → Executable file
View File

15
docker-compose.ci.yml Normal file
View File

@@ -0,0 +1,15 @@
services:
shlink_db_mysql:
user: '0'
environment:
MYSQL_DATABASE: shlink_test
shlink_db_postgres:
user: '0'
environment:
POSTGRES_DB: shlink_test
shlink_db_maria:
user: '0'
environment:
MYSQL_DATABASE: shlink_test

190
docker-compose.yml Normal file
View File

@@ -0,0 +1,190 @@
services:
shlink_nginx:
container_name: shlink_nginx
image: nginx:1.25-alpine
ports:
- "8000:80"
volumes:
- ./:/home/shlink/www
- ./docs:/home/shlink/www/public/docs
- ./data/infra/vhost.conf:/etc/nginx/conf.d/default.conf
links:
- shlink_php
shlink_php:
container_name: shlink_php
user: 1000:1000
build:
context: .
dockerfile: ./data/infra/php.Dockerfile
ports:
- '8888:8888'
volumes:
- ./:/home/shlink/www
- ./data/infra/php.ini:/usr/local/etc/php/php.ini
links:
- shlink_db_mysql
- shlink_db_postgres
- shlink_db_maria
- shlink_db_ms
- shlink_redis
- shlink_redis_acl
- shlink_mercure
- shlink_mercure_proxy
- shlink_rabbitmq
- shlink_matomo
environment:
LC_ALL: C
DEFAULT_DOMAIN: localhost:8000
extra_hosts:
- 'host.docker.internal:host-gateway'
shlink_roadrunner:
container_name: shlink_roadrunner
user: 1000:1000
build:
context: .
dockerfile: ./data/infra/roadrunner.Dockerfile
ports:
- "8800:8080"
volumes:
- ./:/home/shlink
- ./data/infra/php.ini:/usr/local/etc/php/php.ini
links:
- shlink_db_mysql
- shlink_db_postgres
- shlink_db_maria
- shlink_db_ms
- shlink_redis
- shlink_redis_acl
- shlink_mercure
- shlink_mercure_proxy
- shlink_rabbitmq
- shlink_matomo
environment:
LC_ALL: C
extra_hosts:
- 'host.docker.internal:host-gateway'
shlink_db_mysql:
container_name: shlink_db_mysql
user: 1000:1000
image: mysql:8.0
ports:
- "3307:3306"
volumes:
- ./:/home/shlink/www
- ./data/infra/database:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: shlink
shlink_db_postgres:
container_name: shlink_db_postgres
user: 1000:1000
image: postgres:16.3-alpine
ports:
- "5434:5432"
volumes:
- ./:/home/shlink/www
- ./data/infra/database_pg:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: root
POSTGRES_DB: shlink
PGDATA: /var/lib/postgresql/data/pgdata
shlink_db_maria:
container_name: shlink_db_maria
user: 1000:1000
image: mariadb:10.7
ports:
- "3308:3306"
volumes:
- ./:/home/shlink/www
- ./data/infra/database_maria:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: shlink
MYSQL_INITDB_SKIP_TZINFO: 1
shlink_db_ms:
container_name: shlink_db_ms
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- "1433:1433"
environment:
ACCEPT_EULA: Y
SA_PASSWORD: "Passw0rd!"
shlink_redis:
container_name: shlink_redis
image: redis:7.4-alpine
ports:
- "6380:6379"
shlink_redis_acl:
container_name: shlink_redis_acl
image: redis:7.4-alpine
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
ports:
- "6382:6379"
volumes:
- ./data/infra/redis/redis-acl.conf:/usr/local/etc/redis/redis.conf
shlink_mercure_proxy:
container_name: shlink_mercure_proxy
image: nginx:1.25-alpine
ports:
- "8002:80"
volumes:
- ./:/home/shlink/www
- ./data/infra/mercure_proxy_vhost.conf:/etc/nginx/conf.d/default.conf
links:
- shlink_mercure
shlink_mercure:
container_name: shlink_mercure
image: dunglas/mercure:v0.18
ports:
- "3080:80"
environment:
SERVER_NAME: ":80"
MERCURE_PUBLISHER_JWT_KEY: mercure_jwt_key_long_enough_to_avoid_error
MERCURE_SUBSCRIBER_JWT_KEY: mercure_jwt_key_long_enough_to_avoid_error
MERCURE_EXTRA_DIRECTIVES: "cors_origins https://app.shlink.io http://localhost:3000 http://127.0.0.1:3000 http://localhost:3002 http://127.0.0.1:3002 http://localhost:3005 http://127.0.0.1:3005"
shlink_rabbitmq:
container_name: shlink_rabbitmq
image: rabbitmq:3.11-management-alpine
ports:
- "15673:15672"
- "5673:5672"
environment:
RABBITMQ_DEFAULT_USER: "rabbit"
RABBITMQ_DEFAULT_PASS: "rabbit"
shlink_swagger_ui:
container_name: shlink_swagger_ui
image: swaggerapi/swagger-ui:v5.11.3
ports:
- "8005:8080"
volumes:
- ./docs/swagger:/app
shlink_matomo:
container_name: shlink_matomo
image: matomo:5.0-apache
ports:
- "8003:80"
volumes:
# Matomo does not persist port in trusted hosts. This volume is needed to edit config afterward
# https://github.com/matomo-org/matomo/issues/9549
- ./data/infra/matomo:/var/www/html
links:
- shlink_db_mysql
environment:
MATOMO_DATABASE_HOST: "shlink_db_mysql"
MATOMO_DATABASE_ADAPTER: "mysql"
MATOMO_DATABASE_DBNAME: "matomo"
MATOMO_DATABASE_USERNAME: "root"
MATOMO_DATABASE_PASSWORD: "root"

34
docker/README.md Normal file
View File

@@ -0,0 +1,34 @@
# Shlink Docker image
[![Docker build status](https://img.shields.io/github/workflow/status/shlinkio/shlink/Build%20docker%20image?logo=docker&style=flat-square)](https://github.com/shlinkio/shlink/actions?query=workflow%3A%22Build+docker+image%22)
[![Docker pulls](https://img.shields.io/docker/pulls/shlinkio/shlink.svg?logo=docker&style=flat-square)](https://hub.docker.com/r/shlinkio/shlink/)
This image provides an easy way to set up [shlink](https://shlink.io) on a container-based runtime.
It exposes a shlink instance served with [RoadRunner](https://roadrunner.dev), which can be linked to external databases to persist data.
## Usage
The most basic way to run Shlink's docker image is by providing these mandatory env vars.
* `DEFAULT_DOMAIN`: The default short domain used for this shlink instance. For example **s.test**.
* `IS_HTTPS_ENABLED`: Either **true** or **false**. Tells if Shlink is being served with HTTPs or not.
* `GEOLITE_LICENSE_KEY`: Your GeoLite2 license key. [Learn more](https://shlink.io/documentation/geolite-license-key/) about this.
To run shlink on top of a local docker service, and using an internal SQLite database, do the following:
```bash
docker run \
--name shlink \
-p 8080:8080 \
-e DEFAULT_DOMAIN=s.test \
-e IS_HTTPS_ENABLED=true \
-e GEOLITE_LICENSE_KEY=kjh23ljkbndskj345 \
shlinkio/shlink:stable
```
## Full documentation
All the features supported by Shlink are also supported by the docker image.
If you want to learn more, visit the [full documentation](https://shlink.io/documentation/install-docker-image/).

3
docker/config/php.ini Normal file
View File

@@ -0,0 +1,3 @@
log_errors_max_len=0
zend.assertions=1
assert.exception=1

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env sh
set -e
cd /etc/shlink
# Create data directories if they do not exist. This allows data dir to be mounted as an empty dir if needed
mkdir -p data/cache data/locks data/log data/proxies
flags="--no-interaction --clear-db-cache"
# Read env vars through Shlink command, so that it applies the `_FILE` env var fallback logic
geolite_license_key=$(bin/cli env-var:read GEOLITE_LICENSE_KEY)
skip_initial_geolite_download=$(bin/cli env-var:read SKIP_INITIAL_GEOLITE_DOWNLOAD)
initial_api_key=$(bin/cli env-var:read INITIAL_API_KEY)
# Skip downloading GeoLite2 db file if the license key env var was not defined or skipping was explicitly set
if [ -z "${geolite_license_key}" ] || [ "${skip_initial_geolite_download}" = "true" ]; then
flags="${flags} --skip-download-geolite"
fi
# If INITIAL_API_KEY was provided, create an initial API key
if [ -n "${initial_api_key}" ]; then
flags="${flags} --initial-api-key=${initial_api_key}"
fi
php vendor/bin/shlink-installer init ${flags}
if [ "$SHLINK_RUNTIME" = 'rr' ]; then
# Run with `exec` so that signals are properly handled
exec ./bin/rr serve -c config/roadrunner/.rr.yml
fi

View File

@@ -0,0 +1,50 @@
# Support restrictions and permissions in API keys
* Status: Accepted
* Date: 2021-01-17
## Context and problem statement
Historically, every API key generated for Shlink granted you access to all existing resources.
The intention is to be able to apply some form of restriction to API keys, so that only a subset of "resources" can be accessed with it, naming:
* Allowing interactions only with short URLs and related resources, that have been created with the same API key.
* Allowing interactions only with short URLs and related resources, that have been attached to a specific domain.
The intention is to implement a system that allows adding to API keys as many of these restrictions as wanted.
Supporting more restrictions in the future is also desirable.
## Considered options
* Using an ACL/RBAC library, and checking roles in a middleware.
* Using a service that, provided an API key, tells if certain resource is reachable while it also allows building queries dynamically.
* Using some library implementing the specification pattern, to dynamically build queries transparently for outer layers.
## Decision outcome
The main difficulty on implementing this is that the entity conditioning the behavior (the API key) comes in the request in some form, but it can potentially affect database queries performed in the persistence layer.
Because of this, it has to traverse all the application layers from top to bottom, in most of the cases.
This motivated selecting the third option, as we can propagate the API key and delay its handling to the last step, without changing the behavior of the rest of the layers that much (except in some individual use cases).
The domain term used to refer these "restrictions" is finally **roles**.
It can be combined in the future with an ACL/RBAC library, if we want to restrict access to certain resources, but it didn't fulfil the initial requirements.
## Pros and Cons of the Options
### An ACL/RBAC library
* Good, because there are many good libraries out there.
* Bad, because when you need to filter resources lists this kind of libraries doesn't really work.
### A service with the logic
* Bad, because it would need to be used in many layers of the application, mixing unrelated concerns.
### A library implementing the specification pattern
* Good, because allows centralizing the generation of dynamic specs by the entity itself, that are later translated automatically into database queries.

View File

@@ -0,0 +1,35 @@
# Track visits to 'base_url', 'invalid_short_url' and 'regular_404'
* Status: Accepted
* Date: 2021-02-07
## Context and problem statement
Shlink has the mechanism to return either custom errors or custom redirects when visiting the instance's base URL, an invalid short URL, or any other kind of URL that would result in a "Not found" error.
However, it does not track visits to any of those, just to valid short URLs.
The intention is to change that, and allow users to track the cases mentioned above.
## Considered options
* Create a new table to track visits o this kind.
* Reuse the existing `visits` table, by making `short_url_id` nullable and adding a couple of other fields.
## Decision outcome
The decision is to use the existing table, as making the short URL nullable can be handled seamlessly by using named constructors, and it has a lot of benefits on regards of reusing existing components.
Also, the domain name this kind of visits will receive is "Orphan Visits", as they are detached from any existing short URL.
## Pros and Cons of the Options
### New table
* Good because we don't touch existing models and tables, reducing the risk to introduce a backwards compatibility break.
* Bad because we will have to repeat data modeling and logic, or refactor some components to support both contexts. This in turn increases the options to introduce a BC break.
### Reuse existing table
* Good because all the mechanisms in place to handle visits will work out of the box, including locating visits and such.
* Bad because we will have more optional properties, which means more double checks in many places.

View File

@@ -0,0 +1,59 @@
# Migrate to a new caching library
* Status: Accepted
* Date: 2021-08-05
## Context and problem statement
Shlink has always used the `doctrine/cache` library to handle anything related with cache.
It was convenient, as it provided several adapters, and it was the library used by other doctrine packages.
However, after the creation of the caching PSRs ([PSR-6 - Cache](https://www.php-fig.org/psr/psr-6) and [PSR-16 - Simple cache](https://www.php-fig.org/psr/psr-16)), most library authors have moved to those interfaces, and the doctrine team has decided to recommend using any other existing package and decommission their own solution.
Also, Shlink needs support for Redis clusters and Redis sentinels, which is not supported by `doctrine/cache` Redis adapters.
## Considered options
After some research, the only packages that seem to support the capabilities required by Shlink and also seem healthy, are these:
* [Symfony cache](https://symfony.com/doc/current/components/cache.html)
* 🟢 PSR-6 compliant: **yes**
* 🟢 PSR-16 compliant: **yes**
* 🟢 APCu support: **yes**
* 🟢 Redis support: **yes**
* 🟢 Redis cluster support: **yes**
* 🟢 Redis sentinel support: **yes**
* 🟢 Can use redis through Predis: **yes**
* 🔴 Individual packages per adapter: **no**
* [Laminas cache](https://docs.laminas.dev/laminas-cache/)
* 🟢 PSR-6 compliant: **yes**
* 🟢 PSR-16 compliant: **yes**
* 🟢 APCu support: **yes**
* 🟢 Redis support: **yes**
* 🟢 Redis cluster support: **yes**
* 🔴 Redis sentinel support: **no**
* 🔴 Can use redis through Predis: **no**
* 🟢 Individual packages per adapter: **yes**
## Decision outcome
Even though Symfony packs all their adapters in a single component, which means we will install some code that will never be used, Laminas relies on the native redis extension for anything related with redis.
That would make Shlink more complex to install, so it seems Symfony's package is the option where it's easier to migrate to.
Also, it's important that the cache component can share the Redis integration (through `Predis`, in this case), as it's also used by other components (the lock component, to name one).
## Pros and Cons of the Options
### Symfony cache
* Good because it supports Redis Sentinel.
* Good because it allows using a external `Predis` instance.
* Bad because it packs all the adapters in a single component.
### Laminas cache
* Good because allows installing only the adapters you are going to use, through separated packages.
* Bad because it requires the php-redis native extension in order to interact with Redis.
* Bad because it does ot seem to support Redis Sentinels.

View File

@@ -0,0 +1,51 @@
# Update env vars behavior to have precedence over installer options
* Status: Accepted
* Date: 2022-01-15
## Context and problem statement
Shlink supports providing configuration via the installer tool that generates a config file that gets merged with the rest of the config, or via environment variables.
It is potentially possible to combine both, but if you do so, you will find out the installer tool config has precedence over env vars, which is not very intuitive.
A [Twitter survey](https://twitter.com/shlinkio/status/1480614855006732289) has also showed up all participants also found the behavior should be the opposite.
## Considered options
* Move the logic to read env vars to another config file which always overrides installer options.
* Move the logic to read env vars to a config post-processor which overrides config dynamically, only if the appropriate env var had been defined.
* Make the installer generate a config file which also includes the logic to load env vars on it.
* Make the installer no longer generate the config structure, and instead generate a map with env vars and their values. Then Shlink would define those env vars if not defined already.
## Decision outcome
The most viable option was finally to re-think the installer tool, and make it generate a map of env vars and their values.
Then Shlink reads this as the first config file, which sets the values as env vars if not yet defined, and later on, the values are read as usual wherever needed.
## Pros and Cons of the Options
### Read all env vars in a single config file
* Bad: This option had to be discarded, as it would always override the installer config no matter what.
### Read all env vars in a config post-processor
* Good because it would not require any change in the installer.
* Bad because it requires moving all env var reading logic somewhere else, while having it together with their contextual config is quite convenient.
* Bad because it requires defining a map between the config path from the installer and the env var to set.
### Make the installer generate a config file which also reads env vars
* Good because it would not require changing Shlink.
* Bad because it requires looking for a new way to generate the installer config.
* Bad because it would mean reading the env vars in multiple places.
### Re-think the installer to no longer generate internal config, and instead, just define values for regular env vars
* Bad because it requires changes both in Shlink and the installer.
* Bad because it's more error-prone, and the option with higher chances to introduce a regression.
* Good because it finally decouples Shlink internal config (which is an implementation detail) from any external tool, including the installer, allowing to change it at will.
* Good because it opens the door to eventually simplify the installer. For the moment, it requires a bit of extra logic to support importing the old config.
* Good because it allows keeping the logic to read env vars next to the config where it applies.

Some files were not shown because too many files have changed in this diff Show More