From a9a53a96523c0e22d4b28aa97037728ff723e5c7 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 6 Apr 2020 20:52:33 +0200 Subject: [PATCH 1/2] Ensured entities metadata cache is cleared during installation and docker start-up --- CHANGELOG.md | 23 +++++++++++++++++++++++ composer.json | 4 ++-- docker/docker-entrypoint.sh | 3 +++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e7d5ea1..6730bef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). +## [Unreleased] + +#### Added + +* *Nothing* + +#### Changed + +* *Nothing* + +#### Deprecated + +* *Nothing* + +#### Removed + +* *Nothing* + +#### Fixed + +* [#712](https://github.com/shlinkio/shlink/issues/712) Fixed app set-up not clearing entities metadata cache. + + ## 2.1.2 - 2020-03-29 #### Added diff --git a/composer.json b/composer.json index 7094757d..d2c9d467 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "shlinkio/shlink-common": "^3.0", "shlinkio/shlink-config": "^1.0", "shlinkio/shlink-event-dispatcher": "^1.4", - "shlinkio/shlink-installer": "^4.3.1", + "shlinkio/shlink-installer": "4.3.2", "shlinkio/shlink-ip-geolocation": "^1.4", "symfony/console": "^5.0", "symfony/filesystem": "^5.0", @@ -65,7 +65,7 @@ "eaglewu/swoole-ide-helper": "dev-master", "infection/infection": "^0.16.1", "phpstan/phpstan": "^0.12.18", - "phpunit/phpunit": "^9.0.1", + "phpunit/phpunit": "~9.0.1", "roave/security-advisories": "dev-master", "shlinkio/php-coding-standard": "~2.1.0", "shlinkio/shlink-test-utils": "^1.4", diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 7f924057..055e315f 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -12,6 +12,9 @@ php bin/cli db:migrate -n -q echo "Generating proxies..." php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q +echo "Clearing entities cache..." +php vendor/doctrine/orm/bin/doctrine.php orm:clear-cache:metadata -n -q + # When restarting the container, swoole might think it is already in execution # This forces the app to be started every second until the exit code is 0 until php vendor/mezzio/mezzio-swoole/bin/mezzio-swoole start; do sleep 1 ; done From fa9ace83ad92cfd4054bf131e7dce6679c7d510c Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 6 Apr 2020 20:59:10 +0200 Subject: [PATCH 2/2] Fixed incorrect use of tilde --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d2c9d467..cd0d699a 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "shlinkio/shlink-common": "^3.0", "shlinkio/shlink-config": "^1.0", "shlinkio/shlink-event-dispatcher": "^1.4", - "shlinkio/shlink-installer": "4.3.2", + "shlinkio/shlink-installer": "^4.3.2", "shlinkio/shlink-ip-geolocation": "^1.4", "symfony/console": "^5.0", "symfony/filesystem": "^5.0",