-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
' . $hesklang['cpric'] . '
';
-}
-else
-{
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
- 3) {
- $_SESSION['cat_priority'] = 3;
- }
-
- /* Category name */
- $catname = hesk_input(hesk_POST('name'), $hesklang['enter_cat_name'], 'manage_categories.php');
-
- $background_color = hesk_POST('background-color', '#ffffff');
- $foreground_color = hesk_POST('foreground-color', '#000000');
- $display_border = hesk_POST('display-border', 0);
- if ($foreground_color == '') {
- $foreground_color = 'AUTO';
- $display_border = 0;
- }
-
- $usage = hesk_POST('usage', 0);
-
- /* Do we already have a category with this name? */
- $res = hesk_dbQuery("SELECT `id` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` WHERE `name` LIKE '" . hesk_dbEscape(hesk_dbLike($catname)) . "' LIMIT 1");
- if (hesk_dbNumRows($res) != 0) {
- $_SESSION['catname'] = $catname;
- hesk_process_messages($hesklang['cndupl'], 'manage_categories.php');
- }
-
- /* Get the latest cat_order */
- $res = hesk_dbQuery("SELECT `cat_order` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` ORDER BY `cat_order` DESC LIMIT 1");
- $row = hesk_dbFetchRow($res);
- $my_order = $row[0] + 10;
-
- hesk_dbQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories`
- (`name`,`cat_order`,`autoassign`,`type`, `priority`, `background_color`, `foreground_color`, `display_border_outline`, `usage`) VALUES
- ('" . hesk_dbEscape($catname) . "','" . intval($my_order) . "','" . intval($_SESSION['cat_autoassign']) . "',
- '" . intval($_SESSION['cat_type']) . "','{$_SESSION['cat_priority']}', '" . hesk_dbEscape($background_color) . "',
- '" . hesk_dbEscape($foreground_color) . "', '" . intval($display_border) . "', " . intval($usage) . ")");
-
- hesk_cleanSessionVars('catname');
- hesk_cleanSessionVars('cat_autoassign');
- hesk_cleanSessionVars('cat_type');
- hesk_cleanSessionVars('cat_priority');
-
- $_SESSION['selcat2'] = hesk_dbInsertID();
-
- hesk_process_messages(sprintf($hesklang['cat_name_added'], '
' . stripslashes($catname) . ''), 'manage_categories.php', 'SUCCESS');
-} // End new_cat()
-
-
-function update_category()
-{
- global $hesk_settings, $hesklang;
-
- /* A security check */
- hesk_token_check('POST');
-
- $_SERVER['PHP_SELF'] = 'manage_categories.php?catid=' . intval(hesk_POST('catid'));
-
- $catid = hesk_isNumber(hesk_POST('id'), $hesklang['choose_cat_ren'], $_SERVER['PHP_SELF']);
- $_SESSION['selcat'] = $catid;
- $_SESSION['selcat2'] = $catid;
-
- $catname = hesk_input(hesk_POST('name'), $hesklang['cat_ren_name'], $_SERVER['PHP_SELF']);
- $_SESSION['catname2'] = $catname;
-
- $background_color = hesk_POST('background-color', '#ffffff');
- $foreground_color = hesk_POST('foreground-color', '#000000');
- $display_border = hesk_POST('display-border', 0);
- if ($foreground_color == '') {
- $foreground_color = 'AUTO';
- $display_border = 0;
- }
- $manager = hesk_POST('manager', 0);
- $priority = hesk_POST('priority', 0);
- $usage = hesk_POST('usage', 0);
-
-
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `name`='" . hesk_dbEscape($catname) . "',
- `priority` = '" . hesk_dbEscape($priority) . "',
- `manager` = " . intval($manager) . ",
- `background_color` = '" . hesk_dbEscape($background_color) . "',
- `foreground_color` = '" . hesk_dbEscape($foreground_color) . "',
- `display_border_outline` = '" . intval($display_border) . "',
- `usage` = " . intval($usage) . "
- WHERE `id`='" . intval($catid) . "'");
-
- unset($_SESSION['selcat']);
- unset($_SESSION['catname2']);
-
- hesk_process_messages(sprintf($hesklang['category_updated'], stripslashes($catname)), $_SERVER['PHP_SELF'], 'SUCCESS');
-} // End rename_cat()
-
-
-function remove()
-{
- global $hesk_settings, $hesklang;
-
- /* A security check */
- hesk_token_check();
-
- $_SERVER['PHP_SELF'] = 'manage_categories.php';
-
- $mycat = intval(hesk_GET('catid')) or hesk_error($hesklang['no_cat_id']);
- if ($mycat == 1) {
- hesk_process_messages($hesklang['cant_del_default_cat'], $_SERVER['PHP_SELF']);
- }
-
- hesk_dbQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` WHERE `id`='" . intval($mycat) . "'");
- if (hesk_dbAffectedRows() != 1) {
- hesk_error("$hesklang[int_error]: $hesklang[cat_not_found].");
- }
-
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `category`=1 WHERE `category`='" . intval($mycat) . "'");
-
- hesk_process_messages($hesklang['cat_removed_db'], $_SERVER['PHP_SELF'], 'SUCCESS');
-} // End remove()
-
-
-function order_cat()
-{
- global $hesk_settings, $hesklang;
-
- /* A security check */
- hesk_token_check();
-
- $catid = intval(hesk_GET('catid')) or hesk_error($hesklang['cat_move_id']);
- $_SESSION['selcat2'] = $catid;
-
- $cat_move = intval(hesk_GET('move'));
-
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `cat_order`=`cat_order`+" . intval($cat_move) . " WHERE `id`='" . intval($catid) . "'");
- if (hesk_dbAffectedRows() != 1) {
- hesk_error("$hesklang[int_error]: $hesklang[cat_not_found].");
- }
-
- /* Update all category fields with new order */
- $res = hesk_dbQuery("SELECT `id` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` ORDER BY `cat_order` ASC");
-
- $i = 10;
- while ($mycat = hesk_dbFetchAssoc($res)) {
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `cat_order`=" . intval($i) . " WHERE `id`='" . intval($mycat['id']) . "'");
- $i += 10;
- }
-
- header('Location: manage_categories.php');
- exit();
-} // End order_cat()
-
-
-function toggle_autoassign()
-{
- global $hesk_settings, $hesklang;
-
- /* A security check */
- hesk_token_check();
-
- $catid = intval(hesk_GET('catid')) or hesk_error($hesklang['cat_move_id']);
- $_SESSION['selcat2'] = $catid;
-
- if (intval(hesk_GET('s'))) {
- $autoassign = 1;
- $tmp = $hesklang['caaon'];
- } else {
- $autoassign = 0;
- $tmp = $hesklang['caaoff'];
- }
-
- /* Update auto-assign settings */
- $res = hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `autoassign`='" . intval($autoassign) . "' WHERE `id`='" . intval($catid) . "'");
- if (hesk_dbAffectedRows() != 1) {
- hesk_process_messages($hesklang['int_error'] . ': ' . $hesklang['cat_not_found'], './manage_categories.php');
- }
-
- hesk_process_messages($tmp, './manage_categories.php', 'SUCCESS');
-
-} // End toggle_autoassign()
-
-
-function toggle_type()
-{
- global $hesk_settings, $hesklang;
-
- /* A security check */
- hesk_token_check();
-
- $catid = intval(hesk_GET('catid')) or hesk_error($hesklang['cat_move_id']);
- $_SESSION['selcat2'] = $catid;
-
- if (intval(hesk_GET('s'))) {
- $type = 1;
- $tmp = $hesklang['cpriv'];
- } else {
- $type = 0;
- $tmp = $hesklang['cpub'];
- }
-
- /* Update auto-assign settings */
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `type`='{$type}' WHERE `id`='" . intval($catid) . "'");
- if (hesk_dbAffectedRows() != 1) {
- hesk_process_messages($hesklang['int_error'] . ': ' . $hesklang['cat_not_found'], './manage_categories.php');
- }
-
- hesk_process_messages($tmp, './manage_categories.php', 'SUCCESS');
-
-} // End toggle_type()
-
-function output_user_dropdown($userArray)
-{
- global $hesklang;
-
- if (!hesk_checkPermission('can_set_manager', 0)) {
- foreach ($userArray as $user) {
- if ($user['id'] == $selectId) {
- return '
' . $user['name'] . '
';
- }
- }
- return '
' . $hesklang['no_manager'] . '
';
- } else {
- $dropdownMarkup = '
';
-
-
- return $dropdownMarkup;
- }
-}
-
-function get_manager($user_id, $user_array) {
- global $hesklang;
-
- if ($user_id == 0) {
- return $hesklang['no_manager'];
- }
-
- foreach ($user_array as $user) {
- if ($user['id'] == $user_id) {
- return $user['name'];
- }
- }
-
- return 'Error!';
-}
-
?>
diff --git a/admin/manage_users.php b/admin/manage_users.php
index 2ed5999a..4159d638 100644
--- a/admin/manage_users.php
+++ b/admin/manage_users.php
@@ -621,31 +621,6 @@ function update_user()
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `owner`=0 WHERE `owner`='" . intval($myuser['id']) . "' AND `category` NOT IN (" . $myuser['categories'] . ")");
}
- // Find the list of categories they are manager of. If they no longer have access to the category, revoke their manager permission.
- if ($myuser['isadmin']) {
- // Admins can't be managers
- hesk_dbQuery('UPDATE `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'categories` SET `manager` = 0 WHERE `manager` = ' . intval($myuser['id']));
- } else {
- $currentCatRs = hesk_dbQuery("SELECT `categories` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` WHERE `id` = '" . intval($myuser['id']) . "' LIMIT 1");
- $rowOfCategories = hesk_dbFetchAssoc($currentCatRs);
- $cats = $rowOfCategories['categories'];
- $currentCategories = explode(',', $cats);
- $newCategories = explode(',', $myuser['categories']);
-
- // If any any elements are in current but not in new, add them to the revoke array
- $revokeCats = array();
- foreach ($currentCategories as $currentCategory) {
- if (!in_array($currentCategory, $newCategories) && $currentCategory != '') {
- array_push($revokeCats, $currentCategory);
- }
- }
-
- if (count($revokeCats) > 0) {
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `manager` = 0 WHERE `id` IN (" . implode(',', $revokeCats) . ")");
- }
- }
-
-
hesk_dbQuery(
"UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` SET
`user`='" . hesk_dbEscape($myuser['user']) . "',
@@ -676,11 +651,6 @@ function update_user()
`default_calendar_view`=" . intval($myuser['default_calendar_view']) . "
WHERE `id`='" . intval($myuser['id']) . "'");
- // If they are now inactive, remove any manager rights
- if (!$myuser['active']) {
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `manager` = 0 WHERE `manager` = " . intval($myuser['id']));
- }
-
unset($_SESSION['save_userdata']);
unset($_SESSION['userdata']);
@@ -844,9 +814,6 @@ function remove()
hesk_process_messages($hesklang['cant_del_own'], './manage_users.php');
}
- // Revoke manager rights
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `manager` = 0 WHERE `manager` = " . intval($myuser));
-
/* Un-assign all tickets for this user */
$res = hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `owner`=0 WHERE `owner`='" . intval($myuser) . "'");
@@ -910,9 +877,6 @@ function toggle_active()
$active = 0;
$tmp = $hesklang['user_deactivated'];
- // Revoke any manager rights
- hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `manager` = 0 WHERE `manager` = " . intval($myuser));
-
$notificationSql = ", `autoassign` = '0', `notify_new_unassigned` = '0', `notify_new_my` = '0', `notify_reply_unassigned` = '0',
`notify_reply_my` = '0', `notify_assigned` = '0', `notify_pm` = '0', `notify_note` = '0', `notify_note_unassigned` = '0', `notify_overdue_unassigned` = '0'";
}
diff --git a/admin/new_ticket.php b/admin/new_ticket.php
index 9233b35b..e831ec15 100644
--- a/admin/new_ticket.php
+++ b/admin/new_ticket.php
@@ -113,13 +113,13 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
$hesk_settings['categories'] = array();
if (hesk_checkPermission('can_submit_any_cat', 0)) {
- $res = hesk_dbQuery("SELECT `id`, `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `cat_order` ASC");
+ $res = hesk_dbQuery("SELECT `id`, `name`, `mfh_description` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `cat_order` ASC");
} else {
- $res = hesk_dbQuery("SELECT `id`, `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` WHERE ".hesk_myCategories('id')." ORDER BY `cat_order` ASC");
+ $res = hesk_dbQuery("SELECT `id`, `name`, `mfh_description` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` WHERE ".hesk_myCategories('id')." ORDER BY `cat_order` ASC");
}
while ($row = hesk_dbFetchAssoc($res)) {
- $hesk_settings['categories'][$row['id']] = $row['name'];
+ $hesk_settings['categories'][$row['id']] = $row;
}
$number_of_categories = count($hesk_settings['categories']);
@@ -147,7 +147,7 @@ $show_quick_help = $show['show'];
1): ?>
-
+
@@ -1038,9 +1038,10 @@ function print_select_category($number_of_categories) {
// Print a select box if number of categories is large
if ($number_of_categories > $hesk_settings['cat_show_select'])
{
+ $firstDescription = null;
?>
+
» '.$v.'';
$new_row = 1;
foreach ($hesk_settings['categories'] as $k=>$v):
@@ -1079,7 +1102,14 @@ function print_select_category($number_of_categories) {
diff --git a/api/ApplicationContext.php b/api/ApplicationContext.php
deleted file mode 100644
index dae5a238..00000000
--- a/api/ApplicationContext.php
+++ /dev/null
@@ -1,142 +0,0 @@
-get = array();
-
- // Settings
- $this->get[ModsForHeskSettingsGateway::class] = new ModsForHeskSettingsGateway();
-
- // API Checker
- $this->get[ApiChecker::class] = new ApiChecker($this->get[ModsForHeskSettingsGateway::class]);
-
- // Custom Navigation
- $this->get[CustomNavElementGateway::class] = new CustomNavElementGateway();
- $this->get[CustomNavElementHandler::class] = new CustomNavElementHandler($this->get[CustomNavElementGateway::class]);
-
- // Logging
- $this->get[LoggingGateway::class] = new LoggingGateway();
-
- // Verified Email Checker
- $this->get[VerifiedEmailGateway::class] = new VerifiedEmailGateway();
- $this->get[VerifiedEmailChecker::class] = new VerifiedEmailChecker($this->get[VerifiedEmailGateway::class]);
-
- // Users
- $this->get[UserGateway::class] = new UserGateway();
- $this->get[UserContextBuilder::class] = new UserContextBuilder($this->get[UserGateway::class]);
-
- // Categories
- $this->get[CategoryGateway::class] = new CategoryGateway();
- $this->get[CategoryRetriever::class] = new CategoryRetriever($this->get[CategoryGateway::class]);
-
- // Bans
- $this->get[BanGateway::class] = new BanGateway();
- $this->get[BanRetriever::class] = new BanRetriever($this->get[BanGateway::class]);
-
- // Statuses
- $this->get[StatusGateway::class] = new StatusGateway();
-
- // Email Sender
- $this->get[EmailTemplateRetriever::class] = new EmailTemplateRetriever();
- $this->get[EmailTemplateParser::class] = new EmailTemplateParser($this->get[StatusGateway::class],
- $this->get[CategoryGateway::class],
- $this->get[UserGateway::class],
- $this->get[EmailTemplateRetriever::class]);
- $this->get[BasicEmailSender::class] = new BasicEmailSender();
- $this->get[MailgunEmailSender::class] = new MailgunEmailSender();
- $this->get[EmailSenderHelper::class] = new EmailSenderHelper($this->get[EmailTemplateParser::class],
- $this->get[BasicEmailSender::class],
- $this->get[MailgunEmailSender::class]);
-
- // Tickets
- $this->get[UserToTicketChecker::class] = new UserToTicketChecker($this->get[UserGateway::class]);
- $this->get[TicketGateway::class] = new TicketGateway();
- $this->get[TicketRetriever::class] = new TicketRetriever($this->get[TicketGateway::class],
- $this->get[UserToTicketChecker::class]);
- $this->get[TicketValidators::class] = new TicketValidators($this->get[TicketGateway::class]);
- $this->get[TrackingIdGenerator::class] = new TrackingIdGenerator($this->get[TicketGateway::class]);
- $this->get[Autoassigner::class] = new Autoassigner($this->get[CategoryGateway::class], $this->get[UserGateway::class]);
- $this->get[NewTicketValidator::class] = new NewTicketValidator($this->get[CategoryRetriever::class],
- $this->get[BanRetriever::class],
- $this->get[TicketValidators::class]);
- $this->get[TicketCreator::class] = new TicketCreator($this->get[NewTicketValidator::class],
- $this->get[TrackingIdGenerator::class],
- $this->get[Autoassigner::class],
- $this->get[StatusGateway::class],
- $this->get[TicketGateway::class],
- $this->get[VerifiedEmailChecker::class],
- $this->get[EmailSenderHelper::class],
- $this->get[UserGateway::class],
- $this->get[ModsForHeskSettingsGateway::class]);
- $this->get[FileWriter::class] = new FileWriter();
- $this->get[FileReader::class] = new FileReader();
- $this->get[FileDeleter::class] = new FileDeleter();
- $this->get[AttachmentGateway::class] = new AttachmentGateway();
- $this->get[AttachmentHandler::class] = new AttachmentHandler($this->get[TicketGateway::class],
- $this->get[AttachmentGateway::class],
- $this->get[FileWriter::class],
- $this->get[UserToTicketChecker::class],
- $this->get[FileDeleter::class]);
- $this->get[AttachmentRetriever::class] = new AttachmentRetriever($this->get[AttachmentGateway::class],
- $this->get[FileReader::class],
- $this->get[TicketGateway::class],
- $this->get[UserToTicketChecker::class]);
- $this->get[TicketDeleter::class] =
- new TicketDeleter($this->get[TicketGateway::class],
- $this->get[UserToTicketChecker::class],
- $this->get[AttachmentHandler::class]);
- $this->get[TicketEditor::class] =
- new TicketEditor($this->get[TicketGateway::class], $this->get[UserToTicketChecker::class]);
-
- // Statuses
- $this->get[StatusRetriever::class] = new StatusRetriever($this->get[StatusGateway::class]);
-
- // Settings
- $this->get[SettingsRetriever::class] = new SettingsRetriever($this->get[ModsForHeskSettingsGateway::class]);
- }
-}
\ No newline at end of file
diff --git a/api/BusinessLogic/Attachments/AttachmentHandler.php b/api/BusinessLogic/Attachments/AttachmentHandler.php
index 3a874ae9..08c3d39a 100644
--- a/api/BusinessLogic/Attachments/AttachmentHandler.php
+++ b/api/BusinessLogic/Attachments/AttachmentHandler.php
@@ -33,7 +33,11 @@ class AttachmentHandler {
/* @var $userToTicketChecker UserToTicketChecker */
private $userToTicketChecker;
- function __construct($ticketGateway, $attachmentGateway, $fileWriter, $userToTicketChecker, $fileDeleter) {
+ function __construct(TicketGateway $ticketGateway,
+ AttachmentGateway $attachmentGateway,
+ FileWriter $fileWriter,
+ UserToTicketChecker $userToTicketChecker,
+ FileDeleter $fileDeleter) {
$this->ticketGateway = $ticketGateway;
$this->attachmentGateway = $attachmentGateway;
$this->fileWriter = $fileWriter;
diff --git a/api/BusinessLogic/Categories/Category.php b/api/BusinessLogic/Categories/Category.php
index 755188f3..bf17c56e 100644
--- a/api/BusinessLogic/Categories/Category.php
+++ b/api/BusinessLogic/Categories/Category.php
@@ -52,12 +52,17 @@ class Category {
public $priority;
/**
- * @var int|null The manager for the Categories, if applicable
+ * @var bool Indication if the user has access to the Categories
*/
- public $manager;
+ public $accessible;
/**
- * @var bool Indication if the user has access to the Categories
+ * @var string
*/
- public $accessible;
+ public $description;
+
+ /**
+ * @var int
+ */
+ public $numberOfTickets;
}
\ No newline at end of file
diff --git a/api/BusinessLogic/Categories/CategoryHandler.php b/api/BusinessLogic/Categories/CategoryHandler.php
new file mode 100644
index 00000000..4c3451ac
--- /dev/null
+++ b/api/BusinessLogic/Categories/CategoryHandler.php
@@ -0,0 +1,190 @@
+categoryGateway = $categoryGateway;
+ $this->ticketGateway = $ticketGateway;
+ $this->permissionChecker = $permissionChecker;
+ $this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway;
+ }
+
+ /**
+ * @param $category Category
+ * @param $userContext
+ * @param $heskSettings array
+ * @return Category The newly created category with ID
+ * @throws ValidationException When validation fails
+ * @throws \Exception When the newly created category was not retrieved
+ */
+ //TODO Test
+ function createCategory($category, $userContext, $heskSettings) {
+ $modsForHeskSettings = $this->modsForHeskSettingsGateway->getAllSettings($heskSettings);
+
+ $validationModel = $this->validate($category, $userContext);
+
+ if (count($validationModel->errorKeys) > 0) {
+ throw new ValidationException($validationModel);
+ }
+
+ $id = $this->categoryGateway->createCategory($category, $heskSettings);
+
+ $allCategories = $this->categoryGateway->getAllCategories($heskSettings, $modsForHeskSettings);
+
+ foreach ($allCategories as $innerCategory) {
+ if ($innerCategory->id === $id) {
+ return $innerCategory;
+ }
+ }
+
+ throw new \Exception("Newly created category {$id} lost! :O");
+ }
+
+ /**
+ * @param $category Category
+ * @param $userContext
+ * @param $creating bool
+ * @return ValidationModel
+ * @throws AccessViolationException
+ */
+ //TODO Test
+ private function validate($category, $userContext, $creating = true) {
+ $validationModel = new ValidationModel();
+
+ if (!$this->permissionChecker->doesUserHavePermission($userContext, UserPrivilege::CAN_MANAGE_CATEGORIES)) {
+ throw new AccessViolationException('User cannot manage categories!');
+ }
+
+ if (!$creating && $category->id < 1) {
+ $validationModel->errorKeys[] = 'ID_MISSING';
+ }
+
+ if ($category->backgroundColor === null || trim($category->backgroundColor) === '') {
+ $validationModel->errorKeys[] = 'BACKGROUND_COLOR_MISSING';
+ }
+
+ if ($category->foregroundColor === null || trim($category->foregroundColor) === '') {
+ $validationModel->errorKeys[] = 'FOREGROUND_COLOR_MISSING';
+ }
+
+ if ($category->name === null || trim($category->name) === '') {
+ $validationModel->errorKeys[] = 'NAME_MISSING';
+ }
+
+ if ($category->priority === null || intval($category->priority) < 0 || intval($category->priority) > 3) {
+ $validationModel->errorKeys[] = 'INVALID_PRIORITY';
+ }
+
+ if ($category->autoAssign === null || !is_bool($category->autoAssign)) {
+ $validationModel->errorKeys[] = 'INVALID_AUTOASSIGN';
+ }
+
+ if ($category->displayBorder === null || !is_bool($category->displayBorder)) {
+ $validationModel->errorKeys[] = 'INVALID_DISPLAY_BORDER';
+ }
+
+ if ($category->type === null || (intval($category->type) !== 0 && intval($category->type) !== 1)) {
+ $validationModel->errorKeys[] = 'INVALID_TYPE';
+ }
+
+ return $validationModel;
+ }
+
+ /**
+ * @param $category Category
+ * @param $userContext
+ * @param $heskSettings array
+ * @return Category
+ * @throws ValidationException
+ * @throws \Exception When the category is missing
+ */
+ function editCategory($category, $userContext, $heskSettings) {
+ $modsForHeskSettings = $this->modsForHeskSettingsGateway->getAllSettings($heskSettings);
+
+ $validationModel = $this->validate($category, $userContext, false);
+
+ if (count($validationModel->errorKeys) > 0) {
+ throw new ValidationException($validationModel);
+ }
+
+ $this->categoryGateway->updateCategory($category, $heskSettings);
+ $this->categoryGateway->resortAllCategories($heskSettings);
+
+ $allCategories = $this->categoryGateway->getAllCategories($heskSettings, $modsForHeskSettings);
+
+ foreach ($allCategories as $innerCategory) {
+ if ($innerCategory->id === $category->id) {
+ return $innerCategory;
+ }
+ }
+
+ throw new \Exception("Category {$category->id} vanished! :O");
+ }
+
+ function deleteCategory($id, $userContext, $heskSettings) {
+ if (!$this->permissionChecker->doesUserHavePermission($userContext, UserPrivilege::CAN_MANAGE_CATEGORIES)) {
+ throw new AccessViolationException('User cannot manage categories!');
+ }
+
+ if ($id === 1) {
+ throw new \Exception("Category 1 cannot be deleted!");
+ }
+
+ $this->ticketGateway->moveTicketsToDefaultCategory($id, $heskSettings);
+ $this->categoryGateway->deleteCategory($id, $heskSettings);
+ $this->categoryGateway->resortAllCategories($heskSettings);
+ }
+
+ function sortCategory($id, $direction, $heskSettings) {
+ $modsForHeskSettings = $this->modsForHeskSettingsGateway->getAllSettings($heskSettings);
+
+ $categories = $this->categoryGateway->getAllCategories($heskSettings, $modsForHeskSettings);
+ $category = null;
+ foreach ($categories as $innerCategory) {
+ if ($innerCategory->id === intval($id)) {
+ $category = $innerCategory;
+ break;
+ }
+ }
+
+ if ($category === null) {
+ throw new \Exception("Could not find category with ID {$id}!");
+ }
+
+ if ($direction === Direction::UP) {
+ $category->catOrder -= 15;
+ } else {
+ $category->catOrder += 15;
+ }
+
+ $this->categoryGateway->updateCategory($category, $heskSettings);
+ $this->categoryGateway->resortAllCategories($heskSettings);
+ }
+}
\ No newline at end of file
diff --git a/api/BusinessLogic/Categories/CategoryRetriever.php b/api/BusinessLogic/Categories/CategoryRetriever.php
index 4a46466f..526d9f88 100644
--- a/api/BusinessLogic/Categories/CategoryRetriever.php
+++ b/api/BusinessLogic/Categories/CategoryRetriever.php
@@ -4,6 +4,7 @@ namespace BusinessLogic\Categories;
use BusinessLogic\Security\UserContext;
use DataAccess\Categories\CategoryGateway;
+use DataAccess\Settings\ModsForHeskSettingsGateway;
class CategoryRetriever {
/**
@@ -11,8 +12,15 @@ class CategoryRetriever {
*/
private $categoryGateway;
- function __construct($categoryGateway) {
+ /**
+ * @var ModsForHeskSettingsGateway
+ */
+ private $modsForHeskSettingsGateway;
+
+ function __construct(CategoryGateway $categoryGateway,
+ ModsForHeskSettingsGateway $modsForHeskSettingsGateway) {
$this->categoryGateway = $categoryGateway;
+ $this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway;
}
/**
@@ -21,7 +29,9 @@ class CategoryRetriever {
* @return array
*/
function getAllCategories($heskSettings, $userContext) {
- $categories = $this->categoryGateway->getAllCategories($heskSettings);
+ $modsForHeskSettings = $this->modsForHeskSettingsGateway->getAllSettings($heskSettings);
+
+ $categories = $this->categoryGateway->getAllCategories($heskSettings, $modsForHeskSettings);
foreach ($categories as $category) {
$category->accessible = $userContext->admin ||
diff --git a/api/BusinessLogic/Emails/EmailSenderHelper.php b/api/BusinessLogic/Emails/EmailSenderHelper.php
index b02453ab..5c6b23cb 100644
--- a/api/BusinessLogic/Emails/EmailSenderHelper.php
+++ b/api/BusinessLogic/Emails/EmailSenderHelper.php
@@ -21,7 +21,9 @@ class EmailSenderHelper {
*/
private $mailgunEmailSender;
- function __construct($emailTemplateParser, $basicEmailSender, $mailgunEmailSender) {
+ function __construct(EmailTemplateParser $emailTemplateParser,
+ BasicEmailSender $basicEmailSender,
+ MailgunEmailSender $mailgunEmailSender) {
$this->emailTemplateParser = $emailTemplateParser;
$this->basicEmailSender = $basicEmailSender;
$this->mailgunEmailSender = $mailgunEmailSender;
diff --git a/api/BusinessLogic/Emails/EmailTemplateParser.php b/api/BusinessLogic/Emails/EmailTemplateParser.php
index e53a03b2..e96db960 100644
--- a/api/BusinessLogic/Emails/EmailTemplateParser.php
+++ b/api/BusinessLogic/Emails/EmailTemplateParser.php
@@ -35,7 +35,10 @@ class EmailTemplateParser {
*/
private $emailTemplateRetriever;
- function __construct($statusGateway, $categoryGateway, $userGateway, $emailTemplateRetriever) {
+ function __construct(StatusGateway $statusGateway,
+ CategoryGateway $categoryGateway,
+ UserGateway $userGateway,
+ EmailTemplateRetriever $emailTemplateRetriever) {
$this->statusGateway = $statusGateway;
$this->categoryGateway = $categoryGateway;
$this->userGateway = $userGateway;
@@ -50,6 +53,7 @@ class EmailTemplateParser {
* @param $modsForHeskSettings array
* @return ParsedEmailProperties
* @throws InvalidEmailTemplateException
+ * @throws \Exception
*/
function getFormattedEmailForLanguage($templateId, $languageCode, $ticket, $heskSettings, $modsForHeskSettings) {
global $hesklang;
diff --git a/api/BusinessLogic/Emails/ParsedEmailProperties.php b/api/BusinessLogic/Emails/ParsedEmailProperties.php
index 5cbe594f..a0421bca 100644
--- a/api/BusinessLogic/Emails/ParsedEmailProperties.php
+++ b/api/BusinessLogic/Emails/ParsedEmailProperties.php
@@ -1,10 +1,4 @@
customNavElementGateway = $customNavElementGateway;
}
diff --git a/api/BusinessLogic/Security/BanRetriever.php b/api/BusinessLogic/Security/BanRetriever.php
index e44fa344..66213cf5 100644
--- a/api/BusinessLogic/Security/BanRetriever.php
+++ b/api/BusinessLogic/Security/BanRetriever.php
@@ -11,7 +11,7 @@ class BanRetriever {
*/
private $banGateway;
- function __construct($banGateway) {
+ function __construct(BanGateway $banGateway) {
$this->banGateway = $banGateway;
}
diff --git a/api/BusinessLogic/Security/PermissionChecker.php b/api/BusinessLogic/Security/PermissionChecker.php
new file mode 100644
index 00000000..cf2b1a43
--- /dev/null
+++ b/api/BusinessLogic/Security/PermissionChecker.php
@@ -0,0 +1,23 @@
+admin) {
+ return true;
+ }
+
+ if (in_array($permission, $userContext->permissions)) {
+ return true;
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/api/BusinessLogic/Security/UserContextBuilder.php b/api/BusinessLogic/Security/UserContextBuilder.php
index 65c4972e..7bb975ee 100644
--- a/api/BusinessLogic/Security/UserContextBuilder.php
+++ b/api/BusinessLogic/Security/UserContextBuilder.php
@@ -14,7 +14,7 @@ class UserContextBuilder {
*/
private $userGateway;
- function __construct($userGateway) {
+ function __construct(UserGateway $userGateway) {
$this->userGateway = $userGateway;
}
diff --git a/api/BusinessLogic/Security/UserPrivilege.php b/api/BusinessLogic/Security/UserPrivilege.php
index ad6064cc..1e90ff70 100644
--- a/api/BusinessLogic/Security/UserPrivilege.php
+++ b/api/BusinessLogic/Security/UserPrivilege.php
@@ -14,4 +14,5 @@ class UserPrivilege {
const CAN_REPLY_TO_TICKETS = 'can_reply_tickets';
const CAN_EDIT_TICKETS = 'can_edit_tickets';
const CAN_DELETE_TICKETS = 'can_del_tickets';
+ const CAN_MANAGE_CATEGORIES = 'can_man_cat';
}
\ No newline at end of file
diff --git a/api/BusinessLogic/Security/UserToTicketChecker.php b/api/BusinessLogic/Security/UserToTicketChecker.php
index 3da75192..0f21d785 100644
--- a/api/BusinessLogic/Security/UserToTicketChecker.php
+++ b/api/BusinessLogic/Security/UserToTicketChecker.php
@@ -10,7 +10,7 @@ class UserToTicketChecker {
/* @var $userGateway UserGateway */
private $userGateway;
- function __construct($userGateway) {
+ function __construct(UserGateway $userGateway) {
$this->userGateway = $userGateway;
}
@@ -31,12 +31,6 @@ class UserToTicketChecker {
return false;
}
- $categoryManagerId = $this->userGateway->getManagerForCategory($ticket->categoryId, $heskSettings);
-
- if ($user->id === $categoryManagerId) {
- return true;
- }
-
$extraPermissions[] = UserPrivilege::CAN_VIEW_TICKETS;
foreach ($extraPermissions as $permission) {
diff --git a/api/BusinessLogic/Settings/ApiChecker.php b/api/BusinessLogic/Settings/ApiChecker.php
index 863a6e06..8645dd5c 100644
--- a/api/BusinessLogic/Settings/ApiChecker.php
+++ b/api/BusinessLogic/Settings/ApiChecker.php
@@ -9,7 +9,7 @@ class ApiChecker {
/* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */
private $modsForHeskSettingsGateway;
- function __construct($modsForHeskSettingsGateway) {
+ function __construct(ModsForHeskSettingsGateway $modsForHeskSettingsGateway) {
$this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway;
}
diff --git a/api/BusinessLogic/Settings/SettingsRetriever.php b/api/BusinessLogic/Settings/SettingsRetriever.php
index e8db0e48..21eeb13a 100644
--- a/api/BusinessLogic/Settings/SettingsRetriever.php
+++ b/api/BusinessLogic/Settings/SettingsRetriever.php
@@ -9,7 +9,7 @@ class SettingsRetriever {
/* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */
private $modsForHeskSettingsGateway;
- function __construct($modsForHeskSettingsGateway) {
+ function __construct(ModsForHeskSettingsGateway $modsForHeskSettingsGateway) {
$this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway;
}
diff --git a/api/BusinessLogic/Statuses/StatusRetriever.php b/api/BusinessLogic/Statuses/StatusRetriever.php
index 0bcfe844..181ceae1 100644
--- a/api/BusinessLogic/Statuses/StatusRetriever.php
+++ b/api/BusinessLogic/Statuses/StatusRetriever.php
@@ -10,7 +10,7 @@ class StatusRetriever {
/* @var $statusGateway StatusGateway */
private $statusGateway;
- function __construct($statusGateway) {
+ function __construct(StatusGateway $statusGateway) {
$this->statusGateway = $statusGateway;
}
diff --git a/api/BusinessLogic/Tickets/Autoassigner.php b/api/BusinessLogic/Tickets/Autoassigner.php
index 49723095..e4095815 100644
--- a/api/BusinessLogic/Tickets/Autoassigner.php
+++ b/api/BusinessLogic/Tickets/Autoassigner.php
@@ -15,7 +15,8 @@ class Autoassigner {
/* @var $userGateway UserGateway */
private $userGateway;
- function __construct($categoryGateway, $userGateway) {
+ function __construct(CategoryGateway $categoryGateway,
+ UserGateway $userGateway) {
$this->categoryGateway = $categoryGateway;
$this->userGateway = $userGateway;
}
diff --git a/api/BusinessLogic/Tickets/NewTicketValidator.php b/api/BusinessLogic/Tickets/NewTicketValidator.php
index bb80a1f8..7697f860 100644
--- a/api/BusinessLogic/Tickets/NewTicketValidator.php
+++ b/api/BusinessLogic/Tickets/NewTicketValidator.php
@@ -24,7 +24,9 @@ class NewTicketValidator {
*/
private $ticketValidators;
- function __construct($categoryRetriever, $banRetriever, $ticketValidators) {
+ function __construct(CategoryRetriever $categoryRetriever,
+ BanRetriever $banRetriever,
+ TicketValidators $ticketValidators) {
$this->categoryRetriever = $categoryRetriever;
$this->banRetriever = $banRetriever;
$this->ticketValidators = $ticketValidators;
diff --git a/api/BusinessLogic/Tickets/TicketCreator.php b/api/BusinessLogic/Tickets/TicketCreator.php
index 245da2a1..d9e8c346 100644
--- a/api/BusinessLogic/Tickets/TicketCreator.php
+++ b/api/BusinessLogic/Tickets/TicketCreator.php
@@ -56,8 +56,15 @@ class TicketCreator {
/* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */
private $modsForHeskSettingsGateway;
- function __construct($newTicketValidator, $trackingIdGenerator, $autoassigner, $statusGateway, $ticketGateway,
- $verifiedEmailChecker, $emailSenderHelper, $userGateway, $modsForHeskSettingsGateway) {
+ function __construct(NewTicketValidator $newTicketValidator,
+ TrackingIdGenerator $trackingIdGenerator,
+ Autoassigner $autoassigner,
+ StatusGateway $statusGateway,
+ TicketGateway $ticketGateway,
+ VerifiedEmailChecker $verifiedEmailChecker,
+ EmailSenderHelper $emailSenderHelper,
+ UserGateway $userGateway,
+ ModsForHeskSettingsGateway $modsForHeskSettingsGateway) {
$this->newTicketValidator = $newTicketValidator;
$this->trackingIdGenerator = $trackingIdGenerator;
$this->autoassigner = $autoassigner;
diff --git a/api/BusinessLogic/Tickets/TicketDeleter.php b/api/BusinessLogic/Tickets/TicketDeleter.php
index fde51ee7..7d1fa4d9 100644
--- a/api/BusinessLogic/Tickets/TicketDeleter.php
+++ b/api/BusinessLogic/Tickets/TicketDeleter.php
@@ -20,7 +20,9 @@ class TicketDeleter {
/* @var $attachmentHandler AttachmentHandler */
private $attachmentHandler;
- function __construct($ticketGateway, $userToTicketChecker, $attachmentHandler) {
+ function __construct(TicketGateway $ticketGateway,
+ UserToTicketChecker $userToTicketChecker,
+ AttachmentHandler $attachmentHandler) {
$this->ticketGateway = $ticketGateway;
$this->userToTicketChecker = $userToTicketChecker;
$this->attachmentHandler = $attachmentHandler;
diff --git a/api/BusinessLogic/Tickets/TicketEditor.php b/api/BusinessLogic/Tickets/TicketEditor.php
index a5fe9774..ac0bca61 100644
--- a/api/BusinessLogic/Tickets/TicketEditor.php
+++ b/api/BusinessLogic/Tickets/TicketEditor.php
@@ -22,7 +22,8 @@ class TicketEditor {
/* @var $userToTicketChecker UserToTicketChecker */
private $userToTicketChecker;
- function __construct($ticketGateway, $userToTicketChecker) {
+ function __construct(TicketGateway $ticketGateway,
+ UserToTicketChecker $userToTicketChecker) {
$this->ticketGateway = $ticketGateway;
$this->userToTicketChecker = $userToTicketChecker;
}
diff --git a/api/BusinessLogic/Tickets/TicketRetriever.php b/api/BusinessLogic/Tickets/TicketRetriever.php
index 5a237a98..569210ef 100644
--- a/api/BusinessLogic/Tickets/TicketRetriever.php
+++ b/api/BusinessLogic/Tickets/TicketRetriever.php
@@ -19,7 +19,8 @@ class TicketRetriever {
/* @var $userToTicketChecker UserToTicketChecker */
private $userToTicketChecker;
- function __construct($ticketGateway, $userToTicketChecker) {
+ function __construct(TicketGateway $ticketGateway,
+ UserToTicketChecker $userToTicketChecker) {
$this->ticketGateway = $ticketGateway;
$this->userToTicketChecker = $userToTicketChecker;
}
diff --git a/api/BusinessLogic/Tickets/TicketValidators.php b/api/BusinessLogic/Tickets/TicketValidators.php
index 15a53bb3..ff310757 100644
--- a/api/BusinessLogic/Tickets/TicketValidators.php
+++ b/api/BusinessLogic/Tickets/TicketValidators.php
@@ -10,7 +10,7 @@ class TicketValidators {
*/
private $ticketGateway;
- function __construct($ticketGateway) {
+ function __construct(TicketGateway $ticketGateway) {
$this->ticketGateway = $ticketGateway;
}
diff --git a/api/BusinessLogic/Tickets/TrackingIdGenerator.php b/api/BusinessLogic/Tickets/TrackingIdGenerator.php
index 623ab1fe..892953e5 100644
--- a/api/BusinessLogic/Tickets/TrackingIdGenerator.php
+++ b/api/BusinessLogic/Tickets/TrackingIdGenerator.php
@@ -12,7 +12,7 @@ class TrackingIdGenerator {
*/
private $ticketGateway;
- function __construct($ticketGateway) {
+ function __construct(TicketGateway $ticketGateway) {
$this->ticketGateway = $ticketGateway;
}
diff --git a/api/BusinessLogic/Tickets/VerifiedEmailChecker.php b/api/BusinessLogic/Tickets/VerifiedEmailChecker.php
index fccb32fc..3846fbc3 100644
--- a/api/BusinessLogic/Tickets/VerifiedEmailChecker.php
+++ b/api/BusinessLogic/Tickets/VerifiedEmailChecker.php
@@ -17,7 +17,7 @@ class VerifiedEmailChecker {
*/
private $verifiedEmailGateway;
- function __construct($verifiedEmailGateway) {
+ function __construct(VerifiedEmailGateway $verifiedEmailGateway) {
$this->verifiedEmailGateway = $verifiedEmailGateway;
}
diff --git a/api/Controllers/Attachments/PublicAttachmentController.php b/api/Controllers/Attachments/PublicAttachmentController.php
index c5e9077c..c12325a5 100644
--- a/api/Controllers/Attachments/PublicAttachmentController.php
+++ b/api/Controllers/Attachments/PublicAttachmentController.php
@@ -14,7 +14,7 @@ class PublicAttachmentController {
self::verifyAttachmentsAreEnabled($hesk_settings);
/* @var $attachmentRetriever AttachmentRetriever */
- $attachmentRetriever = $applicationContext->get[AttachmentRetriever::class];
+ $attachmentRetriever = $applicationContext->get(AttachmentRetriever::class);
$attachment = $attachmentRetriever->getAttachmentContentsForTrackingId($trackingId, $attachmentId, $userContext, $hesk_settings);
diff --git a/api/Controllers/Attachments/StaffTicketAttachmentsController.php b/api/Controllers/Attachments/StaffTicketAttachmentsController.php
index 1d32f812..7f6a09c0 100644
--- a/api/Controllers/Attachments/StaffTicketAttachmentsController.php
+++ b/api/Controllers/Attachments/StaffTicketAttachmentsController.php
@@ -18,7 +18,7 @@ class StaffTicketAttachmentsController {
$this->verifyAttachmentsAreEnabled($hesk_settings);
/* @var $attachmentRetriever AttachmentRetriever */
- $attachmentRetriever = $applicationContext->get[AttachmentRetriever::class];
+ $attachmentRetriever = $applicationContext->get(AttachmentRetriever::class);
$contents = $attachmentRetriever->getAttachmentContentsForTicket($ticketId, $attachmentId, $userContext, $hesk_settings);
@@ -37,7 +37,7 @@ class StaffTicketAttachmentsController {
$this->verifyAttachmentsAreEnabled($hesk_settings);
/* @var $attachmentHandler AttachmentHandler */
- $attachmentHandler = $applicationContext->get[AttachmentHandler::class];
+ $attachmentHandler = $applicationContext->get(AttachmentHandler::class);
$createAttachmentForTicketModel = $this->createModel(JsonRetriever::getJsonData(), $ticketId);
@@ -61,7 +61,7 @@ class StaffTicketAttachmentsController {
global $applicationContext, $hesk_settings, $userContext;
/* @var $attachmentHandler AttachmentHandler */
- $attachmentHandler = $applicationContext->get[AttachmentHandler::class];
+ $attachmentHandler = $applicationContext->get(AttachmentHandler::class);
$attachmentHandler->deleteAttachmentFromTicket($ticketId, $attachmentId, $userContext, $hesk_settings);
diff --git a/api/Controllers/Categories/CategoryController.php b/api/Controllers/Categories/CategoryController.php
index e376afef..0ef2bf75 100644
--- a/api/Controllers/Categories/CategoryController.php
+++ b/api/Controllers/Categories/CategoryController.php
@@ -2,18 +2,24 @@
namespace Controllers\Categories;
+use BusinessLogic\Categories\Category;
+use BusinessLogic\Categories\CategoryHandler;
use BusinessLogic\Categories\CategoryRetriever;
use BusinessLogic\Exceptions\ApiFriendlyException;
+use BusinessLogic\Helpers;
+use Controllers\JsonRetriever;
class CategoryController {
function get($id) {
$categories = self::getAllCategories();
- if (!isset($categories[$id])) {
- throw new ApiFriendlyException("Category {$id} not found!", "Category Not Found", 404);
+ foreach ($categories as $category) {
+ if ($category->id === $id) {
+ return output($category);
+ }
}
- output($categories[$id]);
+ throw new ApiFriendlyException("Category {$id} not found!", "Category Not Found", 404);
}
static function printAllCategories() {
@@ -24,8 +30,80 @@ class CategoryController {
global $hesk_settings, $applicationContext, $userContext;
/* @var $categoryRetriever CategoryRetriever */
- $categoryRetriever = $applicationContext->get[CategoryRetriever::class];
+ $categoryRetriever = $applicationContext->get(CategoryRetriever::class);
return $categoryRetriever->getAllCategories($hesk_settings, $userContext);
}
+
+ function post() {
+ global $hesk_settings, $userContext, $applicationContext;
+
+ $data = JsonRetriever::getJsonData();
+
+ $category = $this->buildCategoryFromJson($data);
+
+ /* @var $categoryHandler CategoryHandler */
+ $categoryHandler = $applicationContext->get(CategoryHandler::class);
+
+ $category = $categoryHandler->createCategory($category, $userContext, $hesk_settings);
+
+ return output($category, 201);
+ }
+
+ /**
+ * @param $json
+ * @return Category
+ */
+ private function buildCategoryFromJson($json) {
+ $category = new Category();
+
+ $category->autoAssign = Helpers::safeArrayGet($json, 'autoassign');
+ $category->backgroundColor = Helpers::safeArrayGet($json, 'backgroundColor');
+ $category->catOrder = Helpers::safeArrayGet($json, 'catOrder');
+ $category->description = Helpers::safeArrayGet($json, 'description');
+ $category->displayBorder = Helpers::safeArrayGet($json, 'displayBorder');
+ $category->foregroundColor = Helpers::safeArrayGet($json, 'foregroundColor');
+ $category->name = Helpers::safeArrayGet($json, 'name');
+ $category->priority = Helpers::safeArrayGet($json, 'priority');
+ $category->type = Helpers::safeArrayGet($json, 'type');
+ $category->usage = Helpers::safeArrayGet($json, 'usage');
+
+ return $category;
+ }
+
+ function put($id) {
+ global $hesk_settings, $userContext, $applicationContext;
+
+ $data = JsonRetriever::getJsonData();
+
+ $category = $this->buildCategoryFromJson($data);
+ $category->id = intval($id);
+
+ /* @var $categoryHandler CategoryHandler */
+ $categoryHandler = $applicationContext->get(CategoryHandler::class);
+
+ $category = $categoryHandler->editCategory($category, $userContext, $hesk_settings);
+
+ return output($category);
+ }
+
+ function delete($id) {
+ global $hesk_settings, $userContext, $applicationContext;
+
+ /* @var $categoryHandler CategoryHandler */
+ $categoryHandler = $applicationContext->get(CategoryHandler::class);
+
+ $categoryHandler->deleteCategory($id, $userContext, $hesk_settings);
+
+ return http_response_code(204);
+ }
+
+ static function sort($id, $direction) {
+ global $applicationContext, $hesk_settings;
+
+ /* @var $handler CategoryHandler */
+ $handler = $applicationContext->get(CategoryHandler::class);
+
+ $handler->sortCategory(intval($id), $direction, $hesk_settings);
+ }
}
\ No newline at end of file
diff --git a/api/Controllers/Navigation/CustomNavElementController.php b/api/Controllers/Navigation/CustomNavElementController.php
index d4a514e7..8196eb16 100644
--- a/api/Controllers/Navigation/CustomNavElementController.php
+++ b/api/Controllers/Navigation/CustomNavElementController.php
@@ -3,7 +3,6 @@
namespace Controllers\Navigation;
-use BusinessLogic\Exceptions\ApiFriendlyException;
use BusinessLogic\Helpers;
use BusinessLogic\Navigation\CustomNavElement;
use BusinessLogic\Navigation\CustomNavElementHandler;
@@ -17,7 +16,7 @@ class CustomNavElementController extends InternalApiController {
self::staticCheckForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
output($handler->getAllCustomNavElements($hesk_settings));
}
@@ -28,7 +27,7 @@ class CustomNavElementController extends InternalApiController {
self::staticCheckForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
$handler->sortCustomNavElement(intval($id), $direction, $hesk_settings);
}
@@ -39,7 +38,7 @@ class CustomNavElementController extends InternalApiController {
$this->checkForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
output($handler->getCustomNavElement($id, $hesk_settings));
}
@@ -50,7 +49,7 @@ class CustomNavElementController extends InternalApiController {
$this->checkForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
$data = JsonRetriever::getJsonData();
$element = $handler->createCustomNavElement($this->buildElementModel($data), $hesk_settings);
@@ -64,7 +63,7 @@ class CustomNavElementController extends InternalApiController {
$this->checkForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
$data = JsonRetriever::getJsonData();
$handler->saveCustomNavElement($this->buildElementModel($data, $id), $hesk_settings);
@@ -78,7 +77,7 @@ class CustomNavElementController extends InternalApiController {
$this->checkForInternalUseOnly();
/* @var $handler CustomNavElementHandler */
- $handler = $applicationContext->get[CustomNavElementHandler::class];
+ $handler = $applicationContext->get(CustomNavElementHandler::class);
$handler->deleteCustomNavElement($id, $hesk_settings);
diff --git a/api/Controllers/Settings/SettingsController.php b/api/Controllers/Settings/SettingsController.php
index c8e53941..4e66016a 100644
--- a/api/Controllers/Settings/SettingsController.php
+++ b/api/Controllers/Settings/SettingsController.php
@@ -7,11 +7,11 @@ use BusinessLogic\Settings\SettingsRetriever;
class SettingsController {
function get() {
- global $applicationContext, $hesk_settings, $modsForHesk_settings;
+ global $applicationContext, $hesk_settings;
/* @var $settingsRetriever SettingsRetriever */
- $settingsRetriever = $applicationContext->get[SettingsRetriever::class];
+ $settingsRetriever = $applicationContext->get(SettingsRetriever::class);
- output($settingsRetriever->getAllSettings($hesk_settings, $modsForHesk_settings));
+ output($settingsRetriever->getAllSettings($hesk_settings));
}
}
\ No newline at end of file
diff --git a/api/Controllers/Statuses/StatusController.php b/api/Controllers/Statuses/StatusController.php
index f9e2f087..536c6b60 100644
--- a/api/Controllers/Statuses/StatusController.php
+++ b/api/Controllers/Statuses/StatusController.php
@@ -10,7 +10,7 @@ class StatusController {
global $applicationContext, $hesk_settings;
/* @var $statusRetriever StatusRetriever */
- $statusRetriever = $applicationContext->get[StatusRetriever::class];
+ $statusRetriever = $applicationContext->get(StatusRetriever::class);
output($statusRetriever->getAllStatuses($hesk_settings));
}
diff --git a/api/Controllers/Tickets/CustomerTicketController.php b/api/Controllers/Tickets/CustomerTicketController.php
index cd8e9481..2b1b2614 100644
--- a/api/Controllers/Tickets/CustomerTicketController.php
+++ b/api/Controllers/Tickets/CustomerTicketController.php
@@ -18,7 +18,7 @@ class CustomerTicketController {
$emailAddress = isset($_GET['email']) ? $_GET['email'] : null;
/* @var $ticketRetriever TicketRetriever */
- $ticketRetriever = $applicationContext->get[TicketRetriever::class];
+ $ticketRetriever = $applicationContext->get(TicketRetriever::class);
output($ticketRetriever->getTicketByTrackingIdAndEmail($trackingId, $emailAddress, $hesk_settings));
}
@@ -27,7 +27,7 @@ class CustomerTicketController {
global $applicationContext, $hesk_settings, $userContext;
/* @var $ticketCreator TicketCreator */
- $ticketCreator = $applicationContext->get[TicketCreator::class];
+ $ticketCreator = $applicationContext->get(TicketCreator::class);
$jsonRequest = JsonRetriever::getJsonData();
diff --git a/api/Controllers/Tickets/ResendTicketEmailToCustomerController.php b/api/Controllers/Tickets/ResendTicketEmailToCustomerController.php
index 79fb5a62..fe2aa7be 100644
--- a/api/Controllers/Tickets/ResendTicketEmailToCustomerController.php
+++ b/api/Controllers/Tickets/ResendTicketEmailToCustomerController.php
@@ -19,15 +19,15 @@ class ResendTicketEmailToCustomerController extends InternalApiController {
$this->checkForInternalUseOnly();
/* @var $ticketRetriever TicketRetriever */
- $ticketRetriever = $applicationContext->get[TicketRetriever::class];
+ $ticketRetriever = $applicationContext->get(TicketRetriever::class);
$ticket = $ticketRetriever->getTicketById($ticketId, $hesk_settings, $userContext);
/* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */
- $modsForHeskSettingsGateway = $applicationContext->get[ModsForHeskSettingsGateway::class];
+ $modsForHeskSettingsGateway = $applicationContext->get(ModsForHeskSettingsGateway::class);
$modsForHeskSettings = $modsForHeskSettingsGateway->getAllSettings($hesk_settings);
/* @var $emailSender EmailSenderHelper */
- $emailSender = $applicationContext->get[EmailSenderHelper::class];
+ $emailSender = $applicationContext->get(EmailSenderHelper::class);
$language = $ticket->language;
diff --git a/api/Controllers/Tickets/StaffTicketController.php b/api/Controllers/Tickets/StaffTicketController.php
index 001cd556..a4860f07 100644
--- a/api/Controllers/Tickets/StaffTicketController.php
+++ b/api/Controllers/Tickets/StaffTicketController.php
@@ -15,7 +15,7 @@ class StaffTicketController {
global $applicationContext, $userContext, $hesk_settings;
/* @var $ticketRetriever TicketRetriever */
- $ticketRetriever = $applicationContext->get[TicketRetriever::class];
+ $ticketRetriever = $applicationContext->get(TicketRetriever::class);
output($ticketRetriever->getTicketById($id, $hesk_settings, $userContext));
}
@@ -24,7 +24,7 @@ class StaffTicketController {
global $applicationContext, $userContext, $hesk_settings;
/* @var $ticketDeleter TicketDeleter */
- $ticketDeleter = $applicationContext->get[TicketDeleter::class];
+ $ticketDeleter = $applicationContext->get(TicketDeleter::class);
$ticketDeleter->deleteTicket($id, $userContext, $hesk_settings);
@@ -35,7 +35,7 @@ class StaffTicketController {
global $applicationContext, $userContext, $hesk_settings;
/* @var $ticketEditor TicketEditor */
- $ticketEditor = $applicationContext->get[TicketEditor::class];
+ $ticketEditor = $applicationContext->get(TicketEditor::class);
$jsonRequest = JsonRetriever::getJsonData();
diff --git a/api/DataAccess/Categories/CategoryGateway.php b/api/DataAccess/Categories/CategoryGateway.php
index 4fd35c7b..1a4c0d1c 100644
--- a/api/DataAccess/Categories/CategoryGateway.php
+++ b/api/DataAccess/Categories/CategoryGateway.php
@@ -4,6 +4,7 @@ namespace DataAccess\Categories;
use BusinessLogic\Categories\Category;
use DataAccess\CommonDao;
+use DataAccess\Logging\LoggingGateway;
use Exception;
class CategoryGateway extends CommonDao {
@@ -11,10 +12,18 @@ class CategoryGateway extends CommonDao {
* @param $hesk_settings
* @return Category[]
*/
- function getAllCategories($hesk_settings) {
+ function getAllCategories($hesk_settings, $modsForHesk_settings) {
$this->init();
- $sql = 'SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'categories`';
+ $sortColumn = $modsForHesk_settings['category_order_column'];
+
+ $sql = 'SELECT `cat`.*, COUNT(`tickets`.`id`) AS `number_of_tickets`
+ FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'categories` `cat`
+ LEFT JOIN `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` `tickets`
+ ON `cat`.`id` = `tickets`.`category`
+ GROUP BY `cat`.`id`
+ ORDER BY `cat`.`' . $sortColumn . '` ASC';
+
$response = hesk_dbQuery($sql);
@@ -32,12 +41,94 @@ class CategoryGateway extends CommonDao {
$category->foregroundColor = $row['foreground_color'];
$category->displayBorder = $row['display_border_outline'] === '1';
$category->priority = intval($row['priority']);
- $category->manager = intval($row['manager']) == 0 ? NULL : intval($row['manager']);
- $results[$category->id] = $category;
+ $category->description = $row['mfh_description'];
+ $category->numberOfTickets = intval($row['number_of_tickets']);
+ $results[] = $category;
}
$this->close();
return $results;
}
+
+ /**
+ * @param $category Category
+ * @param $heskSettings array
+ * @return int The ID of the newly created category
+ */
+ function createCategory($category, $heskSettings) {
+ $this->init();
+
+ $newOrderRs = hesk_dbQuery("SELECT `cat_order` FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories` ORDER BY `cat_order` DESC LIMIT 1");
+ $newOrder = hesk_dbFetchAssoc($newOrderRs);
+
+ $sql = "INSERT INTO `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories`
+ (`name`, `cat_order`, `autoassign`, `type`, `priority`, `background_color`, `usage`,
+ `foreground_color`, `display_border_outline`, `mfh_description`)
+ VALUES ('" . hesk_dbEscape($category->name) . "', " . intval($newOrder['cat_order']) . ",
+ '" . ($category->autoAssign ? 1 : 0) . "', '" . intval($category->type) . "',
+ '" . intval($category->priority) . "',
+ '" . hesk_dbEscape($category->backgroundColor) . "', " . intval($category->usage) . ",
+ '" . hesk_dbEscape($category->foregroundColor) . "', '" . ($category->displayBorder ? 1 : 0) . "',
+ '" . hesk_dbEscape($category->description) . "')";
+
+ hesk_dbQuery($sql);
+
+ $id = hesk_dbInsertID();
+
+ $this->close();
+
+ return $id;
+ }
+
+ /**
+ * @param $category Category
+ * @param $heskSettings array
+ */
+ function updateCategory($category, $heskSettings) {
+ $this->init();
+
+ $sql = "UPDATE `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories` SET
+ `name` = '" . hesk_dbEscape($category->name) . "',
+ `cat_order` = " . intval($category->catOrder) . ",
+ `autoassign` = '" . ($category->autoAssign ? 1 : 0) . "',
+ `type` = '" . intval($category->type) . "',
+ `priority` = '" . intval($category->priority) . "',
+ `background_color` = '" . hesk_dbEscape($category->backgroundColor) . "',
+ `usage` = " . intval($category->usage) . ",
+ `foreground_color` = '" . hesk_dbEscape($category->foregroundColor) . "',
+ `display_border_outline` = '" . ($category->displayBorder ? 1 : 0) . "',
+ `mfh_description` = '" . hesk_dbEscape($category->description) . "'
+ WHERE `id` = " . intval($category->id);
+
+ hesk_dbQuery($sql);
+
+ $this->close();
+ }
+
+ function resortAllCategories($heskSettings) {
+ $this->init();
+
+ $rs = hesk_dbQuery("SELECT `id` FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories`
+ ORDER BY `cat_order` ASC");
+
+ $sortValue = 10;
+ while ($row = hesk_dbFetchAssoc($rs)) {
+ hesk_dbQuery("UPDATE `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories`
+ SET `cat_order` = " . intval($sortValue) . "
+ WHERE `id` = " . intval($row['id']));
+
+ $sortValue += 10;
+ }
+
+ $this->close();
+ }
+
+ function deleteCategory($id, $heskSettings) {
+ $this->init();
+
+ hesk_dbQuery("DELETE FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories` WHERE `id` = " . intval($id));
+
+ $this->close();
+ }
}
\ No newline at end of file
diff --git a/api/DataAccess/Security/UserGateway.php b/api/DataAccess/Security/UserGateway.php
index e836f18a..3ed4191b 100644
--- a/api/DataAccess/Security/UserGateway.php
+++ b/api/DataAccess/Security/UserGateway.php
@@ -99,25 +99,4 @@ class UserGateway extends CommonDao {
return $users;
}
-
- function getManagerForCategory($categoryId, $heskSettings) {
- $this->init();
-
- $rs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "users`
- WHERE `id` = (
- SELECT `manager`
- FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "categories`
- WHERE `id` = " . intval($categoryId) . ")");
-
- if (hesk_dbNumRows($rs) === 0) {
- $this->close();
- return null;
- }
-
- $user = UserContext::fromDataRow(hesk_dbFetchAssoc($rs));
-
- $this->close();
-
- return $user;
- }
}
\ No newline at end of file
diff --git a/api/DataAccess/Tickets/TicketGateway.php b/api/DataAccess/Tickets/TicketGateway.php
index 1645618b..a14d623e 100644
--- a/api/DataAccess/Tickets/TicketGateway.php
+++ b/api/DataAccess/Tickets/TicketGateway.php
@@ -358,4 +358,14 @@ class TicketGateway extends CommonDao {
$this->close();
}
+
+ function moveTicketsToDefaultCategory($oldCategoryId, $heskSettings) {
+ $this->init();
+
+ hesk_dbQuery("UPDATE `" . hesk_dbEscape($heskSettings['db_pfix']) . "tickets`
+ SET `category` = 1
+ WHERE `category` = " . intval($oldCategoryId));
+
+ $this->close();
+ }
}
\ No newline at end of file
diff --git a/api/Link.php b/api/Link.php
index f2dbba22..0e745ee3 100644
--- a/api/Link.php
+++ b/api/Link.php
@@ -1,5 +1,7 @@
categoryGateway = $this->createMock(CategoryGateway::class);
+ $this->ticketGateway = $this->createMock(TicketGateway::class);
+ $this->permissionChecker = $this->createMock(PermissionChecker::class);
+ $this->modsForHeskSettingsGateway = $this->createMock(ModsForHeskSettingsGateway::class);
+
+ $this->categoryHandler = new CategoryHandler($this->categoryGateway,
+ $this->ticketGateway,
+ $this->permissionChecker,
+ $this->modsForHeskSettingsGateway);
+ $this->heskSettings = array();
+
+ //TODO write proper tests!
+ $this->permissionChecker->method('doesUserHavePermission')->willReturn(true);
+ }
+
+ function testCreateCallsTheGatewayWithTheCategory() {
+ //-- Arrange
+ $category = new Category();
+ $category->autoAssign = true;
+ $category->backgroundColor = 'a';
+ $category->foregroundColor = 'a';
+ $category->catOrder = 1000;
+ $category->description = 'd';
+ $category->displayBorder = false;
+ $category->name = 'n';
+ $category->priority = Priority::LOW;
+ $category->usage = 0;
+ $category->type = 0;
+ $category->id = 1;
+ $this->categoryGateway->method('getAllCategories')->willReturn([$category]);
+
+ //-- Assert
+ $this->categoryGateway->expects($this->once())->method('createCategory')
+ ->willReturn(1)
+ ->with($category, $this->heskSettings);
+
+ //-- Act
+ $this->categoryHandler->createCategory($category, new UserContext(), $this->heskSettings);
+ }
+}
diff --git a/api/Tests/BusinessLogic/Security/UserToTicketCheckerTest.php b/api/Tests/BusinessLogic/Security/UserToTicketCheckerTest.php
index d3afb126..07318d66 100644
--- a/api/Tests/BusinessLogic/Security/UserToTicketCheckerTest.php
+++ b/api/Tests/BusinessLogic/Security/UserToTicketCheckerTest.php
@@ -92,23 +92,4 @@ class UserToTicketCheckerTest extends TestCase {
//-- Assert
self::assertThat($result, self::isFalse());
}
-
- function testItReturnsTrueWhenTheUserDoesNotHaveEditPermissionsButIsTheCategoryManager() {
- //-- Arrange
- $user = new UserContext();
- $user->admin = false;
- $user->categories = array(1);
- $user->permissions = array(UserPrivilege::CAN_VIEW_TICKETS, 'something else');
- $user->id = 1;
- $this->userGateway->method('getManagerForCategory')->willReturn(1);
-
- $ticket = new Ticket();
- $ticket->categoryId = 1;
-
- //-- Act
- $result = $this->userToTicketChecker->isTicketAccessibleToUser($user, $ticket, $this->heskSettings, array(UserPrivilege::CAN_EDIT_TICKETS));
-
- //-- Assert
- self::assertThat($result, self::isTrue());
- }
}
diff --git a/api/autoload.php b/api/autoload.php
index b9c2292e..0712c2e1 100644
--- a/api/autoload.php
+++ b/api/autoload.php
@@ -21,4 +21,7 @@ global $hesk_settings;
require_once(__DIR__ . '/../inc/custom_fields.inc.php');
// Load the ApplicationContext
-$applicationContext = new \ApplicationContext();
\ No newline at end of file
+$builder = new \DI\ContainerBuilder();
+$builder->setDefinitionCache(new \Doctrine\Common\Cache\ArrayCache());
+
+$applicationContext = $builder->build();
\ No newline at end of file
diff --git a/api/composer.json b/api/composer.json
index f23ca66a..e4c083d0 100644
--- a/api/composer.json
+++ b/api/composer.json
@@ -10,7 +10,7 @@
}
],
"require-dev": {
- "phpunit/phpunit": "5.7.9"
+ "phpunit/phpunit": "6.3.0"
},
"require": {
"phpmailer/phpmailer": "^5.2",
@@ -18,6 +18,7 @@
"php-http/guzzle6-adapter": "^1.1",
"php-http/message": "^1.5",
"php-http/curl-client": "^1.7",
- "guzzlehttp/psr7": "^1.3"
+ "guzzlehttp/psr7": "^1.3",
+ "mike-koch/php-di": "4.4.11"
}
}
diff --git a/api/composer.lock b/api/composer.lock
index 7ac81d56..c5a1a92d 100644
--- a/api/composer.lock
+++ b/api/composer.lock
@@ -4,25 +4,28 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "266b9167ab52abc3c4a2514bf29491ed",
+ "content-hash": "f84b1b3e118e669dc5110809cbc86e4c",
"packages": [
{
"name": "clue/stream-filter",
- "version": "v1.3.0",
+ "version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/clue/php-stream-filter.git",
- "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785"
+ "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785",
- "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785",
+ "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0",
+ "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
+ "require-dev": {
+ "phpunit/phpunit": "^5.0 || ^4.8"
+ },
"type": "library",
"autoload": {
"psr-4": {
@@ -53,7 +56,38 @@
"stream_filter_append",
"stream_filter_register"
],
- "time": "2015-11-08T23:41:30+00:00"
+ "time": "2017-08-18T09:54:01+00:00"
+ },
+ {
+ "name": "container-interop/container-interop",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/container-interop/container-interop.git",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "shasum": ""
+ },
+ "require": {
+ "psr/container": "^1.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Interop\\Container\\": "src/Interop/Container/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+ "homepage": "https://github.com/container-interop/container-interop",
+ "time": "2017-02-14T19:40:03+00:00"
},
{
"name": "doctrine/annotations",
@@ -61,17 +95,17 @@
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "54cacc9b81758b14e3ce750f205a393d52339e97"
+ "reference": "2497b1f9db56278d3ad2248f9e4bdbbbaa271c3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97",
- "reference": "54cacc9b81758b14e3ce750f205a393d52339e97",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/2497b1f9db56278d3ad2248f9e4bdbbbaa271c3e",
+ "reference": "2497b1f9db56278d3ad2248f9e4bdbbbaa271c3e",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
- "php": "^5.6 || ^7.0"
+ "php": "^7.1"
},
"require-dev": {
"doctrine/cache": "1.*",
@@ -80,7 +114,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.6.x-dev"
}
},
"autoload": {
@@ -121,7 +155,7 @@
"docblock",
"parser"
],
- "time": "2017-02-24 16:22:25"
+ "time": "2017-07-22 11:08:38"
},
{
"name": "doctrine/cache",
@@ -129,28 +163,35 @@
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
- "reference": "0da649fce4838f7a6121c501c9a86d4b8921b648"
+ "reference": "beb0fa35b61e9073f8612d9ffd34920bdaec406a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/0da649fce4838f7a6121c501c9a86d4b8921b648",
- "reference": "0da649fce4838f7a6121c501c9a86d4b8921b648",
+ "url": "https://api.github.com/repos/doctrine/cache/zipball/beb0fa35b61e9073f8612d9ffd34920bdaec406a",
+ "reference": "beb0fa35b61e9073f8612d9ffd34920bdaec406a",
"shasum": ""
},
"require": {
- "php": "~5.6|~7.0"
+ "php": "~7.1"
},
"conflict": {
"doctrine/common": ">2.2,<2.4"
},
"require-dev": {
- "phpunit/phpunit": "^5.7",
- "predis/predis": "~1.0"
+ "alcaeus/mongo-php-adapter": "^1.1",
+ "doctrine/coding-standard": "^1.0",
+ "mongodb/mongodb": "^1.1",
+ "phpunit/phpunit": "^6.3",
+ "predis/predis": "~1.0",
+ "squizlabs/php_codesniffer": "^3.0"
+ },
+ "suggest": {
+ "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.7.x-dev"
+ "dev-master": "1.8.x-dev"
}
},
"autoload": {
@@ -190,38 +231,34 @@
"cache",
"caching"
],
- "time": "2017-03-06 14:38:51"
+ "time": "2017-08-25 06:51:37"
},
{
- "name": "doctrine/collections",
- "version": "v1.4.0",
+ "name": "doctrine/lexer",
+ "version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/collections.git",
- "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba"
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "cc709ba91eee09540091ad5a5f2616727662e41b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba",
- "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/cc709ba91eee09540091ad5a5f2616727662e41b",
+ "reference": "cc709ba91eee09540091ad5a5f2616727662e41b",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "~0.1@dev",
- "phpunit/phpunit": "^5.7"
+ "php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3.x-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Collections\\": "lib/"
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -233,66 +270,62 @@
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
- "description": "Collections Abstraction library",
+ "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
- "array",
- "collections",
- "iterator"
+ "lexer",
+ "parser"
],
- "time": "2017-01-03T10:49:41+00:00"
+ "time": "2017-07-24 09:37:08"
},
{
- "name": "doctrine/common",
- "version": "dev-master",
+ "name": "guzzlehttp/guzzle",
+ "version": "6.3.0",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/common.git",
- "reference": "4b434dbf8d204198dac708f2e938f7c805864dd6"
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/common/zipball/4b434dbf8d204198dac708f2e938f7c805864dd6",
- "reference": "4b434dbf8d204198dac708f2e938f7c805864dd6",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
+ "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": ""
},
"require": {
- "doctrine/annotations": "1.*",
- "doctrine/cache": "1.*",
- "doctrine/collections": "1.*",
- "doctrine/inflector": "1.*",
- "doctrine/lexer": "1.*",
- "php": "~5.6|~7.0"
+ "guzzlehttp/promises": "^1.0",
+ "guzzlehttp/psr7": "^1.4",
+ "php": ">=5.5"
},
"require-dev": {
- "phpunit/phpunit": "^5.7"
+ "ext-curl": "*",
+ "phpunit/phpunit": "^4.0 || ^5.0",
+ "psr/log": "^1.0"
+ },
+ "suggest": {
+ "psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.8.x-dev"
+ "dev-master": "6.2-dev"
}
},
"autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
"psr-4": {
- "Doctrine\\Common\\": "lib/Doctrine/Common"
+ "GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -301,76 +334,57 @@
],
"authors": [
{
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
}
],
- "description": "Common Library for Doctrine projects",
- "homepage": "http://www.doctrine-project.org",
+ "description": "Guzzle is a PHP HTTP client library",
+ "homepage": "http://guzzlephp.org/",
"keywords": [
- "annotations",
- "collections",
- "eventmanager",
- "persistence",
- "spl"
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "rest",
+ "web service"
],
- "time": "2017-03-06 07:30:42"
+ "time": "2017-06-22T18:50:49+00:00"
},
{
- "name": "doctrine/dbal",
+ "name": "guzzlehttp/promises",
"version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/dbal.git",
- "reference": "50bf623418be0feb3282bb50d07a4aea977fb33a"
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "09e549f5534380c68761260a71f847644d8f65aa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/50bf623418be0feb3282bb50d07a4aea977fb33a",
- "reference": "50bf623418be0feb3282bb50d07a4aea977fb33a",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/09e549f5534380c68761260a71f847644d8f65aa",
+ "reference": "09e549f5534380c68761260a71f847644d8f65aa",
"shasum": ""
},
"require": {
- "doctrine/common": "^2.7.1",
- "php": "^7.0"
+ "php": ">=5.5.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.4.6",
- "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
- "symfony/console": "2.*||^3.0"
- },
- "suggest": {
- "symfony/console": "For helpful console commands such as SQL execution and import of files."
+ "phpunit/phpunit": "^4.0"
},
- "bin": [
- "bin/doctrine-dbal"
- ],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6.x-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\DBAL\\": "lib/"
- }
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -378,62 +392,54 @@
],
"authors": [
{
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
}
],
- "description": "Database Abstraction Layer",
- "homepage": "http://www.doctrine-project.org",
+ "description": "Guzzle promises library",
"keywords": [
- "database",
- "dbal",
- "persistence",
- "queryobject"
+ "promise"
],
- "time": "2017-02-25 22:09:19"
+ "time": "2017-05-20 23:14:18"
},
{
- "name": "doctrine/inflector",
+ "name": "guzzlehttp/psr7",
"version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/inflector.git",
- "reference": "803a2ed9fea02f9ca47cd45395089fe78769a392"
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "811b676fbab9c99e359885032e5ebc70e442f5b8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/803a2ed9fea02f9ca47cd45395089fe78769a392",
- "reference": "803a2ed9fea02f9ca47cd45395089fe78769a392",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/811b676fbab9c99e359885032e5ebc70e442f5b8",
+ "reference": "811b676fbab9c99e359885032e5ebc70e442f5b8",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
},
"require-dev": {
- "phpunit/phpunit": "4.*"
+ "phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Inflector\\": "lib/"
- }
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -441,69 +447,59 @@
],
"authors": [
{
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
},
{
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
}
],
- "description": "Common String Manipulations with regard to casing and singular/plural rules.",
- "homepage": "http://www.doctrine-project.org",
+ "description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
- "inflection",
- "pluralize",
- "singularize",
- "string"
+ "http",
+ "message",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
],
- "time": "2016-05-12 17:23:41"
+ "time": "2017-07-17 09:11:21"
},
{
- "name": "doctrine/instantiator",
- "version": "dev-master",
+ "name": "mailgun/mailgun-php",
+ "version": "2.3.4",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "68099b02b60bbf3b088ff5cb67bf506770ef9cac"
+ "url": "https://github.com/mailgun/mailgun-php.git",
+ "reference": "f58c5914aefa16fa6ed2b5cf9ee84d40cbda1b3a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/68099b02b60bbf3b088ff5cb67bf506770ef9cac",
- "reference": "68099b02b60bbf3b088ff5cb67bf506770ef9cac",
+ "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/f58c5914aefa16fa6ed2b5cf9ee84d40cbda1b3a",
+ "reference": "f58c5914aefa16fa6ed2b5cf9ee84d40cbda1b3a",
"shasum": ""
},
"require": {
- "php": ">=5.3,<8.0-DEV"
+ "php": "^5.5|^7.0",
+ "php-http/client-common": "^1.1",
+ "php-http/discovery": "^1.0",
+ "php-http/httplug": "^1.0",
+ "php-http/message": "^1.0",
+ "php-http/multipart-stream-builder": "^1.0",
+ "webmozart/assert": "^1.2"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "guzzlehttp/psr7": "^1.4",
+ "php-http/guzzle6-adapter": "^1.0",
+ "phpunit/phpunit": "~4.8"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ "psr-0": {
+ "Mailgun": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -512,138 +508,86 @@
],
"authors": [
{
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "name": "Travis Swientek",
+ "email": "travis@mailgunhq.com"
}
],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "time": "2017-01-23 09:23:06"
+ "description": "The Mailgun SDK provides methods for all API functions.",
+ "time": "2017-06-20T19:56:09+00:00"
},
{
- "name": "doctrine/lexer",
- "version": "dev-master",
+ "name": "mike-koch/php-di",
+ "version": "4.4.11",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/lexer.git",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
+ "url": "https://github.com/mike-koch/PHP-DI.git",
+ "reference": "c1a18d55666983901e542fc2626a51b831f30f0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
- "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
+ "url": "https://api.github.com/repos/mike-koch/PHP-DI/zipball/c1a18d55666983901e542fc2626a51b831f30f0e",
+ "reference": "c1a18d55666983901e542fc2626a51b831f30f0e",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "container-interop/container-interop": "~1.0",
+ "doctrine/annotations": "~1.2",
+ "doctrine/cache": "~1.0",
+ "myclabs/php-enum": "~1.1",
+ "ocramius/proxy-manager": "~0.5",
+ "php": ">=5.3.3",
+ "php-di/phpdoc-reader": "~1.3"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
},
+ "type": "library",
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Lexer\\": "lib/"
- }
+ "psr-4": {
+ "DI\\": "src/DI/"
+ },
+ "files": [
+ "src/DI/functions.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
- "authors": [
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- }
- ],
- "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
- "homepage": "http://www.doctrine-project.org",
+ "description": "PHP-DI is a Container that makes Dependency Injection as practical as possible in PHP. This fork fixes an issue in 4.x that prevented it from working in PHP 7.1.",
+ "homepage": "https://github.com/mike-koch/PHP-DI/",
"keywords": [
- "lexer",
- "parser"
+ "container",
+ "dependency injection",
+ "di"
],
- "time": "2014-09-09 13:34:57"
+ "time": "2017-09-08T02:23:09+00:00"
},
{
- "name": "guzzle/guzzle",
- "version": "dev-master",
+ "name": "myclabs/php-enum",
+ "version": "1.5.2",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/guzzle3.git",
- "reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe"
+ "url": "https://github.com/myclabs/php-enum.git",
+ "reference": "3ed7088cfd0a0e06534b7f8b0eee82acea574fac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/f7778ed85e3db90009d79725afd6c3a82dab32fe",
- "reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe",
+ "url": "https://api.github.com/repos/myclabs/php-enum/zipball/3ed7088cfd0a0e06534b7f8b0eee82acea574fac",
+ "reference": "3ed7088cfd0a0e06534b7f8b0eee82acea574fac",
"shasum": ""
},
"require": {
- "ext-curl": "*",
- "php": ">=5.3.3",
- "symfony/event-dispatcher": "~2.1"
- },
- "replace": {
- "guzzle/batch": "self.version",
- "guzzle/cache": "self.version",
- "guzzle/common": "self.version",
- "guzzle/http": "self.version",
- "guzzle/inflection": "self.version",
- "guzzle/iterator": "self.version",
- "guzzle/log": "self.version",
- "guzzle/parser": "self.version",
- "guzzle/plugin": "self.version",
- "guzzle/plugin-async": "self.version",
- "guzzle/plugin-backoff": "self.version",
- "guzzle/plugin-cache": "self.version",
- "guzzle/plugin-cookie": "self.version",
- "guzzle/plugin-curlauth": "self.version",
- "guzzle/plugin-error-response": "self.version",
- "guzzle/plugin-history": "self.version",
- "guzzle/plugin-log": "self.version",
- "guzzle/plugin-md5": "self.version",
- "guzzle/plugin-mock": "self.version",
- "guzzle/plugin-oauth": "self.version",
- "guzzle/service": "self.version",
- "guzzle/stream": "self.version"
+ "php": ">=5.3"
},
"require-dev": {
- "doctrine/cache": "~1.3",
- "monolog/monolog": "~1.0",
- "phpunit/phpunit": "3.7.*",
- "psr/log": "~1.0",
- "symfony/class-loader": "~2.1",
- "zendframework/zend-cache": "2.*,<2.3",
- "zendframework/zend-log": "2.*,<2.3"
- },
- "suggest": {
- "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
+ "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
+ "squizlabs/php_codesniffer": "1.*"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.9-dev"
- }
- },
"autoload": {
- "psr-0": {
- "Guzzle": "src/",
- "Guzzle\\Tests": "tests/"
+ "psr-4": {
+ "MyCLabs\\Enum\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -652,68 +596,56 @@
],
"authors": [
{
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Guzzle Community",
- "homepage": "https://github.com/guzzle/guzzle/contributors"
+ "name": "PHP Enum contributors",
+ "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
}
],
- "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
- "homepage": "http://guzzlephp.org/",
+ "description": "PHP Enum implementation",
+ "homepage": "http://github.com/myclabs/php-enum",
"keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "rest",
- "web service"
+ "enum"
],
- "abandoned": "guzzlehttp/guzzle",
- "time": "2016-10-26 18:22:07"
+ "time": "2017-06-28T16:24:08+00:00"
},
{
- "name": "guzzlehttp/guzzle",
- "version": "dev-master",
+ "name": "ocramius/proxy-manager",
+ "version": "0.5.2",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/guzzle.git",
- "reference": "6a99df94a22f01b4b9c32ed8789cf30d05bdba92"
+ "url": "https://github.com/Ocramius/ProxyManager.git",
+ "reference": "0ac0eb3e8e04c7fa75caaf1a43c5405623abf8f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6a99df94a22f01b4b9c32ed8789cf30d05bdba92",
- "reference": "6a99df94a22f01b4b9c32ed8789cf30d05bdba92",
+ "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/0ac0eb3e8e04c7fa75caaf1a43c5405623abf8f5",
+ "reference": "0ac0eb3e8e04c7fa75caaf1a43c5405623abf8f5",
"shasum": ""
},
"require": {
- "guzzlehttp/promises": "^1.0",
- "guzzlehttp/psr7": "^1.3.1",
- "php": ">=5.5"
+ "php": ">=5.3.3",
+ "zendframework/zend-code": ">2.2.5,<3.0"
},
"require-dev": {
- "ext-curl": "*",
- "phpunit/phpunit": "^4.0",
- "psr/log": "^1.0"
+ "ext-phar": "*",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "1.5.*"
},
"suggest": {
- "psr/log": "Required for using the Log middleware"
+ "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects",
+ "zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)",
+ "zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)",
+ "zendframework/zend-stdlib": "To use the hydrator proxy",
+ "zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2-dev"
+ "dev-master": "0.6.x-dev"
}
},
"autoload": {
- "files": [
- "src/functions_include.php"
- ],
- "psr-4": {
- "GuzzleHttp\\": "src/"
+ "psr-0": {
+ "ProxyManager\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -722,169 +654,97 @@
],
"authors": [
{
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
}
],
- "description": "Guzzle is a PHP HTTP client library",
- "homepage": "http://guzzlephp.org/",
+ "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies",
+ "homepage": "https://github.com/Ocramius/ProxyManager",
"keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "rest",
- "web service"
+ "aop",
+ "lazy loading",
+ "proxy",
+ "proxy pattern",
+ "service proxies"
],
- "time": "2017-02-19 15:59:27"
+ "time": "2014-09-28T14:18:11+00:00"
},
{
- "name": "guzzlehttp/promises",
- "version": "dev-master",
+ "name": "php-di/phpdoc-reader",
+ "version": "1.3.0",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/promises.git",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+ "url": "https://github.com/PHP-DI/PhpDocReader.git",
+ "reference": "8a6e123fd1ce54f7fcbd71747b3bf04e465da229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+ "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/8a6e123fd1ce54f7fcbd71747b3bf04e465da229",
+ "reference": "8a6e123fd1ce54f7fcbd71747b3bf04e465da229",
"shasum": ""
},
"require": {
- "php": ">=5.5.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.0"
+ "doctrine/annotations": "1.*",
+ "php": ">=5.3.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
- },
"autoload": {
- "psr-4": {
- "GuzzleHttp\\Promise\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
+ "psr-0": {
+ "PhpDocReader": "src/",
+ "UnitTest": "tests/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- }
- ],
- "description": "Guzzle promises library",
"keywords": [
- "promise"
+ "phpdoc",
+ "reflection"
],
- "time": "2016-12-20 10:07:11"
+ "time": "2014-08-21T08:20:45+00:00"
},
{
- "name": "guzzlehttp/psr7",
+ "name": "php-http/client-common",
"version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "41972f428b31bc3ebff0707f63dd2165d3ac4cf6"
+ "url": "https://github.com/php-http/client-common.git",
+ "reference": "600ea9a5d867a7bbe1c4e03722b8dc2ebc9bd3c8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/41972f428b31bc3ebff0707f63dd2165d3ac4cf6",
- "reference": "41972f428b31bc3ebff0707f63dd2165d3ac4cf6",
+ "url": "https://api.github.com/repos/php-http/client-common/zipball/600ea9a5d867a7bbe1c4e03722b8dc2ebc9bd3c8",
+ "reference": "600ea9a5d867a7bbe1c4e03722b8dc2ebc9bd3c8",
"shasum": ""
},
"require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
- },
- "provide": {
- "psr/http-message-implementation": "1.0"
+ "php": ">=5.4",
+ "php-http/httplug": "^1.1",
+ "php-http/message": "^1.2",
+ "php-http/message-factory": "^1.0",
+ "symfony/options-resolver": "^2.6 || ^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "guzzlehttp/psr7": "^1.4",
+ "henrikbjorn/phpspec-code-coverage": "^1.0",
+ "phpspec/phpspec": "^2.4"
+ },
+ "suggest": {
+ "php-http/cache-plugin": "PSR-6 Cache plugin",
+ "php-http/logger-plugin": "PSR-3 Logger plugin",
+ "php-http/stopwatch-plugin": "Symfony Stopwatch plugin"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Tobias Schultze",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": [
- "http",
- "message",
- "request",
- "response",
- "stream",
- "uri",
- "url"
- ],
- "time": "2017-02-18 11:43:27"
- },
- {
- "name": "mailgun/mailgun-php",
- "version": "v2.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/mailgun/mailgun-php.git",
- "reference": "54b7f851b8e0241d593897dc2d50906bf4a43995"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/54b7f851b8e0241d593897dc2d50906bf4a43995",
- "reference": "54b7f851b8e0241d593897dc2d50906bf4a43995",
- "shasum": ""
- },
- "require": {
- "php": "^5.5|^7.0",
- "php-http/discovery": "^1.0",
- "php-http/httplug": "^1.0",
- "php-http/message": "^1.0",
- "php-http/multipart-stream-builder": "^0.1"
- },
- "require-dev": {
- "php-http/guzzle6-adapter": "^1.0",
- "phpunit/phpunit": "~4.6"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Mailgun": "src/"
+ "Http\\Client\\Common\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -893,54 +753,19 @@
],
"authors": [
{
- "name": "Travis Swientek",
- "email": "travis@mailgunhq.com"
- }
- ],
- "description": "The Mailgun SDK provides methods for all API functions.",
- "time": "2016-08-10T16:58:18+00:00"
- },
- {
- "name": "myclabs/deep-copy",
- "version": "1.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe",
- "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0"
- },
- "require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com"
}
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
],
- "description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
+ "description": "Common HTTP Client implementations and tools for HTTPlug",
+ "homepage": "http://httplug.io",
"keywords": [
- "clone",
- "copy",
- "duplicate",
- "object",
- "object graph"
+ "client",
+ "common",
+ "http",
+ "httplug"
],
- "time": "2017-01-26T22:05:40+00:00"
+ "time": "2017-08-05 15:50:10"
},
{
"name": "php-http/curl-client",
@@ -1004,12 +829,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-http/discovery.git",
- "reference": "cc5669d9cb51170ad0278a3b984cd3c7894d6ff9"
+ "reference": "7b50ab4d6c9fdaa1ed53ae310c955900af6e3372"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/discovery/zipball/cc5669d9cb51170ad0278a3b984cd3c7894d6ff9",
- "reference": "cc5669d9cb51170ad0278a3b984cd3c7894d6ff9",
+ "url": "https://api.github.com/repos/php-http/discovery/zipball/7b50ab4d6c9fdaa1ed53ae310c955900af6e3372",
+ "reference": "7b50ab4d6c9fdaa1ed53ae310c955900af6e3372",
"shasum": ""
},
"require": {
@@ -1058,7 +883,7 @@
"message",
"psr7"
],
- "time": "2017-02-12 08:49:24"
+ "time": "2017-08-03 10:12:53"
},
{
"name": "php-http/guzzle6-adapter",
@@ -1066,12 +891,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-http/guzzle6-adapter.git",
- "reference": "c0168c6e5fa286c3837310d591114d2683b9b9a5"
+ "reference": "54181ff8455a4c2e1706a53e0d98060b93030321"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/c0168c6e5fa286c3837310d591114d2683b9b9a5",
- "reference": "c0168c6e5fa286c3837310d591114d2683b9b9a5",
+ "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/54181ff8455a4c2e1706a53e0d98060b93030321",
+ "reference": "54181ff8455a4c2e1706a53e0d98060b93030321",
"shasum": ""
},
"require": {
@@ -1085,7 +910,7 @@
},
"require-dev": {
"ext-curl": "*",
- "php-http/client-integration-tests": "^0.5.1"
+ "php-http/client-integration-tests": "^0.6"
},
"type": "library",
"extra": {
@@ -1118,7 +943,7 @@
"Guzzle",
"http"
],
- "time": "2016-08-02 09:03:17"
+ "time": "2017-05-29 15:06:15"
},
{
"name": "php-http/httplug",
@@ -1126,12 +951,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-http/httplug.git",
- "reference": "f32fefee51cb96e99edb0c4bb1d11b5026ad5069"
+ "reference": "036f86f0cb1f37c13dd9b5e75b71866e7ab3f60b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/httplug/zipball/f32fefee51cb96e99edb0c4bb1d11b5026ad5069",
- "reference": "f32fefee51cb96e99edb0c4bb1d11b5026ad5069",
+ "url": "https://api.github.com/repos/php-http/httplug/zipball/036f86f0cb1f37c13dd9b5e75b71866e7ab3f60b",
+ "reference": "036f86f0cb1f37c13dd9b5e75b71866e7ab3f60b",
"shasum": ""
},
"require": {
@@ -1174,7 +999,7 @@
"client",
"http"
],
- "time": "2017-01-02 06:37:42"
+ "time": "2017-08-18 18:51:51"
},
{
"name": "php-http/message",
@@ -1182,12 +1007,12 @@
"source": {
"type": "git",
"url": "https://github.com/php-http/message.git",
- "reference": "13df8c48f40ca7925303aa336f19be4b80984f01"
+ "reference": "2edd63bae5f52f79363c5f18904b05ce3a4b7253"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/message/zipball/13df8c48f40ca7925303aa336f19be4b80984f01",
- "reference": "13df8c48f40ca7925303aa336f19be4b80984f01",
+ "url": "https://api.github.com/repos/php-http/message/zipball/2edd63bae5f52f79363c5f18904b05ce3a4b7253",
+ "reference": "2edd63bae5f52f79363c5f18904b05ce3a4b7253",
"shasum": ""
},
"require": {
@@ -1196,6 +1021,9 @@
"php-http/message-factory": "^1.0.2",
"psr/http-message": "^1.0"
},
+ "provide": {
+ "php-http/message-factory-implementation": "1.0"
+ },
"require-dev": {
"akeneo/phpspec-skip-example-extension": "^1.0",
"coduo/phpspec-data-provider-extension": "^1.0",
@@ -1243,7 +1071,7 @@
"message",
"psr-7"
],
- "time": "2017-02-14 08:58:37"
+ "time": "2017-07-05 06:40:53"
},
{
"name": "php-http/message-factory",
@@ -1293,114 +1121,700 @@
"stream",
"uri"
],
- "time": "2016-02-03 08:16:31"
+ "time": "2016-02-03 08:16:31"
+ },
+ {
+ "name": "php-http/multipart-stream-builder",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/multipart-stream-builder.git",
+ "reference": "0f66890b095841c1606be107d68be250fe8ed768"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/0f66890b095841c1606be107d68be250fe8ed768",
+ "reference": "0f66890b095841c1606be107d68be250fe8ed768",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "php-http/discovery": "^1.0",
+ "php-http/message-factory": "^1.0.2",
+ "psr/http-message": "^1.0"
+ },
+ "require-dev": {
+ "php-http/message": "^1.5",
+ "phpunit/phpunit": "^4.8 || ^5.4",
+ "zendframework/zend-diactoros": "^1.3.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Message\\MultipartStream\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com"
+ }
+ ],
+ "description": "A builder class that help you create a multipart stream",
+ "homepage": "http://php-http.org",
+ "keywords": [
+ "factory",
+ "http",
+ "message",
+ "multipart stream",
+ "stream"
+ ],
+ "time": "2017-05-21 18:01:57"
+ },
+ {
+ "name": "php-http/promise",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-http/promise.git",
+ "reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/810b30da8bcf69e4b82c4b9bc6b31518234293ab",
+ "reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab",
+ "shasum": ""
+ },
+ "require-dev": {
+ "henrikbjorn/phpspec-code-coverage": "^1.0",
+ "phpspec/phpspec": "^2.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Http\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com"
+ },
+ {
+ "name": "Joel Wurtz",
+ "email": "joel.wurtz@gmail.com"
+ }
+ ],
+ "description": "Promise used for asynchronous HTTP requests",
+ "homepage": "http://httplug.io",
+ "keywords": [
+ "promise"
+ ],
+ "time": "2016-01-28 07:54:12"
+ },
+ {
+ "name": "phpmailer/phpmailer",
+ "version": "v5.2.25",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHPMailer/PHPMailer.git",
+ "reference": "2baf20b01690fba8cf720c1ebcf9b988eda50915"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2baf20b01690fba8cf720c1ebcf9b988eda50915",
+ "reference": "2baf20b01690fba8cf720c1ebcf9b988eda50915",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "php": ">=5.0.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "1.2.*",
+ "jms/serializer": "0.16.*",
+ "phpdocumentor/phpdocumentor": "2.*",
+ "phpunit/phpunit": "4.8.*",
+ "symfony/debug": "2.8.*",
+ "symfony/filesystem": "2.8.*",
+ "symfony/translation": "2.8.*",
+ "symfony/yaml": "2.8.*",
+ "zendframework/zend-cache": "2.5.1",
+ "zendframework/zend-config": "2.5.1",
+ "zendframework/zend-eventmanager": "2.5.1",
+ "zendframework/zend-filter": "2.5.1",
+ "zendframework/zend-i18n": "2.5.1",
+ "zendframework/zend-json": "2.5.1",
+ "zendframework/zend-math": "2.5.1",
+ "zendframework/zend-serializer": "2.5.*",
+ "zendframework/zend-servicemanager": "2.5.*",
+ "zendframework/zend-stdlib": "2.5.1"
+ },
+ "suggest": {
+ "league/oauth2-google": "Needed for Google XOAUTH2 authentication"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "class.phpmailer.php",
+ "class.phpmaileroauth.php",
+ "class.phpmaileroauthgoogle.php",
+ "class.smtp.php",
+ "class.pop3.php",
+ "extras/EasyPeasyICS.php",
+ "extras/ntlm_sasl_client.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL-2.1"
+ ],
+ "authors": [
+ {
+ "name": "Jim Jagielski",
+ "email": "jimjag@gmail.com"
+ },
+ {
+ "name": "Marcus Bointon",
+ "email": "phpmailer@synchromedia.co.uk"
+ },
+ {
+ "name": "Andy Prevost",
+ "email": "codeworxtech@users.sourceforge.net"
+ },
+ {
+ "name": "Brent R. Matzelle"
+ }
+ ],
+ "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
+ "time": "2017-08-28T11:12:07+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "2cc4a01788191489dc7459446ba832fa79a216a7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/2cc4a01788191489dc7459446ba832fa79a216a7",
+ "reference": "2cc4a01788191489dc7459446ba832fa79a216a7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-06-28 15:35:32"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "time": "2016-08-06 14:39:51"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "3.4.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "9e2ed813a4683bfa310a45d416b922fd7ede638c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9e2ed813a4683bfa310a45d416b922fd7ede638c",
+ "reference": "9e2ed813a4683bfa310a45d416b922fd7ede638c",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\OptionsResolver\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony OptionsResolver Component",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "config",
+ "configuration",
+ "options"
+ ],
+ "time": "2017-08-03 09:34:20"
+ },
+ {
+ "name": "webmozart/assert",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/assert.git",
+ "reference": "4a8bf11547e139e77b651365113fc12850c43d9a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a",
+ "reference": "4a8bf11547e139e77b651365113fc12850c43d9a",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Assert\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Assertions to validate method input/output with nice error messages.",
+ "keywords": [
+ "assert",
+ "check",
+ "validate"
+ ],
+ "time": "2016-11-23 20:04:41"
+ },
+ {
+ "name": "zendframework/zend-code",
+ "version": "2.6.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-code.git",
+ "reference": "95033f061b083e16cdee60530ec260d7d628b887"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-code/zipball/95033f061b083e16cdee60530ec260d7d628b887",
+ "reference": "95033f061b083e16cdee60530ec260d7d628b887",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || 7.0.0 - 7.0.4 || ^7.0.6",
+ "zendframework/zend-eventmanager": "^2.6 || ^3.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "~1.0",
+ "fabpot/php-cs-fixer": "1.7.*",
+ "phpunit/phpunit": "^4.8.21",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "suggest": {
+ "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
+ "zendframework/zend-stdlib": "Zend\\Stdlib component"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.6-dev",
+ "dev-develop": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Code\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "provides facilities to generate arbitrary code using an object oriented interface",
+ "homepage": "https://github.com/zendframework/zend-code",
+ "keywords": [
+ "code",
+ "zf2"
+ ],
+ "time": "2016-04-20T17:26:42+00:00"
+ },
+ {
+ "name": "zendframework/zend-eventmanager",
+ "version": "dev-develop",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-eventmanager.git",
+ "reference": "071016ade1deee5b8346ec9d8d48935437746c37"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/071016ade1deee5b8346ec9d8d48935437746c37",
+ "reference": "071016ade1deee5b8346ec9d8d48935437746c37",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "^0.1",
+ "container-interop/container-interop": "^1.1.0",
+ "phpunit/phpunit": "^6.0.7 || ^5.7.14",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0"
+ },
+ "suggest": {
+ "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev",
+ "dev-develop": "3.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\EventManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Trigger and listen to events within a PHP application",
+ "homepage": "https://github.com/zendframework/zend-eventmanager",
+ "keywords": [
+ "event",
+ "eventmanager",
+ "events",
+ "zf2"
+ ],
+ "time": "2017-07-11 19:19:12"
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "doctrine/instantiator",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "^6.2.3",
+ "squizlabs/php_codesniffer": "^3.0.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://github.com/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2017-07-22 11:58:36"
+ },
+ {
+ "name": "myclabs/deep-copy",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "doctrine/collections": "1.*",
+ "phpunit/phpunit": "~4.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Create deep copies (clones) of your objects",
+ "homepage": "https://github.com/myclabs/DeepCopy",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ],
+ "time": "2017-04-12 18:52:22"
},
{
- "name": "php-http/multipart-stream-builder",
- "version": "0.1.6",
+ "name": "phar-io/manifest",
+ "version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/php-http/multipart-stream-builder.git",
- "reference": "74d5ac517778ae87a065c6f4076316c35b58a777"
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "014feadb268809af7c8e2f7ccd396b8494901f58"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/74d5ac517778ae87a065c6f4076316c35b58a777",
- "reference": "74d5ac517778ae87a065c6f4076316c35b58a777",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/014feadb268809af7c8e2f7ccd396b8494901f58",
+ "reference": "014feadb268809af7c8e2f7ccd396b8494901f58",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7.0",
- "php-http/discovery": "^1.0",
- "php-http/message-factory": "^1.0.2",
- "psr/http-message": "^1.0"
- },
- "require-dev": {
- "php-http/message": "^1.5",
- "phpunit/phpunit": "^4.8 || ^5.4",
- "zendframework/zend-diactoros": "^1.3.5"
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "phar-io/version": "^1.0.1",
+ "php": "^5.6 || ^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.2-dev"
+ "dev-master": "1.0.x-dev"
}
},
"autoload": {
- "psr-4": {
- "Http\\Message\\MultipartStream\\": "src/"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com"
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
}
],
- "description": "A builder class that help you create a multipart stream",
- "homepage": "http://php-http.org",
- "keywords": [
- "factory",
- "http",
- "message",
- "multipart stream",
- "stream"
- ],
- "time": "2017-02-16T08:52:59+00:00"
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "time": "2017-04-07 07:07:10"
},
{
- "name": "php-http/promise",
- "version": "dev-master",
+ "name": "phar-io/version",
+ "version": "1.0.1",
"source": {
"type": "git",
- "url": "https://github.com/php-http/promise.git",
- "reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab"
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/promise/zipball/810b30da8bcf69e4b82c4b9bc6b31518234293ab",
- "reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
"shasum": ""
},
- "require-dev": {
- "henrikbjorn/phpspec-code-coverage": "^1.0",
- "phpspec/phpspec": "^2.4"
+ "require": {
+ "php": "^5.6 || ^7.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Http\\Promise\\": "src/"
- }
+ "classmap": [
+ "src/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com"
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
},
{
- "name": "Joel Wurtz",
- "email": "joel.wurtz@gmail.com"
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
}
],
- "description": "Promise used for asynchronous HTTP requests",
- "homepage": "http://httplug.io",
- "keywords": [
- "promise"
- ],
- "time": "2016-01-28 07:54:12"
+ "description": "Library for handling version information and constraints",
+ "time": "2017-03-05T17:38:23+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@@ -1408,12 +1822,12 @@
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+ "reference": "a046af61c36e9162372f205de091a1cab7340f1c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/a046af61c36e9162372f205de091a1cab7340f1c",
+ "reference": "a046af61c36e9162372f205de091a1cab7340f1c",
"shasum": ""
},
"require": {
@@ -1454,26 +1868,26 @@
"reflection",
"static analysis"
],
- "time": "2015-12-27 11:43:31"
+ "time": "2017-04-30 11:58:12"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "4.1.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2",
+ "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2",
"shasum": ""
},
"require": {
- "php": ">=5.5",
+ "php": "^7.0",
"phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
@@ -1499,24 +1913,24 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2016-09-30T07:12:33+00:00"
+ "time": "2017-08-30T18:51:59+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
- "php": ">=5.5",
+ "php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
@@ -1546,67 +1960,7 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-11-25T06:54:22+00:00"
- },
- {
- "name": "phpmailer/phpmailer",
- "version": "v5.2.22",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPMailer/PHPMailer.git",
- "reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/b18cb98131bd83103ccb26a888fdfe3177b8a663",
- "reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663",
- "shasum": ""
- },
- "require": {
- "php": ">=5.0.0"
- },
- "require-dev": {
- "phpdocumentor/phpdocumentor": "*",
- "phpunit/phpunit": "4.7.*"
- },
- "suggest": {
- "league/oauth2-google": "Needed for Google XOAUTH2 authentication"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "class.phpmailer.php",
- "class.phpmaileroauth.php",
- "class.phpmaileroauthgoogle.php",
- "class.smtp.php",
- "class.pop3.php",
- "extras/EasyPeasyICS.php",
- "extras/ntlm_sasl_client.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "LGPL-2.1"
- ],
- "authors": [
- {
- "name": "Jim Jagielski",
- "email": "jimjag@gmail.com"
- },
- {
- "name": "Marcus Bointon",
- "email": "phpmailer@synchromedia.co.uk"
- },
- {
- "name": "Andy Prevost",
- "email": "codeworxtech@users.sourceforge.net"
- },
- {
- "name": "Brent R. Matzelle"
- }
- ],
- "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
- "time": "2017-01-09T09:33:47+00:00"
+ "time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
@@ -1614,29 +1968,29 @@
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
- "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
+ "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
- "sebastian/comparator": "^1.1",
- "sebastian/recursion-context": "^1.0|^2.0"
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
+ "sebastian/comparator": "^1.1|^2.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.0",
+ "phpspec/phpspec": "^2.5|^3.2",
"phpunit/phpunit": "^4.8 || ^5.6.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -1669,44 +2023,45 @@
"spy",
"stub"
],
- "time": "2016-11-21 14:58:47"
+ "time": "2017-09-04 11:05:03"
},
{
"name": "phpunit/php-code-coverage",
- "version": "4.0.x-dev",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "7a2bfe73aa381a76cb6d13599ae37bf74a12a02f"
+ "reference": "77a1ba8076365f943e2a3d75573b6c9822840ac6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7a2bfe73aa381a76cb6d13599ae37bf74a12a02f",
- "reference": "7a2bfe73aa381a76cb6d13599ae37bf74a12a02f",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/77a1ba8076365f943e2a3d75573b6c9822840ac6",
+ "reference": "77a1ba8076365f943e2a3d75573b6c9822840ac6",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0",
- "phpunit/php-file-iterator": "~1.3",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-token-stream": "^1.4.2",
- "sebastian/code-unit-reverse-lookup": "~1.0",
- "sebastian/environment": "^1.3.2 || ^2.0",
- "sebastian/version": "~1.0|~2.0"
+ "ext-dom": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^2.0",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^3.0",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1"
},
"require-dev": {
- "ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "^5.4"
+ "ext-xdebug": "^2.5",
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
- "ext-dom": "*",
- "ext-xdebug": ">=2.4.0",
- "ext-xmlwriter": "*"
+ "ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.2.x-dev"
}
},
"autoload": {
@@ -1732,7 +2087,7 @@
"testing",
"xunit"
],
- "time": "2017-01-24 16:35:00"
+ "time": "2017-08-25 06:32:04"
},
{
"name": "phpunit/php-file-iterator",
@@ -1824,25 +2179,30 @@
},
{
"name": "phpunit/php-timer",
- "version": "1.0.8",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
+ "reference": "d107f347d368dd8a384601398280c7c608390ab7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
- "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/d107f347d368dd8a384601398280c7c608390ab7",
+ "reference": "d107f347d368dd8a384601398280c7c608390ab7",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4|~5"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
"autoload": {
"classmap": [
"src/"
@@ -1864,7 +2224,7 @@
"keywords": [
"timer"
],
- "time": "2016-05-12T18:03:57+00:00"
+ "time": "2017-03-07 15:42:04"
},
{
"name": "phpunit/php-token-stream",
@@ -1872,25 +2232,25 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
+ "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
- "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0",
+ "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.2.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1913,20 +2273,20 @@
"keywords": [
"tokenizer"
],
- "time": "2016-11-15 14:06:22"
+ "time": "2017-08-20 05:47:52"
},
{
"name": "phpunit/phpunit",
- "version": "5.7.9",
+ "version": "6.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "69f832b87c731d5cacad7f91948778fe98335fdd"
+ "reference": "9501bab711403a1ab5b8378a8adb4ec3db3debdb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69f832b87c731d5cacad7f91948778fe98335fdd",
- "reference": "69f832b87c731d5cacad7f91948778fe98335fdd",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9501bab711403a1ab5b8378a8adb4ec3db3debdb",
+ "reference": "9501bab711403a1ab5b8378a8adb4ec3db3debdb",
"shasum": ""
},
"require": {
@@ -1935,33 +2295,35 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "~1.3",
- "php": "^5.6 || ^7.0",
- "phpspec/prophecy": "^1.6.2",
- "phpunit/php-code-coverage": "^4.0.4",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^3.2",
- "sebastian/comparator": "~1.2.2",
- "sebastian/diff": "~1.2",
- "sebastian/environment": "^1.3.4 || ^2.0",
- "sebastian/exporter": "~2.0",
- "sebastian/global-state": "^1.0 || ^2.0",
- "sebastian/object-enumerator": "~2.0",
- "sebastian/resource-operations": "~1.0",
- "sebastian/version": "~1.0|~2.0",
- "symfony/yaml": "~2.1|~3.0"
+ "myclabs/deep-copy": "^1.6.1",
+ "phar-io/manifest": "^1.0.1",
+ "phar-io/version": "^1.0",
+ "php": "^7.0",
+ "phpspec/prophecy": "^1.7",
+ "phpunit/php-code-coverage": "^5.2.2",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^1.0.9",
+ "phpunit/phpunit-mock-objects": "^4.0.3",
+ "sebastian/comparator": "^2.0.2",
+ "sebastian/diff": "^2.0",
+ "sebastian/environment": "^3.1",
+ "sebastian/exporter": "^3.1",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
+ "sebastian/resource-operations": "^1.0",
+ "sebastian/version": "^2.0.1"
},
"conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2"
+ "phpdocumentor/reflection-docblock": "3.0.2",
+ "phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
- "phpunit/php-invoker": "~1.1"
+ "phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
@@ -1969,7 +2331,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.7.x-dev"
+ "dev-master": "6.3.x-dev"
}
},
"autoload": {
@@ -1995,167 +2357,66 @@
"testing",
"xunit"
],
- "time": "2017-01-28T06:14:33+00:00"
+ "time": "2017-08-04T05:20:39+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "3.4.x-dev",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.6 || ^7.0",
- "phpunit/php-text-template": "^1.2",
- "sebastian/exporter": "^1.2 || ^2.0"
- },
- "conflict": {
- "phpunit/phpunit": "<5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.4"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.2.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
- "role": "lead"
- }
- ],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "time": "2016-12-08 20:27:08"
- },
- {
- "name": "psr/http-message",
- "version": "dev-master",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP messages",
- "homepage": "https://github.com/php-fig/http-message",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ],
- "time": "2016-08-06 14:39:51"
- },
- {
- "name": "sabre/event",
- "version": "2.0.x-dev",
+ "version": "dev-master",
"source": {
"type": "git",
- "url": "https://github.com/fruux/sabre-event.git",
- "reference": "337b6f5e10ea6e0b21e22c7e5788dd3883ae73ff"
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fruux/sabre-event/zipball/337b6f5e10ea6e0b21e22c7e5788dd3883ae73ff",
- "reference": "337b6f5e10ea6e0b21e22c7e5788dd3883ae73ff",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0",
+ "reference": "2f789b59ab89669015ad984afa350c4ec577ade0",
"shasum": ""
},
"require": {
- "php": ">=5.4.1"
+ "doctrine/instantiator": "^1.0.5",
+ "php": "^7.0",
+ "phpunit/php-text-template": "^1.2.1",
+ "sebastian/exporter": "^3.0"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<6.0"
},
"require-dev": {
- "phpunit/phpunit": "*",
- "sabre/cs": "~0.0.1"
+ "phpunit/phpunit": "^6.0"
+ },
+ "suggest": {
+ "ext-soap": "*"
},
"type": "library",
- "autoload": {
- "psr-4": {
- "Sabre\\Event\\": "lib/"
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0.x-dev"
}
},
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
- "name": "Evert Pot",
- "email": "me@evertpot.com",
- "homepage": "http://evertpot.com/",
- "role": "Developer"
+ "name": "Sebastian Bergmann",
+ "email": "sb@sebastian-bergmann.de",
+ "role": "lead"
}
],
- "description": "sabre/event is a library for lightweight event-based programming",
- "homepage": "http://sabre.io/event/",
+ "description": "Mock Object library for PHPUnit",
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
- "EventEmitter",
- "events",
- "hooks",
- "plugin",
- "promise",
- "signal"
+ "mock",
+ "xunit"
],
- "time": "2015-05-19 10:24:22"
+ "time": "2017-08-03 14:08:16"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2163,19 +2424,19 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "11606652af09e847cdbbbc3ca17df26b1173a454"
+ "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/11606652af09e847cdbbbc3ca17df26b1173a454",
- "reference": "11606652af09e847cdbbbc3ca17df26b1173a454",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/3488be0a7b346cd6e5361510ed07e88f9bea2e88",
+ "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88",
"shasum": ""
},
"require": {
- "php": ">=5.6"
+ "php": "^5.6 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^5.7 || ^6.0"
},
"type": "library",
"extra": {
@@ -2200,34 +2461,34 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2016-12-06 20:05:00"
+ "time": "2017-03-04 10:23:55"
},
{
"name": "sebastian/comparator",
- "version": "1.2.x-dev",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
+ "reference": "fb3213355da37bf91569ca7a944af19bc57b80e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fb3213355da37bf91569ca7a944af19bc57b80e9",
+ "reference": "fb3213355da37bf91569ca7a944af19bc57b80e9",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
+ "php": "^7.0",
+ "sebastian/diff": "^2.0",
+ "sebastian/exporter": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "2.1.x-dev"
}
},
"autoload": {
@@ -2258,13 +2519,13 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
- "time": "2017-01-29 09:50:25"
+ "time": "2017-08-20 14:03:32"
},
{
"name": "sebastian/diff",
@@ -2272,24 +2533,24 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "d0814318784b7756fb932116acd19ee3b0cbe67a"
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/d0814318784b7756fb932116acd19ee3b0cbe67a",
- "reference": "d0814318784b7756fb932116acd19ee3b0cbe67a",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.8"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -2316,7 +2577,7 @@
"keywords": [
"diff"
],
- "time": "2016-10-03 07:45:03"
+ "time": "2017-08-03 08:09:46"
},
{
"name": "sebastian/environment",
@@ -2324,24 +2585,24 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.0"
+ "phpunit/phpunit": "^6.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -2366,7 +2627,7 @@
"environment",
"hhvm"
],
- "time": "2016-11-26 07:53:53"
+ "time": "2017-07-01 08:51:00"
},
{
"name": "sebastian/exporter",
@@ -2374,26 +2635,26 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -2433,7 +2694,7 @@
"export",
"exporter"
],
- "time": "2016-11-19 08:54:04"
+ "time": "2017-04-03 13:19:02"
},
{
"name": "sebastian/global-state",
@@ -2441,19 +2702,19 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "ab3e5ce501d9d45288b53f885a54c87e0cdc7164"
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ab3e5ce501d9d45288b53f885a54c87e0cdc7164",
- "reference": "ab3e5ce501d9d45288b53f885a54c87e0cdc7164",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-uopz": "*"
@@ -2484,7 +2745,7 @@
"keywords": [
"global state"
],
- "time": "2016-12-12 08:07:45"
+ "time": "2017-04-27 15:39:26"
},
{
"name": "sebastian/object-enumerator",
@@ -2492,25 +2753,26 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35"
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
- "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -2530,7 +2792,52 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2016-11-19 07:35:10"
+ "time": "2017-08-03 12:35:26"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "time": "2017-03-29 09:07:27"
},
{
"name": "sebastian/recursion-context",
@@ -2538,24 +2845,24 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "reference": "a0e54bc9bf04e2c5b302236984cebc277631f0f1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a0e54bc9bf04e2c5b302236984cebc277631f0f1",
+ "reference": "a0e54bc9bf04e2c5b302236984cebc277631f0f1",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -2583,7 +2890,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2016-11-19 07:33:16"
+ "time": "2017-03-07 15:09:59"
},
{
"name": "sebastian/resource-operations",
@@ -2671,270 +2978,46 @@
"time": "2016-10-03 07:35:21"
},
{
- "name": "symfony/event-dispatcher",
- "version": "2.8.x-dev",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "3178c0e247b81da8a0265b460ac23bec6d2e6627"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3178c0e247b81da8a0265b460ac23bec6d2e6627",
- "reference": "3178c0e247b81da8a0265b460ac23bec6d2e6627",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.9"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "^2.0.5|~3.0.0",
- "symfony/dependency-injection": "~2.6|~3.0.0",
- "symfony/expression-language": "~2.6|~3.0.0",
- "symfony/stopwatch": "~2.3|~3.0.0"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.8-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\EventDispatcher\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony EventDispatcher Component",
- "homepage": "https://symfony.com",
- "time": "2017-02-18 19:13:35"
- },
- {
- "name": "symfony/yaml",
- "version": "dev-master",
+ "name": "theseer/tokenizer",
+ "version": "1.1.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "7928849b226f065dae93ec0e8be3b829f73ba67b"
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/7928849b226f065dae93ec0e8be3b829f73ba67b",
- "reference": "7928849b226f065dae93ec0e8be3b829f73ba67b",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
- },
- "require-dev": {
- "symfony/console": "~2.8|~3.0"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.3-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Symfony\\Component\\Yaml\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
+ "classmap": [
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Yaml Component",
- "homepage": "https://symfony.com",
- "time": "2017-01-21 17:10:26"
- },
- {
- "name": "vlucas/spot2",
- "version": "2.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/vlucas/spot2.git",
- "reference": "f30e5439c1c8d969490d773bc3f87937e675083a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/vlucas/spot2/zipball/f30e5439c1c8d969490d773bc3f87937e675083a",
- "reference": "f30e5439c1c8d969490d773bc3f87937e675083a",
- "shasum": ""
- },
- "require": {
- "doctrine/dbal": "~2.4",
- "php": ">=5.4",
- "sabre/event": "~2.0",
- "vlucas/valitron": "1.x"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Spot": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Vance Lucas",
- "email": "vance@vancelucas.com",
- "homepage": "http://www.vancelucas.com",
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
"role": "Developer"
}
],
- "description": "Simple DataMapper built on top of Doctrine DBAL",
- "homepage": "https://github.com/vlucas/spot2",
- "keywords": [
- "database",
- "datamapper",
- "dbal",
- "doctrine",
- "entity",
- "mapper",
- "model",
- "orm"
- ],
- "time": "2014-07-03T14:29:08+00:00"
- },
- {
- "name": "vlucas/valitron",
- "version": "v1.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/vlucas/valitron.git",
- "reference": "b33c79116260637337187b7125f955ae26d306cc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/vlucas/valitron/zipball/b33c79116260637337187b7125f955ae26d306cc",
- "reference": "b33c79116260637337187b7125f955ae26d306cc",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.2"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "Valitron": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD"
- ],
- "authors": [
- {
- "name": "Vance Lucas",
- "email": "vance@vancelucas.com",
- "homepage": "http://www.vancelucas.com"
- }
- ],
- "description": "Simple, elegant, stand-alone validation library with NO dependencies",
- "homepage": "http://github.com/vlucas/valitron",
- "keywords": [
- "valid",
- "validation",
- "validator"
- ],
- "time": "2017-02-23T08:31:59+00:00"
- },
- {
- "name": "webmozart/assert",
- "version": "dev-master",
- "source": {
- "type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "4a8bf11547e139e77b651365113fc12850c43d9a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a",
- "reference": "4a8bf11547e139e77b651365113fc12850c43d9a",
- "shasum": ""
- },
- "require": {
- "php": "^5.3.3 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.3-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Webmozart\\Assert\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@gmail.com"
- }
- ],
- "description": "Assertions to validate method input/output with nice error messages.",
- "keywords": [
- "assert",
- "check",
- "validate"
- ],
- "time": "2016-11-23 20:04:41"
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "time": "2017-04-07T12:08:54+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
diff --git a/api/index.php b/api/index.php
index 403fb0c7..b4c3b490 100644
--- a/api/index.php
+++ b/api/index.php
@@ -50,7 +50,7 @@ function assertApiIsEnabled() {
global $applicationContext, $hesk_settings;
/* @var $apiChecker \BusinessLogic\Settings\ApiChecker */
- $apiChecker = $applicationContext->get[\BusinessLogic\Settings\ApiChecker::class];
+ $apiChecker = $applicationContext->get(\BusinessLogic\Settings\ApiChecker::class);
if (!$apiChecker->isApiEnabled($hesk_settings)) {
print output(array('message' => 'API Disabled'), 404);
@@ -77,7 +77,7 @@ function buildUserContext($xAuthToken) {
global $applicationContext, $userContext, $hesk_settings;
/* @var $userContextBuilder \BusinessLogic\Security\UserContextBuilder */
- $userContextBuilder = $applicationContext->get[\BusinessLogic\Security\UserContextBuilder::class];
+ $userContextBuilder = $applicationContext->get(\BusinessLogic\Security\UserContextBuilder::class);
$userContext = $userContextBuilder->buildUserContext($xAuthToken, $hesk_settings);
}
@@ -90,17 +90,13 @@ function errorHandler($errorNumber, $errorMessage, $errorFile, $errorLine) {
* @param $exception Exception
*/
function exceptionHandler($exception) {
- global $applicationContext, $userContext, $hesk_settings;
+ global $userContext, $hesk_settings;
if (strpos($exception->getTraceAsString(), 'LoggingGateway') !== false) {
//-- Suppress these for now, as it would cause issues to output two JSONs at one time.
return;
}
-
- /* @var $loggingGateway \DataAccess\Logging\LoggingGateway */
- $loggingGateway = $applicationContext->get[\DataAccess\Logging\LoggingGateway::class];
-
// We don't cast API Friendly Exceptions as they're user-generated errors
if (exceptionIsOfType($exception, \BusinessLogic\Exceptions\ApiFriendlyException::class)) {
/* @var $castedException \BusinessLogic\Exceptions\ApiFriendlyException */
@@ -142,7 +138,7 @@ function tryToLog($location, $message, $stackTrace, $userContext, $heskSettings)
global $applicationContext;
/* @var $loggingGateway \DataAccess\Logging\LoggingGateway */
- $loggingGateway = $applicationContext->get[\DataAccess\Logging\LoggingGateway::class];
+ $loggingGateway = $applicationContext->get(\DataAccess\Logging\LoggingGateway::class);
try {
return $loggingGateway->logError($location, $message, $stackTrace, $userContext, $heskSettings);
@@ -187,8 +183,10 @@ Link::before('globalBefore');
Link::all(array(
// Categories
- '/v1/categories' => action(\Controllers\Categories\CategoryController::class . '::printAllCategories'),
- '/v1/categories/{i}' => action(\Controllers\Categories\CategoryController::class),
+ '/v1/categories/all' => action(\Controllers\Categories\CategoryController::class . '::printAllCategories', [RequestMethod::GET], SecurityHandler::INTERNAL_OR_AUTH_TOKEN),
+ '/v1/categories' => action(\Controllers\Categories\CategoryController::class, [RequestMethod::POST], SecurityHandler::INTERNAL_OR_AUTH_TOKEN),
+ '/v1/categories/{i}' => action(\Controllers\Categories\CategoryController::class, [RequestMethod::GET, RequestMethod::PUT, RequestMethod::DELETE], SecurityHandler::INTERNAL_OR_AUTH_TOKEN),
+ '/v1-internal/categories/{i}/sort/{s}' => action(\Controllers\Categories\CategoryController::class . '::sort', [RequestMethod::POST], SecurityHandler::INTERNAL),
// Tickets
'/v1/tickets' => action(\Controllers\Tickets\CustomerTicketController::class),
// Tickets - Staff
@@ -205,28 +203,34 @@ Link::all(array(
/* Internal use only routes */
// Resend email response
'/v1-internal/staff/tickets/{i}/resend-email' =>
- action(\Controllers\Tickets\ResendTicketEmailToCustomerController::class, SecurityHandler::INTERNAL),
+ action(\Controllers\Tickets\ResendTicketEmailToCustomerController::class, RequestMethod::ALL, SecurityHandler::INTERNAL),
// Custom Navigation
'/v1-internal/custom-navigation/all' =>
- action(\Controllers\Navigation\CustomNavElementController::class . '::getAll', SecurityHandler::INTERNAL),
+ action(\Controllers\Navigation\CustomNavElementController::class . '::getAll', RequestMethod::ALL, SecurityHandler::INTERNAL),
'/v1-internal/custom-navigation' =>
- action(\Controllers\Navigation\CustomNavElementController::class, SecurityHandler::INTERNAL),
+ action(\Controllers\Navigation\CustomNavElementController::class, RequestMethod::ALL, SecurityHandler::INTERNAL),
'/v1-internal/custom-navigation/{i}' =>
- action(\Controllers\Navigation\CustomNavElementController::class, SecurityHandler::INTERNAL),
+ action(\Controllers\Navigation\CustomNavElementController::class, RequestMethod::ALL, SecurityHandler::INTERNAL),
'/v1-internal/custom-navigation/{i}/sort/{s}' =>
- action(\Controllers\Navigation\CustomNavElementController::class . '::sort', SecurityHandler::INTERNAL),
+ action(\Controllers\Navigation\CustomNavElementController::class . '::sort', RequestMethod::ALL, SecurityHandler::INTERNAL),
'/v1-public/hesk-version' =>
- action(\Controllers\System\HeskVersionController::class . '::getHeskVersion', SecurityHandler::OPEN),
+ action(\Controllers\System\HeskVersionController::class . '::getHeskVersion', RequestMethod::ALL, SecurityHandler::OPEN),
'/v1-public/mods-for-hesk-version' =>
- action(\Controllers\System\HeskVersionController::class . '::getModsForHeskVersion', SecurityHandler::OPEN),
+ action(\Controllers\System\HeskVersionController::class . '::getModsForHeskVersion', RequestMethod::ALL, SecurityHandler::OPEN),
// Any URL that doesn't match goes to the 404 handler
'404' => 'handle404'
));
-function action($class, $securityHandler = SecurityHandler::AUTH_TOKEN) {
- return [$class, $class, $securityHandler];
+/**
+ * @param $class object|string The class name (and optional static method)
+ * @param $requestMethods array The accepted request methods for this endpoint
+ * @param $securityHandler string The proper security handler
+ * @return array The configured path
+ */
+function action($class, $requestMethods = RequestMethod::ALL, $securityHandler = SecurityHandler::AUTH_TOKEN) {
+ return [$class, $class, $securityHandler, $requestMethods];
}
class SecurityHandler {
diff --git a/css/mods-for-hesk-new.css b/css/mods-for-hesk-new.css
index 7fcd2604..b093d08a 100644
--- a/css/mods-for-hesk-new.css
+++ b/css/mods-for-hesk-new.css
@@ -324,4 +324,13 @@ div.ticket-info {
#toast-container > div {
opacity: 1;
+}
+
+.input-group-addon {
+ padding: 0;
+ border: 0;
+}
+
+.input-group-addon.button > button {
+ border-radius: 0;
}
\ No newline at end of file
diff --git a/inc/common.inc.php b/inc/common.inc.php
index 94f487dc..ec0ed464 100644
--- a/inc/common.inc.php
+++ b/inc/common.inc.php
@@ -2026,7 +2026,6 @@ function hesk_getFeatureArray()
'can_service_msg', /* User can manage service messages shown in customer interface */
'can_email_tpl', /* User can manage email templates */
'can_man_ticket_statuses', /* User can manage ticket statuses */
- 'can_set_manager', /* User can set category managers */
'can_man_permission_tpl', /* User can manage permission templates */
'can_man_settings', /* User can manage helpdesk settings */
'can_change_notification_settings', /* User can change notification settings */
diff --git a/inc/headerAdmin.inc.php b/inc/headerAdmin.inc.php
index 20501baa..45840576 100644
--- a/inc/headerAdmin.inc.php
+++ b/inc/headerAdmin.inc.php
@@ -75,6 +75,7 @@ header('X-UA-Compatible: IE=edge');
+
" class=" fixed js">
+
diff --git a/index.php b/index.php
index 61eba1f7..8ab81bd9 100644
--- a/index.php
+++ b/index.php
@@ -87,9 +87,10 @@ function print_select_category($number_of_categories)
// Print a select box if number of categories is large
if ($number_of_categories > $hesk_settings['cat_show_select'])
{
+ $firstDescription = null;
?>
@@ -220,9 +251,9 @@ function print_add_ticket()
// Get categories
$hesk_settings['categories'] = array();
- $res = hesk_dbQuery("SELECT `id`, `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` WHERE `type`='0' ORDER BY `cat_order` ASC");
+ $res = hesk_dbQuery("SELECT `id`, `name`, `mfh_description` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` WHERE `type`='0' ORDER BY `cat_order` ASC");
while ($row=hesk_dbFetchAssoc($res)) {
- $hesk_settings['categories'][$row['id']] = $row['name'];
+ $hesk_settings['categories'][$row['id']] = $row;
}
$number_of_categories = count($hesk_settings['categories']);
@@ -254,7 +285,7 @@ function print_add_ticket()
-
diff --git a/install/mods-for-hesk/database-validation.php b/install/mods-for-hesk/database-validation.php
index 22c34c98..7f1534e8 100644
--- a/install/mods-for-hesk/database-validation.php
+++ b/install/mods-for-hesk/database-validation.php
@@ -93,7 +93,6 @@ hesk_dbConnect();
$all_good = $all_good & run_column_check('tickets', 'longitude');
$all_good = $all_good & run_column_check('stage_tickets', 'latitude');
$all_good = $all_good & run_column_check('stage_tickets', 'longitude');
- $all_good = $all_good & run_column_check('categories', 'manager');
$all_good = $all_good & run_column_check('users', 'permission_template');
$all_good = $all_good & run_table_check('permission_templates');
$all_good = $all_good & run_column_check('permission_templates', 'id');
diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php
index 2970c923..c8922f46 100644
--- a/install/mods-for-hesk/sql/installSql.php
+++ b/install/mods-for-hesk/sql/installSql.php
@@ -1130,4 +1130,14 @@ function execute311Scripts() {
hesk_dbConnect();
updateVersion('3.1.1');
+}
+
+function execute320Scripts() {
+ global $hesk_settings;
+ hesk_dbConnect();
+
+ executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories`
+ ADD COLUMN `mfh_description` VARCHAR(255)");
+
+ updateVersion('3.2.0');
}
\ No newline at end of file
diff --git a/internal-api/js/lang.js b/internal-api/js/lang.js
index d0f232cc..c87c5184 100644
--- a/internal-api/js/lang.js
+++ b/internal-api/js/lang.js
@@ -1,5 +1,8 @@
var mfhLang = {
text: function(key) {
return $('#lang_' + key).text();
+ },
+ html: function(key) {
+ return $('#lang_' + key).html()
}
};
\ No newline at end of file
diff --git a/internal-api/js/manage-categories.js b/internal-api/js/manage-categories.js
new file mode 100644
index 00000000..853e06e1
--- /dev/null
+++ b/internal-api/js/manage-categories.js
@@ -0,0 +1,383 @@
+var categories = [];
+
+$(document).ready(function() {
+ loadTable();
+ bindEditModal();
+ bindModalCancelCallback();
+ bindFormSubmit();
+ bindDeleteButton();
+ bindCreateModal();
+ bindGenerateLinkModal();
+ bindSortButtons();
+});
+
+
+function loadTable() {
+ $('#overlay').show();
+ var heskUrl = $('p#hesk-path').text();
+ var $tableBody = $('#table-body');
+
+ $.ajax({
+ method: 'GET',
+ url: heskUrl + 'api/index.php/v1/categories/all',
+ headers: { 'X-Internal-Call': true },
+ success: function(data) {
+ $tableBody.html('');
+
+ if (data.length === 0) {
+ mfhAlert.error("No categories were found. This shouldn't happen.", "No categories found");
+ $('#overlay').hide();
+ return;
+ }
+
+ var totalNumberOfTickets = 0;
+ $.each(data, function() {
+ totalNumberOfTickets += this.numberOfTickets;
+ });
+
+ var first = true;
+ var lastElement = null;
+ $.each(data, function() {
+ var $template = $($('#category-row-template').html());
+
+ $template.find('span[data-property="id"]').text(this.id).attr('data-value', this.id);
+ var $nameField = $template.find('span[data-property="category-name"]');
+ if (this.foregroundColor === 'AUTO') {
+ $nameField.addClass('background-volatile');
+ } else {
+ $nameField.css('color', this.foregroundColor);
+ }
+ $nameField.css('background', this.backgroundColor);
+ if (this.displayBorder && this.foregroundColor !== 'AUTO') {
+ $nameField.css('border', 'solid 1px ' + this.foregroundColor);
+ }
+ $nameField.html(this.name);
+
+ if (this.description === '' || this.description === null) {
+ $template.find('.fa-info-circle').hide();
+ } else {
+ $template.find('.fa-info-circle').attr('data-content', this.description);
+ }
+ var $priority = $template.find('span[data-property="priority"]');
+ if (this.priority === 0) {
+ // Critical
+ $priority.text(mfhLang.text('critical')).addClass('critical');
+ } else if (this.priority === 1) {
+ // High
+ $priority.text(mfhLang.text('high')).addClass('important');
+ } else if (this.priority === 2) {
+ // Medium
+ $priority.text(mfhLang.text('medium')).addClass('medium');
+ } else {
+ // Low
+ $priority.text(mfhLang.text('low')).addClass('normal');
+ }
+ var linkPattern = $('input[name="show-tickets-path"]').val();
+ $template.find('a[data-property="number-of-tickets"]')
+ .text(this.numberOfTickets)
+ .attr('href', linkPattern.replace('{0}', this.id));
+ var percentText = mfhLang.text('perat');
+ var percentage = Math.round(this.numberOfTickets / totalNumberOfTickets * 100);
+ $template.find('div.progress').attr('title', percentText.replace('%s', percentage + '%'));
+ $template.find('div.progress-bar').attr('aria-value-now', percentage).css('width', percentage + '%');
+
+ $template.find('[data-property="generate-link"]')
+ .attr('data-category-id', this.id)
+ .find('i').attr('title', mfhLang.text('geco'));
+
+ if (this.usage === 1) {
+ // Tickets only
+ $template.find('.fa-calendar').removeClass('fa-calendar');
+ } else if (this.usage === 2) {
+ // Events only
+ $template.find('.fa-ticket').removeClass('fa-ticket');
+ }
+
+ if (this.autoAssign) {
+ $template.find('.fa-bolt').addClass('orange');
+ $template.find('[data-property="autoassign"]').text(mfhLang.text('enabled_title_case'));
+ } else {
+ $template.find('.fa-bolt').addClass('gray');
+ $template.find('[data-property="autoassign"]').text(mfhLang.text('disabled_title_case'));
+ }
+
+ if (this.type === 1) {
+ // Private
+ $template.find('[data-property="type"]').text(mfhLang.text('cat_private'));
+ $template.find('.fa-lock').show();
+ $template.find('[data-property="generate-link"]').find('i')
+ .addClass('fa-ban')
+ .addClass('red')
+ .attr('title', mfhLang.text('cpric'));
+ } else {
+ // Public
+ $template.find('[data-property="type"]').text(mfhLang.text('cat_public'));
+ $template.find('.fa-unlock-alt').show();
+ $template.find('[data-property="generate-link"]').find('i')
+ .addClass('fa-code')
+ .addClass('green')
+ .attr('title', mfhLang.text('geco'));
+ }
+
+ if (this.id === 1) {
+ $template.find('[data-action="delete"]').hide();
+ }
+
+ $tableBody.append($template);
+
+ categories[this.id] = this;
+
+ lastElement = this;
+
+ if (first) {
+ $template.find('[data-direction="up"]').css('visibility', 'hidden');
+ first = false;
+ }
+ });
+
+ if (lastElement) {
+ //-- Hide the down arrow on the last element
+ $('[data-value="' + lastElement.id + '"]').parent().parent()
+ .find('[data-direction="down"]').css('visibility', 'hidden');
+ }
+ },
+ error: function(data) {
+ mfhAlert.errorWithLog(mfhLang.text('error_retrieving_categories'), data.responseJSON);
+ console.error(data);
+ },
+ complete: function() {
+ refreshBackgroundVolatileItems();
+ $('[data-toggle="popover"]').popover({
+ trigger: 'hover',
+ container: 'body'
+ });
+ $('#overlay').hide();
+ }
+ });
+}
+
+function bindEditModal() {
+ $(document).on('click', '[data-action="edit"]', function() {
+ var element = categories[$(this).parent().parent().find('[data-property="id"]').text()];
+ var $modal = $('#category-modal');
+
+ $modal.find('#edit-label').show();
+ $modal.find('#create-label').hide();
+
+ $modal.find('input[name="name"]').val(element.name).end()
+ .find('select[name="priority"]').val(element.priority).end()
+ .find('input[name="id"]').val(element.id).end()
+ .find('select[name="usage"]').val(element.usage).end()
+ .find('input[name="display-border"][value="' + (element.displayBorder ? 1 : 0) + '"]')
+ .prop('checked', 'checked').end();
+
+ var backgroundColor = element.backgroundColor;
+ var foregroundColor = element.foregroundColor;
+ var colorpickerOptions = {
+ format: 'hex',
+ color: backgroundColor
+ };
+ $modal.find('input[name="background-color"]')
+ .colorpicker(colorpickerOptions).end().modal('show');
+
+ colorpickerOptions = {
+ format: 'hex'
+ };
+ if (foregroundColor != '' && foregroundColor !== 'AUTO') {
+ colorpickerOptions.color = foregroundColor;
+ }
+
+ $modal.find('input[name="foreground-color"]')
+ .colorpicker(colorpickerOptions).end().modal('show');
+
+ if (foregroundColor === '' || foregroundColor === 'AUTO') {
+ $modal.find('input[name="foreground-color"]').colorpicker('setValue', '#fff');
+ $modal.find('input[name="foreground-color"]').val('');
+ }
+
+ $modal.find('input[name="cat-order"]').val(element.catOrder);
+ $modal.find('input[name="autoassign"][value="' + (element.autoAssign ? 1 : 0) + '"]')
+ .prop('checked', 'checked');
+ $modal.find('input[name="type"][value="' + (element.type ? 1 : 0) + '"]')
+ .prop('checked', 'checked');
+ $modal.find('textarea[name="description"]').val(element.description === null ? '' : element.description);
+
+ $modal.modal('show');
+ });
+}
+
+function bindCreateModal() {
+ $('#create-button').click(function() {
+ var $modal = $('#category-modal');
+ $modal.find('#edit-label').hide();
+ $modal.find('#create-label').show();
+
+ $modal.find('input[name="name"]').val('');
+ $modal.find('select[name="priority"]').val(3); // Low priority
+ $modal.find('select[name="usage"]').val(0); // Tickets and events
+ $modal.find('input[name="id"]').val(-1);
+ $modal.find('textarea[name="description"]').val('');
+ $modal.find('input[name="cat-order"]').val('');
+ $modal.find('input[name="type"][value="0"]').prop('checked', 'checked');
+ $modal.find('input[name="autoassign"][value="0"]').prop('checked', 'checked');
+ $modal.find('input[name="display-border"][value="0"]')
+ .prop('checked', 'checked');
+
+ var colorpickerOptions = {
+ format: 'hex',
+ color: '#fff'
+ };
+ $modal.find('input[name="background-color"]')
+ .colorpicker(colorpickerOptions).end().modal('show');
+ $modal.find('input[name="background-color"]').val('');
+ $modal.find('input[name="foreground-color"]')
+ .colorpicker(colorpickerOptions).end().modal('show');
+ $modal.find('input[name="foreground-color"]').val('');
+
+ $modal.modal('show');
+ });
+}
+
+function bindModalCancelCallback() {
+ $('.cancel-callback').click(function() {
+ var $editCategoryModal = $('#category-modal');
+
+ $editCategoryModal.find('input[name="background-color"]').val('').colorpicker('destroy').end();
+ $editCategoryModal.find('input[name="foreground-color"]').val('').colorpicker('destroy').end();
+ $editCategoryModal.find('input[name="display-border"][value="1"]').prop('checked');
+ $editCategoryModal.find('input[name="display-border"][value="0"]').prop('checked');
+ $editCategoryModal.find('input[name="autoassign"][value="1"]').prop('checked');
+ $editCategoryModal.find('input[name="autoassign"][value="0"]').prop('checked');
+ });
+}
+
+function bindFormSubmit() {
+ $('form#manage-category').submit(function(e) {
+ e.preventDefault();
+ var heskUrl = $('p#hesk-path').text();
+
+ var $modal = $('#category-modal');
+
+ var data = {
+ autoassign: $modal.find('input[name="autoassign"]').val() === 'true',
+ backgroundColor: $modal.find('input[name="background-color"]').val(),
+ description: $modal.find('textarea[name="description"]').val(),
+ displayBorder: $modal.find('input[name="display-border"]:checked').val() === '1',
+ foregroundColor: $modal.find('input[name="foreground-color"]').val() === '' ? 'AUTO' : $modal.find('input[name="foreground-color"]').val(),
+ name: $modal.find('input[name="name"]').val(),
+ priority: parseInt($modal.find('select[name="priority"]').val()),
+ type: parseInt($modal.find('input[name="type"]:checked').val()),
+ usage: parseInt($modal.find('select[name="usage"]').val()),
+ catOrder: parseInt($modal.find('input[name="cat-order"]').val())
+ };
+
+ var url = heskUrl + 'api/index.php/v1/categories/';
+ var method = 'POST';
+
+ var categoryId = parseInt($modal.find('input[name="id"]').val());
+ if (categoryId !== -1) {
+ url += categoryId;
+ method = 'PUT';
+ }
+
+ $modal.find('#action-buttons').find('.cancel-button').attr('disabled', 'disabled');
+ $modal.find('#action-buttons').find('.save-button').attr('disabled', 'disabled');
+
+ $.ajax({
+ method: 'POST',
+ url: url,
+ headers: {
+ 'X-Internal-Call': true,
+ 'X-HTTP-Method-Override': method
+ },
+ data: JSON.stringify(data),
+ success: function(data) {
+ var format = undefined;
+ if (categoryId === -1) {
+ format = mfhLang.html('cat_name_added');
+ mfhAlert.success(format.replace('%s', data.name));
+ } else {
+ format = mfhLang.html('category_updated');
+ mfhAlert.success(format.replace('%s', data.name));
+ }
+ $modal.modal('hide');
+ loadTable();
+ },
+ error: function(data) {
+ mfhAlert.errorWithLog(mfhLang.text('error_saving_updating_category'), data.responseJSON);
+ console.error(data);
+ },
+ complete: function(data) {
+ $modal.find('#action-buttons').find('.cancel-button').removeAttr('disabled');
+ $modal.find('#action-buttons').find('.save-button').removeAttr('disabled');
+ }
+ });
+ });
+}
+
+function bindDeleteButton() {
+ $(document).on('click', '[data-action="delete"]', function() {
+ $('#overlay').show();
+
+ var heskUrl = $('p#hesk-path').text();
+ var element = categories[$(this).parent().parent().find('[data-property="id"]').text()];
+
+ $.ajax({
+ method: 'POST',
+ url: heskUrl + 'api/index.php/v1/categories/' + element.id,
+ headers: {
+ 'X-Internal-Call': true,
+ 'X-HTTP-Method-Override': 'DELETE'
+ },
+ success: function() {
+ mfhAlert.success(mfhLang.text('cat_removed'));
+ loadTable();
+ },
+ error: function(data) {
+ $('#overlay').hide();
+ mfhAlert.errorWithLog(mfhLang.text('error_deleting_category'), data.responseJSON);
+ console.error(data);
+ }
+ });
+ });
+}
+
+function bindGenerateLinkModal() {
+ var $modal = $('#generate-link-modal');
+
+ $modal.find('.input-group-addon').click(function() {
+ clipboard.copy($modal.find('input[type="text"]').val());
+ mfhAlert.success(mfhLang.text('copied_to_clipboard'));
+ });
+
+ $(document).on('click', '[data-property="generate-link"] i.fa-code', function () {
+ var heskUrl = $('p#hesk-url').text();
+
+ var url = heskUrl + '/index.php?a=add&catid=' + $(this).parent().data('category-id');
+
+ $modal.find('input[type="text"]').val(url).end().modal('show');
+ });
+}
+
+function bindSortButtons() {
+ $(document).on('click', '[data-action="sort"]', function() {
+ $('#overlay').show();
+ var heskUrl = $('p#hesk-path').text();
+ var direction = $(this).data('direction');
+ var element = categories[$(this).parent().parent().parent().find('[data-property="id"]').text()];
+
+ $.ajax({
+ method: 'POST',
+ url: heskUrl + 'api/index.php/v1-internal/categories/' + element.id + '/sort/' + direction,
+ headers: { 'X-Internal-Call': true },
+ success: function() {
+ loadTable();
+ },
+ error: function(data) {
+ mfhAlert.errorWithLog(mfhLang.text('error_sorting_categories'), data.responseJSON);
+ console.error(data);
+ $('#overlay').hide();
+ }
+ })
+ });
+}
\ No newline at end of file
diff --git a/js/clipboard.min.js b/js/clipboard.min.js
new file mode 100644
index 00000000..0f4ca9a5
--- /dev/null
+++ b/js/clipboard.min.js
@@ -0,0 +1,9 @@
+(function(e,c){"undefined"!==typeof module?module.exports=c():"function"===typeof define&&"object"===typeof define.amd?define(c):this[e]=c()})("clipboard",function(){if("undefined"===typeof document||!document.addEventListener)return null;var e={};e.copy=function(){function c(){d=!1;b=null;g&&window.getSelection().removeAllRanges();g=!1}var d=!1,b=null,g=!1;document.addEventListener("copy",function(c){if(d){for(var g in b)c.clipboardData.setData(g,b[g]);c.preventDefault()}});return function(f){return new Promise(function(m,
+e){function k(b){try{if(document.execCommand("copy"))c(),m();else{if(b)throw c(),Error("Unable to copy. Perhaps it's not available in your browser?");var d=document.getSelection();if(!document.queryCommandEnabled("copy")&&d.isCollapsed){var f=document.createRange();f.selectNodeContents(document.body);d.removeAllRanges();d.addRange(f);g=!0}k(!0)}}catch(a){c(),e(a)}}d=!0;"string"===typeof f?b={"text/plain":f}:f instanceof Node?b={"text/html":(new XMLSerializer).serializeToString(f)}:f instanceof Object?
+b=f:e("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings.");k(!1)})}}();e.paste=function(){var c=!1,d,b;document.addEventListener("paste",function(g){if(c){c=!1;g.preventDefault();var f=d;d=null;f(g.clipboardData.getData(b))}});return function(g){return new Promise(function(f,e){c=!0;d=f;b=g||"text/plain";try{document.execCommand("paste")||(c=!1,e(Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(h){c=!1,e(Error(h))}})}}();
+"undefined"===typeof ClipboardEvent&&"undefined"!==typeof window.clipboardData&&"undefined"!==typeof window.clipboardData.setData&&(function(c){function d(a,b){return function(){a.apply(b,arguments)}}function b(a){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");this._value=this._state=null;this._deferreds=[];l(a,d(f,this),d(e,this))}function g(a){var b=this;return null===this._state?void this._deferreds.push(a):
+void n(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(e){return void a.reject(e)}a.resolve(d)})}function f(a){try{if(a===this)throw new TypeError("A promise cannot be resolved with itself.");if(a&&("object"==typeof a||"function"==typeof a)){var b=a.then;if("function"==typeof b)return void l(d(b,a),d(f,this),d(e,this))}this._state=!0;this._value=a;h.call(this)}catch(c){e.call(this,c)}}function e(a){this._state=
+!1;this._value=a;h.call(this)}function h(){for(var a=0,b=this._deferreds.length;b>a;a++)g.call(this,this._deferreds[a]);this._deferreds=null}function k(a,b,c,d){this.onFulfilled="function"==typeof a?a:null;this.onRejected="function"==typeof b?b:null;this.resolve=c;this.reject=d}function l(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){d||(d=!0,c(e))}}var n=b.immediateFn||"function"==typeof setImmediate&&setImmediate||function(a){setTimeout(a,1)},p=Array.isArray||
+function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.prototype["catch"]=function(a){return this.then(null,a)};b.prototype.then=function(a,c){var d=this;return new b(function(b,e){g.call(d,new k(a,c,b,e))})};b.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&p(arguments[0])?arguments[0]:arguments);return new b(function(b,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,
+a)},c)}a[f]=g;0===--e&&b(a)}catch(k){c(k)}}if(0===a.length)return b([]);for(var e=a.length,f=0;f