diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c993714d3..d1385a2cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: php-versions: [8.1, 8.2, 8.3] - nextcloud-versions: ['stable28'] + nextcloud-versions: ['stable28', 'stable29'] name: Nextcloud ${{ matrix.nextcloud-versions }} php${{ matrix.php-versions }} unit tests steps: - name: Set up php${{ matrix.php-versions }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 63925dd62..5100b469d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.4.0 - 2024.04.28 Nextcloud Hub 8 +- Compability changes to Nextcloud 29. + ## 1.3.0 - 2023.12.12 Nextcloud Hub 7 - Compability changes to Nextcloud 28. diff --git a/appinfo/info.xml b/appinfo/info.xml index 09b27a4ea..2e1f559c6 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ - **📱 Devices:** Lost your phone? Check the map! - **〰 Tracks:** Load GPS tracks or past trips. Recording with [PhoneTrack](https://f-droid.org/en/packages/net.eneiluj.nextcloud.phonetrack/) or [OwnTracks](https://owntracks.org) is planned. ]]> - 1.3.1 + 1.4.0 agpl Julien Veyssier Arne Hamann @@ -33,7 +33,7 @@ https://raw.githubusercontent.com/nextcloud/maps/master/screenshots/screenshot3.png exif - + diff --git a/composer.json b/composer.json index 1d7123c68..f0dc1de54 100644 --- a/composer.json +++ b/composer.json @@ -11,5 +11,10 @@ "test:integration:dev": "phpunit -c tests/phpunit.integration.xml --no-coverage --order-by=defects --stop-on-defect --fail-on-warning --stop-on-error --stop-on-failure", "test:unit": "phpunit -c tests/phpunit.unit.xml --fail-on-warning", "test:unit:dev": "phpunit -c tests/phpunit.unit.xml --no-coverage --order-by=defects --stop-on-defect --fail-on-warning --stop-on-error --stop-on-failure" + }, + "autoload": { + "files": [ + "lib/Helper/functions.php" + ] } } diff --git a/lib/Controller/PublicTracksController.php b/lib/Controller/PublicTracksController.php index c10707a80..62e4f5e78 100644 --- a/lib/Controller/PublicTracksController.php +++ b/lib/Controller/PublicTracksController.php @@ -45,16 +45,7 @@ use OCA\Maps\Service\TracksService; use OCP\Share\IManager as ShareManager; - -/** - * @param string $text - * @return string - */ -function remove_utf8_bom(string $text): string { - $bom = pack('H*','EFBBBF'); - $text = preg_replace("/^$bom/", '', $text); - return $text; -} +use function OCA\Maps\Helper\remove_utf8_bom; class PublicTracksController extends PublicPageController { diff --git a/lib/Controller/TracksController.php b/lib/Controller/TracksController.php index 757f0f928..c9c153eb3 100644 --- a/lib/Controller/TracksController.php +++ b/lib/Controller/TracksController.php @@ -37,15 +37,7 @@ use OCA\Maps\Service\TracksService; -/** - * @param string $text - * @return string - */ -function remove_utf8_bom(string $text): string { - $bom = pack('H*','EFBBBF'); - $text = preg_replace("/^$bom/", '', $text); - return $text; -} +use function OCA\Maps\Helper\remove_utf8_bom; class TracksController extends Controller { diff --git a/lib/Helper/functions.php b/lib/Helper/functions.php new file mode 100644 index 000000000..1f825fc83 --- /dev/null +++ b/lib/Helper/functions.php @@ -0,0 +1,36 @@ + + * + * @author Arne Hamann + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Maps\Helper; + +/** + * function remove_utf8_bom + * + * @param string $text + * @return string + */ +function remove_utf8_bom(string $text): string { + $bom = pack('H*','EFBBBF'); + $text = preg_replace("/^$bom/", '', $text); + return $text; +} diff --git a/package.json b/package.json index f433dd0b0..cf35f3e17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "maps", - "version": "1.3.1", + "version": "1.4.0", "description": "Maps app", "main": "main.js", "directories": {