Skip to content

Commit fb76ba2

Browse files
authored
Plugin cleanup, #PG-5170 (#44)
* Fix swagger code block styling * Updated php version requirements and added learn more FAQ for missing specs * implement auto scroll behaviour to keep opened plugin in view * added php version 7.4 support * add hash param for learn more * updated version to 7.4 for tests * Updated vue * Update FAQ url * removed todo comment * eslint fixes and vue build * update tests to have max variable
1 parent e11966b commit fb76ba2

10 files changed

Lines changed: 259 additions & 53 deletions

File tree

.github/workflows/matomo-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Action for running tests
22
# This file has been automatically created.
33
# To recreate it you can run this command
4-
# ./console generate:test-action --plugin="ApiReference" --php-versions="7.2,8.4" --schedule-cron="0 19 * * 6"
4+
# ./console generate:test-action --plugin="ApiReference" --php-versions="7.4,8.4" --schedule-cron="0 19 * * 6"
55

66
name: Plugin ApiReference Tests
77

@@ -37,7 +37,7 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
php: [ '7.2', '8.4' ]
40+
php: [ '7.4', 'matomo5_max_php' ]
4141
target: ['minimum_required_matomo', 'maximum_supported_matomo']
4242
steps:
4343
- uses: actions/checkout@v3
@@ -55,4 +55,4 @@ jobs:
5555
matomo-test-branch: ${{ matrix.target }}
5656
redis-service: true
5757
artifacts-pass: ${{ secrets.ARTIFACTS_PASS }}
58-
upload-artifacts: ${{ matrix.php == '7.2' && matrix.target == 'maximum_supported_matomo' }}
58+
upload-artifacts: ${{ matrix.php == '7.4' && matrix.target == 'maximum_supported_matomo' }}

ApiReference.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function getClientSideTranslationKeys(&$translationKeys): void
3737
$translationKeys[] = 'ApiReference_SwaggerPagePluginEmpty';
3838
$translationKeys[] = 'ApiReference_SwaggerPageRequestFailed';
3939
$translationKeys[] = 'ApiReference_SwaggerPageSpecLoadFailed';
40+
$translationKeys[] = 'ApiReference_SwaggerPageSpecNotAvailable';
4041
$translationKeys[] = 'ApiReference_SwaggerPageSearchNoResults';
4142
$translationKeys[] = 'ApiReference_SwaggerPageSearchPlaceholder';
4243
$translationKeys[] = 'ApiReference_UserAuthentication';

lang/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"SwaggerApi": "Swagger API",
77
"SwaggerPagePluginEmpty": "No plugins are configured in the ApiReference whitelist.",
88
"SwaggerPageRequestFailed": "The plugin whitelist could not be loaded.",
9-
"SwaggerPageSpecLoadFailed": "The OpenAPI spec could not be loaded for this plugin.",
109
"SwaggerPageSearchNoResults": "No plugins match your search.",
1110
"SwaggerPageSearchPlaceholder": "Search by plugin name",
11+
"SwaggerPageSpecLoadFailed": "The OpenAPI spec could not be loaded for this plugin.",
12+
"SwaggerPageSpecNotAvailable": "The OpenAPI spec is not available for this plugin yet. %1$sLearn more%2$s",
1213
"UserAuthentication": "User authentication",
1314
"UserAuthenticationManageTokens": "You can manage your authentication tokens on your security page.",
1415
"UserAuthenticationUsingTokenAuth": "If you want to request data within a script, a crontab, etc. you need to add the '%3$s' URL parameter to the API calls for URLs that require authentication."

plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"license": "GPL v3+",
1414
"homepage": "https:\/\/matomo.org",
1515
"require": {
16+
"php": ">=7.4.0",
1617
"matomo": ">=5.0.0-stable,<6.0.0-b1"
1718
},
1819
"authors": [

vue/dist/ApiReference.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)