Recommend Composer or NPM instead of Git submodules#278
Recommend Composer or NPM instead of Git submodules#278westonruter merged 111 commits intomasterfrom
Conversation
|
This would fix #83? |
|
@westonruter Yes, it would fix also #83. Are you OK with the general idea of recommending Composer and npm install instead of the git submodules? |
|
Yes, I'm probably just old fashioned for still clinging to what is familiar to me. |
# Conflicts: # .travis.yml
| fi | ||
|
|
||
| if [ ! -e "$DEV_LIB_PATH/check-diff.sh" ]; then | ||
| echo "Unable to determine DEV_LIB_PATH" | ||
|
|
||
| exec < /dev/tty # to be able to use read | ||
| read -p "Would you like to clone wp-dev-lib to a temporary dir? [y/N] " -r -n 1 |
There was a problem hiding this comment.
We now require this to be a proper project dependancy.
There was a problem hiding this comment.
Is this another change that should be rolled back since submodules are still ok if desired?
This reverts commit df88fb3.
|
OK, this is super strange. It is actually failing during function _delete_all_data() {
global $wpdb;
foreach ( array(
$wpdb->posts,
$wpdb->postmeta,
$wpdb->comments,
$wpdb->commentmeta,
$wpdb->term_relationships,
$wpdb->termmeta,
) as $table ) {
$wpdb->query( "DELETE FROM {$table}" );
}
foreach ( array(
$wpdb->terms,
$wpdb->term_taxonomy,
) as $table ) {
$wpdb->query( "DELETE FROM {$table} WHERE term_id != 1" );
}
$wpdb->query( "UPDATE {$wpdb->term_taxonomy} SET count = 0" );
$wpdb->query( "DELETE FROM {$wpdb->users} WHERE ID != 1" );
$wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE user_id != 1" );
}while doing any queries during the actual tests works just fine. |
|
@kasparsd How close is this to being done? I'm working on an updated version of the |
|
@valendesigns I think it is pretty much done. Will look into resolving the merge conflicts. Could you please check the updated readme copy and ensure it sounds good and clear? |
# Conflicts: # readme.md
This reverts commit 09a7ac1.
|
@westonruter This is ready for another round of code review. I've tagged a 0.1.0 release to ensure users can always revert to the previous version. |
| "test": [ | ||
| "find ./scripts -name *.php -print0 | xargs -0 -n1 -P8 php -l", | ||
| "shellcheck **/*.sh || true", | ||
| "shellcheck --format json **/*.sh | grep --quiet --invert-match '\"level\":\"error\"'" |
There was a problem hiding this comment.
Fail only on errors for now.
|
It's working well in my testing of the composer method: ampproject/amp-wp#1131 |
|
@kasparsd would you tag a new release? I'm guessing that would be |
|
@westonruter I tagged it as 1.0.0 as this is a breaking change since files have been moved around. |
wp-dev-libvia Composer or npm.scriptsdirectory.generate-markdown-readmelogic to work with the new layout. Make sure the readme.md never gets out of sync with the readme.txt, if it is staged for commit.PHP Warning: mysqli_query(): Couldn't fetch mysqli in wp-includes/wp-db.php.New features:
pre-commitlogic for a test project under/tests/composer. Since thepre-commitlogic relies on a Git repository at the project root, we create a fresh repo at/tests/composer, commitphpcs.xmltomasterand then commit the rest of the files to atestbranch which is used for thepre-commitchecks.