Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Jul 26, 2023
2 parents e785e83 + 9527bce commit f643d3d
Show file tree
Hide file tree
Showing 12 changed files with 475 additions and 1,310 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
strategy:
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.1'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
- {name: 'WP latest', version: 'latest', continue: false}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.1', continue: false}
- {name: 'WP trunk', version: 'WordPress/WordPress#master', continue: true}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -38,6 +38,7 @@ jobs:
run: npm run env:start
- name: Test
run: npm run cypress:run
continue-on-error: ${{ matrix.core.continue }}
- name: Make artifacts available
uses: actions/upload-artifact@v3
if: failure()
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install node v12
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: '.nvmrc'
- name: npm install
run: npm install
- name: eslint
Expand All @@ -32,11 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set PHP version
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.0'
coverage: none
tools: phpcs
- name: composer install
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: getong/[email protected]

- name: Set PHP version
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.0'
coverage: none

- name: Install dependencies
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [1.2.1] - 2023-07-26
### Added
- More robust minimum PHP version check (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#129](https://github.com/10up/convert-to-blocks/pull/129)).

### Changed
- Bump minimum required PHP version from 7.4 to 8.0 in our `composer.json` config (props [@c0ntax](https://github.com/c0ntax), [@Sidsector9](https://github.com/Sidsector9) via [#122](https://github.com/10up/convert-to-blocks/pull/122)).

### Fixed
- Parse error caused by a comma (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh), [@ravinderk](https://github.com/ravinderk), [@felipeelia](https://github.com/felipeelia) via [#123](https://github.com/10up/convert-to-blocks/pull/123)).

### Security
- Bump `minimist` from 1.2.0 to 1.2.7 and `mkdirp` from 0.5.1 to 0.5.6 (props [@dependabot](https://github.com/apps/dependabot) via [#117](https://github.com/10up/convert-to-blocks/pull/117)).
- Bump `ini` from 1.3.5 to 1.3.8 (props [@dependabot](https://github.com/apps/dependabot) via [#119](https://github.com/10up/convert-to-blocks/pull/119)).
- Bump `browser-sync` from 2.27.10 to 2.29.3 and removes `qs` (props [@dependabot](https://github.com/apps/dependabot) via [#120](https://github.com/10up/convert-to-blocks/pull/120)).
- Bump `word-wrap` from 1.2.3 to 1.2.5 (props [@dependabot](https://github.com/apps/dependabot) via [#127](https://github.com/10up/convert-to-blocks/pull/127)).

## [1.2.0] - 2023-06-27
**Note that this release bumps the WordPress minimum version from 5.7 to 6.1 and the PHP minimum version from 7.4 to 8.0.**

Expand Down Expand Up @@ -106,6 +122,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Initial release of Convert to Blocks.

[Unreleased]: https://github.com/10up/convert-to-blocks/compare/trunk...develop
[1.2.1]: https://github.com/10up/convert-to-blocks/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/10up/convert-to-blocks/compare/1.1.1...1.2.0
[1.1.1]: https://github.com/10up/convert-to-blocks/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/10up/convert-to-blocks/compare/1.0.2...1.1.0
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Taylor Lovett (@tlovett1)](https://github.com/tlovett1), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Diana Padron](https://profiles.wordpress.org/dianapadron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Brandon Berg (@BBerg10up)](https://github.com/BBerg10up), [Hashim Warren (@hashimwarren)](https://github.com/hashimwarren), [Jason LeMahieu (@MadtownLems)](https://github.com/MadtownLems), [Simon Carne](https://profiles.wordpress.org/scarne/), [Rodrigo Arias (@rodrigo-arias)](https://github.com/rodrigo-arias), [Gary Thayer (@gthayer)](https://github.com/gthayer), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Andrew Norcross (@norcross)](https://github.com/norcross), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Mehul Gohil (@mehul0810)](https://github.com/mehul0810), [Akshit Sethi (@akshitsethi)](https://github.com/akshitsethi), [Terrance Orletsky (@terrance-orletsky-d7)](https://github.com/terrance-orletsky-d7), [Philipp (@ouun)](https://github.com/ouun), [Sanket Parmar (@sanketio)](https://github.com/sanketio), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Barney Jeffries(@barneyjeffries)](https://github.com/barneyjeffries).
[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Taylor Lovett (@tlovett1)](https://github.com/tlovett1), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Diana Padron](https://profiles.wordpress.org/dianapadron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Brandon Berg (@BBerg10up)](https://github.com/BBerg10up), [Hashim Warren (@hashimwarren)](https://github.com/hashimwarren), [Jason LeMahieu (@MadtownLems)](https://github.com/MadtownLems), [Simon Carne](https://profiles.wordpress.org/scarne/), [Rodrigo Arias (@rodrigo-arias)](https://github.com/rodrigo-arias), [Gary Thayer (@gthayer)](https://github.com/gthayer), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Andrew Norcross (@norcross)](https://github.com/norcross), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Mehul Gohil (@mehul0810)](https://github.com/mehul0810), [Akshit Sethi (@akshitsethi)](https://github.com/akshitsethi), [Terrance Orletsky (@terrance-orletsky-d7)](https://github.com/terrance-orletsky-d7), [Philipp (@ouun)](https://github.com/ouun), [Sanket Parmar (@sanketio)](https://github.com/sanketio), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Dan Burzynski (@c0ntax)](https://github.com/c0ntax).

## Libraries

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": ">=7.4"
"php": ">=8.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package convert-to-blocks
*/

$plugin_version = '1.2.0';
$plugin_version = '1.2.1';

if ( file_exists( __DIR__ . '/.commit' ) ) {
// phpcs:disable
Expand Down
50 changes: 48 additions & 2 deletions convert-to-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Plugin Name: Convert to Blocks
* Plugin URI: https://github.com/10up/convert-to-blocks
* Description: Convert classic editor posts to blocks on the fly.
* Version: 1.2.0
* Version: 1.2.1
* Requires at least: 6.1
* Requires PHP: 8
* Requires PHP: 8.0
* Author: 10up
* Author URI: https://10up.com
* License: GPLv2 or later
Expand Down Expand Up @@ -45,6 +45,52 @@ function convert_to_blocks_get_setting( $name ) {
return apply_filters( 'convert_to_blocks_setting_' . $name, constant( $name ), \get_current_blog_id() );
}

/**
* Get the minimum version of PHP required by this plugin.
*
* @since 1.2.1
*
* @return string Minimum version required.
*/
function convert_to_blocks_minimum_php_requirement() {
return '8.0';
}

/**
* Whether PHP installation meets the minimum requirements
*
* @since 1.2.1
*
* @return bool True if meets minimum requirements, false otherwise.
*/
function convert_to_blocks_site_meets_php_requirements() {
return version_compare( phpversion(), convert_to_blocks_minimum_php_requirement(), '>=' );
}

if ( ! convert_to_blocks_site_meets_php_requirements() ) {
add_action(
'admin_notices',
function() {
?>
<div class="notice notice-error">
<p>
<?php
echo wp_kses_post(
sprintf(
/* translators: %s: Minimum required PHP version */
__( 'Convert to Blocks requires PHP version %s or later. Please upgrade PHP or disable the plugin.', 'convert-to-blocks' ),
esc_html( convert_to_blocks_minimum_php_requirement() )
)
);
?>
</p>
</div>
<?php
}
);
return;
}

if ( file_exists( __DIR__ . '/config.test.php' ) && defined( 'PHPUNIT_RUNNER' ) ) {
require_once __DIR__ . '/config.test.php';
}
Expand Down
6 changes: 1 addition & 5 deletions includes/ConvertToBlocks/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,7 @@ public function filter_notice() {
?>
<div class="notice notice-warning is-dismissible">
<p>
<?php
printf(
esc_html__( 'A filter hook (post_type_supports_convert_to_blocks) is already active.', 'convert-to-blocks' ),
);
?>
<?php esc_html_e( 'A filter hook (post_type_supports_convert_to_blocks) is already active.', 'convert-to-blocks' ); ?>
</p>
</div>
<?php
Expand Down
Loading

0 comments on commit f643d3d

Please sign in to comment.