[Blueprints v2] Add support for "enableMultisite" step#136
Conversation
|
It's a promising start @JanJakes, thank you! We could use a couple of unit tests here – LMK if you'd like to connect on how to build them. |
|
@adamziel I'm just finishing the tests; I will push it soon. Should the behavior be as close to the v1 behavior as possible? For example, when a site is already multisite, should it fail with |
be5de5c to
d82f567
Compare
For now, yes. It may be cumbersome in some cases but could prevent catastrophic failures in other cases. |
|
There are some interesting test failures in the macOS and Win builds, while Ubuntu passes. It's likely related to how some |
99bf6db to
1de041a
Compare
|
@adamziel This should be ready now. The test failures seem to be unrelated/flaky. |
|
@adamziel There's one more thing that came to my mind: The When using the CLI via I will do some testing via the |
|
@adamziel OK, so particularly for the enable-multisite path, the That said, would it be safer to add something like the below to the subprocess script prefix? It's as per WP CLI. |
|
@JanJakes would we be adding that just in case? Or did you run into an actual case where lacking those values is an issue? I'm worried about confusing WordPress into thinking we're running via a CGI SAPI when we're actually running as CLI. |
@adam At this stage, it only seems to be a precaution. It doesn't affect the multisite step as it is, and likely not other steps we have now. What's a bit tricky, though, is that in many of the steps we call |
PHP 7.2 and 7.3 tokenize "<?php" string without any additional tokens as T_INLINE_HTML instead of T_OPEN_TAG. Let's just fix the tests.
08df555 to
141e1bd
Compare
@adamziel Just for the record, I didn't add this. If you'd prefer to do it, I can create a new PR. |
|
I'm on the fence. I looked up why WP-CLI does that but the decisions are not well documented. It seems like that's just their way of supporting the Lacking these attributes didn't give me any troubles yet. At the same time, when I had them set, I occasionally saw WordPress trying to send the |
|
@adamziel We can also wait and see if it's needed at some point. In WP CLI, I noticed it seems to be needed for multisite install but not multisite conversion (as we're doing). There are some cases when the CLI commands land on |


Resolves #130.
Closes #131.