@@ -184,6 +184,9 @@ public function webform_drush_command() {
184
184
'description ' => "Generates the Webform module's composer.json with libraries as repositories. " ,
185
185
'core ' => ['8+ ' ],
186
186
'bootstrap ' => DRUSH_BOOTSTRAP_DRUPAL_ROOT ,
187
+ 'options ' => [
188
+ 'disable-tls ' => '[boolean] If set to true all HTTPS URLs will be tried with HTTP instead and no network level encryption is performed. ' ,
189
+ ],
187
190
'examples ' => [
188
191
'webform-libraries-composer ' => "Generates the Webform module's composer.json with libraries as repositories. " ,
189
192
],
@@ -257,6 +260,9 @@ public function webform_drush_command() {
257
260
'description ' => "Updates the Drupal installation's composer.json to include the Webform module's selected libraries as repositories. " ,
258
261
'core ' => ['8+ ' ],
259
262
'bootstrap ' => DRUSH_BOOTSTRAP_DRUPAL_ROOT ,
263
+ 'options ' => [
264
+ 'disable-tls ' => '[boolean] If set to true all HTTPS URLs will be tried with HTTP instead and no network level encryption is performed. ' ,
265
+ ],
260
266
'examples ' => [
261
267
'webform-composer-update ' => "Updates the Drupal installation's composer.json to include the Webform module's selected libraries as repositories. " ,
262
268
],
@@ -617,6 +623,9 @@ public function drush_webform_libraries_composer() {
617
623
}
618
624
} ' , TRUE );
619
625
626
+ // Set disable tls.
627
+ $ this ->drush_webform_composer_set_disable_tls ($ data );
628
+
620
629
// Set libraries.
621
630
$ data ['repositories ' ] = [];
622
631
$ data ['require ' ] = [];
@@ -949,6 +958,9 @@ public function drush_webform_composer_update() {
949
958
}
950
959
}
951
960
961
+ // Set disable tls.
962
+ $ this ->drush_webform_composer_set_disable_tls ($ data );
963
+
952
964
// Set libraries.
953
965
$ this ->drush_webform_composer_set_libraries ($ repositories , $ require );
954
966
@@ -959,6 +971,25 @@ public function drush_webform_composer_update() {
959
971
$ this ->drush_print ('Make sure to run `composer update`. ' );
960
972
}
961
973
974
+
975
+ /**
976
+ * Set composer disable tls.
977
+ *
978
+ * This is needed when CKEditor's HTTPS server's SSL is not working properly.
979
+ *
980
+ * @param array $data
981
+ * Composer JSON data.
982
+ */
983
+ protected function drush_webform_composer_set_disable_tls (array &$ data ) {
984
+ // Remove disable-tls config.
985
+ if (isset ($ data ['config ' ]) && isset ($ data ['config ' ]['disable-tls ' ])) {
986
+ unset($ data ['config ' ]['disable-tls ' ]);
987
+ }
988
+ if ($ this ->drush_get_option ('disable-tls ' )) {
989
+ $ data ['config ' ]['disable-tls ' ] = TRUE ;
990
+ }
991
+ }
992
+
962
993
/**
963
994
* Set composer libraries.
964
995
*
@@ -1006,6 +1037,7 @@ protected function drush_webform_composer_set_libraries(array &$repositories, ar
1006
1037
ksort ($ repositories );
1007
1038
ksort ($ require );
1008
1039
}
1040
+
1009
1041
/******************************************************************************/
1010
1042
// Generate commands.
1011
1043
/******************************************************************************/
0 commit comments