-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #604 from shlinkio/develop
Release v2
- Loading branch information
Showing
310 changed files
with
1,344 additions
and
4,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM php:7.3.11-alpine3.10 | ||
FROM php:7.4.1-alpine3.10 | ||
LABEL maintainer="Alejandro Celaya <[email protected]>" | ||
|
||
ARG SHLINK_VERSION=1.20.2 | ||
ARG SHLINK_VERSION=2.0.0 | ||
ENV SHLINK_VERSION ${SHLINK_VERSION} | ||
ENV SWOOLE_VERSION 4.4.12 | ||
ENV COMPOSER_VERSION 1.9.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Upgrading | ||
|
||
## From v1.x to v2.x | ||
|
||
### 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 me 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. | ||
|
||
### 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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.