Description
Hello, I'd like to be able to install the library manually (i.e. without composer). Ultimately my goal is to package it for Gentoo, so that users can install it using our package manager, portage.
I've hit a problem though: unlike the other language install tools (rubygems, cabal, etc.), composer encourages you to use its autoload.php file instead of keeping track of includes at the top of each file. This sounds nice at first, until you try to install a library without composer -- if I use another package manager to install the library instead of composer, it doesn't work! All the include()s are missing.
Would it be possible to add the includes to the source files that need them? This should make it possible to install the library manually, and will also have the nice side effect of making the source easier to hack on without going through a composer install.
I've made the following changes locally and they were enough to get me started:
diff --git a/lib/Redmine/Api/AbstractApi.php b/lib/Redmine/Api/AbstractApi.php
index 0d64ed3..eaf61f2 100644
--- a/lib/Redmine/Api/AbstractApi.php
+++ b/lib/Redmine/Api/AbstractApi.php
@@ -2,6 +2,8 @@
namespace Redmine\Api;
+require_once(dirname(__FILE__) . '/../Client.php');
+
use Redmine\Client;
/**
diff --git a/lib/Redmine/Api/Attachment.php b/lib/Redmine/Api/Attachment.php
index 5aad32b..e5068a9 100644
--- a/lib/Redmine/Api/Attachment.php
+++ b/lib/Redmine/Api/Attachment.php
@@ -2,6 +2,8 @@
namespace Redmine\Api;
+require('AbstractApi.php');
+
/**
* Attachment details
*
diff --git a/lib/Redmine/Client.php b/lib/Redmine/Client.php
index 48ae676..e025266 100644
--- a/lib/Redmine/Client.php
+++ b/lib/Redmine/Client.php
@@ -2,6 +2,27 @@
namespace Redmine;
+require('Api/Attachment.php');
+require('Api/CustomField.php');
+require('Api/Group.php');
+require('Api/Issue.php');
+require('Api/IssueCategory.php');
+require('Api/IssuePriority.php');
+require('Api/IssueRelation.php');
+require('Api/IssueStatus.php');
+require('Api/Membership.php');
+require('Api/News.php');
+require('Api/Project.php');
+require('Api/Query.php');
+require('Api/Role.php');
+require('Api/SimpleXMLElement.php');
+require('Api/TimeEntry.php');
+require('Api/TimeEntryActivity.php');
+require('Api/Tracker.php');
+require('Api/User.php');
+require('Api/Version.php');
+require('Api/Wiki.php');
+
use Redmine\Api\SimpleXMLElement;
/**