Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f0316a0
Update documentation and add some extra checks
s3rgiosan Feb 7, 2025
1228198
Fix previous commit
s3rgiosan Feb 7, 2025
240fd2e
Add getters to return post-to-post and post-to-user defined relations…
s3rgiosan Feb 7, 2025
a43f97a
Add helper function to retrieve post to post|user relationships by a …
s3rgiosan Feb 7, 2025
943c41b
Add helper function to get post relationship data (similar to tenup_c…
s3rgiosan Feb 7, 2025
abed1c8
Add @since
s3rgiosan Feb 7, 2025
52cae97
Update Helpers.php
s3rgiosan Feb 10, 2025
f492272
Update Registry.php
s3rgiosan Feb 10, 2025
a9f173c
Update Registry.php
s3rgiosan Feb 10, 2025
9d20710
Fix get_post_relationship_data to return all post and user relationsh…
s3rgiosan Feb 10, 2025
3af0e53
Merge branch 'master' into feature/helpers
s3rgiosan Feb 11, 2025
3fb03fe
Allow for 'any' as relationship filter and variable renaming for clarity
s3rgiosan Feb 11, 2025
948289c
Merge branch 'develop'
jeffpaul Feb 15, 2025
7c01591
Update helpers
s3rgiosan Feb 17, 2025
e836712
Merge branch 'master' into feature/helpers
s3rgiosan Feb 17, 2025
e60c3ec
Update docblock
s3rgiosan Feb 17, 2025
2dc14e9
Update docblocks
s3rgiosan Feb 17, 2025
1f185c2
Add support for context param
s3rgiosan Feb 17, 2025
578115a
Minor updates
s3rgiosan Feb 18, 2025
24d7072
Return same format regardless of field used to query
s3rgiosan Feb 21, 2025
3b114db
Minor variable renaming for readability
s3rgiosan Feb 21, 2025
9d7a769
Fix labels for from and to relationships
s3rgiosan Feb 21, 2025
908ee73
Fix post type used for from and to related posts queries
s3rgiosan Feb 21, 2025
9071634
Fix returned post type depending if it's a from or to relationship
s3rgiosan Feb 21, 2025
1d6415f
Fix check for post type in to relationships
s3rgiosan Feb 21, 2025
ff93b51
Fix check for other post type filter
s3rgiosan Feb 21, 2025
22dbe1d
Add enable ui flag for post to user relationships
s3rgiosan Feb 21, 2025
d163f16
Rename function for clarity
s3rgiosan Feb 21, 2025
24f0d01
Update helpers
s3rgiosan Mar 14, 2025
74898cb
Add support to return all relationships
s3rgiosan May 6, 2025
dd5bba7
Update dependencies
s3rgiosan May 6, 2025
113342c
Merge branch 'develop' into feature/helpers
s3rgiosan May 26, 2025
357bd1c
Update test dependencies
s3rgiosan Jan 8, 2026
5dbaedb
Add tests for the new helpers
s3rgiosan Jan 8, 2026
55e0573
Fix metabox test
s3rgiosan Jan 8, 2026
33d1832
Fix format and add docblocks
s3rgiosan Jan 8, 2026
ac61c1b
Update tests to use wp-env + phpunit
s3rgiosan Jan 9, 2026
9cb8396
Add more npm commands
s3rgiosan Jan 9, 2026
79c4d93
Cleanup registry after each test
s3rgiosan Jan 9, 2026
fe7f90e
Add docblocks to tests, fix format and use strict comparisons (assert…
s3rgiosan Jan 9, 2026
81d9b22
Simplify test command
s3rgiosan Jan 9, 2026
bc2ce16
Fix non-deterministic tests
s3rgiosan Jan 9, 2026
6d1d52c
Merge branch 'develop' into feature/helpers
s3rgiosan Jan 9, 2026
24471e3
Add spellcheck disable line
s3rgiosan Jan 9, 2026
56c7358
Add support for flags
s3rgiosan Jan 9, 2026
f53a9cf
Add nvmrc file
s3rgiosan Jan 9, 2026
4ec73be
Add action to test PHP
s3rgiosan Jan 9, 2026
5834009
Add cache path
s3rgiosan Jan 9, 2026
81ec0fa
Add npm install step
s3rgiosan Jan 9, 2026
b95625c
Revert update
s3rgiosan Jan 12, 2026
531015d
Update tests for "loose" comparisons (backwards compat)
s3rgiosan Jan 12, 2026
3589782
Update dependencies
s3rgiosan Jan 12, 2026
cc3ec5a
Add build command to fix GH action
s3rgiosan Jan 29, 2026
b7d10a4
Add makepot and archive commands
s3rgiosan Jan 29, 2026
e0ac45a
Update dependencies
s3rgiosan Jan 29, 2026
8a70b93
Install node-wp-i18n
s3rgiosan Jan 29, 2026
8064212
Validate input params
s3rgiosan Jan 30, 2026
bd055a2
Add check for db errors
s3rgiosan Jan 30, 2026
334815a
Add filter for the default posts per page limit for relationship queries
s3rgiosan Jan 30, 2026
a429b86
Add static variable caching to both `get_post_to_post_relationships_b…
s3rgiosan Jan 30, 2026
3d147c8
Bypass static cache when doing tests
s3rgiosan Jan 30, 2026
5b1ea3a
Update version to 2.0.0
s3rgiosan Jan 30, 2026
01ec95a
Update version
s3rgiosan Jan 30, 2026
0febc0b
Update test-php action
s3rgiosan Jan 30, 2026
6135e03
Fix docblocks
s3rgiosan Apr 24, 2026
9af151c
Improve gh action command
s3rgiosan Apr 25, 2026
1e8967f
Improve doc block
s3rgiosan Apr 25, 2026
e09911a
Use WP trunk branch for wp-env
s3rgiosan Apr 25, 2026
81472bc
Unregister relationship UI hooks to ensure test isolation
s3rgiosan Apr 25, 2026
a4b94a6
Align version
s3rgiosan Apr 25, 2026
5dcf085
Sanitize nonce
s3rgiosan Apr 25, 2026
d0f85e2
Add guard checks
s3rgiosan Apr 25, 2026
4ce94a4
Escape exceptions
s3rgiosan Apr 25, 2026
7d39617
Change static cache separator
s3rgiosan Apr 25, 2026
9a06349
Move checks earlier to avoid unwanted iterations
s3rgiosan Apr 26, 2026
ab25c25
Add cast to int for posts per page
s3rgiosan Apr 26, 2026
57c3ba8
Add filter for the default users per page limit
s3rgiosan Apr 26, 2026
dae0041
Add cache for relationships add and delete
s3rgiosan Apr 26, 2026
2bf183b
Update cache TTL to number instead of constant
s3rgiosan Apr 26, 2026
5aa6f30
Add tests for cache module
s3rgiosan Apr 26, 2026
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
11 changes: 10 additions & 1 deletion .github/_typos.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[default.extend-words]
# Add words that should be ignored (define them as themselves)
Tung = "Tung" # Example: Don't correct the surname "Tung"
curent = "curent" # Intentionally preserving misspelling to avoid breaking changes
curent = "curent" # Intentionally preserving misspelling to avoid breaking changes

[type.php]
extend-ignore-re = [
# spellchecker:disable-line:
"(?Rm)^.*//\\s*@spellchecker:disable-line(\\b.*)?$",

# spellchecker:<on|off>:
"//\\s*@spellchecker:off\\s*\\n.*\\n\\s*//\\s*@spellchecker:on"
]
55 changes: 55 additions & 0 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test PHP

env:
COMPOSER_VERSION: "2"
COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache"

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

permissions:
contents: read

jobs:
test-php:
runs-on: ubuntu-latest
steps:
- name: Check out our repo source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"

- name: Prepare composer cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-

- name: Set PHP version
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: '8.2'
extensions: :php-psr
coverage: none

- name: Install Node dependencies
run: npm ci --omit=optional

- name: Install dependencies
run: composer install --ignore-platform-reqs

- name: Setup Tests
run: npm run test:setup

- name: Run Tests
run: npm run test:all
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.phpunit.result.cache
test-results/

# Version Control
.svn

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
15 changes: 15 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"core": "WordPress/WordPress#master",
"phpVersion": "8.2",
"plugins": [
"."
],
"mappings": {
"wp-content/plugins/wp-content-connect": "."
},
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true
}
}

2 changes: 0 additions & 2 deletions Requirements.txt

This file was deleted.

118 changes: 0 additions & 118 deletions bin/install-wp-tests.sh

This file was deleted.

14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"minimum-stability": "dev",
"require": {
"composer/installers": "^1.2"
"php": "^7.4|^8.0"
},
"autoload": {
"psr-4": {
Expand All @@ -31,7 +31,15 @@
]
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"10up/wp_mock": "0.2.0"
"10up/wp_mock": "^0.3.0",
"phpunit/phpunit": "^9.6",
"yoast/phpunit-polyfills": "^1.1"
},
"config": {
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"composer/installers": true
}
}
}
Loading
Loading