Skip to content

Commit

Permalink
v1.8.5 (#72)
Browse files Browse the repository at this point in the history
* Change test filenames, update phpunit config.
* Update composer dependencies
* Update node dependencies
* Update workflows for new wordpress and php versions
* Update font awesome
* Increase version to 6.5.2
* Update Twitter (X) logo
* Switch to cdnjs
* Fix PHP/WordPress test pairs
* Update version number and READMEs
  • Loading branch information
chrislarrycarl authored Jun 9, 2024
1 parent e0e3a1c commit 09972c4
Show file tree
Hide file tree
Showing 20 changed files with 390 additions and 170 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-tests-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
--health-retries=3
strategy:
matrix:
php-versions: [ '8.2', '8.1', '8.0' ]
wordpress-versions: [ '6.2', '6.1', '6.0' ]
php-versions: [ '8.3', '8.2' ]
wordpress-versions: [ '6.5', '6.4' ]
operating-system: [ ubuntu-20.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/phpunit-tests-legacy-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: PHPUnit Tests (8.x)

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
test-php:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
services:
mysql-service:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
php-versions: [ '8.1', '8.0' ]
wordpress-versions: [ '6.3', '6.2', '6.1', '6.0' ]
operating-system: [ ubuntu-20.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}

steps:
- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Setup PHP
# Commit hash for v2.25.4: https://github.com/shivammathur/setup-php/releases/tag/2.25.4
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
lsb_release -a
- name: Checkout utm.codes
# Commit hash for v3.5.3: https://github.com/actions/checkout/releases/tag/v3.5.3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0

- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^9.5 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root localhost:3306 ${{ matrix.wordpress-versions }}
- name: Run PHPUnit Tests
run: |
cd _test
../vendor/bin/phpunit
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ To download just the plugin (without the developer extras in this repo) check ou

utm.codes is developed for, and tested with, platform versions covering [the vast majority of WordPress users](https://wordpress.org/about/stats/), including:

- WordPress 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, and 6.4
- PHP 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, and 8.2
- WordPress 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, and 6.5
- PHP 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, and 8.3

## Branches

Expand Down
13 changes: 8 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: chrislarrycarl
Donate link: https://utm.codes/pricing/
Tags: analytics, utm codes, analytics, google analytics, campaign marketing, link generator
Requires at least: 5.1.0
Tested up to: 6.4
Tested up to: 6.5
Requires PHP: 7.1.0
Stable tag: 1.8.4
Stable tag: 1.8.5
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -34,8 +34,8 @@ For more information, videos, and helpful tips [visit the utm.codes website](htt
- Supports adding additional custom parameters to links for improved versatility
- Multi-user access within WordPress to share creation and management responsibilities
- See your current link count in the admin dashboard "At a Glance"
- Tested with WordPress 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, and 6.2
- Tested with PHP 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, and 8.2
- Tested with WordPress 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5
- Tested with PHP 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3
- Tested with MySQL 5.6, 5.7, 8.0
- 100% Free and Open Source

Expand Down Expand Up @@ -99,12 +99,15 @@ That isn't a question. But thank you.

== Changelog ==

= 1.8.5 =
- Supports WordPress v6.3, v6.4, v6.5
- Update dependencies

= 1.8.4 =
- Supports WordPress v6.2
- Update dependencies
- Update minimum requirements


= 1.8.3 =

- Supports WordPress v6.1
Expand Down
2 changes: 1 addition & 1 deletion _test/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<testsuites>
<testsuite name="all">
<directory prefix="test-" suffix=".php">./tests/</directory>
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ function test_add_static_resources() {
$this->assertTrue( in_array( 'utm-dot-codes', $wp_scripts->queue ) );

$this->assertTrue( array_key_exists( 'font-awesome', $wp_styles->registered ) );
$this->assertEquals( $wp_styles->registered['font-awesome']->src, 'https://use.fontawesome.com/releases/v5.15.0/css/all.css' );
$this->assertEquals( $wp_styles->registered['font-awesome']->src, 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css' );
$this->assertTrue( in_array( 'font-awesome', $wp_styles->queue ) );

$this->assertTrue( array_key_exists( 'utm-dot-codes', $wp_styles->registered ) );
Expand Down Expand Up @@ -1237,7 +1237,7 @@ function test_social_api_filter_hook() {
'stack-exchange' => array( 'Stack Exchange', 'fab fa-stack-exchange' ),
'stack-overflow' => array( 'Stack Overflow', 'fab fa-stack-overflow' ),
'tumblr' => array( 'Tumblr', 'fab fa-tumblr' ),
'twitter' => array( 'Twitter', 'fab fa-twitter' ),
'twitter' => array( 'X (Twitter)', 'fab fa-x-twitter' ),
'vimeo' => array( 'Vimeo', 'fab fa-vimeo-v' ),
'vk' => array( 'VK', 'fab fa-vk'),
'weibo' => array( 'Weibo', 'fab fa-weibo'),
Expand Down Expand Up @@ -1282,7 +1282,7 @@ function( $networks ) {
'stack-exchange' => array( 'Stack Exchange', 'fab fa-stack-exchange' ),
'stack-overflow' => array( 'Stack Overflow', 'fab fa-stack-overflow' ),
'tumblr' => array( 'Tumblr', 'fab fa-tumblr' ),
'twitter' => array( 'Twitter', 'fab fa-twitter' ),
'twitter' => array( 'X (Twitter)', 'fab fa-x-twitter' ),
'vimeo' => array( 'Vimeo', 'fab fa-vimeo-v' ),
'vk' => array( 'VK', 'fab fa-vk'),
'weibo' => array( 'Weibo', 'fab fa-weibo'),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion _test/tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* Manually load the utm.codes plugin for testing
*/
function _manually_load_utm_dot_codes() {
require_once '../utm-dot-codes.php';
require_once getenv( 'UTMDC_PLUGIN_DIR' ) . '/utm-dot-codes.php';
update_option( 'active_plugins', 'utm-dot-codes/utm-dot-codes.php' );
}
tests_add_filter( 'muplugins_loaded', '_manually_load_utm_dot_codes' );
Expand Down
4 changes: 2 additions & 2 deletions classes/class-utmdotcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ public function bulk_actions( $bulk_actions ) {
public function add_css() {
wp_enqueue_style(
'font-awesome',
'https://use.fontawesome.com/releases/v5.15.0/css/all.css',
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css',
array(),
UTMDC_VERSION,
'all'
Expand Down Expand Up @@ -1656,7 +1656,7 @@ public function get_social_networks() {
'stack-exchange' => array( 'Stack Exchange', 'fab fa-stack-exchange' ),
'stack-overflow' => array( 'Stack Overflow', 'fab fa-stack-overflow' ),
'tumblr' => array( 'Tumblr', 'fab fa-tumblr' ),
'twitter' => array( 'Twitter', 'fab fa-twitter' ),
'twitter' => array( 'X (Twitter)', 'fab fa-x-twitter' ),
'vimeo' => array( 'Vimeo', 'fab fa-vimeo-v' ),
'vk' => array( 'VK', 'fab fa-vk' ),
'weibo' => array( 'Weibo', 'fab fa-weibo' ),
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "asdfdotdev/utm.codes",
"version": "1.8.4",
"version": "1.8.5",
"description": "A plugin that makes building analytics friendly links quick and easy.",
"type": "wordpress-plugin",
"require-dev": {
"squizlabs/php_codesniffer": "^3.7",
"squizlabs/php_codesniffer": "^3.10",
"wp-coding-standards/wpcs": "2.3",
"phpcompatibility/php-compatibility": "^9.3",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.6",
"yoast/phpunit-polyfills": "^2.0"
},
"license": "GPL-2.0-only",
Expand Down
Loading

0 comments on commit 09972c4

Please sign in to comment.