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

Release: v2.4.1 #1019

Merged
merged 98 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
3150695
Date data should be in UTC before passing to strtotime()
BrookeDot Jun 19, 2023
7fc9add
Use options.php instead of null
mrmadhat Jul 25, 2023
a988b0b
Refactor node-tests workflow with a common GitHub Action
attackant Oct 30, 2023
8b86909
Refactor PHPUnit GitHub workflow for simplicity
attackant Oct 30, 2023
dd69381
"Update composer script for testing
attackant Oct 30, 2023
faf3c86
Update phpcs command in composer.json
attackant Oct 30, 2023
55477bb
Update composer dependencies and PHP version
attackant Oct 30, 2023
a037276
Simplify PHPCS action in workflow file
attackant Oct 30, 2023
6d14b47
Remove WordPress matrix from PHPCS workflow
attackant Oct 30, 2023
fae3994
Remove redundant "phpcs" command from workflow
attackant Oct 30, 2023
f967836
Add null checks and private variables for to address PHP notices and …
attackant Oct 30, 2023
c4c7628
Downgrade PHP version requirement in composer.json
attackant Oct 31, 2023
ec87ffa
"Configure PHP CodeSniffer to run only in non-draft PRs"
attackant Oct 31, 2023
4dd2584
Update GitHub Actions to refine pull request triggers
attackant Oct 31, 2023
fd06ac3
Add multisite testing to GitHub Actions
attackant Oct 31, 2023
0066034
Add PHP docblocks for HTML and caption fields in Table_Test and Theme…
attackant Oct 31, 2023
1410294
Fix failing unit tests due to unset defaults
attackant Oct 31, 2023
f59d6be
"PHPCBF changes updated class imports and formatting across multiple …
attackant Oct 31, 2023
b2ce921
Update PHP Code Sniffer suppression annotations
attackant Oct 31, 2023
7818b1a
Ignore specific PHP Code Sniffer warnings for audio node checks
attackant Oct 31, 2023
a094bc2
"Escaping response messages and adding PHPCS exceptions"
attackant Oct 31, 2023
a299ba5
Ensure proper escaping of error messages in class-push.php
attackant Oct 31, 2023
4cb16ac
"Adjusted code to satisfy PHPCS naming conventions
attackant Oct 31, 2023
d5f0ea9
"Add PHP Code Sniffer ignores for snake case naming checks
attackant Oct 31, 2023
3eb5afa
Update trigger event location in GitHub workflows
attackant Oct 31, 2023
0ea326e
Update PHP version requirement in composer.json
attackant Oct 31, 2023
1cd1f31
Change submenu parent for Bulk Export page to handle PHP deprecation …
attackant Nov 1, 2023
8b2c2e0
Merge branch 'mrmadhat-chore/php-8-depreciations' into release/v2.4.1
attackant Nov 1, 2023
e96caf9
Improve output sanitization across various files
attackant Nov 1, 2023
34de0a9
build
attackant Nov 2, 2023
7dedab1
build
attackant Nov 2, 2023
9748455
Update version requirements and contributors in readme
attackant Nov 2, 2023
09ef9bd
Fix typo
attackant Nov 2, 2023
9c9dc9a
Temporarily add this branch
attackant Nov 2, 2023
64f5185
Fix syntax
attackant Nov 2, 2023
9dd7607
Force running actions
attackant Nov 2, 2023
501f646
Add workflow_dispatch
attackant Nov 2, 2023
b291066
build
attackant Nov 2, 2023
76934db
Add workflow_dispatch and remove dummy function
attackant Nov 2, 2023
d8dd4d3
Testing new GH action setup PHPUnit Testing Suite workflow
attackant Nov 2, 2023
74cd31a
Update PHPUnit workflow for better test environment setup
attackant Nov 3, 2023
9a361d8
Update 'composer.json' dependencies and config
attackant Nov 3, 2023
f69dde0
Refactor bootstrap test file to improve code organization and readabi…
attackant Nov 3, 2023
145938b
Testing on PHP 8.0
attackant Nov 3, 2023
3834a76
Testing on PHP 8.0
attackant Nov 3, 2023
4e3e330
Update autoload path and plugin loading sequence in test bootstrap
attackant Nov 3, 2023
1d4bbb5
Refactor directory traversal in bootstrap script
attackant Nov 3, 2023
c44792f
Add alleyinteractive/composer-wordpress-autoloader to composer.json
attackant Nov 3, 2023
7d9966b
Merge branch 'refs/heads/release/v2.4.1' into issue-1021
attackant Nov 3, 2023
f21dc84
Remove temporary PHPUnit Testing Suite, adjust composer.json and modi…
attackant Nov 3, 2023
4fb0e7f
"Reformat WP_TESTS_MULTISITE definition in bootstrap.php"
attackant Nov 3, 2023
f10f6b5
Update test-class-end-of-article data sets
attackant Nov 6, 2023
de21b26
Update minimum required PHP and WordPress versions
attackant Nov 6, 2023
270f06b
Merge pull request #1023 from alleyinteractive/issue-1021
attackant Nov 7, 2023
e5ffc69
Add workflow to deploy plugin to WordPress.org
attackant Nov 13, 2023
9124e0d
Update .github/workflows/deploy-to-wordpress.yml
attackant Nov 13, 2023
e81cbc8
Update deployment workflow for version checking
attackant Nov 13, 2023
f3652f9
Update GitHub Action to abort on non-incremented versions
attackant Nov 13, 2023
33067d8
Update GitHub Actions workflow for better efficiency
attackant Nov 13, 2023
3515711
add dry run
attackant Nov 13, 2023
e44dee8
add dry run
attackant Nov 14, 2023
967c281
Refactor deploy-to-wordpress workflow and update composer.json
attackant Nov 14, 2023
95c238b
Add .distignore and update .deployignore
attackant Nov 14, 2023
a4aa2ae
Move GITHUB_TOKEN environment variable to specific step
attackant Nov 14, 2023
0cee96f
Add built-release workflow and update deployment workflow
attackant Nov 14, 2023
26171ab
Update package.json version and script
attackant Nov 14, 2023
731cbfb
Add release instructions to README
attackant Nov 14, 2023
508cc71
Remove Github actions workflows
attackant Nov 14, 2023
ed94b04
Update plugin version in apple-news.php
attackant Nov 15, 2023
1a8208d
Merge pull request #1025 from alleyinteractive/deploy-to-wordpress-vi…
attackant Nov 15, 2023
72a7739
Merge pull request #1007 from BrookeDot/patch-1
attackant Nov 15, 2023
06e98b7
Bumping version in apple news class
srtfisher Nov 15, 2023
4d9e9b8
Remove polyfills reference (not in use with testkit)
srtfisher Nov 15, 2023
4161cff
Ensure that the request class is loaded
srtfisher Nov 15, 2023
03512e3
Use the WpOrg\Requests\Utility\CaseInsensitiveDictionary class if it …
srtfisher Nov 15, 2023
97dfabc
Disable nonce checking when testing
srtfisher Nov 15, 2023
b109c08
Testing CI
srtfisher Nov 15, 2023
90f6254
Remove workflow_dispatch
srtfisher Nov 15, 2023
fe94f6a
More remove workflow_dispatch
srtfisher Nov 15, 2023
1e861cc
Adding more branches to CI
srtfisher Nov 15, 2023
ff7f101
Fix command
srtfisher Nov 15, 2023
001530a
Enable multisite via the matrix
srtfisher Nov 15, 2023
7696a38
Include push on branches too
srtfisher Nov 15, 2023
ed6869f
Fix matrix variable
srtfisher Nov 15, 2023
d3fa1af
Merge pull request #1029 from alleyinteractive/hotfix/testkit-fixes
attackant Nov 15, 2023
45dab2b
Decode HTML entities in link button text to prevent things like amper…
attackant Dec 22, 2023
ac6971b
phpcbf fixes only
attackant Dec 22, 2023
deb4edd
Update package dependencies with npm audit fix
attackant Jan 2, 2024
a4fb6e4
Update custom property name in .phpcs.xml
attackant Jan 2, 2024
188a702
Update PHP and WordPress version requirements
attackant Jan 2, 2024
2b7ff15
Fix formatting in class-markdown.php
attackant Jan 2, 2024
d347430
Update 'Tested up to' version in readme.txt
attackant Jan 3, 2024
7b3d1ec
Update .phpcs.xml
attackant Jan 3, 2024
ff1f255
Refactor function parameters and condition in apple-news.php
attackant Jan 3, 2024
721eaf1
Removed strict typing in "filter_update_post_metadata" function
attackant Jan 3, 2024
87c63ec
Add space
attackant Jan 3, 2024
58c6e81
Merge pull request #1037 from alleyinteractive/issue-1034
attackant Jan 3, 2024
6e9246c
Remove draft from actions
attackant Jan 3, 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
29 changes: 7 additions & 22 deletions .github/workflows/node-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,10 @@ on:
pull_request:

jobs:
npm-ci:
name: (npm) Install, build, and test
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
all_but_latest: true
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install node dependencies (npm ci)
run: npm ci
- name: Run npm lint
run: npm run lint
- name: Run npm test
run: npm run test
- name: Run npm build
run: npm run build
node-tests:
uses: alleyinteractive/.github/.github/workflows/node-tests.yml@main
with:
ci: true
node: 16
run-audit: false
kevinfodness marked this conversation as resolved.
Show resolved Hide resolved
working-directory: ./
28 changes: 8 additions & 20 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
name: PHP Coding Standards

on:
pull_request:
attackant marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
all_but_latest: true
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none
- name: Validate Composer package
run: composer validate --strict
- name: Install dependencies
uses: ramsey/composer-install@v2
- name: Run PHPCS
run: composer phpcs
strategy:
matrix:
php: [ 8.0 ]
attackant marked this conversation as resolved.
Show resolved Hide resolved
uses: alleyinteractive/.github/.github/workflows/php-coding-standards.yml@main
kevinfodness marked this conversation as resolved.
Show resolved Hide resolved
with:
php: ${{ matrix.php }}
57 changes: 11 additions & 46 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,16 @@
name: Unit Tests
name: Testing Suite

on:
pull_request:
workflow_dispatch:

jobs:
tests:
name: "PHP: ${{ matrix.php }} (MU: ${{ matrix.multisite }})"
runs-on: ubuntu-latest
php-tests:
strategy:
fail-fast: true
matrix:
multisite: [0, 1]
php: ['8.0', '7.4', '7.3', '7.2', '7.1']
attackant marked this conversation as resolved.
Show resolved Hide resolved
env:
WP_CORE_DIR: /tmp/wordpress/
WP_MULTISITE: ${{ matrix.multisite }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
all_but_latest: true
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v2
- name: Set up WordPress
run: |
bash <(curl -s "https://raw.githubusercontent.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh") wordpress_unit_tests root '' 127.0.0.1
rm -rf "${WP_CORE_DIR}wp-content/plugins"
mkdir -p "${WP_CORE_DIR}wp-content/plugins/publish-to-apple-news"
rsync -a --exclude=.git . "${WP_CORE_DIR}wp-content/plugins/publish-to-apple-news"
cd ${WP_CORE_DIR}wp-content/plugins/publish-to-apple-news && composer install
- name: Run tests
shell: bash
run: |
cd ${WP_CORE_DIR}/wp-content/plugins/publish-to-apple-news
composer run phpunit
php: ['8.2', '8.1', '8.0', '7.4']
wordpress: ["latest"]
uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main
with:
command: "test"
php: ${{ matrix.php }}
wordpress: ${{ matrix.wordpress }}
16 changes: 10 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
"type" : "wordpress-plugin",
"license" : "GPL-3.0-or-later",
"require" : {
"composer/installers": "~1.0",
"php": ">=7.1"
"composer/installers": "^1.12.0",
"php": "^8.0"
attackant marked this conversation as resolved.
Show resolved Hide resolved
},
"require-dev": {
"phpspec/prophecy": "~1.0",
"alleyinteractive/alley-coding-standards": "^0.3.0",
"yoast/phpunit-polyfills": "^1.0"
"phpspec/prophecy": "^1.17.0",
"alleyinteractive/alley-coding-standards": "^2.0.1",
"yoast/phpunit-polyfills": "^2.0"
},
"scripts": {
"phpcbf" : "phpcbf .",
"phpcs" : "phpcs .",
"phpunit" : "phpunit"
"phpunit" : "phpunit",
"test": [
"@phpcs",
"@phpunit"
]
},
"config": {
"allow-plugins": {
Expand Down
4 changes: 4 additions & 0 deletions includes/apple-exporter/builders/class-components.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ private function get_components_from_node( $node ) {
*/
private function get_image_full_size_url( $url ) {

if(null === $url) {
attackant marked this conversation as resolved.
Show resolved Hide resolved
return '';
}

// Strip URL formatting for easier matching.
$url = urldecode( $url );

Expand Down
1 change: 1 addition & 0 deletions tests/admin/test-class-admin-apple-themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* A class which is used to test the Admin_Apple_Themes class.
*/
class Admin_Apple_Themes_Test extends Apple_News_Testcase {
private Admin_Apple_Themes $themes;
attackant marked this conversation as resolved.
Show resolved Hide resolved

/**
* A helper function to create the default theme.
Expand Down
2 changes: 2 additions & 0 deletions tests/apple-exporter/components/test-class-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* @subpackage Tests
*/
class Apple_News_Table_Test extends Apple_News_Component_TestCase {
private string $html;
attackant marked this conversation as resolved.
Show resolved Hide resolved
private string $html_caption;

/**
* A fixture containing operations to be run before each test.
Expand Down
4 changes: 4 additions & 0 deletions tests/mocks/function-coauthors.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ function coauthors( $between = ', ', $between_last = ' and ', $before = '', $aft
// Get last index.
$last_index = count( $apple_news_coauthors ) - 1;

if(null === $between) {
attackant marked this conversation as resolved.
Show resolved Hide resolved
$between = ', ';
}

// Compute output.
$output = $before
. implode( $between, array_slice( $apple_news_coauthors, 0, $last_index ) )
Expand Down
Loading