Skip to content

Commit 6958854

Browse files
authored
Merge pull request #215 from php-perfect/ddev22-compatibility
Update the plugin for compatibility to ddev 1.22
2 parents 86e5ad8 + 6cae6bb commit 6958854

File tree

8 files changed

+18
-33
lines changed

8 files changed

+18
-33
lines changed

src/main/java/de/php_perfect/intellij/ddev/config/ConfigJsonSchemaProviderFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public boolean isAvailable(@NotNull VirtualFile file) {
3131

3232
@Override
3333
public @Nullable VirtualFile getSchemaFile() {
34-
return JsonSchemaProviderFactory.getResourceFile(getClass(), "/schema/ddev-config-1.19.schema.json");
34+
return JsonSchemaProviderFactory.getResourceFile(getClass(), "/schema/ddev-config-1.22.schema.json");
3535
}
3636

3737
@Override

src/main/java/de/php_perfect/intellij/ddev/serviceActions/ServiceActionManagerImpl.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,11 @@ private Optional<Map.Entry<String, AnAction>> mapToServiceNameWithAction(
104104
}
105105

106106
private @NotNull String buildActionText(String key, String fullName) {
107-
switch (key) {
108-
case "dba":
109-
return DdevIntegrationBundle.message("action.services.open.dba");
110-
case "web":
111-
return DdevIntegrationBundle.message("action.services.open.web");
112-
case "mailhog":
113-
return DdevIntegrationBundle.message("action.services.open.mailHog");
114-
default:
115-
return DdevIntegrationBundle.message("action.services.open.any", fullName);
116-
}
107+
return switch (key) {
108+
case "web" -> DdevIntegrationBundle.message("action.services.open.web");
109+
case "mailhog" -> DdevIntegrationBundle.message("action.services.open.mailHog");
110+
default -> DdevIntegrationBundle.message("action.services.open.any", fullName);
111+
};
117112
}
118113

119114
@Override

src/main/resources/messages/DdevIntegrationBundle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ status.Paused=Paused
9797
status.Unhealthy=Unhealthy
9898
status.Undefined=Unknown
9999
# Services
100-
action.services.open.dba=Open Database Administration
101100
action.services.open.web=Open Website
102101
action.services.open.any=Open {0}
103102
action.services.open.description=Open {0} service in your browser

src/main/resources/schema/ddev-config-1.19.schema.json renamed to src/main/resources/schema/ddev-config-1.22.schema.json

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
}
2323
}
2424
},
25+
"required": [
26+
"name"
27+
],
28+
"additionalProperties": false,
2529
"properties": {
2630
"name": {
2731
"description": "Provide the name of the project to configure (normally the same as the last part of directory name)",
@@ -66,7 +70,8 @@
6670
"7.3",
6771
"7.4",
6872
"8.0",
69-
"8.1"
73+
"8.1",
74+
"8.2"
7075
]
7176
},
7277
"webserver_type": {
@@ -207,7 +212,8 @@
207212
"type": "array",
208213
"items": {
209214
"type": "string"
210-
}
215+
},
216+
"uniqueItems": true
211217
},
212218
"fail_on_hook_fail": {
213219
"description": "Decide whether 'ddev start' should be interrupted by a failing hook",
@@ -229,21 +235,6 @@
229235
"example": "59002",
230236
"type": "string"
231237
},
232-
"phpmyadmin_port": {
233-
"description": "Router port to be used for PHPMyAdmin (dba) container access",
234-
"example": "8036",
235-
"type": "string"
236-
},
237-
"phpmyadmin_https_port": {
238-
"description": "Router port to be used for PHPMyAdmin (dba) container access (https)",
239-
"example": "8037",
240-
"type": "string"
241-
},
242-
"host_phpmyadmin_port": {
243-
"description": "The dba (PHPMyAdmin) container's localhost-bound port, if exposed via bind-all-interfaces",
244-
"example": "8036",
245-
"type": "string"
246-
},
247238
"mailhog_port": {
248239
"description": "Router port to be used for mailhog access",
249240
"example": "8025",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbaimg":"phpmyadmin:5","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"8.1","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
1+
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"8.1","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbaimg":"phpmyadmin:5","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"7.4","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
1+
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"7.4","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{"level":"debug","msg":"detected terminal width=80 urlPortWidth=32 infoWidth=20","time":"2022-05-27T14:24:48+02:00"}
2-
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbaimg":"phpmyadmin:5","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"8.1","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
2+
{"level":"info","msg":"┌──────────────────────────────────┐\n│ Project: acol ~/projects/acol ht │\n│ tps://acol.ddev.site│\n├─────────┬──────┬──────────┬──────┤\n│ SERVICE │ STAT │ URL/PORT │ INFO │\n├─────────┼──────┼──────────┼──────┤\n└─────────┴──────┴──────────┴──────┘\n","raw":{"approot":"/home/nl/projects/acol","database_type":"mariadb","dbimg":"ddev/ddev-dbserver-mariadb-10.4:v1.18.2","docroot":"public","fail_on_hook_fail":false,"hostname":"acol.ddev.site","hostnames":["acol.ddev.site"],"httpURLs":["http://acol.ddev.site","http://127.0.0.1:-1"],"httpsURLs":["https://acol.ddev.site","https://127.0.0.1:-1"],"httpsurl":"https://acol.ddev.site","httpurl":"http://acol.ddev.site","mariadb_version":"10.4","mutagen_enabled":false,"name":"acol","nfs_mount_enabled":false,"php_version":"8.1","primary_url":"https://acol.ddev.site","router_disabled":false,"router_http_port":"80","router_https_port":"443","router_status":"stopped","router_status_log":"","services":{},"shortroot":"~/projects/acol","ssh_agent_status":"exited","status":"stopped","type":"php","urls":["https://acol.ddev.site","https://127.0.0.1:-1","http://acol.ddev.site","http://127.0.0.1:-1"],"webimg":"ddev/ddev-webserver:v1.18.2","webserver_type":"apache-fpm","xdebug_enabled":false},"time":"2022-02-05T14:51:31+01:00"}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"level":"info","msg":" ITEM VALUE \n architecture amd64 \n build_info BUILDINFO should have new info \n db ddev/ddev-dbserver-mariadb-10.3:20220102_gzip_snapshots \n dba phpmyadmin:5\n ddev_ssh_agent ddev/ddev-ssh-agent:v1.18.0 \n ddev_version v1.19.0-alpha3-12-gdf44295f \n docker 20.10.12\n docker_compose v2.2.2 \n docker_platform docker-desktop \n docker_type Docker Desktop For Windows\n mutagen 0.12.0 \n os windows\n router ddev/ddev-router:20211128__docker-compose-networking \n web ddev/ddev-webserver:20220117_no_volume_copy \n","raw":{"architecture":"amd64","build info":"BUILDINFO should have new info","db":"ddev/ddev-dbserver-mariadb-10.3:20220102_gzip_snapshots","dba":"phpmyadmin:5","ddev-ssh-agent":"ddev/ddev-ssh-agent:v1.18.0","DDEV version":"v1.19.0","docker":"20.10.12","docker-compose":"v2.2.2","docker-platform":"docker-desktop","mutagen":"0.12.0","os":"windows","router":"ddev/ddev-router:20211128__docker-compose-networking","web":"ddev/ddev-webserver:20220117_no_volume_copy"},"time":"2022-02-05T15:47:35+01:00"}
1+
{"level":"info","msg":" ITEM VALUE \n architecture amd64 \n build_info BUILDINFO should have new info \n db ddev/ddev-dbserver-mariadb-10.3:20220102_gzip_snapshots \n ddev_ssh_agent ddev/ddev-ssh-agent:v1.18.0 \n ddev_version v1.19.0-alpha3-12-gdf44295f \n docker 20.10.12\n docker_compose v2.2.2 \n docker_platform docker-desktop \n docker_type Docker Desktop For Windows\n mutagen 0.12.0 \n os windows\n router ddev/ddev-router:20211128__docker-compose-networking \n web ddev/ddev-webserver:20220117_no_volume_copy \n","raw":{"architecture":"amd64","build info":"BUILDINFO should have new info","db":"ddev/ddev-dbserver-mariadb-10.3:20220102_gzip_snapshots","ddev-ssh-agent":"ddev/ddev-ssh-agent:v1.18.0","DDEV version":"v1.19.0","docker":"20.10.12","docker-compose":"v2.2.2","docker-platform":"docker-desktop","mutagen":"0.12.0","os":"windows","router":"ddev/ddev-router:20211128__docker-compose-networking","web":"ddev/ddev-webserver:20220117_no_volume_copy"},"time":"2022-02-05T15:47:35+01:00"}

0 commit comments

Comments
 (0)