diff --git a/.markdownlintignore b/.markdownlintignore
index b31ea81ba..1a634e542 100644
--- a/.markdownlintignore
+++ b/.markdownlintignore
@@ -1,4 +1,4 @@
-lib/CssXPath/
+lib/phpgt/
lib/phpmailer/
node_modules/
p/scripts/vendor/
diff --git a/.typos.toml b/.typos.toml
index b05117ccf..3e150d7dc 100644
--- a/.typos.toml
+++ b/.typos.toml
@@ -29,7 +29,7 @@ extend-exclude = [
"bin/",
"data/",
"docs/fr/",
- "lib/CssXPath/",
+ "lib/phpgt/",
"lib/phpmailer/",
"lib/SimplePie/",
"node_modules/",
diff --git a/lib/.gitignore b/lib/.gitignore
index f1e6fdd7e..b599767a7 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -1,6 +1,12 @@
autoload.php
composer.lock
composer/
+phpgt/cssxpath/.github/
+phpgt/cssxpath/.gitignore
+phpgt/cssxpath/.scrutinizer.yml
+phpgt/cssxpath/composer.json
+phpgt/cssxpath/CONTRIBUTING.md
+phpgt/cssxpath/test/
phpmailer/phpmailer/*oauth*
phpmailer/phpmailer/COMMITMENT*
phpmailer/phpmailer/composer.*
diff --git a/lib/CssXPath/NotYetImplementedException.php b/lib/CssXPath/NotYetImplementedException.php
deleted file mode 100644
index 70d9492cf..000000000
--- a/lib/CssXPath/NotYetImplementedException.php
+++ /dev/null
@@ -1,4 +0,0 @@
-=7.0.0",
+ "phpgt/cssxpath": "v1.1.4",
"phpmailer/phpmailer": "6.6.0"
},
"config": {
+ "sort-packages": true,
"vendor-dir": "./"
},
"scripts": {
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index a4a9df36a..96a9cb2a8 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -52,8 +52,11 @@ function classAutoloader($class) {
include(LIB_PATH . '/' . str_replace('_', '/', $class) . '.php');
} elseif (strpos($class, 'SimplePie') === 0) {
include(LIB_PATH . '/SimplePie/' . str_replace('_', '/', $class) . '.php');
- } elseif (strpos($class, 'CssXPath') !== false) {
- include(LIB_PATH . '/CssXPath/' . basename(str_replace('\\', '/', $class)) . '.php');
+ } elseif (str_starts_with($class, 'Gt\\CssXPath\\')) {
+ $prefix = 'Gt\\CssXPath\\';
+ $base_dir = LIB_PATH . '/phpgt/cssxpath/src/';
+ $relative_class_name = substr($class, strlen($prefix));
+ require $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
} elseif (str_starts_with($class, 'PHPMailer\\PHPMailer\\')) {
$prefix = 'PHPMailer\\PHPMailer\\';
$base_dir = LIB_PATH . '/phpmailer/phpmailer/src/';
diff --git a/lib/CssXPath/LICENSE b/lib/phpgt/cssxpath/LICENSE
similarity index 100%
rename from lib/CssXPath/LICENSE
rename to lib/phpgt/cssxpath/LICENSE
diff --git a/lib/CssXPath/README.md b/lib/phpgt/cssxpath/README.md
similarity index 100%
rename from lib/CssXPath/README.md
rename to lib/phpgt/cssxpath/README.md
diff --git a/lib/CssXPath/CssXPathException.php b/lib/phpgt/cssxpath/src/CssXPathException.php
similarity index 50%
rename from lib/CssXPath/CssXPathException.php
rename to lib/phpgt/cssxpath/src/CssXPathException.php
index bd7798243..81ad3ac9d 100644
--- a/lib/CssXPath/CssXPathException.php
+++ b/lib/phpgt/cssxpath/src/CssXPathException.php
@@ -3,4 +3,4 @@ namespace Gt\CssXPath;
use RuntimeException;
-class CssXPathException extends RuntimeException {}
+class CssXPathException extends RuntimeException {}
\ No newline at end of file
diff --git a/lib/phpgt/cssxpath/src/NotYetImplementedException.php b/lib/phpgt/cssxpath/src/NotYetImplementedException.php
new file mode 100644
index 000000000..39d12b3bc
--- /dev/null
+++ b/lib/phpgt/cssxpath/src/NotYetImplementedException.php
@@ -0,0 +1,4 @@
+Created with the PHP Coding Standard Generator. https://edorian.github.com/php-coding-standard-generator/
- ./lib/CssXPath/
./lib/SimplePie/
+ ./lib/phpgt/
./lib/phpmailer/
./lib/http-conditional.php
./node_modules/
diff --git a/tests/lib/CssXPath/CssXPathTest.php b/tests/lib/CssXPath/CssXPathTest.php
new file mode 100644
index 000000000..c6fe24fc8
--- /dev/null
+++ b/tests/lib/CssXPath/CssXPathTest.php
@@ -0,0 +1,8 @@
+assertTrue(class_exists('Gt\\CssXPath\\Translator'));
+ }
+}
diff --git a/tests/lib/PHPMailer/PHPMailerTest.php b/tests/lib/PHPMailer/PHPMailerTest.php
index 4707e2a1e..8fc14b815 100644
--- a/tests/lib/PHPMailer/PHPMailerTest.php
+++ b/tests/lib/PHPMailer/PHPMailerTest.php
@@ -1,7 +1,7 @@
assertTrue(class_exists('PHPMailer\\PHPMailer\\PHPMailer'));
}