@@ -15,16 +15,17 @@ public static function merge( array $blueprint, array $post_runtime ): array {
1515}
1616
1717$ runtime_blueprint = array (
18- 'preferredVersions ' => array ( 'php ' => '8.3 ' ),
18+ 'preferredVersions ' => array ( 'wp ' => ' 7.0 ' , ' php ' => '8.4 ' ),
1919 'features ' => array ( 'networking ' => false ),
2020 'steps ' => array (
2121 array ( 'step ' => 'login ' ),
2222 array ( 'step ' => 'installPlugin ' , 'pluginData ' => array ( 'url ' => 'runtime.zip ' ) ),
2323 ),
2424);
2525$ post_runtime = array (
26- 'features ' => array ( 'networking ' => true ),
27- 'steps ' => array ( array ( 'step ' => 'runPHP ' , 'code ' => '<?php import_site(); ' ) ),
26+ 'preferredVersions ' => array ( 'wp ' => 'latest ' , 'php ' => '8.2 ' ),
27+ 'features ' => array ( 'networking ' => true ),
28+ 'steps ' => array ( array ( 'step ' => 'runPHP ' , 'code ' => '<?php import_site(); ' ) ),
2829);
2930
3031$ merged = WP_Codebox_Post_Runtime_Blueprint_Smoke::merge ( $ runtime_blueprint , $ post_runtime );
@@ -34,6 +35,10 @@ public static function merge( array $blueprint, array $post_runtime ): array {
3435 fwrite ( STDERR , 'Post-runtime blueprint steps were not appended after runtime materialization. ' . PHP_EOL );
3536 exit ( 1 );
3637}
38+ if ( array ( 'wp ' => '7.0 ' , 'php ' => '8.4 ' ) !== ( $ merged ['preferredVersions ' ] ?? null ) ) {
39+ fwrite ( STDERR , 'Post-runtime blueprint preferredVersions overwrote the runtime selection. ' . PHP_EOL );
40+ exit ( 1 );
41+ }
3742if ( true !== ( $ merged ['features ' ]['networking ' ] ?? null ) ) {
3843 fwrite ( STDERR , 'Post-runtime blueprint features did not override the base feature. ' . PHP_EOL );
3944 exit ( 1 );
0 commit comments