Skip to content

Commit

Permalink
Bump composer deps (#78)
Browse files Browse the repository at this point in the history
* bump composer deps

* break out the composer install

* don't run test in the install step

* check for deactivate plugins
this is probably mostly a problem for unit testing

* check for wp error

* optimize composer install and output standards

* look for vipwpcs

* force vipwpcs install if not found

* force vipwps if not found

* more debugging

* use the right directory

* add more debugging

* just manually install vipwpcs

* try reinstall

* why

* more debug

* clone if not exists
  • Loading branch information
jazzsequence authored Jan 17, 2025
1 parent bd1bbe8 commit cb07be9
Show file tree
Hide file tree
Showing 585 changed files with 15,769 additions and 2,064 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
- name: Install Composer Dependencies
run: composer install --no-interaction --prefer-dist --no-cache -vvv
- name: Why?
run: |
composer install
composer lint
if [ -z "$(ls -A vendor/automattic/vipwpcs)" ]; then
echo "VIPWPCS is empty"
git clone https://github.com/Automattic/VIP-Coding-Standards.git vendor/automattic/vipwpcs
else
echo "VIPWPCS is not empty"
fi
- name: Lint
run: composer lint
test:
name: Test
runs-on: ubuntu-latest
Expand All @@ -32,6 +40,5 @@ jobs:
run: |
composer install
chmod +x bin/*.sh
bash ./bin/phpunit-test.sh
- name: Test
run: composer test
run: bash ./bin/phpunit-test.sh
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"pantheon-systems/pantheon-wp-coding-standards": "^2.0",
"pantheon-systems/wpunit-helpers": "^2.0",
"phpunit/phpunit": "^9",
"yoast/phpunit-polyfills": "^3.0"
"yoast/phpunit-polyfills": "^3.0",
"automattic/vipwpcs": "^3.0"
},
"config": {
"allow-plugins": {
Expand Down
377 changes: 185 additions & 192 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inc/bgg/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function get_bgg_search_results( $query ) {
$response = wp_remote_get( bgg_search( $query ) );
$results = [];

if ( isset( $response['response'] ) && 200 === $response['response']['code'] ) {
if ( ! is_wp_error( $response ) && isset( $response['response'] ) && 200 === $response['response']['code'] ) {
$xml = simplexml_load_string( wp_remote_retrieve_body( $response ) );

if ( isset( $xml->boardgame ) ) {
Expand Down
7 changes: 5 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ function autoload_init() {
$exists = file_exists( $plugin_vendor ) || file_exists( $root_vendor );
if ( $exists ) {
$files[] = $exists ? $plugin_vendor : $root_vendor;
} else {
} elseif ( function_exists( 'deactivate_plugins' ) ) {
// If it's not loaded, deactivate the plugin.
deactivate_plugins( plugin_basename( __FILE__ ) );
} else {
// Something else happened, bail now.
return \WP_Error( 'init_error', __( 'Error initializing the plugin. Could not find extended-cpts library and could not deactivate the plugin. Giving up.', 'games-collector' ) );
}
}

Expand Down Expand Up @@ -129,7 +132,7 @@ function init() {
autoload_init();

// If CMB2 was not loaded, deactivate ourself.
if ( ! function_exists( 'cmb2_bootstrap' ) ) {
if ( ! function_exists( 'cmb2_bootstrap' ) && function_exists( 'deactivate_plugins' ) ) {
deactivate_plugins( plugin_basename( __FILE__ ) );
return;
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/bin/tokenize
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ if [ -n "$bashSource" ]; then
fi
fi

"${dir}/tokenize" "$@"
exec "${dir}/tokenize" "$@"
393 changes: 193 additions & 200 deletions vendor/composer/installed.json

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'jazzsequence/games-collector',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '0dd5d612c2011e2ce8a248ca927488078970e1e5',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'efbd0f09f706134db54fa48046c2ae6036fd6f2c',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -65,45 +65,45 @@
'dev_requirement' => false,
),
'jazzsequence/games-collector' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '0dd5d612c2011e2ce8a248ca927488078970e1e5',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'efbd0f09f706134db54fa48046c2ae6036fd6f2c',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'johnbillion/args' => array(
'pretty_version' => '2.1.0',
'version' => '2.1.0.0',
'reference' => '464f53c1eff41eaa7e7aec9d5e03a2c8cfb2b783',
'pretty_version' => '2.2.1',
'version' => '2.2.1.0',
'reference' => 'ef9b110c4379ded08300c5484e4fa67455697c5b',
'type' => 'library',
'install_path' => __DIR__ . '/../johnbillion/args',
'aliases' => array(),
'dev_requirement' => false,
),
'johnbillion/extended-cpts' => array(
'pretty_version' => '5.0.9',
'version' => '5.0.9.0',
'reference' => '98e974fd972205b419d658a18afa5f22350f477d',
'pretty_version' => '5.0.11',
'version' => '5.0.11.0',
'reference' => '57f2e74155a12e7a37d07250e6739dbab5a732b3',
'type' => 'library',
'install_path' => __DIR__ . '/../johnbillion/extended-cpts',
'aliases' => array(),
'dev_requirement' => false,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.12.0',
'version' => '1.12.0.0',
'reference' => '3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c',
'pretty_version' => '1.12.1',
'version' => '1.12.1.0',
'reference' => '123267b2c49fbf30d78a7b2d333f6be754b94845',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(),
'dev_requirement' => true,
),
'nikic/php-parser' => array(
'pretty_version' => 'v5.3.1',
'version' => '5.3.1.0',
'reference' => '8eea230464783aa9671db8eea6f8c6ac5285794b',
'pretty_version' => 'v5.4.0',
'version' => '5.4.0.0',
'reference' => '447a020a1f875a434d62f2a401f53b82a396e494',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
Expand All @@ -119,9 +119,9 @@
'dev_requirement' => true,
),
'pantheon-systems/wpunit-helpers' => array(
'pretty_version' => 'v2.0.1',
'version' => '2.0.1.0',
'reference' => '4663809a3dd9bffdd98169afcb6c31e8f6aab91c',
'pretty_version' => 'v2.0.2',
'version' => '2.0.2.0',
'reference' => '8e767a2d59abc16b4fc5bedc12e0adbb87554044',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/../pantheon-systems/wpunit-helpers',
'aliases' => array(),
Expand Down Expand Up @@ -164,9 +164,9 @@
'dev_requirement' => true,
),
'phpcompatibility/phpcompatibility-wp' => array(
'pretty_version' => '2.1.5',
'version' => '2.1.5.0',
'reference' => '01c1ff2704a58e46f0cb1ca9d06aee07b3589082',
'pretty_version' => '2.1.6',
'version' => '2.1.6.0',
'reference' => '80ccb1a7640995edf1b87a4409fa584cd5869469',
'type' => 'phpcodesniffer-standard',
'install_path' => __DIR__ . '/../phpcompatibility/phpcompatibility-wp',
'aliases' => array(),
Expand All @@ -191,9 +191,9 @@
'dev_requirement' => true,
),
'phpstan/phpdoc-parser' => array(
'pretty_version' => '1.32.0',
'version' => '1.32.0.0',
'reference' => '6ca22b154efdd9e3c68c56f5d94670920a1c19a4',
'pretty_version' => '1.33.0',
'version' => '1.33.0.0',
'reference' => '82a311fd3690fb2bf7b64d5c98f912b3dd746140',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
'aliases' => array(),
Expand Down Expand Up @@ -245,9 +245,9 @@
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '9.6.21',
'version' => '9.6.21.0',
'reference' => 'de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa',
'pretty_version' => '9.6.22',
'version' => '9.6.22.0',
'reference' => 'f80235cb4d3caa59ae09be3adf1ded27521d1a9c',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
Expand Down Expand Up @@ -398,9 +398,9 @@
'dev_requirement' => true,
),
'sirbrillig/phpcs-variable-analysis' => array(
'pretty_version' => 'v2.11.19',
'version' => '2.11.19.0',
'reference' => 'bc8d7e30e2005bce5c59018b7cdb08e9fb45c0d1',
'pretty_version' => 'v2.11.22',
'version' => '2.11.22.0',
'reference' => 'ffb6f16c6033ec61ed84446b479a31d6529f0eb7',
'type' => 'phpcodesniffer-standard',
'install_path' => __DIR__ . '/../sirbrillig/phpcs-variable-analysis',
'aliases' => array(),
Expand All @@ -416,18 +416,18 @@
'dev_requirement' => true,
),
'spryker/code-sniffer' => array(
'pretty_version' => '0.17.25',
'version' => '0.17.25.0',
'reference' => '4d26c642e56be892f1fcebc227e9a7b4ddb25f06',
'pretty_version' => '0.17.26',
'version' => '0.17.26.0',
'reference' => 'be31dad00da0af2417a775b1d545c87cb058f2e8',
'type' => 'phpcodesniffer-standard',
'install_path' => __DIR__ . '/../spryker/code-sniffer',
'aliases' => array(),
'dev_requirement' => true,
),
'squizlabs/php_codesniffer' => array(
'pretty_version' => '3.10.3',
'version' => '3.10.3.0',
'reference' => '62d32998e820bddc40f99f8251958aed187a5c9c',
'pretty_version' => '3.11.2',
'version' => '3.11.2.0',
'reference' => '1368f4a58c3c52114b86b1abe8f4098869cb0079',
'type' => 'library',
'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
'aliases' => array(),
Expand All @@ -452,9 +452,9 @@
'dev_requirement' => true,
),
'yoast/phpunit-polyfills' => array(
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => '19e6d5fb8aad31f731f774f9646a10c64a8843d2',
'pretty_version' => '3.1.1',
'version' => '3.1.1.0',
'reference' => 'e6381c62c4df51677b657fbac79b79dfce7acdab',
'type' => 'library',
'install_path' => __DIR__ . '/../yoast/phpunit-polyfills',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion vendor/johnbillion/args/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This library provides well-documented classes which represent many of the associ

## Current status

Last updated for WordPress 6.6.
Last updated for WordPress 6.7.

## Requirements

Expand Down
12 changes: 6 additions & 6 deletions vendor/johnbillion/args/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,17 +299,17 @@
"wordpress-install-dir": "vendor/wordpress/wordpress"
},
"require-dev": {
"ergebnis/json-printer": "^3.2",
"ergebnis/phpstan-rules": "^1.0",
"ergebnis/json-printer": "3.7.0",
"ergebnis/phpstan-rules": "1.0.0",
"humanmade/coding-standards": "1.2.1",
"johnbillion/falsey-assertequals-detector": "^3",
"phpdocumentor/reflection": "~4.0 || ~5.0",
"phpstan/phpstan": "1.12.5",
"phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan": "1.12.12",
"phpstan/phpstan-phpunit": "1.4.1",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpunit/phpunit": "^9.0",
"roots/wordpress-core-installer": "^1.0.0",
"roots/wordpress-full": "6.6",
"roots/wordpress-core-installer": "1.100.0",
"roots/wordpress-full": "6.7",
"szepeviktor/phpstan-wordpress": "1.3.5"
},
"funding": [
Expand Down
2 changes: 1 addition & 1 deletion vendor/johnbillion/args/src/MetaQuery/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final public static function fromArray( array $clauses ) : self {
return $class;
}

final public function addClause( Clause $clause, string $key = null ) : void {
final public function addClause( Clause $clause, ?string $key = null ) : void {
if ( null !== $key ) {
$this->clauses[ $key ] = $clause;
} else {
Expand Down
7 changes: 0 additions & 7 deletions vendor/johnbillion/args/src/WP_Term_Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,6 @@ class WP_Term_Query extends Shared\Base implements MetaQuery\WithArgs {
*/
public string $fields;

/**
* Whether to return a term count. If true, will take precedence over `$fields`.
*
* Default false.
*/
public bool $count;

/**
* Name or array of names to return term(s) for.
*
Expand Down
5 changes: 5 additions & 0 deletions vendor/johnbillion/args/src/register_meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ class register_meta extends Shared\Base {
*/
public string $description;

/**
* A human-readable label of the data attached to this meta key.
*/
public string $label;

/**
* Whether the meta key has one value per object, or an array of values per object.
*/
Expand Down
6 changes: 3 additions & 3 deletions vendor/johnbillion/extended-cpts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Not your first time here? See [Recent Changes for Developers](https://github.com
## Minimum Requirements ##

* **PHP:** 7.4
- Tested up to PHP 8.3
* **WordPress:** 5.7
- Tested up to WP 6.6
- Tested up to PHP 8.4
* **WordPress:** 5.8
- Tested up to WP 6.7

## Installation ##

Expand Down
14 changes: 7 additions & 7 deletions vendor/johnbillion/extended-cpts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"johnbillion/falsey-assertequals-detector": "*",
"johnbillion/plugin-infrastructure": "dev-trunk",
"johnbillion/wp-compat": "0.1.0",
"lucatume/wp-browser": ">=3.0.21 <3.5",
"phpcompatibility/phpcompatibility-wp": "^2",
"phpstan/phpstan": "1.12.2",
"phpstan/phpstan-phpunit": "1.4.0",
"roots/wordpress-core-installer": "^1.0.0",
"johnbillion/wp-compat": "0.3.1",
"lucatume/wp-browser": "3.2.3",
"phpcompatibility/phpcompatibility-wp": "2.1.5",
"phpstan/phpstan": "1.12.12",
"phpstan/phpstan-phpunit": "1.4.1",
"roots/wordpress-core-installer": "1.100.0",
"roots/wordpress-full": "*",
"szepeviktor/phpstan-wordpress": "1.1.6",
"szepeviktor/phpstan-wordpress": "1.3.5",
"wp-coding-standards/wpcs": "2.3.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion vendor/johnbillion/extended-cpts/extended-cpts.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @link https://github.com/johnbillion/extended-cpts
* @copyright 2012-2024 John Blackbourn
* @license GPL v2 or later
* @version 5.0.9
* @version 5.0.11
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion vendor/johnbillion/extended-cpts/src/TaxonomyAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function meta_box_simple( WP_Post $post, array $meta_box ): void {
* @param bool $show_none Optional. Whether to include a 'none' item in the term list. Default false.
* @param string $type Optional. The taxonomy list type (checklist or dropdown). Default 'checklist'.
*/
protected function do_meta_box( WP_Post $post, \Walker $walker = null, bool $show_none = false, string $type = 'checklist' ): void {
protected function do_meta_box( WP_Post $post, ?\Walker $walker = null, bool $show_none = false, string $type = 'checklist' ): void {
$taxonomy = $this->taxo->taxonomy;
/** @var WP_Taxonomy */
$tax = get_taxonomy( $taxonomy );
Expand Down
Loading

0 comments on commit cb07be9

Please sign in to comment.