Skip to content

Commit a193360

Browse files
committed
Add 'type' to JSON Schema for Blueprints v1 (phpExtensionBundles), remove support for the 'importWordPressFiles' in its v1 shape, use the correct DOCROOT in the NewSiteResolver
1 parent 7df16a4 commit a193360

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

components/Blueprints/SiteResolver/NewSiteResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static private function isWordPressInstalled( Runtime $runtime, Tracker $progres
156156
PHP
157157
,
158158
[
159-
'DOCROOT' => getenv('DOCROOT'),
159+
'DOCROOT' => $runtime->getConfiguration()->getTargetSiteRoot(),
160160
],
161161
null,
162162
5

components/Blueprints/Versions/Version1/V1ToV2Transpiler.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,7 @@ public function upgrade( array $validated_v1_blueprint ): array {
215215
$this->logger->warning( 'The `enableMultisite` step is not supported by the Blueprint v2 schema and will be ignored.' );
216216
break;
217217
case 'importWordPressFiles':
218-
if ( isset( $v1step['progress'] ) ) {
219-
$this->logger->warning( 'The `progress` option is not supported on importWordPressFiles step and will be ignored: %s. Use the runtime configuration to set the progress bar instead.' );
220-
}
221-
if ( isset( $v1step['pathInZip'] ) ) {
222-
$this->logger->warning( 'The `pathInZip` option is not supported on importWordPressFiles step. The entire step will be ignored.' );
223-
} else {
224-
/**
225-
* wordPressFilesZip refers to a zip file with a full WordPress installation.
226-
* It's relevant for the target site resolution stage, not as a step.
227-
*/
228-
$v2['wordpressVersion'] = self::convertV1ResourceToV2Reference( $v1step['wordPressFilesZip'] );
229-
}
218+
$this->logger->warning( 'The `importWordPressFiles` step is not supported by the Blueprint v2 schema. The entire step will be ignored.' );
230219
break;
231220
case 'runWpInstallationWizard':
232221
$this->logger->warning( 'The `runWpInstallationWizard` step is not supported by the Blueprint v2 schema. Provide your WordPress export URL in the top-level "wordpressVersion" key and the runner will handle the installation automatically.' );

components/Blueprints/Versions/Version1/schema-v1.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@
144144
"description": "User to log in as. If true, logs the user in as admin/password."
145145
},
146146
"phpExtensionBundles": {
147+
"type": "array",
148+
"items": {
149+
"type": "string"
150+
},
147151
"deprecated": "No longer used. Feel free to remove it from your Blueprint."
148152
},
149153
"steps": {

0 commit comments

Comments
 (0)