Commit Graph

595 Commits

Author SHA1 Message Date
Alejandro Celaya
05acd4ae88 Add two modes for short URLs 2023-01-25 20:33:07 +01:00
Alejandro Celaya
4ee0032c2a Deprecated validateUrl option on short URL creation/edition 2023-01-23 20:30:12 +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
1447687ebe Add deviceLongUrls to short URL creation 2023-01-21 10:12:52 +01:00
Alejandro Celaya
80e3f01562 Replace references to doma.in with s.test 2023-01-19 09:05:52 +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
92c80e7833 Removed superfluous exception code by using named args 2023-01-02 13:47:16 +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
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
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
6a2227efc5 Removed all uinnecessary usages of equalsTo param constraint 2022-10-23 18:15: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
bcd5d2848d Used PHPUnit mocks in RoleResolverTest instead of prophezy 2022-10-12 12:47:58 +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
0c6f8f1136 Refactored global entities into their own proper namespaces 2022-09-23 19:03:32 +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
f5f990511c Refactored global models into their own proper namespaces 2022-09-23 18:05:17 +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
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
6f17f70137 Allowed to delay GeoLite2 db download on docker images 2022-09-18 17:00:03 +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
8d244c8d34 Migrated UrlShortenerOptions to immutable object 2022-09-17 15:54:43 +02:00
Alejandro Celaya
20f457a3e9 Migrated NotFoundRedirectOptions to immutable object 2022-09-17 13:32:40 +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
997289da02 Changed all public setUp methods in tests to be protected 2022-09-11 12:02:49 +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
709a4639b3 Fixed merge conflicts 2022-08-09 18:59:55 +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
7acf27dd38 Replaced usage of deprecated methods in DateRange class 2022-08-04 11:27:33 +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
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
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
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
bca3e62ced Updated to readonly public props on as many models as possible 2022-04-23 14:00:47 +02:00
Alejandro Celaya
011856cbfa Removed redundant var 2022-04-23 09:15:01 +02:00
Alejandro Celaya
3a82691503 Small improvements on CreateDatabaseCommand 2022-04-10 19:48:32 +02:00
Alejandro Celaya
1449e24b66 Improved some tests 2022-03-14 19:41:33 +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
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
c52f3c396b Fixed merge conflicts 2022-02-19 19:47:34 +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
9e32886f60 Created first CLI E2E tests 2022-02-13 12:20:02 +01:00
Alejandro Celaya
1d4186392c Marked database commands as hidden 2022-01-30 12:15:53 +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
2abcaf02e2 Standardized ordering field handling and added validation for short URLs list 2022-01-09 11:23:27 +01:00
Alejandro Celaya
775f58f972 Added support for pagination in tags lists 2022-01-05 19:12:08 +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
203ad7d594 Updated dependencies 2021-12-16 21:46:52 +01:00
Alejandro Celaya
1ff241411b Removed everything that was deprecated 2021-12-14 22:21:53 +01:00
Alejandro Celaya
0786a962e7 Increased MIS to 83% 2021-12-10 13:42:33 +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
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
f361403888 Updated paginator types 2021-12-08 17:36:40 +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
bd3a59e9ca Updated to doctrine-migrations 3.3 2021-10-23 15:44:56 +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
0c95b978b4 Added option in CLI to disable query forwarding when creating Short URLs 2021-10-02 10:45:00 +02:00
Alejandro Celaya
cbec4a4e81 Moved constants to its own file inside config folder 2021-09-26 11:26:26 +02:00
Alejandro Celaya
9a31f53d4d Updated to coding standard v2.2.0 2021-08-05 19:47:17 +02:00
Alejandro Celaya
883ac1007a Updated to provisional hero-common v4.0 2021-08-04 18:46:19 +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
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
02fd28edec Installed phpstan-dcotrine and fixed more static analysis errors 2021-07-20 13:29:50 +02:00
Alejandro Celaya
de5666d262 Resolved all phpstan errors 2021-07-19 22:47:12 +02:00
Alejandro Celaya
bceea090ed Increaed phpstan level to 7 2021-07-17 20:58:24 +02:00
Alejandro Celaya
6d78cd59e9 Fixed merge conflicts 2021-05-30 13:31:37 +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
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
1efa973507 Updated ImportedLinksProcessor to support importing visits if provided 2021-04-11 11:44:10 +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
KetchupBomb
5d0f306bcc Feature/show API key info in short-url CLI 2021-04-10 07:10:22 +00: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
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
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
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
KetchupBomb
b93b14986e Feature/name api keys 2021-03-07 21:30:37 +00: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
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
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
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
9cddedcdba Extracted logic to stringify ShortUrls to its own service 2021-02-01 23:18:52 +01:00
Alejandro Celaya
7e90fd45a7 Renamed ShortUrlInputFilter and added named constructors to it 2021-01-31 07:47:58 +01:00
Alejandro Celaya
063ee9c195 Inlcuded tags as part of the ShortUrlMeta 2021-01-30 19:17:12 +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
752ded2f80 Changed to kebab-case for CLI flags in command tests 2021-01-30 11:25:20 +01:00
Alejandro Celaya
158e981970 Deprecated camelCase options in rest of CLI commands 2021-01-30 11:17:13 +01:00