Skip to content

Conversation

@schlessera
Copy link
Member

See #44

@schlessera
Copy link
Member Author

@danielbachhuber, @gitlost The above test was actually meant to fail to have a regression test for #44 .

However, it seems like the Phar that is built to be deployed is different than the Phar that is used when built during the tests. Shouldn't these two scenarios give the exact same results? At what point (and in which workflows) is the Phar stripped for size (as I assume this casues #44)?

@gitlost
Copy link
Contributor

gitlost commented Oct 30, 2017

The phar built by FeatureContext::build_phar() is totally fake really, particularly when not run from wp-cli, as it just runs utils/make-phar.php on the current repo directory. To make this work in the command repos, this https://github.com/wp-cli/wp-cli/blob/v1.4.0/utils/make-phar.php#L183 is used, which was originally added in wp-cli/wp-cli#3923, temporarily removed in wp-cli/wp-cli#4185, and added back in wp-cli/wp-cli#4257 when it was discovered that the package-command tests were failing in #22 (comment).

So as package-command's composer.json doesn't include the phpcs stuff itself and Composer doesn't recursively add them (it seems - I hesitate to say anything definite about Composer), they aren't in the vendor dirs and the autoload*s in package-command won't mention them.

@danielbachhuber danielbachhuber changed the title Fix Composer missing plugin files in stripped Phars. Add a test for not hitting Composer plugin errors when listing packages Nov 7, 2017
@schlessera schlessera changed the title Fix Composer missing plugin files in stripped Phars. Add regression test to detect Composer plugin errors Nov 7, 2017
@schlessera schlessera added command:package Related to 'package' command scope:testing Related to testing labels Nov 7, 2017
@schlessera schlessera added this to the 1.0.8 milestone Nov 7, 2017
@danielbachhuber danielbachhuber merged commit b069ec3 into master Nov 7, 2017
@danielbachhuber danielbachhuber deleted the 44-phar-missing-composer-plugin-files branch November 7, 2017 16:40
schlessera pushed a commit that referenced this pull request Jan 5, 2022
Add regression test to detect Composer plugin errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:package Related to 'package' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants