From c8cc40cf8e0f2848030d45743852a6c0df838bd1 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 14:35:58 +0200 Subject: [PATCH 01/41] Added CI unit and integration tests --- .github/workflows/tests.yml | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..d01609d --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,73 @@ +name: Unit/Integration tests + +on: + pull_request: + branches: + - main + - branch-* + - tool-* + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macOS-latest] + php-versions: ['5.6', '7.4', '8.0'] + wp-versions: ['4.4', '5.2', 'latest'] + include: + php-versions: '5.4' + wp-versions: '4.4' + name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. + + env: + WP_TESTS_DIR: "/tmp/tests/phpunit" + WP_CORE_DIR: "/tmp/wordpress-develop" + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + tools: composer:v1, phpunit, cs2pr + + - name: Start mysql service + run: sudo /etc/init.d/mysql start + + - name: Setup problem matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Get composer cache directory + id: composercache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composercache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest --no-interaction + + - name: Install tests + run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} + + - name: Mysql8 auth plugin workaround + run: sudo mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" + + - name: Run test + run: composer run-tests From a360c9de87023eaf40261687c953b05d98ee3de7 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 14:40:36 +0200 Subject: [PATCH 02/41] Fixed the "A mapping was not expected" error --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d01609d..f216091 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,8 @@ jobs: php-versions: ['5.6', '7.4', '8.0'] wp-versions: ['4.4', '5.2', 'latest'] include: - php-versions: '5.4' - wp-versions: '4.4' + - php-versions: '5.4' + wp-versions: '4.4' name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. env: From d8e281fbb3367c07f52c5c568901e98f1cd36d29 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 14:42:58 +0200 Subject: [PATCH 03/41] Fixed the missing operating system --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f216091..2a85cce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,8 @@ jobs: php-versions: ['5.6', '7.4', '8.0'] wp-versions: ['4.4', '5.2', 'latest'] include: - - php-versions: '5.4' + - operating-system: [ubuntu-latest, windows-latest, macOS-latest] + php-versions: '5.4' wp-versions: '4.4' name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. From 240d8ebf66d6a858fcf428c324790e8ea5d58a56 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 15:01:46 +0200 Subject: [PATCH 04/41] Added missing slash to WP_CORE_DIR Also removed old php versions from the matrix for now. --- .github/workflows/tests.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a85cce..0169c6e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,17 +15,13 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest] - php-versions: ['5.6', '7.4', '8.0'] + php-versions: ['7.1', '7.4', '8.0'] wp-versions: ['4.4', '5.2', 'latest'] - include: - - operating-system: [ubuntu-latest, windows-latest, macOS-latest] - php-versions: '5.4' - wp-versions: '4.4' name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. env: WP_TESTS_DIR: "/tmp/tests/phpunit" - WP_CORE_DIR: "/tmp/wordpress-develop" + WP_CORE_DIR: "/tmp/wordpress-develop/" steps: - name: Checkout From 1040a0ecbe18f3d1b1d874746905a67788b05899 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 15:17:26 +0200 Subject: [PATCH 05/41] Use only php 7.2 and 7.4, load mysql differently This may fix the "sudo" issue on Windows. --- .github/workflows/tests.yml | 15 +++++++++++---- composer.json | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0169c6e..e7ac810 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,8 +15,17 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest] - php-versions: ['7.1', '7.4', '8.0'] + php-versions: ['7.2', '7.4'] wp-versions: ['4.4', '5.2', 'latest'] + + services: + database: + image: mysql:5.6 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. env: @@ -33,9 +42,7 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: none tools: composer:v1, phpunit, cs2pr - - - name: Start mysql service - run: sudo /etc/init.d/mysql start + extensions: mysql - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" diff --git a/composer.json b/composer.json index 4723681..8a05f2a 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "php": ">=5.4.0" }, "require-dev": { - "php": "^7.1", + "php": "^7.2", "automattic/phpcs-neutron-standard": "*", "brain/monkey": "^2.0", "dealerdirect/phpcodesniffer-composer-installer": "*", From 50bad5b9cdd2ab7dafea04ef95b5607371c7ec61 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 15:20:24 +0200 Subject: [PATCH 06/41] Updated composer.lock --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index fa76ecd..1cf411f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6b2a43ea95c439823eb405aca9f39695", + "content-hash": "5b54106d4051a4e5e0d4273c42f567a3", "packages": [], "packages-dev": [ { @@ -458,16 +458,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.10.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", "shasum": "" }, "require": { @@ -506,7 +506,7 @@ "parser", "php" ], - "time": "2020-12-20T10:01:03+00:00" + "time": "2021-05-03T19:11:20+00:00" }, { "name": "phar-io/manifest", @@ -2879,7 +2879,7 @@ "php": ">=5.4.0" }, "platform-dev": { - "php": "^7.1" + "php": "^7.2" }, "plugin-api-version": "1.1.0" } From 6c80b5f35e9feb49549dac64eecf0969386671ca Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 15:28:26 +0200 Subject: [PATCH 07/41] Use only ubuntu --- .github/workflows/tests.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7ac810..8a14f9d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,18 +14,10 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-latest, windows-latest, macOS-latest] + operating-system: [ubuntu-latest] php-versions: ['7.2', '7.4'] wp-versions: ['4.4', '5.2', 'latest'] - services: - database: - image: mysql:5.6 - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306:3306 - name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. env: @@ -42,7 +34,9 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: none tools: composer:v1, phpunit, cs2pr - extensions: mysql + + - name: Start mysql service + run: sudo /etc/init.d/mysql start - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" From 4a755ff4621b6e12ce3d4f27e922ffaa35e61b67 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 15:56:11 +0200 Subject: [PATCH 08/41] Try WP 4.4.1 instead of 4.4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a14f9d..8dba001 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['7.2', '7.4'] - wp-versions: ['4.4', '5.2', 'latest'] + wp-versions: ['4.4.1', '5.2', 'latest'] name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. From 63b5561054b563bd341921dc73eb901c92a06c01 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 16:13:45 +0200 Subject: [PATCH 09/41] sdfg --- .github/workflows/tests.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8dba001..2755a98 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,16 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['7.2', '7.4'] - wp-versions: ['4.4.1', '5.2', 'latest'] + wp-versions: ['4.4', '5.2', 'latest'] + + services: + database: + image: mysql:5.6 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. @@ -34,9 +43,7 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: none tools: composer:v1, phpunit, cs2pr - - - name: Start mysql service - run: sudo /etc/init.d/mysql start + extensions: mysql - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" @@ -64,8 +71,5 @@ jobs: - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} - - name: Mysql8 auth plugin workaround - run: sudo mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" - - name: Run test run: composer run-tests From a303afe127f70820f4c6371692139f0cc0c45915 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 16:55:35 +0200 Subject: [PATCH 10/41] Added class alias for old WP versions --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2755a98..c1682b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,5 +71,9 @@ jobs: - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} + - name: Compat' for tests for WP < 5.1 + if: ${{ matrix.wp-versions }} < 5.1 + run: php -r "if ( ! class_exists( 'PHPUnit_Framework_TestCase' ) && class_exists( '\\PHPUnit\\Framework\\TestCase' ) ) { class_alias( '\\PHPUnit\\Framework\\TestCase', 'PHPUnit_Framework_TestCase' ) }" + - name: Run test run: composer run-tests From 04db51fb21bd6bcae91dd3cd97edc2d8963c935b Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 16:58:19 +0200 Subject: [PATCH 11/41] Doh! --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1682b6..0b7e2b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions }} < 5.1 - run: php -r "if ( ! class_exists( 'PHPUnit_Framework_TestCase' ) && class_exists( '\\PHPUnit\\Framework\\TestCase' ) ) { class_alias( '\\PHPUnit\\Framework\\TestCase', 'PHPUnit_Framework_TestCase' ) }" + run: php -r "if ( ! class_exists( 'PHPUnit_Framework_TestCase' ) && class_exists( '\\PHPUnit\\Framework\\TestCase' ) ) { class_alias( '\\PHPUnit\\Framework\\TestCase', 'PHPUnit_Framework_TestCase' ); }" - name: Run test run: composer run-tests From 7cb66872982cdf062f81eb4442d436e076225ae3 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 17:18:56 +0200 Subject: [PATCH 12/41] if --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b7e2b1..7bd6b17 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,8 +72,8 @@ jobs: run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} - name: Compat' for tests for WP < 5.1 - if: ${{ matrix.wp-versions }} < 5.1 - run: php -r "if ( ! class_exists( 'PHPUnit_Framework_TestCase' ) && class_exists( '\\PHPUnit\\Framework\\TestCase' ) ) { class_alias( '\\PHPUnit\\Framework\\TestCase', 'PHPUnit_Framework_TestCase' ); }" + if: ${{ matrix.wp-versions == '4.4' }} + run: php -r "class_alias( '\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase' );" - name: Run test run: composer run-tests From de9841854c060291aef15632c547e781c77f2c83 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 17:47:15 +0200 Subject: [PATCH 13/41] qerg --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7bd6b17..be28de1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "class_alias( '\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase' );" + run: php -r "require_once 'vendor/autoload.php'; class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" - name: Run test run: composer run-tests From a7a8e73db967f3e9cf20bb7f255c87491b39a59b Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 17:57:27 +0200 Subject: [PATCH 14/41] serth --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index be28de1..6ba656d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -68,12 +68,12 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest --no-interaction - - name: Install tests - run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} - - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "require_once 'vendor/autoload.php'; class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" + run: php -r "class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" + + - name: Install tests + run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} - name: Run test run: composer run-tests From ad7cd758e880aa74610572f6706c609c562e5b57 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 17:58:57 +0200 Subject: [PATCH 15/41] serhgfdgh --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6ba656d..4873118 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,7 +70,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" + run: php -r "require_once 'vendor/autoload.php'; class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} From 2c8360ab01d72b5462b93c7592b95446271f6655 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:03:14 +0200 Subject: [PATCH 16/41] Com'on! --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4873118..10de82a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,7 +70,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "require_once 'vendor/autoload.php'; class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );" + run: php -r "class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase', false );" - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} From 60aed02005f8eee5d2ee27e6e92c43ce49b153d4 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:38:47 +0200 Subject: [PATCH 17/41] Let's go berserk --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 10de82a..641210e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -68,12 +68,12 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest --no-interaction - - name: Compat' for tests for WP < 5.1 - if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase', false );" - - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} + - name: Compat' for tests for WP < 5.1 + if: ${{ matrix.wp-versions == '4.4' }} + run: php -r "$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( $path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( $path ) ) );" + - name: Run test run: composer run-tests From 3d9f721af2d820d68c1983a3e4118a1ca339d27e Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:41:03 +0200 Subject: [PATCH 18/41] Uh? --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 641210e..aad4eb2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( $path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( $path ) ) );" + run: php -r "\$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( $path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 23d6338246c6401c85c33970f3bc25fd432f7e13 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:42:49 +0200 Subject: [PATCH 19/41] Tsss... --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aad4eb2..5b7e7b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( $path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 01eda9407e1af5b722bfcf407d4fc2bb303f1ab4 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:48:57 +0200 Subject: [PATCH 20/41] srthdjh --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b7e7b5..f44069b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = env.WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 1450b1d5d487e2808460aa46c672f87210553e25 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:51:13 +0200 Subject: [PATCH 21/41] getenv --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f44069b..af189ae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = env.WP_TESTS_DIR . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = getenv( 'WP_TESTS_DIR' ) . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 9ece92fe5ae8026588d1685333a93a7f81a3d1cf Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:54:07 +0200 Subject: [PATCH 22/41] raw --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index af189ae..818ccd3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = getenv( 'WP_TESTS_DIR' ) . '/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = '/tmp/tests/phpunit/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From d90d7bcab21f5ac07fbbf618086ed9019ec82e60 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 18:57:14 +0200 Subject: [PATCH 23/41] This is doomed, but trying something --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 818ccd3..316fc78 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = '/tmp/tests/phpunit/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 93dbb9c8695eca41c2c839c83195557063b0704a Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 19:03:00 +0200 Subject: [PATCH 24/41] For fun --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 316fc78..f6e9f5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase', file_get_contents( \$path ) ) );" + run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', \"class_alias( \'\PHPUnit\Framework\TestCase\', \'PHPUnit_Framework_TestCase\' );\nclass_alias( \'\PHPUnit\Framework\Exception\', \'PHPUnit_Framework_Exception\' );\nclass WP_UnitTestCase\"", file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From e06f7507e8ab500fece3c482a2879bab6f494095 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 19:07:46 +0200 Subject: [PATCH 25/41] srtght --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f6e9f5e..638f8ab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', \"class_alias( \'\PHPUnit\Framework\TestCase\', \'PHPUnit_Framework_TestCase\' );\nclass_alias( \'\PHPUnit\Framework\Exception\', \'PHPUnit_Framework_Exception\' );\nclass WP_UnitTestCase\"", file_get_contents( \$path ) ) );" + run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', \"class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );\nclass_alias( '\PHPUnit\Framework\Exception', 'PHPUnit_Framework_Exception' );\nclass WP_UnitTestCase\"", file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 80af2c46f4a03cb33a5512f8bddeb30ff96bee37 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Thu, 6 May 2021 19:15:14 +0200 Subject: [PATCH 26/41] sehtsrth --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 638f8ab..1f305e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,7 +73,7 @@ jobs: - name: Compat' for tests for WP < 5.1 if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', \"class_alias( '\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase' );\nclass_alias( '\PHPUnit\Framework\Exception', 'PHPUnit_Framework_Exception' );\nclass WP_UnitTestCase\"", file_get_contents( \$path ) ) );" + run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', 'class_alias( \'\PHPUnit\Framework\TestCase\', \'PHPUnit_Framework_TestCase\' );' . PHP_EOL . 'class_alias( \'\PHPUnit\Framework\Exception\', \'PHPUnit_Framework_Exception\' );' . PHP_EOL . 'class WP_UnitTestCase', file_get_contents( \$path ) ) );" - name: Run test run: composer run-tests From 38dcaded95e1f9961686d7971d799b923cb84007 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 13:44:53 +0200 Subject: [PATCH 27/41] Replaced WP 4.4 by 5.1 --- .github/workflows/tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1f305e6..a43bb7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['7.2', '7.4'] - wp-versions: ['4.4', '5.2', 'latest'] + wp-versions: ['5.1', '5.2', 'latest'] services: database: @@ -71,9 +71,5 @@ jobs: - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} - - name: Compat' for tests for WP < 5.1 - if: ${{ matrix.wp-versions == '4.4' }} - run: php -r "\$path = '${{ env.WP_TESTS_DIR }}/includes/testcase.php'; file_put_contents( \$path, str_replace( 'class WP_UnitTestCase', 'class_alias( \'\PHPUnit\Framework\TestCase\', \'PHPUnit_Framework_TestCase\' );' . PHP_EOL . 'class_alias( \'\PHPUnit\Framework\Exception\', \'PHPUnit_Framework_Exception\' );' . PHP_EOL . 'class WP_UnitTestCase', file_get_contents( \$path ) ) );" - - name: Run test run: composer run-tests From a1710547c09b193e20de2ee7fb6408e471d8e6de Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 14:30:27 +0200 Subject: [PATCH 28/41] Trying something (this will probably explode) --- .github/workflows/tests.yml | 5 +++++ composer.json | 14 +++++++------- composer.lock | 25 +++++++++++++++---------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a43bb7d..45a5127 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,11 @@ jobs: php-versions: ['7.2', '7.4'] wp-versions: ['5.1', '5.2', 'latest'] + include: + - operating-system: [ubuntu-latest] + php-versions: ['5.4'] + wp-versions: ['5.1'] + services: database: image: mysql:5.6 diff --git a/composer.json b/composer.json index 8a05f2a..ae7b1f6 100644 --- a/composer.json +++ b/composer.json @@ -25,13 +25,13 @@ "php": ">=5.4.0" }, "require-dev": { - "php": "^7.2", - "automattic/phpcs-neutron-standard": "*", - "brain/monkey": "^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "*", - "phpcompatibility/phpcompatibility-wp": "*", - "phpmetrics/phpmetrics": "*", - "phpunit/phpunit": "^7.0", + "php": "^5.4 || ^7.0", + "automattic/phpcs-neutron-standard": "1.5.2 || ^1.7", + "brain/monkey": "^1.5 || ^2.6", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "phpcompatibility/phpcompatibility-wp": "^2.1", + "phpmetrics/phpmetrics": "2.0 || ^2.7", + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "*", "szepeviktor/phpstan-wordpress": "*", diff --git a/composer.lock b/composer.lock index 1cf411f..d1c00ad 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5b54106d4051a4e5e0d4273c42f567a3", + "content-hash": "e4c69c422be035eb6f4b37cd2d936812", "packages": [], "packages-dev": [ { @@ -1499,12 +1499,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "db47aac368cb81bc9d3b09556e63b716be61cf43" + "reference": "07314cf15422b2e162d591fe8ef2b850612b808f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/db47aac368cb81bc9d3b09556e63b716be61cf43", - "reference": "db47aac368cb81bc9d3b09556e63b716be61cf43", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/07314cf15422b2e162d591fe8ef2b850612b808f", + "reference": "07314cf15422b2e162d591fe8ef2b850612b808f", "shasum": "" }, "conflict": { @@ -1522,7 +1522,7 @@ "barrelstrength/sprout-forms": "<3.9", "baserproject/basercms": ">=4,<=4.3.6|>=4.4,<4.4.1", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", - "bolt/bolt": "<3.7.1", + "bolt/bolt": "<3.7.2", "bolt/core": "<4.1.13", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<5.1.2", @@ -1554,6 +1554,7 @@ "dompdf/dompdf": ">=0.6,<0.6.2", "drupal/core": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", "drupal/drupal": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", + "dweeves/magmi": "<=0.7.24", "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", @@ -1578,7 +1579,9 @@ "flarum/tags": "<=0.1-beta.13", "fluidtypo3/vhs": "<5.1.1", "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<5.8.3", "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<6.5.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", @@ -1609,7 +1612,7 @@ "laravel/framework": "<6.20.26|>=7,<8.40", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "league/commonmark": "<0.18.3", - "librenms/librenms": "<1.53", + "librenms/librenms": "<21.1", "livewire/livewire": ">2.2.4,<2.2.6", "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", "magento/magento1ce": "<1.9.4.3", @@ -1630,11 +1633,12 @@ "nystudio107/craft-seomatic": "<3.3", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", - "october/cms": "= 1.0.469|>=1.0.319,<1.0.469", + "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", "october/october": ">=1.0.319,<1.0.466", "october/rain": "<1.0.472|>=1.1,<1.1.2", "onelogin/php-saml": "<2.10.4", "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", + "opencart/opencart": "<=3.0.3.2", "openid/php-openid": "<2.3", "openmage/magento-lts": "<=19.4.12|>=20,<=20.0.8", "orchid/platform": ">=9,<9.4.4", @@ -1806,7 +1810,8 @@ "zetacomponents/mail": "<1.8.2", "zf-commons/zfc-user": "<1.2.2", "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", - "zfr/zfr-oauth2-server-module": "<0.1.2" + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<6.0.22" }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -1836,7 +1841,7 @@ "type": "tidelift" } ], - "time": "2021-05-02T09:01:19+00:00" + "time": "2021-05-06T19:08:33+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2879,7 +2884,7 @@ "php": ">=5.4.0" }, "platform-dev": { - "php": "^7.2" + "php": "^5.4 || ^7.0" }, "plugin-api-version": "1.1.0" } From 0406996df0fa5a54a1cf24aef38a072426d3c816 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 14:31:46 +0200 Subject: [PATCH 29/41] Nop, nobody saw this --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 45a5127..9fd4a36 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,9 +19,9 @@ jobs: wp-versions: ['5.1', '5.2', 'latest'] include: - - operating-system: [ubuntu-latest] - php-versions: ['5.4'] - wp-versions: ['5.1'] + - operating-system: ubuntu-latest + php-versions: '5.4' + wp-versions: '5.1' services: database: From 6c17ae8f28ec00b6db4b9ed2254c4754d71a54da Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 15:13:57 +0200 Subject: [PATCH 30/41] Let's try this --- .github/workflows/tests.yml | 2 +- Tests/Unit/.phpunit.result.cache | 2 +- composer.json | 10 +++++----- composer.lock | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fd4a36..ed84a86 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -67,7 +67,7 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ runner.os }}-composer- - name: Install dependencies diff --git a/Tests/Unit/.phpunit.result.cache b/Tests/Unit/.phpunit.result.cache index 91314d8..8c10192 100644 --- a/Tests/Unit/.phpunit.result.cache +++ b/Tests/Unit/.phpunit.result.cache @@ -1 +1 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":234:{a:2:{s:7:"defects";a:1:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";i:4;}s:5:"times";a:1:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";d:0.318;}}} \ No newline at end of file +C:37:"PHPUnit\Runner\DefaultTestResultCache":4934:{a:2:{s:7:"defects";a:1:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";i:4;}s:5:"times";a:40:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";d:0.147;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOnlyValidValues";d:0.215;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOption";d:0.001;s:80:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldNotDelete";d:0.002;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_DeleteAll::testShouldDeleteAll";d:0;s:97:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenNotStringOption";d:0.001;s:94:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenUnkownOption";d:0;s:79:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnValue";d:0.015;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnResetValues";d:0;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnValues";d:0.001;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnOnlyValidValues";d:0.001;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetStorage::testShouldReturnStorage";d:0;s:82:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Has::testShouldReturnIfHasKey";d:0.001;s:86:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Set::testShouldSetOnlyValidValues";d:0.001;s:126:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetDefaultValues::testShouldReturnDefaultValues";d:0.013;s:120:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetIdentifier::testShouldReturnIdentifier";d:0.003;s:112:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetPrefix::testShouldReturnPrefix";d:0;s:122:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetResetValues::testShouldReturnResetValues";d:0.001;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnDefaultValue";d:0.007;s:132:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedVersion";d:0.002;s:130:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedValue";d:0.002;s:139:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidateOnUpdate::testShouldReturnValidatedValues";d:0.004;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteNetworkOptionWhenIsNetworkOption";d:0.005;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteSiteOptionWhenIsNotNetworkOption";d:0.001;s:111:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnEmptyArrayWhenInvalidValue";d:0.002;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnFalseWhenValueIsFalse";d:0.001;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnArrayWhenValidValue";d:0.001;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnNetworkOptionWhenIsNetworkOption";d:0.001;s:98:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnAString";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnOptionName";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnAnInteger";d:0.005;s:108:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnCurrentNetworkId";d:0.001;s:106:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnGivenNetworkId";d:0;s:91:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetType::testShouldReturnType";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnABoolean";d:0;s:110:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnIfNetworkOption";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldDeleteOptionWhenEmptyValue";d:0.002;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNetworkOptionWhenIsNetworkOption";d:0.002;s:125:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.002;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNonAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.003;}}} \ No newline at end of file diff --git a/composer.json b/composer.json index ae7b1f6..02a054d 100644 --- a/composer.json +++ b/composer.json @@ -25,13 +25,13 @@ "php": ">=5.4.0" }, "require-dev": { - "php": "^5.4 || ^7.0", - "automattic/phpcs-neutron-standard": "1.5.2 || ^1.7", - "brain/monkey": "^1.5 || ^2.6", + "php": ">=5.4.0", + "automattic/phpcs-neutron-standard": ">=1.5.2", + "brain/monkey": ">=1.5", "dealerdirect/phpcodesniffer-composer-installer": "^0.7", "phpcompatibility/phpcompatibility-wp": "^2.1", - "phpmetrics/phpmetrics": "2.0 || ^2.7", - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0", + "phpmetrics/phpmetrics": ">=2.0", + "phpunit/phpunit": ">=4.8.36 <8.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "*", "szepeviktor/phpstan-wordpress": "*", diff --git a/composer.lock b/composer.lock index d1c00ad..23e4c9c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e4c69c422be035eb6f4b37cd2d936812", + "content-hash": "16a8f78d49976912878c2120e095575d", "packages": [], "packages-dev": [ { @@ -2884,7 +2884,7 @@ "php": ">=5.4.0" }, "platform-dev": { - "php": "^5.4 || ^7.0" + "php": ">=5.4.0" }, "plugin-api-version": "1.1.0" } From 74ebbc32ef6acf93e7f08131194419518f674779 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:03:01 +0200 Subject: [PATCH 31/41] prefer-lowest --- .github/workflows/tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed84a86..1828623 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,6 +22,7 @@ jobs: - operating-system: ubuntu-latest php-versions: '5.4' wp-versions: '5.1' + dependency-version: --prefer-lowest services: database: @@ -67,11 +68,11 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}${{ matrix.dependency-version }}- + restore-keys: ${{ runner.os }}-composer${{ matrix.dependency-version }}- - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest --no-interaction + run: composer update ${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} From e71ea74c3a15b5336cc8941422486a11edcd3203 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:23:41 +0200 Subject: [PATCH 32/41] prefer-lowest + remove --- .github/workflows/tests.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1828623..4e02159 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: - operating-system: ubuntu-latest php-versions: '5.4' wp-versions: '5.1' - dependency-version: --prefer-lowest + dependency-version: prefer-lowest services: database: @@ -68,11 +68,16 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}${{ matrix.dependency-version }}- - restore-keys: ${{ runner.os }}-composer${{ matrix.dependency-version }}- + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.dependency-version }}- + restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - name: Install dependencies - run: composer update ${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction + if: dependency-version == prefer-lowest + run: | + composer remove szepeviktor/phpstan-wordpress + composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction + if: dependency-version != prefer-lowest + run: composer update --prefer-dist --no-progress --no-suggest --no-interaction - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} From 99bbd737ee503dd1ea045affecbe2bc4c4ca8e00 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:26:09 +0200 Subject: [PATCH 33/41] hgsrtr --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e02159..15e35cb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,12 +71,14 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.dependency-version }}- restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - - name: Install dependencies - if: dependency-version == prefer-lowest + - if: dependency-version == prefer-lowest + name: Install dependencies with prefer-lowest run: | composer remove szepeviktor/phpstan-wordpress composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction - if: dependency-version != prefer-lowest + + - if: dependency-version != prefer-lowest + name: Install dependencies run: composer update --prefer-dist --no-progress --no-suggest --no-interaction - name: Install tests From 97b71cdd7fec7e4b18bc787197cd9fccc0815d63 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:29:51 +0200 Subject: [PATCH 34/41] edgrsdgs --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 15e35cb..d2d8122 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,13 +71,13 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.dependency-version }}- restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - - if: dependency-version == prefer-lowest + - if: ${{ matrix.dependency-version }} == prefer-lowest name: Install dependencies with prefer-lowest run: | composer remove szepeviktor/phpstan-wordpress composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction - - if: dependency-version != prefer-lowest + - if: ${{ matrix.dependency-version }} != prefer-lowest name: Install dependencies run: composer update --prefer-dist --no-progress --no-suggest --no-interaction From 7ff90e5598f6fe95fac647164293929df41e54c9 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:52:22 +0200 Subject: [PATCH 35/41] Let's go dirty --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d2d8122..c4890a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,7 +74,7 @@ jobs: - if: ${{ matrix.dependency-version }} == prefer-lowest name: Install dependencies with prefer-lowest run: | - composer remove szepeviktor/phpstan-wordpress + composer remove automattic/phpcs-neutron-standard dealerdirect/phpcodesniffer-composer-installer phpcompatibility/phpcompatibility-wp phpmetrics/phpmetrics roave/security-advisories squizlabs/php_codesniffer szepeviktor/phpstan-wordpress wp-coding-standards/wpcs composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction - if: ${{ matrix.dependency-version }} != prefer-lowest diff --git a/composer.json b/composer.json index 02a054d..8042a5e 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ }, "require-dev": { "php": ">=5.4.0", - "automattic/phpcs-neutron-standard": ">=1.5.2", + "automattic/phpcs-neutron-standard": ">=1.7", "brain/monkey": ">=1.5", "dealerdirect/phpcodesniffer-composer-installer": "^0.7", "phpcompatibility/phpcompatibility-wp": "^2.1", From a999ccc88815670f8097c0c275ad89c6e41281f8 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Fri, 7 May 2021 16:54:08 +0200 Subject: [PATCH 36/41] sdfghsrhdr --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 23e4c9c..24ffb9e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "16a8f78d49976912878c2120e095575d", + "content-hash": "3e90331e33cdcf672622819cc769089a", "packages": [], "packages-dev": [ { From 53d0e1315cae8cbffd41de232e96336c941d4fdc Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Mon, 10 May 2021 13:19:28 +0200 Subject: [PATCH 37/41] Bye-bye php 5.4 --- .github/workflows/tests.yml | 21 ++++----------------- Tests/Unit/.phpunit.result.cache | 2 +- composer.json | 14 +++++++------- composer.lock | 14 +++++++------- 4 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4890a5..10dded1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,15 +15,9 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.2', '7.4'] + php-versions: ['7.1', '7.4'] wp-versions: ['5.1', '5.2', 'latest'] - include: - - operating-system: ubuntu-latest - php-versions: '5.4' - wp-versions: '5.1' - dependency-version: prefer-lowest - services: database: image: mysql:5.6 @@ -68,17 +62,10 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.dependency-version }}- - restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - - - if: ${{ matrix.dependency-version }} == prefer-lowest - name: Install dependencies with prefer-lowest - run: | - composer remove automattic/phpcs-neutron-standard dealerdirect/phpcodesniffer-composer-installer phpcompatibility/phpcompatibility-wp phpmetrics/phpmetrics roave/security-advisories squizlabs/php_codesniffer szepeviktor/phpstan-wordpress wp-coding-standards/wpcs - composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest --no-interaction + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}- + restore-keys: ${{ runner.os }}-composer- - - if: ${{ matrix.dependency-version }} != prefer-lowest - name: Install dependencies + - name: Install dependencies run: composer update --prefer-dist --no-progress --no-suggest --no-interaction - name: Install tests diff --git a/Tests/Unit/.phpunit.result.cache b/Tests/Unit/.phpunit.result.cache index 8c10192..d2db27c 100644 --- a/Tests/Unit/.phpunit.result.cache +++ b/Tests/Unit/.phpunit.result.cache @@ -1 +1 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":4934:{a:2:{s:7:"defects";a:1:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";i:4;}s:5:"times";a:40:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";d:0.147;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOnlyValidValues";d:0.215;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOption";d:0.001;s:80:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldNotDelete";d:0.002;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_DeleteAll::testShouldDeleteAll";d:0;s:97:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenNotStringOption";d:0.001;s:94:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenUnkownOption";d:0;s:79:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnValue";d:0.015;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnResetValues";d:0;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnValues";d:0.001;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnOnlyValidValues";d:0.001;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetStorage::testShouldReturnStorage";d:0;s:82:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Has::testShouldReturnIfHasKey";d:0.001;s:86:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Set::testShouldSetOnlyValidValues";d:0.001;s:126:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetDefaultValues::testShouldReturnDefaultValues";d:0.013;s:120:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetIdentifier::testShouldReturnIdentifier";d:0.003;s:112:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetPrefix::testShouldReturnPrefix";d:0;s:122:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetResetValues::testShouldReturnResetValues";d:0.001;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnDefaultValue";d:0.007;s:132:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedVersion";d:0.002;s:130:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedValue";d:0.002;s:139:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidateOnUpdate::testShouldReturnValidatedValues";d:0.004;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteNetworkOptionWhenIsNetworkOption";d:0.005;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteSiteOptionWhenIsNotNetworkOption";d:0.001;s:111:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnEmptyArrayWhenInvalidValue";d:0.002;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnFalseWhenValueIsFalse";d:0.001;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnArrayWhenValidValue";d:0.001;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnNetworkOptionWhenIsNetworkOption";d:0.001;s:98:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnAString";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnOptionName";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnAnInteger";d:0.005;s:108:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnCurrentNetworkId";d:0.001;s:106:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnGivenNetworkId";d:0;s:91:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetType::testShouldReturnType";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnABoolean";d:0;s:110:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnIfNetworkOption";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldDeleteOptionWhenEmptyValue";d:0.002;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNetworkOptionWhenIsNetworkOption";d:0.002;s:125:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.002;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNonAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.003;}}} \ No newline at end of file +C:37:"PHPUnit\Runner\DefaultTestResultCache":4922:{a:2:{s:7:"defects";a:1:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";i:4;}s:5:"times";a:40:{s:81:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Init::testShouldRegisterHook";d:0.147;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOnlyValidValues";d:0.208;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldDeleteOption";d:0;s:80:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Delete::testShouldNotDelete";d:0.001;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_DeleteAll::testShouldDeleteAll";d:0.001;s:97:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenNotStringOption";d:0.001;s:94:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnNullWhenUnkownOption";d:0;s:79:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Get::testShouldReturnValue";d:0.014;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnResetValues";d:0;s:83:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnValues";d:0;s:92:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetAll::testShouldReturnOnlyValidValues";d:0;s:88:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_GetStorage::testShouldReturnStorage";d:0;s:82:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Has::testShouldReturnIfHasKey";d:0;s:86:"Screenfeed\AutoWPOptions\Tests\Unit\src\Options\Test_Set::testShouldSetOnlyValidValues";d:0.001;s:126:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetDefaultValues::testShouldReturnDefaultValues";d:0.013;s:120:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetIdentifier::testShouldReturnIdentifier";d:0.003;s:112:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetPrefix::testShouldReturnPrefix";d:0;s:122:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_GetResetValues::testShouldReturnResetValues";d:0.001;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnDefaultValue";d:0.007;s:132:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedVersion";d:0.001;s:130:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidate::testShouldReturnSanitizedValue";d:0.001;s:139:"Screenfeed\AutoWPOptions\Tests\Unit\src\Sanitization\AbstractSanitization\Test_SanitizeAndValidateOnUpdate::testShouldReturnValidatedValues";d:0.005;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteNetworkOptionWhenIsNetworkOption";d:0.004;s:118:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Delete::testShouldDeleteSiteOptionWhenIsNotNetworkOption";d:0.001;s:111:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnEmptyArrayWhenInvalidValue";d:0.002;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnFalseWhenValueIsFalse";d:0.001;s:104:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnAnArrayWhenValidValue";d:0.001;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Get::testShouldReturnNetworkOptionWhenIsNetworkOption";d:0.001;s:98:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnAString";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetFullName::testShouldReturnOptionName";d:0;s:101:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnAnInteger";d:0.004;s:108:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnCurrentNetworkId";d:0.001;s:106:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetNetworkId::testShouldReturnGivenNetworkId";d:0;s:91:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_GetType::testShouldReturnType";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnABoolean";d:0;s:110:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_IsNetworkOption::testShouldReturnIfNetworkOption";d:0;s:103:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldDeleteOptionWhenEmptyValue";d:0.002;s:115:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNetworkOptionWhenIsNetworkOption";d:0.001;s:125:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.003;s:128:"Screenfeed\AutoWPOptions\Tests\Unit\src\Storage\WpOption\Test_Set::testShouldUpdateNonAutoloadedSiteOptionWhenIsNotNetworkOption";d:0.001;}}} \ No newline at end of file diff --git a/composer.json b/composer.json index 8042a5e..4723681 100644 --- a/composer.json +++ b/composer.json @@ -25,13 +25,13 @@ "php": ">=5.4.0" }, "require-dev": { - "php": ">=5.4.0", - "automattic/phpcs-neutron-standard": ">=1.7", - "brain/monkey": ">=1.5", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "phpcompatibility/phpcompatibility-wp": "^2.1", - "phpmetrics/phpmetrics": ">=2.0", - "phpunit/phpunit": ">=4.8.36 <8.0", + "php": "^7.1", + "automattic/phpcs-neutron-standard": "*", + "brain/monkey": "^2.0", + "dealerdirect/phpcodesniffer-composer-installer": "*", + "phpcompatibility/phpcompatibility-wp": "*", + "phpmetrics/phpmetrics": "*", + "phpunit/phpunit": "^7.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "*", "szepeviktor/phpstan-wordpress": "*", diff --git a/composer.lock b/composer.lock index 24ffb9e..3d8993c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3e90331e33cdcf672622819cc769089a", + "content-hash": "6b2a43ea95c439823eb405aca9f39695", "packages": [], "packages-dev": [ { @@ -1084,16 +1084,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.85", + "version": "0.12.86", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "20e6333c0067875ad7697cd8acdf245c6ef69d03" + "reference": "a84fdc53ecca7643dbc89ef8880d8b393a6c155a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/20e6333c0067875ad7697cd8acdf245c6ef69d03", - "reference": "20e6333c0067875ad7697cd8acdf245c6ef69d03", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a84fdc53ecca7643dbc89ef8880d8b393a6c155a", + "reference": "a84fdc53ecca7643dbc89ef8880d8b393a6c155a", "shasum": "" }, "require": { @@ -1136,7 +1136,7 @@ "type": "tidelift" } ], - "time": "2021-04-27T14:13:16+00:00" + "time": "2021-05-08T11:29:01+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2884,7 +2884,7 @@ "php": ">=5.4.0" }, "platform-dev": { - "php": ">=5.4.0" + "php": "^7.1" }, "plugin-api-version": "1.1.0" } From 0d39c1d37ce3c131ed7af2d2cf20aa5ae8d1e449 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Mon, 10 May 2021 13:22:47 +0200 Subject: [PATCH 38/41] Try other OS --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 10dded1..cc0d4e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-latest] + operating-system: [ubuntu-latest, windows-latest, macos-latest] php-versions: ['7.1', '7.4'] wp-versions: ['5.1', '5.2', 'latest'] From 30b9c4ba94f132e92f96835a139b63790c6f956f Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Mon, 10 May 2021 13:24:33 +0200 Subject: [PATCH 39/41] No other OS then --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc0d4e7..10dded1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - operating-system: [ubuntu-latest, windows-latest, macos-latest] + operating-system: [ubuntu-latest] php-versions: ['7.1', '7.4'] wp-versions: ['5.1', '5.2', 'latest'] From 4aba560a8498a5f1db021f6c7711181a0dc6e9e8 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Mon, 10 May 2021 13:31:20 +0200 Subject: [PATCH 40/41] No need to test with WP 5.2 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 10dded1..226979c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['7.1', '7.4'] - wp-versions: ['5.1', '5.2', 'latest'] + wp-versions: ['5.1', 'latest'] services: database: From 1602597a8ac8bdf1660fac1d53f2552b762f2443 Mon Sep 17 00:00:00 2001 From: Git I Hate You Date: Mon, 10 May 2021 13:49:52 +0200 Subject: [PATCH 41/41] Try php 8.0 --- .github/workflows/tests.yml | 8 +++++++- composer.json | 2 +- composer.lock | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 226979c..4dbe289 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,12 @@ jobs: php-versions: ['7.1', '7.4'] wp-versions: ['5.1', 'latest'] + include: + - operating-system: ubuntu-latest + php-versions: '8.0' + wp-versions: 'latest' + composer-options: --ignore-platform-reqs + services: database: image: mysql:5.6 @@ -66,7 +72,7 @@ jobs: restore-keys: ${{ runner.os }}-composer- - name: Install dependencies - run: composer update --prefer-dist --no-progress --no-suggest --no-interaction + run: composer update --prefer-dist --no-progress --no-suggest --no-interaction ${{ matrix.composer-options }} - name: Install tests run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} diff --git a/composer.json b/composer.json index 4723681..8e253b1 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "php": ">=5.4.0" }, "require-dev": { - "php": "^7.1", + "php": ">=7.1", "automattic/phpcs-neutron-standard": "*", "brain/monkey": "^2.0", "dealerdirect/phpcodesniffer-composer-installer": "*", diff --git a/composer.lock b/composer.lock index 3d8993c..0b439dc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6b2a43ea95c439823eb405aca9f39695", + "content-hash": "641c7d9b346557bc8b1b03038981951a", "packages": [], "packages-dev": [ { @@ -2884,7 +2884,7 @@ "php": ">=5.4.0" }, "platform-dev": { - "php": "^7.1" + "php": ">=7.1" }, "plugin-api-version": "1.1.0" }