Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add PHP 8.4 and move PCOV to PHP 8.2 #2872

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9e074ae
Add new Rest API base classes
vaurdan Aug 22, 2024
6ad9d44
Implement the Content Helper API namespace
vaurdan Aug 22, 2024
7330236
Add tests for the new REST API classes
vaurdan Aug 22, 2024
e500032
Update UI providers to use the new API endpoints
vaurdan Aug 22, 2024
04de750
Remove unused code and initializations
vaurdan Aug 22, 2024
044b48d
Merge branch 'develop' into refactor/internal-api-content-helper
vaurdan Aug 22, 2024
1b45964
Fix sonarcloud issues
vaurdan Aug 22, 2024
f6f09ac
Merge branch 'develop' into refactor/internal-api-content-helper
vaurdan Aug 22, 2024
fe19315
Refactor to avoid consts and use getters instead
vaurdan Aug 23, 2024
90c9808
Fix minor docblock issues per code review
vaurdan Aug 23, 2024
b000751
Merge branch 'develop' into refactor/internal-api-content-helper
acicovic Aug 26, 2024
77dbd2b
Apply code review suggestions by @acicovic
vaurdan Aug 26, 2024
78395a7
Rename API parameter `content` to `text`
vaurdan Aug 26, 2024
a2cefb5
Add `stats` endpoint
vaurdan Aug 29, 2024
f1bb531
Update the UI to use the new API endpoints
vaurdan Aug 29, 2024
fb3941a
Delete the old endpoints
vaurdan Aug 29, 2024
5d785dd
Add tests
vaurdan Aug 29, 2024
508b199
Apply code review suggestions by @acicovic
vaurdan Aug 29, 2024
5e606da
Add `stats` endpoint
vaurdan Aug 29, 2024
89ef1bb
Update the UI to use the new API endpoints
vaurdan Aug 29, 2024
e14f28c
Delete the old endpoints
vaurdan Aug 29, 2024
5978a36
Add tests
vaurdan Aug 29, 2024
ce9be3a
Merge remote-tracking branch 'origin/refactor/internal-api-stats' int…
vaurdan Aug 29, 2024
fa5ee00
Fix E2E test
vaurdan Aug 29, 2024
e252949
Add `settings` endpoints
vaurdan Aug 30, 2024
36ade72
Update UI to use the new settings API
vaurdan Aug 30, 2024
5b62a4e
Add tests
vaurdan Aug 30, 2024
de7630a
Remove old code
vaurdan Aug 30, 2024
f06c489
Improve comments and whitespace
acicovic Sep 5, 2024
313851e
Merge pull request #2731 from Parsely/refactor/internal-api-content-h…
acicovic Sep 5, 2024
64ac937
Merge pull request #2734 from Parsely/refactor/internal-api-stats
acicovic Sep 5, 2024
32a412a
class-base-endpoint.php: Fix incorrect whitespace
acicovic Sep 5, 2024
83367fa
Merge pull request #2737 from Parsely/update/fix-incorrect-whitespace…
acicovic Sep 5, 2024
3f80988
Endpoints/class-base-endpoint.php: Fix incorrect whitespace
acicovic Sep 5, 2024
8380fc2
Merge pull request #2738 from Parsely/update/fix-incorrect-whitespace…
acicovic Sep 5, 2024
d68ad09
Improve comments and whitespace
acicovic Sep 6, 2024
b2eb9bb
Merge pull request #2735 from Parsely/refactor/internal-api-settings
acicovic Sep 6, 2024
e6e7d10
Merge branch 'develop' into refactor/internal-api
acicovic Sep 6, 2024
1b24e40
Improve comments and whitespace
acicovic Sep 6, 2024
260f014
Merge branch 'develop' into refactor/internal-api
acicovic Sep 9, 2024
f31ff32
Merge branch 'develop' into refactor/internal-api
acicovic Sep 11, 2024
6f6bd16
Merge branch 'develop' into refactor/internal-api
acicovic Sep 12, 2024
a9f47bd
Merge branch 'develop' into refactor/internal-api
acicovic Sep 12, 2024
203f6cb
Merge branch 'develop' into refactor/internal-api
acicovic Sep 16, 2024
3e1efb7
REST API Refactor: Apply fixes/suggestions from the other PRs (#2812)
vaurdan Oct 2, 2024
81d773d
Implement the new Content API service, and remove old RemoteAPI code
vaurdan Oct 10, 2024
1a7ee36
Implement caching mechanism for service endpoints
vaurdan Oct 10, 2024
5352a97
Implement the Suggestions API service
vaurdan Oct 11, 2024
a9216a7
Tests: Add PHP 8.4 and move PCOV to PHP 8.2
acicovic Oct 17, 2024
df6ecdf
Merge branch 'develop' into update/add-php-8.4-to-tests-and-move-pcov…
acicovic Oct 17, 2024
e46d573
Fix code coverage not working on PHP 8.2
acicovic Oct 17, 2024
fa8233f
Merge branch 'update/add-php-8.4-to-tests-and-move-pcov-to-php-8.2' o…
acicovic Oct 17, 2024
2338a2c
Address PHPCS & PHPStan errors and warnings
vaurdan Oct 17, 2024
ee380f4
Merge branch 'refactor/internal-api' into refactor/external-services
vaurdan Oct 18, 2024
1c280da
Fix post-merge issues and namespaces
vaurdan Oct 18, 2024
e103011
Add condition when validate api credentials returns false.
vaurdan Oct 18, 2024
ccaa940
Address code review feedback
vaurdan Oct 18, 2024
c0cb767
Merge branch 'refactor/external-services' into update/add-php-8.4-to-…
acicovic Oct 18, 2024
6ddb1d8
Merge branch 'develop' into update/add-php-8.4-to-tests-and-move-pcov…
acicovic Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,25 @@ jobs:
WP_VERSION: ${{ matrix.wp }}

strategy:
# PHP 7.2 uses PHPUnit 8.5.21
# PHP 7.3 uses PHPUnit 9.5.10
# PHP 7.4 uses PHPUnit 9.5.10
# PHP 8.0 uses PHPUnit 9.5.10
# PHP 8.1 uses PHPUnit 9.5.10
# PHP 8.2 uses PHPUnit 9.5.10
# Note: Different PHP versions use different PHPUnit versions.
# Keys:
# - coverage: Whether to run the tests with code coverage.
# - experimental: Whether the build is "allowed to fail".
matrix:
php: [ '7.2', '7.3', '7.4', '8.0']
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.3']
wp: ['latest']
coverage: [none]
experimental: [false]
include:
- php: '8.1'
coverage: pcov
- php: '8.2'
coverage: pcov # Warning: PCOV might not work for PHP 8.4 or newer according to https://thephp.cc/articles/pcov-or-xdebug.
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
experimental: false
- php: '8.2'
wp: 'trunk'
coverage: none
experimental: false
- php: '8.3'
- php: '8.4'
wp: 'trunk'
coverage: none
experimental: false
experimental: true
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
steps:
Expand Down Expand Up @@ -92,17 +83,17 @@ jobs:
run: composer prepare-ci --no-interaction

- name: Run integration tests (single site)
if: ${{ matrix.php != 8.0 && ! matrix.experimental }}
if: ${{ matrix.php != 8.2 && ! matrix.experimental }}
run: composer testwp --no-interaction

- name: Run integration tests experimental
- name: Run integration tests (single site) experimental
if: ${{ matrix.experimental }}
run: composer testwp-experimental --no-interaction

- name: Run integration tests (multi site)
if: ${{ matrix.php != 8.0 && ! matrix.experimental }}
- name: Run integration tests (multisite)
if: ${{ matrix.php != 8.2 && ! matrix.experimental }}
run: composer testwp-ms --no-interaction

- name: Run integration tests (multisite site with code coverage)
if: ${{ matrix.php == 8.1 }}
if: ${{ matrix.php == 8.2 }} # To prevent unneeded test runs, use this version in the above if clauses.
run: composer coveragewp-ci --no-interaction
15 changes: 7 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@ jobs:
WP_VERSION: latest

strategy:
# PHP 7.2 uses PHPUnit 8.5.21
# PHP 7.3 uses PHPUnit 9.5.10
# PHP 7.4 uses PHPUnit 9.5.10
# PHP 8.0 uses PHPUnit 9.5.10
# PHP 8.1 uses PHPUnit 9.5.10
# Note: Different PHP versions use different PHPUnit versions.
# Keys:
# - coverage: Whether to run the tests with code coverage.
# - experimental: Whether the build is "allowed to fail".
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.2', '8.3']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.3']
coverage: [none]
experimental: [false]
include:
# Run code coverage for only one PHP version
- php: '8.1'
coverage: pcov
- php: '8.2'
coverage: pcov # Warning: PCOV might not work for PHP 8.4 or newer according to https://thephp.cc/articles/pcov-or-xdebug.
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
experimental: false
- php: '8.4'
coverage: none
experimental: true
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
</properties>
</rule>

<!-- Allow short @var assignments in tests. -->
<!-- Allow short @var assignments -->
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>/tests/</exclude-pattern>
<exclude-pattern>/</exclude-pattern>
</rule>

</ruleset>
2 changes: 1 addition & 1 deletion build/blocks/recommendations/edit.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '985cd7ad36a37322fb62');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'f73735ea0f420620d3aa');
2 changes: 1 addition & 1 deletion build/blocks/recommendations/edit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/blocks/recommendations/view.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '816c6be0377185053443');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'db27a5e749f0f3888bee');
2 changes: 1 addition & 1 deletion build/blocks/recommendations/view.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/content-helper/dashboard-widget.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '86a5430e052e357f1b96');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '3a7734d69011884c8267');
2 changes: 1 addition & 1 deletion build/content-helper/dashboard-widget.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/content-helper/editor-sidebar.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '2dba3c67213de163a67c');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '6e668f9bfad0f3f02bf6');
18 changes: 9 additions & 9 deletions build/content-helper/editor-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/content-helper/excerpt-generator.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => '2a31635723a6474c1f34');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => 'f4a464bba52051300fa7');
2 changes: 1 addition & 1 deletion build/content-helper/excerpt-generator.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- vendor/php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php
type_coverage:
return_type: 91
return_type: 90
param_type: 79.2
property_type: 0 # We can't use property types until PHP 7.4 becomes the plugin's minimum version.
print_suggestions: false
Expand Down
48 changes: 0 additions & 48 deletions src/Endpoints/class-analytics-post-detail-api-proxy.php

This file was deleted.

48 changes: 0 additions & 48 deletions src/Endpoints/class-analytics-posts-api-proxy.php

This file was deleted.

Loading
Loading