Skip to content

Commit

Permalink
Updated required PHP version to 8.0.0. Fixed autoloader for 3rd party…
Browse files Browse the repository at this point in the history
… libraries. Updated README files.
  • Loading branch information
alexboia committed Apr 23, 2024
1 parent 8519930 commit dcbf743
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ However, there is no definitive plan for it, but, as a general rule, I would lik

### For running the plug-in itself

1. PHP version 7.4.0 or greater;
1. PHP version 8.0.0 or greater;
2. MySQL version 5.7 or greater (with spatial support);
3. WordPress 6.0.0 or greater;
4. libxml extension;
Expand Down
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: trip, summary, map, gpx, travel
Requires at least: 6.0.0
Tested up to: 6.5.2
Stable tag: 0.3.2
Requires PHP: 7.4.0
Requires PHP: 8.0.0
License: BSD New License
License URI: https://opensource.org/licenses/BSD-3-Clause

Expand Down Expand Up @@ -67,7 +67,7 @@ For train rides the following fields are available:

### Requirements

- PHP version 7.4.0 or greater;
- PHP version 8.0.0 or greater;
- MySQL version 5.7 or greater (with spatial support);
- Wordpress 6.0.0 or greater;
- libxml extension;
Expand Down
2 changes: 1 addition & 1 deletion abp01-plugin-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* License URI: https://github.com/alexboia/WP-Trip-Summary/blob/master/LICENSE.md
* Plugin URI: https://github.com/alexboia/WP-Trip-Summary
* Text Domain: abp01-trip-summary
* Requires PHP: 7.4.0
* Requires PHP: 8.0.0
* Requires at least: 6.0.0
* WPTS Version Name: Marco Polo
*/
Expand Down
1 change: 1 addition & 0 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ copy_source_files() {
mkdir "$WPTS_BUILD_TMPDIR/media" && cp -r ./media/* "$WPTS_BUILD_TMPDIR/media"
mkdir "$WPTS_BUILD_TMPDIR/views" && cp -r ./views/* "$WPTS_BUILD_TMPDIR/views"
mkdir "$WPTS_BUILD_TMPDIR/lib" && cp -r ./lib/* "$WPTS_BUILD_TMPDIR/lib"
mkdir "$WPTS_BUILD_TMPDIR/vendor" && cp -r ./vendor/* "$WPTS_BUILD_TMPDIR/vendor"
mkdir "$WPTS_BUILD_TMPDIR/lang" && cp -r ./lang/* "$WPTS_BUILD_TMPDIR/lang"

mkdir "$WPTS_BUILD_TMPDIR/data"
Expand Down
2 changes: 1 addition & 1 deletion lib/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static function autoload($className) {
$checkPrefix = $prefix . $separator;
if (strpos($className, $checkPrefix) === 0) {
$classPath = str_replace($checkPrefix, '', $className);
$classPath = self::_getRelativePath($classPath, $separator);
$classPath = self::_getRelativePath($classPath, $separator, null);
$classPath = self::$_libDir . '/'
. $searchRelativeDir . '/'
. $classPath . '.php';
Expand Down
2 changes: 1 addition & 1 deletion lib/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public function getPhpVersion() {
}

public function getRequiredPhpVersion() {
return '7.4.0';
return '8.0.0';
}

public function getWpVersion() {
Expand Down
2 changes: 1 addition & 1 deletion tests/test-Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function test_canGetVersions() {

$this->assertEquals(PHP_VERSION, $env->getPhpVersion());
$this->assertEquals(get_bloginfo('version', 'raw'), $env->getWpVersion());
$this->assertEquals('7.4.0', $env->getRequiredPhpVersion());
$this->assertEquals('8.0.0', $env->getRequiredPhpVersion());
$this->assertEquals('6.0.0', $env->getRequiredWpVersion());
$this->assertEquals('0.3.2', $env->getVersion());
}
Expand Down

0 comments on commit dcbf743

Please sign in to comment.