Skip to content

Commit

Permalink
bump required PHP version to 7.4 or higher
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Jan 11, 2025
1 parent 3178970 commit 7ee776f
Show file tree
Hide file tree
Showing 6 changed files with 1,040 additions and 1,039 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-php-syntax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', 'highest']
steps:
# Install PHP interpreter
- name: Setup PHP
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Here, you can browse the source code of the [MC4WP: Mailchimp for WordPress Plug
Requirements
--------------

- PHP version 7.2 or higher
- PHP version 7.4 or higher
- WordPress version 4.6 or higher


Expand All @@ -22,24 +22,24 @@ If you just want to install this plugin on your WordPress site, please download
To install the development version, take the following steps:

1. Clone the GitHub repository:
```
git clone https://github.com/ibericode/mailchimp-for-wordpress.git mailchimp-for-wp
```
```
git clone https://github.com/ibericode/mailchimp-for-wordpress.git mailchimp-for-wp
```

1. Install Composer dependencies:
```sh
composer install
```
```sh
composer install
```

1. Install NPM dependencies:
```
npm install
```
```
npm install
```

1. Generate plugin asset files:
```
npm run build
```
```
npm run build
```

1. Activate the plugin in your WordPress admin panel.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"source": "https://github.com/ibericode/mailchimp-for-wordpress"
},
"require": {
"php": ">=7.2"
"php": ">=7.4"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down
10 changes: 5 additions & 5 deletions mailchimp-for-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
// Prevent direct file access
defined('ABSPATH') or exit;

// don't run if PHP version is lower than 7.4.0
if (PHP_VERSION_ID < 70400) {
return;
}

/** @ignore */
function _mc4wp_load_plugin()
{
Expand All @@ -42,11 +47,6 @@ function _mc4wp_load_plugin()
return;
}

// don't run if PHP version is lower than 7.2.0
if (PHP_VERSION_ID < 70200) {
return;
}

// bootstrap the core plugin
define('MC4WP_VERSION', '4.9.21');
define('MC4WP_PLUGIN_DIR', __DIR__);
Expand Down
27 changes: 14 additions & 13 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?xml version="1.0"?>
<ruleset name="rules">
<description>Code standard rules for Mailchimp for WordPress</description>
<arg name="colors" />
<file>mailchimp-for-wp.php</file>
<file>includes/</file>
<file>integrations/</file>
<file>config/</file>
<exclude-pattern>*\.(html|css|js)</exclude-pattern>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<rule ref="PSR12">
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
</rule>
<description>Code standard rules for Mailchimp for WordPress</description>
<arg name="colors" />
<file>mailchimp-for-wp.php</file>
<file>uninstall.php</file>
<file>includes/</file>
<file>integrations/</file>
<file>config/</file>
<exclude-pattern>*\.(html|css|js|md|json|xml|sh)</exclude-pattern>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<rule ref="PSR12">
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
</rule>
</ruleset>
Loading

0 comments on commit 7ee776f

Please sign in to comment.