From 590b239479061af8db81a15e574f45a2b4088738 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 5 Jun 2021 10:33:59 +0200 Subject: [PATCH 1/4] Remove autoload.php --- src/autoload.php | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/autoload.php diff --git a/src/autoload.php b/src/autoload.php deleted file mode 100644 index 646ee385..00000000 --- a/src/autoload.php +++ /dev/null @@ -1,47 +0,0 @@ - __DIR__.'/Redmine/', - 'Redmine\\Tests\\' => __DIR__.'/../tests/', - ]; - - foreach ($namespaceMap as $prefix => $baseDir) { - // does the class use the namespace prefix? - $len = strlen($prefix); - if (0 !== strncmp($prefix, $class, $len)) { - // no, move to the next registered autoloader - continue; - } - - // get the relative class name - $relativeClass = substr($class, $len); - - // replace the namespace prefix with the base directory, replace namespace - // separators with directory separators in the relative class name, append - // with .php - $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; - - // if the file exists, require it - if (file_exists($file)) { - require $file; - break; - } - } -}); From bb513688d4d7684bbedd835b3cf5bdf42792b47c Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 5 Jun 2021 10:35:55 +0200 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84094d93..d43dea18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - **BREAKING**: Deprecated client `Redmine\Client` was removed, use `Redmine\Client\NativeCurlClient` or `Redmine\Client\Psr18Client` instead +- **BREAKING**: `src/autoload.php` was removed, use the `vendor/autoload.php` from Composer instead ## [v1.8.1](https://github.com/kbsali/php-redmine-api/compare/v1.8.0...v1.8.1) - 2021-06-01 From a7a353cfdaf093c37b1caffdd582f26da041f457 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 5 Jun 2021 10:40:10 +0200 Subject: [PATCH 3/4] Fix tests, use composer autoload.php --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 86e9e571..86256f59 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + src/Redmine/ From 1ec5acd661f1990ca64c7fc7bf915a78572d970b Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 5 Jun 2021 10:49:44 +0200 Subject: [PATCH 4/4] Add vendor autoload.php in phpunit.xml --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 86256f59..f9c81635 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + src/Redmine/