@@ -228,7 +228,7 @@ export function buildReplayableWordPressSiteBlueprint(
228228 $schema : "https://playground.wordpress.net/blueprint-schema.json" ,
229229 preferredVersions : {
230230 wp : snapshot . compatibility . wordpressVersion ,
231- php : snapshot . compatibility . phpVersion ,
231+ php : playgroundBlueprintPhpVersion ( snapshot . compatibility . phpVersion ) ,
232232 } ,
233233 landingPage : options . landingPage ?? "/" ,
234234 steps : [
@@ -249,7 +249,7 @@ export function buildReplayExportBlueprint(
249249 $schema : "https://playground.wordpress.net/blueprint-schema.json" ,
250250 preferredVersions : {
251251 wp : snapshot . compatibility . wordpressVersion ,
252- php : snapshot . compatibility . phpVersion ,
252+ php : playgroundBlueprintPhpVersion ( snapshot . compatibility . phpVersion ) ,
253253 } ,
254254 landingPage : options . landingPage ?? "/" ,
255255 steps : [
@@ -319,6 +319,10 @@ function runtimeInfoForReplayableWordPressSite(
319319 }
320320}
321321
322+ function playgroundBlueprintPhpVersion ( version : string ) : string {
323+ return version . replace ( / ^ ( \d + \. \d + ) \. \d + $ / , "$1" )
324+ }
325+
322326async function writeJson ( path : string , value : unknown ) : Promise < void > {
323327 await writeFile ( path , `${ JSON . stringify ( value , null , 2 ) } \n` )
324328}
0 commit comments