diff --git a/.github/workflows/moodle-plugin-ci.yml b/.github/workflows/moodle-plugin-ci.yml index 75ae7d0..ccae198 100644 --- a/.github/workflows/moodle-plugin-ci.yml +++ b/.github/workflows/moodle-plugin-ci.yml @@ -58,74 +58,12 @@ jobs: - php: 8.0 moodle-branch: MOODLE_401_STABLE database: mariadb - - php: 7.4 - moodle-branch: MOODLE_401_STABLE - database: pgsql - - php: 7.4 - moodle-branch: MOODLE_401_STABLE - database: mariadb - php: 8.0 moodle-branch: MOODLE_400_STABLE database: pgsql - php: 8.0 moodle-branch: MOODLE_400_STABLE database: mariadb - - php: 7.4 - moodle-branch: MOODLE_400_STABLE - database: pgsql - - php: 7.4 - moodle-branch: MOODLE_400_STABLE - database: mariadb - - php: 7.4 - moodle-branch: MOODLE_311_STABLE - database: pgsql - - php: 7.4 - moodle-branch: MOODLE_311_STABLE - database: mariadb - - php: 7.4 - moodle-branch: MOODLE_310_STABLE - database: pgsql - - php: 7.4 - moodle-branch: MOODLE_310_STABLE - database: mariadb - - php: 7.4 - moodle-branch: MOODLE_39_STABLE - database: pgsql - - php: 7.4 - moodle-branch: MOODLE_39_STABLE - database: mariadb - - - php: 7.3 - moodle-branch: MOODLE_311_STABLE - database: pgsql - - php: 7.3 - moodle-branch: MOODLE_311_STABLE - database: mariadb - - php: 7.3 - moodle-branch: MOODLE_310_STABLE - database: pgsql - - php: 7.3 - moodle-branch: MOODLE_310_STABLE - database: mariadb - - php: 7.3 - moodle-branch: MOODLE_39_STABLE - database: pgsql - - php: 7.3 - moodle-branch: MOODLE_39_STABLE - database: mariadb - - - php: 7.2 - moodle-branch: MOODLE_310_STABLE - database: pgsql - - php: 7.2 - moodle-branch: MOODLE_310_STABLE - database: mariadb - - php: 7.2 - moodle-branch: MOODLE_39_STABLE - database: pgsql - - php: 7.2 - moodle-branch: MOODLE_39_STABLE - database: mariadb steps: - name: Check out repository code diff --git a/amd/build/questionnaire.min.js b/amd/build/questionnaire.min.js index 01e5115..30730f3 100644 --- a/amd/build/questionnaire.min.js +++ b/amd/build/questionnaire.min.js @@ -6,6 +6,6 @@ * @copyright 2020 Kevin Tippenhauer * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -define("mod_verbalfeedback/questionnaire",["jquery","core/templates","core/notification","core/ajax","core/str","core/modal_factory","core/modal_events"],(function($,Templates,Notification,Ajax,Str,ModalFactory,ModalEvents){var responses=[],questionnaire=function(){this.registerEvents(),$('[data-region="question-row"]').each((function(){responses[$(this).data("criterionid")]={criterionid:$(this).data("criterionid"),value:null,studentcomment:"",privatecomment:""}}));let questionnaireTable=$('[data-region="questionnaire"]');if(1==questionnaireTable.data("preview"))return;let fromUser=questionnaireTable.data("fromuserid"),toUser=questionnaireTable.data("touserid"),verbalfeedbackId=questionnaireTable.data("verbalfeedbackid"),submissionId=questionnaireTable.data("submissionid");Ajax.call([{methodname:"mod_verbalfeedback_get_responses",args:{verbalfeedbackid:verbalfeedbackId,fromuserid:fromUser,touserid:toUser,submissionid:submissionId}}])[0].done((function(result){$.each(result.responses,(function(){let response=this;responses[response.criterionid].criterionid=response.criterionid,responses[response.criterionid].value=response.value,responses[response.criterionid].studentcomment=response.studentcomment,responses[response.criterionid].privatecomment=response.privatecomment,$('[data-region="question-row"]').each((function(){if($(this).data("criterionid")===response.criterionid){let options=$(this).find(".scaleoption");options&&options.each((function(){let selected=$(this).find("label");(selected.data("value")===response.value||""===selected.data("value")&&null===response.value)&&(selected.removeClass("badge-secondary"),selected.removeClass("badge-info"),selected.addClass("badge-success"))}));let studentcomment=$(this).find(".student-comment.editor_atto_content");studentcomment&&""!==response.studentcomment&&studentcomment.html(response.studentcomment);let privatecomment=$(this).find(".private-comment.editor_atto_content");privatecomment&&""!==response.privatecomment&&privatecomment.html(response.privatecomment)}}))}))})).fail(Notification.exception)};function saveResponses(finalise){$(".student-comment").each((function(){let row=$(this).parents('[data-region="question-row"]'),comment=row.find(".student-comment.editor_atto_content").html();comment='


'==comment?"":comment,responses[row.data("criterionid")].studentcomment=comment})),$(".private-comment").each((function(){let row=$(this).parents('[data-region="question-row"]'),comment=row.find(".private-comment.editor_atto_content").html();comment='


'==comment?"":comment,responses[row.data("criterionid")].privatecomment=comment}));let questionnaireTable=$('[data-region="questionnaire"]'),toUser=questionnaireTable.data("touserid"),toUserFullname=questionnaireTable.data("tousername"),verbalfeedbackId=questionnaireTable.data("verbalfeedbackid"),submissionId=questionnaireTable.data("submissionid");if(questionnaireTable.data("anonymous")&&finalise){let messageStrings=[{key:"finaliseanonymousfeedback",component:"mod_verbalfeedback"},{key:"confirmfinaliseanonymousfeedback",component:"mod_verbalfeedback",param:{name:toUserFullname}}];Str.get_strings(messageStrings,"mod_verbalfeedback").done((function(messages){!function(title,confirmationMessage,verbalfeedbackId,submissionId,toUser,responses,finalise){let confirmButtonTextPromise=Str.get_string("finalise","mod_verbalfeedback"),confirmModalPromise=ModalFactory.create({title:title,body:confirmationMessage,large:!0,type:ModalFactory.types.SAVE_CANCEL});$.when(confirmButtonTextPromise,confirmModalPromise).done((function(confirmButtonText,modal){modal.setSaveButtonText(confirmButtonText),modal.show(),modal.getRoot().on(ModalEvents.hidden,(function(){modal.setBody("")})),modal.getRoot().on(ModalEvents.save,(function(){submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise)}))}))}(messages[0],messages[1],verbalfeedbackId,submissionId,toUser,responses,finalise)})).fail(Notification.exception)}else submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise)}function submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise){let responseObjects=[];for(tuple of Object.entries(responses))null!==tuple[1]&&responseObjects.push(tuple[1]);Ajax.call([{methodname:"mod_verbalfeedback_save_responses",args:{verbalfeedbackid:verbalfeedbackId,submissionid:submissionId,touserid:toUser,responses:responseObjects,complete:finalise}}])[0].done((function(response){Str.get_strings([{key:"responsessaved",component:"mod_verbalfeedback"},{key:"errorresponsesavefailed",component:"mod_verbalfeedback"}]).done((function(messages){let notificationData={};response.result?(notificationData.message=messages[0],notificationData.type="success"):(notificationData.message=messages[1],notificationData.type="error"),Notification.addNotification(notificationData)})).fail(Notification.exception),window.location=response.redirurl})).fail(Notification.exception)}return questionnaire.prototype.registerEvents=function(){$(".scaleoption").click((function(e){e.preventDefault();let row=$(this).parents('[data-region="question-row"]'),options=row.find("label");$.each(options,(function(){if($(this).hasClass("badge-success")){$(this).removeClass("badge-success"),$(this).addClass("badge-secondary");var forId=$(this).attr("for");$("#"+forId).removeAttr("checked")}}));let selected=$(this).find("label");selected.removeClass("badge-secondary"),selected.removeClass("badge-info"),selected.addClass("badge-success"),$("#"+selected.attr("for")).attr("checked","checked");let criterionid=row.data("criterionid");""===selected.data("value")?responses[criterionid].value=null:responses[criterionid].value=selected.data("value")})),$(".scaleoptionlabel").hover((function(e){e.preventDefault(),$(this).hasClass("badge-success")||($(this).hasClass("badge-secondary")?($(this).removeClass("badge-secondary"),$(this).addClass("badge-info")):($(this).addClass("badge-secondary"),$(this).removeClass("badge-info")))})),$(".detail-scaleoption").click((function(e){e.preventDefault();let row=$(this).parents('[data-region="detailed-rating"]'),value=$(this).find(".detail-scaleoptionlabel").data("value");row.find(".student-comment.editor_atto_content").append("")})),$(".detail-scaleoptionlabel").hover((function(e){e.preventDefault(),$(this).hasClass("badge-success")||($(this).hasClass("badge-secondary")?($(this).removeClass("badge-secondary"),$(this).addClass("badge-info")):($(this).addClass("badge-secondary"),$(this).removeClass("badge-info")))})),$("#save-feedback").click((function(){saveResponses(!1)})),$("#submit-feedback").click((function(){saveResponses(!0)})),$(".btn-detail-rating").click((function(e){e.preventDefault();let detailedRating=$(this).parents('[data-region="question-row"]').find(".detailed-rating");detailedRating.hasClass("hidden")?(detailedRating.removeClass("hidden"),$(this).html("−")):(detailedRating.addClass("hidden"),$(this).html("+"))}))},questionnaire})); +define("mod_verbalfeedback/questionnaire",["jquery","core/templates","core/notification","core/ajax","core/str","core/modal_factory","core/modal_events"],(function($,Templates,Notification,Ajax,Str,ModalFactory,ModalEvents){var responses=[],questionnaire=function(){this.registerEvents(),$('[data-region="question-row"]').each((function(){responses[$(this).data("criterionid")]={criterionid:$(this).data("criterionid"),value:null,studentcomment:"",privatecomment:""}}));let questionnaireTable=$('[data-region="questionnaire"]');if(1==questionnaireTable.data("preview"))return;let fromUser=questionnaireTable.data("fromuserid"),toUser=questionnaireTable.data("touserid"),verbalfeedbackId=questionnaireTable.data("verbalfeedbackid"),submissionId=questionnaireTable.data("submissionid");Ajax.call([{methodname:"mod_verbalfeedback_get_responses",args:{verbalfeedbackid:verbalfeedbackId,fromuserid:fromUser,touserid:toUser,submissionid:submissionId}}])[0].done((function(result){$.each(result.responses,(function(){let response=this;responses[response.criterionid].criterionid=response.criterionid,responses[response.criterionid].value=response.value,responses[response.criterionid].studentcomment=response.studentcomment,responses[response.criterionid].privatecomment=response.privatecomment,$('[data-region="question-row"]').each((function(){if($(this).data("criterionid")===response.criterionid){let options=$(this).find(".scaleoption");options&&options.each((function(){let selected=$(this).find("label");(selected.data("value")===response.value||""===selected.data("value")&&null===response.value)&&(selected.removeClass("badge-secondary"),selected.removeClass("badge-info"),selected.addClass("badge-success"))}));let studentcomment=$(this).find(".student-comment.editor_atto_content");studentcomment&&""!==response.studentcomment&&studentcomment.html(response.studentcomment);let privatecomment=$(this).find(".private-comment.editor_atto_content");privatecomment&&""!==response.privatecomment&&privatecomment.html(response.privatecomment)}}))}))})).fail(Notification.exception)};function saveResponses(finalise){$(".student-comment").each((function(){let row=$(this).parents('[data-region="question-row"]'),comment=row.find(".student-comment.editor_atto_content").html();comment='


'==comment?"":comment,responses[row.data("criterionid")].studentcomment=comment})),$(".private-comment").each((function(){let row=$(this).parents('[data-region="question-row"]'),comment=row.find(".private-comment.editor_atto_content").html();comment='


'==comment?"":comment,responses[row.data("criterionid")].privatecomment=comment}));let questionnaireTable=$('[data-region="questionnaire"]'),toUser=questionnaireTable.data("touserid"),toUserFullname=questionnaireTable.data("tousername"),verbalfeedbackId=questionnaireTable.data("verbalfeedbackid"),submissionId=questionnaireTable.data("submissionid");if(questionnaireTable.data("anonymous")&&finalise){let messageStrings=[{key:"finaliseanonymousfeedback",component:"mod_verbalfeedback"},{key:"confirmfinaliseanonymousfeedback",component:"mod_verbalfeedback",param:{name:toUserFullname}}];Str.get_strings(messageStrings,"mod_verbalfeedback").done((function(messages){!function(title,confirmationMessage,verbalfeedbackId,submissionId,toUser,responses,finalise){let confirmButtonTextPromise=Str.get_string("finalise","mod_verbalfeedback"),confirmModalPromise=ModalFactory.create({title:title,body:confirmationMessage,large:!0,type:ModalFactory.types.SAVE_CANCEL});$.when(confirmButtonTextPromise,confirmModalPromise).done((function(confirmButtonText,modal){modal.setSaveButtonText(confirmButtonText),modal.show(),modal.getRoot().on(ModalEvents.hidden,(function(){modal.setBody("")})),modal.getRoot().on(ModalEvents.save,(function(){submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise)}))}))}(messages[0],messages[1],verbalfeedbackId,submissionId,toUser,responses,finalise)})).fail(Notification.exception)}else submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise)}function submitResponses(verbalfeedbackId,submissionId,toUser,responses,finalise){let responseObjects=[];for(const tuple of Object.entries(responses))null!==tuple[1]&&responseObjects.push(tuple[1]);Ajax.call([{methodname:"mod_verbalfeedback_save_responses",args:{verbalfeedbackid:verbalfeedbackId,submissionid:submissionId,touserid:toUser,responses:responseObjects,complete:finalise}}])[0].done((function(response){Str.get_strings([{key:"responsessaved",component:"mod_verbalfeedback"},{key:"errorresponsesavefailed",component:"mod_verbalfeedback"}]).done((function(messages){let notificationData={};response.result?(notificationData.message=messages[0],notificationData.type="success"):(notificationData.message=messages[1],notificationData.type="error"),Notification.addNotification(notificationData)})).fail(Notification.exception),window.location=response.redirurl})).fail(Notification.exception)}return questionnaire.prototype.registerEvents=function(){$(".scaleoption").click((function(e){e.preventDefault();let row=$(this).parents('[data-region="question-row"]'),options=row.find("label");$.each(options,(function(){if($(this).hasClass("badge-success")){$(this).removeClass("badge-success"),$(this).addClass("badge-secondary");var forId=$(this).attr("for");$("#"+forId).removeAttr("checked")}}));let selected=$(this).find("label");selected.removeClass("badge-secondary"),selected.removeClass("badge-info"),selected.addClass("badge-success"),$("#"+selected.attr("for")).attr("checked","checked");let criterionid=row.data("criterionid");""===selected.data("value")?responses[criterionid].value=null:responses[criterionid].value=selected.data("value")})),$(".scaleoptionlabel").hover((function(e){e.preventDefault(),$(this).hasClass("badge-success")||($(this).hasClass("badge-secondary")?($(this).removeClass("badge-secondary"),$(this).addClass("badge-info")):($(this).addClass("badge-secondary"),$(this).removeClass("badge-info")))})),$(".detail-scaleoption").click((function(e){e.preventDefault();let row=$(this).parents('[data-region="detailed-rating"]'),value=$(this).find(".detail-scaleoptionlabel").data("value");row.find(".student-comment.editor_atto_content").append("")})),$(".detail-scaleoptionlabel").hover((function(e){e.preventDefault(),$(this).hasClass("badge-success")||($(this).hasClass("badge-secondary")?($(this).removeClass("badge-secondary"),$(this).addClass("badge-info")):($(this).addClass("badge-secondary"),$(this).removeClass("badge-info")))})),$("#save-feedback").click((function(){saveResponses(!1)})),$("#submit-feedback").click((function(){saveResponses(!0)})),$(".btn-detail-rating").click((function(e){e.preventDefault();let detailedRating=$(this).parents('[data-region="question-row"]').find(".detailed-rating");detailedRating.hasClass("hidden")?(detailedRating.removeClass("hidden"),$(this).html("−")):(detailedRating.addClass("hidden"),$(this).html("+"))}))},questionnaire})); //# sourceMappingURL=questionnaire.min.js.map \ No newline at end of file diff --git a/amd/build/questionnaire.min.js.map b/amd/build/questionnaire.min.js.map index 97e0a33..080137f 100644 --- a/amd/build/questionnaire.min.js.map +++ b/amd/build/questionnaire.min.js.map @@ -1 +1 @@ -{"version":3,"file":"questionnaire.min.js","sources":["../src/questionnaire.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * AMD code for the frequently used comments chooser for the marking guide grading form.\n *\n * @module mod_verbalfeedback/questionnaire\n * @class view\n * @copyright 2020 Kevin Tippenhauer \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery',\n 'core/templates',\n 'core/notification',\n 'core/ajax',\n 'core/str',\n 'core/modal_factory',\n 'core/modal_events'\n], function($, Templates, Notification, Ajax, Str, ModalFactory, ModalEvents) {\n\n var responses = [];\n var questionnaire = function() {\n this.registerEvents();\n\n // Prefill responses array.\n $('[data-region=\"question-row\"]').each(function() {\n responses[$(this).data('criterionid')] = {\n criterionid: $(this).data('criterionid'),\n value: null,\n studentcomment: \"\",\n privatecomment: \"\"\n };\n });\n\n let questionnaireTable = $('[data-region=\"questionnaire\"]');\n\n if(questionnaireTable.data('preview') == true) { // dont use '===' as $preview is '1' not 'true'.\n // do not look for existing submission on preview page\n return;\n }\n\n let fromUser = questionnaireTable.data('fromuserid');\n let toUser = questionnaireTable.data('touserid');\n let verbalfeedbackId = questionnaireTable.data('verbalfeedbackid');\n let submissionId = questionnaireTable.data('submissionid');\n\n let promises = Ajax.call([\n {\n methodname: 'mod_verbalfeedback_get_responses',\n args: {\n verbalfeedbackid: verbalfeedbackId,\n fromuserid: fromUser,\n touserid: toUser,\n submissionid: submissionId\n }\n }\n ]);\n\n promises[0].done(function(result) {\n $.each(result.responses, function() {\n let response = this;\n responses[response.criterionid]['criterionid'] = response.criterionid;\n responses[response.criterionid]['value'] = response.value;\n responses[response.criterionid]['studentcomment'] = response.studentcomment;\n responses[response.criterionid]['privatecomment'] = response.privatecomment;\n\n $('[data-region=\"question-row\"]').each(function() {\n if ($(this).data('criterionid') === response.criterionid) {\n let options = $(this).find('.scaleoption');\n if (options) {\n options.each(function() {\n // Mark selected option as selected.\n let selected = $(this).find('label');\n if (selected.data('value') === response.value) {\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n } else if (selected.data('value') === \"\" && response.value === null) {\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n }\n });\n }\n let studentcomment = $(this).find('.student-comment.editor_atto_content');\n if (studentcomment && response.studentcomment !== '') {\n studentcomment.html(response.studentcomment);\n }\n let privatecomment = $(this).find('.private-comment.editor_atto_content');\n if (privatecomment && response.privatecomment !== '') {\n privatecomment.html(response.privatecomment);\n }\n }\n });\n });\n }).fail(Notification.exception);\n };\n\n questionnaire.prototype.registerEvents = function() {\n $('.scaleoption').click(function(e) {\n e.preventDefault();\n\n let row = $(this).parents('[data-region=\"question-row\"]');\n let options = row.find('label');\n\n // Deselect the option that has been selected.\n $.each(options, function() {\n if ($(this).hasClass('badge-success')) {\n $(this).removeClass('badge-success');\n $(this).addClass('badge-secondary');\n\n var forId = $(this).attr('for');\n var optionRadio = $(\"#\" + forId);\n optionRadio.removeAttr('checked');\n }\n });\n\n // Mark selected option as selected.\n let selected = $(this).find('label');\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n\n // Mark hidden radio button as checked.\n let radio = $(\"#\" + selected.attr('for'));\n radio.attr('checked', 'checked');\n let criterionid = row.data('criterionid');\n\n\n\n // Add this selected value to the array of responses.\n if (selected.data('value') === \"\") { // === is necessary because == \"0\" equals true;\n responses[criterionid]['value'] = null;\n } else {\n responses[criterionid]['value'] = selected.data('value');\n }\n });\n\n $('.scaleoptionlabel').hover(function(e) {\n e.preventDefault();\n\n if (!$(this).hasClass('badge-success')) {\n if ($(this).hasClass('badge-secondary')) {\n $(this).removeClass('badge-secondary');\n $(this).addClass('badge-info');\n } else {\n $(this).addClass('badge-secondary');\n $(this).removeClass('badge-info');\n }\n }\n });\n\n $('.detail-scaleoption').click(function(e) {\n e.preventDefault();\n\n let row = $(this).parents('[data-region=\"detailed-rating\"]');\n let value = $(this).find('.detail-scaleoptionlabel').data(\"value\");\n let studentComment = row.find('.student-comment.editor_atto_content');\n studentComment.append(\"
  • \" + value + \"
\");\n\n });\n\n $('.detail-scaleoptionlabel').hover(function(e) {\n e.preventDefault();\n\n if (!$(this).hasClass('badge-success')) {\n if ($(this).hasClass('badge-secondary')) {\n $(this).removeClass('badge-secondary');\n $(this).addClass('badge-info');\n } else {\n $(this).addClass('badge-secondary');\n $(this).removeClass('badge-info');\n }\n }\n });\n\n $(\"#save-feedback\").click(function() {\n saveResponses(false);\n });\n\n $(\"#submit-feedback\").click(function() {\n saveResponses(true);\n });\n\n $(\".btn-detail-rating\").click(function(e) {\n e.preventDefault();\n let row = $(this).parents('[data-region=\"question-row\"]');\n let detailedRating = row.find(\".detailed-rating\");\n if(detailedRating.hasClass(\"hidden\")) {\n detailedRating.removeClass(\"hidden\");\n $(this).html(\"−\");\n } else {\n detailedRating.addClass(\"hidden\");\n $(this).html(\"+\");\n }\n\n });\n };\n\n /**\n * Save the responses.\n *\n * @param {boolean} finalise\n */\n function saveResponses(finalise) {\n\n $('.student-comment').each(function() {\n let row = $(this).parents('[data-region=\"question-row\"]');\n let comment = row.find('.student-comment.editor_atto_content').html();\n comment = (comment == \"


\" ? \"\": comment); // drop empty comments\n responses[row.data('criterionid')]['studentcomment'] = comment;\n });\n $('.private-comment').each(function() {\n let row = $(this).parents('[data-region=\"question-row\"]');\n let comment = row.find('.private-comment.editor_atto_content').html();\n comment = (comment == \"


\" ? \"\": comment); // drop empty comments\n responses[row.data('criterionid')]['privatecomment'] = comment;\n });\n\n let questionnaireTable = $('[data-region=\"questionnaire\"]');\n let toUser = questionnaireTable.data('touserid');\n let toUserFullname = questionnaireTable.data('tousername');\n let verbalfeedbackId = questionnaireTable.data('verbalfeedbackid');\n let submissionId = questionnaireTable.data('submissionid');\n let anonymous = questionnaireTable.data('anonymous');\n\n if (anonymous && finalise) {\n // Show confirmation dialogue to anonymise the feedback responses.\n let messageStrings = [\n {\n key: 'finaliseanonymousfeedback',\n component: 'mod_verbalfeedback'\n },\n {\n key: 'confirmfinaliseanonymousfeedback',\n component: 'mod_verbalfeedback',\n param: {\n 'name': toUserFullname\n }\n }\n ];\n\n Str.get_strings(messageStrings, 'mod_verbalfeedback').done(function(messages) {\n showConfirmationDialogue(messages[0], messages[1], verbalfeedbackId, submissionId, toUser, responses, finalise);\n }).fail(Notification.exception);\n } else {\n // Just save the responses.\n submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise);\n }\n }\n\n /**\n * Send the responses to the server.\n *\n * @param {number} verbalfeedbackId\n * @param {number} submissionId\n * @param {number} toUser\n * @param {array} responses\n * @param {boolean} finalise\n */\n function submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise) {\n let responseObjects = [];\n for (tuple of Object.entries(responses)) {\n if (tuple[1] !== null) {\n responseObjects.push(tuple[1]);\n }\n }\n\n let promises = Ajax.call([\n {\n methodname: 'mod_verbalfeedback_save_responses',\n args: {\n verbalfeedbackid: verbalfeedbackId,\n submissionid: submissionId,\n touserid: toUser,\n responses: responseObjects,\n complete: finalise\n }\n }\n ]);\n\n promises[0].done(function(response) {\n // console.log(response);\n let messageStrings = [\n {\n key: 'responsessaved',\n component: 'mod_verbalfeedback'\n },\n {\n key: 'errorresponsesavefailed',\n component: 'mod_verbalfeedback'\n }\n ];\n\n Str.get_strings(messageStrings).done(function(messages) {\n let notificationData = {};\n if (response.result) {\n notificationData.message = messages[0];\n notificationData.type = \"success\";\n } else {\n notificationData.message = messages[1];\n notificationData.type = \"error\";\n }\n Notification.addNotification(notificationData);\n }).fail(Notification.exception);\n\n window.location = response.redirurl;\n }).fail(Notification.exception);\n }\n\n /**\n * Renders the confirmation dialogue to submit and finalise the responses.\n *\n * @param {string} title\n * @param {string} confirmationMessage\n * @param {number} verbalfeedbackId\n * @param {number} submissionId\n * @param {number} toUser\n * @param {Array} responses\n * @param {boolean} finalise\n */\n function showConfirmationDialogue(title, confirmationMessage, verbalfeedbackId, submissionId, toUser, responses, finalise) {\n let confirmButtonTextPromise = Str.get_string('finalise', 'mod_verbalfeedback');\n let confirmModalPromise = ModalFactory.create({\n title: title,\n body: confirmationMessage,\n large: true,\n type: ModalFactory.types.SAVE_CANCEL\n });\n $.when(confirmButtonTextPromise, confirmModalPromise).done(function(confirmButtonText, modal) {\n modal.setSaveButtonText(confirmButtonText);\n\n // Display the dialogue.\n modal.show();\n\n // On hide handler.\n modal.getRoot().on(ModalEvents.hidden, function() {\n // Empty modal contents when it's hidden.\n modal.setBody('');\n });\n\n modal.getRoot().on(ModalEvents.save, function() {\n submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise);\n });\n });\n\n }\n\n return questionnaire;\n});\n"],"names":["define","$","Templates","Notification","Ajax","Str","ModalFactory","ModalEvents","responses","questionnaire","registerEvents","each","this","data","criterionid","value","studentcomment","privatecomment","questionnaireTable","fromUser","toUser","verbalfeedbackId","submissionId","call","methodname","args","verbalfeedbackid","fromuserid","touserid","submissionid","done","result","response","options","find","selected","removeClass","addClass","html","fail","exception","saveResponses","finalise","row","parents","comment","toUserFullname","messageStrings","key","component","param","get_strings","messages","title","confirmationMessage","confirmButtonTextPromise","get_string","confirmModalPromise","create","body","large","type","types","SAVE_CANCEL","when","confirmButtonText","modal","setSaveButtonText","show","getRoot","on","hidden","setBody","save","submitResponses","showConfirmationDialogue","responseObjects","tuple","Object","entries","push","complete","notificationData","message","addNotification","window","location","redirurl","prototype","click","e","preventDefault","hasClass","forId","attr","removeAttr","hover","append","detailedRating"],"mappings":";;;;;;;;AAuBAA,0CAAO,CAAC,SACJ,iBACA,oBACA,YACA,WACA,qBACA,sBACD,SAASC,EAAGC,UAAWC,aAAcC,KAAMC,IAAKC,aAAcC,iBAEzDC,UAAY,GACZC,cAAgB,gBACXC,iBAGLT,EAAE,gCAAgCU,MAAK,WACnCH,UAAUP,EAAEW,MAAMC,KAAK,gBAAkB,CACrCC,YAAab,EAAEW,MAAMC,KAAK,eAC1BE,MAAO,KACPC,eAAgB,GAChBC,eAAgB,WAIpBC,mBAAqBjB,EAAE,oCAEc,GAAtCiB,mBAAmBL,KAAK,sBAKvBM,SAAWD,mBAAmBL,KAAK,cACnCO,OAASF,mBAAmBL,KAAK,YACjCQ,iBAAmBH,mBAAmBL,KAAK,oBAC3CS,aAAeJ,mBAAmBL,KAAK,gBAE5BT,KAAKmB,KAAK,CACrB,CACIC,WAAY,mCACZC,KAAM,CACFC,iBAAkBL,iBAClBM,WAAYR,SACZS,SAAUR,OACVS,aAAcP,iBAKjB,GAAGQ,MAAK,SAASC,QACtB9B,EAAEU,KAAKoB,OAAOvB,WAAW,eACnBwB,SAAWpB,KACbJ,UAAUwB,SAASlB,aAAnB,YAAiDkB,SAASlB,YAC1DN,UAAUwB,SAASlB,aAAnB,MAA2CkB,SAASjB,MACpDP,UAAUwB,SAASlB,aAAnB,eAAoDkB,SAAShB,eAC7DR,UAAUwB,SAASlB,aAAnB,eAAoDkB,SAASf,eAE7DhB,EAAE,gCAAgCU,MAAK,cAC/BV,EAAEW,MAAMC,KAAK,iBAAmBmB,SAASlB,YAAa,KACpDmB,QAAUhC,EAAEW,MAAMsB,KAAK,gBACrBD,SACAA,QAAQtB,MAAK,eAELwB,SAAWlC,EAAEW,MAAMsB,KAAK,UACxBC,SAAStB,KAAK,WAAamB,SAASjB,OAIF,KAA3BoB,SAAStB,KAAK,UAAsC,OAAnBmB,SAASjB,SAHjDoB,SAASC,YAAY,mBACrBD,SAASC,YAAY,cACrBD,SAASE,SAAS,yBAQ1BrB,eAAiBf,EAAEW,MAAMsB,KAAK,wCAC9BlB,gBAA8C,KAA5BgB,SAAShB,gBAC3BA,eAAesB,KAAKN,SAAShB,oBAE7BC,eAAiBhB,EAAEW,MAAMsB,KAAK,wCAC9BjB,gBAA8C,KAA5Be,SAASf,gBAC3BA,eAAeqB,KAAKN,SAASf,0BAK9CsB,KAAKpC,aAAaqC,qBA6GhBC,cAAcC,UAEnBzC,EAAE,oBAAoBU,MAAK,eACnBgC,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBC,QAAUF,IAAIT,KAAK,wCAAwCI,OAC/DO,QAAsB,mDAAXA,QAAmE,GAAIA,QAClFrC,UAAUmC,IAAI9B,KAAK,gBAAnB,eAAuDgC,WAE3D5C,EAAE,oBAAoBU,MAAK,eACnBgC,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBC,QAAUF,IAAIT,KAAK,wCAAwCI,OAC/DO,QAAsB,mDAAXA,QAAmE,GAAIA,QAClFrC,UAAUmC,IAAI9B,KAAK,gBAAnB,eAAuDgC,eAGvD3B,mBAAqBjB,EAAE,iCACvBmB,OAASF,mBAAmBL,KAAK,YACjCiC,eAAiB5B,mBAAmBL,KAAK,cACzCQ,iBAAmBH,mBAAmBL,KAAK,oBAC3CS,aAAeJ,mBAAmBL,KAAK,mBAC3BK,mBAAmBL,KAAK,cAEvB6B,SAAU,KAEnBK,eAAiB,CACjB,CACIC,IAAK,4BACLC,UAAW,sBAEf,CACID,IAAK,mCACLC,UAAW,qBACXC,MAAO,MACKJ,kBAKpBzC,IAAI8C,YAAYJ,eAAgB,sBAAsBjB,MAAK,SAASsB,oBA+E1CC,MAAOC,oBAAqBjC,iBAAkBC,aAAcF,OAAQZ,UAAWkC,cAC3Ga,yBAA2BlD,IAAImD,WAAW,WAAY,sBACpDC,oBAAsBnD,aAAaoD,OAAO,CAC1CL,MAAOA,MACPM,KAAML,oBACNM,OAAO,EACPC,KAAMvD,aAAawD,MAAMC,cAE7B9D,EAAE+D,KAAKT,yBAA0BE,qBAAqB3B,MAAK,SAASmC,kBAAmBC,OACnFA,MAAMC,kBAAkBF,mBAGxBC,MAAME,OAGNF,MAAMG,UAAUC,GAAG/D,YAAYgE,QAAQ,WAEnCL,MAAMM,QAAQ,OAGlBN,MAAMG,UAAUC,GAAG/D,YAAYkE,MAAM,WACjCC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,gBAnGnEiC,CAAyBvB,SAAS,GAAIA,SAAS,GAAI/B,iBAAkBC,aAAcF,OAAQZ,UAAWkC,aACvGH,KAAKpC,aAAaqC,gBAGrBkC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,mBAalEgC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,cACpEkC,gBAAkB,OACjBC,SAASC,OAAOC,QAAQvE,WACV,OAAbqE,MAAM,IACRD,gBAAgBI,KAAKH,MAAM,IAIhBzE,KAAKmB,KAAK,CACrB,CACIC,WAAY,oCACZC,KAAM,CACFC,iBAAkBL,iBAClBQ,aAAcP,aACdM,SAAUR,OACVZ,UAAWoE,gBACXK,SAAUvC,aAKb,GAAGZ,MAAK,SAASE,UAatB3B,IAAI8C,YAXe,CACf,CACIH,IAAK,iBACLC,UAAW,sBAEf,CACID,IAAK,0BACLC,UAAW,wBAIanB,MAAK,SAASsB,cACxC8B,iBAAmB,GACjBlD,SAASD,QACTmD,iBAAiBC,QAAU/B,SAAS,GACpC8B,iBAAiBrB,KAAO,YAExBqB,iBAAiBC,QAAU/B,SAAS,GACpC8B,iBAAiBrB,KAAO,SAE5B1D,aAAaiF,gBAAgBF,qBAC9B3C,KAAKpC,aAAaqC,WAErB6C,OAAOC,SAAWtD,SAASuD,YAC5BhD,KAAKpC,aAAaqC,kBAjNzB/B,cAAc+E,UAAU9E,eAAiB,WACrCT,EAAE,gBAAgBwF,OAAM,SAASC,GAC7BA,EAAEC,qBAEEhD,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBX,QAAUU,IAAIT,KAAK,SAGvBjC,EAAEU,KAAKsB,SAAS,cACRhC,EAAEW,MAAMgF,SAAS,iBAAkB,CACnC3F,EAAEW,MAAMwB,YAAY,iBACpBnC,EAAEW,MAAMyB,SAAS,uBAEbwD,MAAQ5F,EAAEW,MAAMkF,KAAK,OACP7F,EAAE,IAAM4F,OACdE,WAAW,mBAK3B5D,SAAWlC,EAAEW,MAAMsB,KAAK,SAC5BC,SAASC,YAAY,mBACrBD,SAASC,YAAY,cACrBD,SAASE,SAAS,iBAGNpC,EAAE,IAAMkC,SAAS2D,KAAK,QAC5BA,KAAK,UAAW,eAClBhF,YAAc6B,IAAI9B,KAAK,eAKI,KAA3BsB,SAAStB,KAAK,SACdL,UAAUM,aAAV,MAAkC,KAElCN,UAAUM,aAAV,MAAkCqB,SAAStB,KAAK,YAIxDZ,EAAE,qBAAqB+F,OAAM,SAASN,GAClCA,EAAEC,iBAEG1F,EAAEW,MAAMgF,SAAS,mBACd3F,EAAEW,MAAMgF,SAAS,oBACjB3F,EAAEW,MAAMwB,YAAY,mBACpBnC,EAAEW,MAAMyB,SAAS,gBAEjBpC,EAAEW,MAAMyB,SAAS,mBACjBpC,EAAEW,MAAMwB,YAAY,mBAKhCnC,EAAE,uBAAuBwF,OAAM,SAASC,GACpCA,EAAEC,qBAEEhD,IAAM1C,EAAEW,MAAMgC,QAAQ,mCACtB7B,MAAQd,EAAEW,MAAMsB,KAAK,4BAA4BrB,KAAK,SACrC8B,IAAIT,KAAK,wCACf+D,OAAO,WAAalF,MAAQ,iBAI/Cd,EAAE,4BAA4B+F,OAAM,SAASN,GACzCA,EAAEC,iBAEG1F,EAAEW,MAAMgF,SAAS,mBACd3F,EAAEW,MAAMgF,SAAS,oBACjB3F,EAAEW,MAAMwB,YAAY,mBACpBnC,EAAEW,MAAMyB,SAAS,gBAEjBpC,EAAEW,MAAMyB,SAAS,mBACjBpC,EAAEW,MAAMwB,YAAY,mBAKhCnC,EAAE,kBAAkBwF,OAAM,WACtBhD,eAAc,MAGlBxC,EAAE,oBAAoBwF,OAAM,WACxBhD,eAAc,MAGlBxC,EAAE,sBAAsBwF,OAAM,SAASC,GACnCA,EAAEC,qBAEEO,eADMjG,EAAEW,MAAMgC,QAAQ,gCACDV,KAAK,oBAC3BgE,eAAeN,SAAS,WACvBM,eAAe9D,YAAY,UAC3BnC,EAAEW,MAAM0B,KAAK,OAEb4D,eAAe7D,SAAS,UACxBpC,EAAEW,MAAM0B,KAAK,UA2JlB7B"} \ No newline at end of file +{"version":3,"file":"questionnaire.min.js","sources":["../src/questionnaire.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * AMD code for the frequently used comments chooser for the marking guide grading form.\n *\n * @module mod_verbalfeedback/questionnaire\n * @class view\n * @copyright 2020 Kevin Tippenhauer \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery',\n 'core/templates',\n 'core/notification',\n 'core/ajax',\n 'core/str',\n 'core/modal_factory',\n 'core/modal_events'\n], function($, Templates, Notification, Ajax, Str, ModalFactory, ModalEvents) {\n\n var responses = [];\n var questionnaire = function() {\n this.registerEvents();\n\n // Prefill responses array.\n $('[data-region=\"question-row\"]').each(function() {\n responses[$(this).data('criterionid')] = {\n criterionid: $(this).data('criterionid'),\n value: null,\n studentcomment: \"\",\n privatecomment: \"\"\n };\n });\n\n let questionnaireTable = $('[data-region=\"questionnaire\"]');\n\n if(questionnaireTable.data('preview') == true) { // dont use '===' as $preview is '1' not 'true'.\n // do not look for existing submission on preview page\n return;\n }\n\n let fromUser = questionnaireTable.data('fromuserid');\n let toUser = questionnaireTable.data('touserid');\n let verbalfeedbackId = questionnaireTable.data('verbalfeedbackid');\n let submissionId = questionnaireTable.data('submissionid');\n\n let promises = Ajax.call([\n {\n methodname: 'mod_verbalfeedback_get_responses',\n args: {\n verbalfeedbackid: verbalfeedbackId,\n fromuserid: fromUser,\n touserid: toUser,\n submissionid: submissionId\n }\n }\n ]);\n\n promises[0].done(function(result) {\n $.each(result.responses, function() {\n let response = this;\n responses[response.criterionid]['criterionid'] = response.criterionid;\n responses[response.criterionid]['value'] = response.value;\n responses[response.criterionid]['studentcomment'] = response.studentcomment;\n responses[response.criterionid]['privatecomment'] = response.privatecomment;\n\n $('[data-region=\"question-row\"]').each(function() {\n if ($(this).data('criterionid') === response.criterionid) {\n let options = $(this).find('.scaleoption');\n if (options) {\n options.each(function() {\n // Mark selected option as selected.\n let selected = $(this).find('label');\n if (selected.data('value') === response.value) {\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n } else if (selected.data('value') === \"\" && response.value === null) {\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n }\n });\n }\n let studentcomment = $(this).find('.student-comment.editor_atto_content');\n if (studentcomment && response.studentcomment !== '') {\n studentcomment.html(response.studentcomment);\n }\n let privatecomment = $(this).find('.private-comment.editor_atto_content');\n if (privatecomment && response.privatecomment !== '') {\n privatecomment.html(response.privatecomment);\n }\n }\n });\n });\n }).fail(Notification.exception);\n };\n\n questionnaire.prototype.registerEvents = function() {\n $('.scaleoption').click(function(e) {\n e.preventDefault();\n\n let row = $(this).parents('[data-region=\"question-row\"]');\n let options = row.find('label');\n\n // Deselect the option that has been selected.\n $.each(options, function() {\n if ($(this).hasClass('badge-success')) {\n $(this).removeClass('badge-success');\n $(this).addClass('badge-secondary');\n\n var forId = $(this).attr('for');\n var optionRadio = $(\"#\" + forId);\n optionRadio.removeAttr('checked');\n }\n });\n\n // Mark selected option as selected.\n let selected = $(this).find('label');\n selected.removeClass('badge-secondary');\n selected.removeClass('badge-info');\n selected.addClass('badge-success');\n\n // Mark hidden radio button as checked.\n let radio = $(\"#\" + selected.attr('for'));\n radio.attr('checked', 'checked');\n let criterionid = row.data('criterionid');\n\n\n\n // Add this selected value to the array of responses.\n if (selected.data('value') === \"\") { // === is necessary because == \"0\" equals true;\n responses[criterionid]['value'] = null;\n } else {\n responses[criterionid]['value'] = selected.data('value');\n }\n });\n\n $('.scaleoptionlabel').hover(function(e) {\n e.preventDefault();\n\n if (!$(this).hasClass('badge-success')) {\n if ($(this).hasClass('badge-secondary')) {\n $(this).removeClass('badge-secondary');\n $(this).addClass('badge-info');\n } else {\n $(this).addClass('badge-secondary');\n $(this).removeClass('badge-info');\n }\n }\n });\n\n $('.detail-scaleoption').click(function(e) {\n e.preventDefault();\n\n let row = $(this).parents('[data-region=\"detailed-rating\"]');\n let value = $(this).find('.detail-scaleoptionlabel').data(\"value\");\n let studentComment = row.find('.student-comment.editor_atto_content');\n studentComment.append(\"
  • \" + value + \"
\");\n\n });\n\n $('.detail-scaleoptionlabel').hover(function(e) {\n e.preventDefault();\n\n if (!$(this).hasClass('badge-success')) {\n if ($(this).hasClass('badge-secondary')) {\n $(this).removeClass('badge-secondary');\n $(this).addClass('badge-info');\n } else {\n $(this).addClass('badge-secondary');\n $(this).removeClass('badge-info');\n }\n }\n });\n\n $(\"#save-feedback\").click(function() {\n saveResponses(false);\n });\n\n $(\"#submit-feedback\").click(function() {\n saveResponses(true);\n });\n\n $(\".btn-detail-rating\").click(function(e) {\n e.preventDefault();\n let row = $(this).parents('[data-region=\"question-row\"]');\n let detailedRating = row.find(\".detailed-rating\");\n if(detailedRating.hasClass(\"hidden\")) {\n detailedRating.removeClass(\"hidden\");\n $(this).html(\"−\");\n } else {\n detailedRating.addClass(\"hidden\");\n $(this).html(\"+\");\n }\n\n });\n };\n\n /**\n * Save the responses.\n *\n * @param {boolean} finalise\n */\n function saveResponses(finalise) {\n\n $('.student-comment').each(function() {\n let row = $(this).parents('[data-region=\"question-row\"]');\n let comment = row.find('.student-comment.editor_atto_content').html();\n comment = (comment == \"


\" ? \"\": comment); // drop empty comments\n responses[row.data('criterionid')]['studentcomment'] = comment;\n });\n $('.private-comment').each(function() {\n let row = $(this).parents('[data-region=\"question-row\"]');\n let comment = row.find('.private-comment.editor_atto_content').html();\n comment = (comment == \"


\" ? \"\": comment); // drop empty comments\n responses[row.data('criterionid')]['privatecomment'] = comment;\n });\n\n let questionnaireTable = $('[data-region=\"questionnaire\"]');\n let toUser = questionnaireTable.data('touserid');\n let toUserFullname = questionnaireTable.data('tousername');\n let verbalfeedbackId = questionnaireTable.data('verbalfeedbackid');\n let submissionId = questionnaireTable.data('submissionid');\n let anonymous = questionnaireTable.data('anonymous');\n\n if (anonymous && finalise) {\n // Show confirmation dialogue to anonymise the feedback responses.\n let messageStrings = [\n {\n key: 'finaliseanonymousfeedback',\n component: 'mod_verbalfeedback'\n },\n {\n key: 'confirmfinaliseanonymousfeedback',\n component: 'mod_verbalfeedback',\n param: {\n 'name': toUserFullname\n }\n }\n ];\n\n Str.get_strings(messageStrings, 'mod_verbalfeedback').done(function(messages) {\n showConfirmationDialogue(messages[0], messages[1], verbalfeedbackId, submissionId, toUser, responses, finalise);\n }).fail(Notification.exception);\n } else {\n // Just save the responses.\n submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise);\n }\n }\n\n /**\n * Send the responses to the server.\n *\n * @param {number} verbalfeedbackId\n * @param {number} submissionId\n * @param {number} toUser\n * @param {array} responses\n * @param {boolean} finalise\n */\n function submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise) {\n let responseObjects = [];\n for (const tuple of Object.entries(responses)) {\n if (tuple[1] !== null) {\n responseObjects.push(tuple[1]);\n }\n }\n\n let promises = Ajax.call([\n {\n methodname: 'mod_verbalfeedback_save_responses',\n args: {\n verbalfeedbackid: verbalfeedbackId,\n submissionid: submissionId,\n touserid: toUser,\n responses: responseObjects,\n complete: finalise\n }\n }\n ]);\n\n promises[0].done(function(response) {\n // console.log(response);\n let messageStrings = [\n {\n key: 'responsessaved',\n component: 'mod_verbalfeedback'\n },\n {\n key: 'errorresponsesavefailed',\n component: 'mod_verbalfeedback'\n }\n ];\n\n Str.get_strings(messageStrings).done(function(messages) {\n let notificationData = {};\n if (response.result) {\n notificationData.message = messages[0];\n notificationData.type = \"success\";\n } else {\n notificationData.message = messages[1];\n notificationData.type = \"error\";\n }\n Notification.addNotification(notificationData);\n }).fail(Notification.exception);\n\n window.location = response.redirurl;\n }).fail(Notification.exception);\n }\n\n /**\n * Renders the confirmation dialogue to submit and finalise the responses.\n *\n * @param {string} title\n * @param {string} confirmationMessage\n * @param {number} verbalfeedbackId\n * @param {number} submissionId\n * @param {number} toUser\n * @param {Array} responses\n * @param {boolean} finalise\n */\n function showConfirmationDialogue(title, confirmationMessage, verbalfeedbackId, submissionId, toUser, responses, finalise) {\n let confirmButtonTextPromise = Str.get_string('finalise', 'mod_verbalfeedback');\n let confirmModalPromise = ModalFactory.create({\n title: title,\n body: confirmationMessage,\n large: true,\n type: ModalFactory.types.SAVE_CANCEL\n });\n $.when(confirmButtonTextPromise, confirmModalPromise).done(function(confirmButtonText, modal) {\n modal.setSaveButtonText(confirmButtonText);\n\n // Display the dialogue.\n modal.show();\n\n // On hide handler.\n modal.getRoot().on(ModalEvents.hidden, function() {\n // Empty modal contents when it's hidden.\n modal.setBody('');\n });\n\n modal.getRoot().on(ModalEvents.save, function() {\n submitResponses(verbalfeedbackId, submissionId, toUser, responses, finalise);\n });\n });\n\n }\n\n return questionnaire;\n});\n"],"names":["define","$","Templates","Notification","Ajax","Str","ModalFactory","ModalEvents","responses","questionnaire","registerEvents","each","this","data","criterionid","value","studentcomment","privatecomment","questionnaireTable","fromUser","toUser","verbalfeedbackId","submissionId","call","methodname","args","verbalfeedbackid","fromuserid","touserid","submissionid","done","result","response","options","find","selected","removeClass","addClass","html","fail","exception","saveResponses","finalise","row","parents","comment","toUserFullname","messageStrings","key","component","param","get_strings","messages","title","confirmationMessage","confirmButtonTextPromise","get_string","confirmModalPromise","create","body","large","type","types","SAVE_CANCEL","when","confirmButtonText","modal","setSaveButtonText","show","getRoot","on","hidden","setBody","save","submitResponses","showConfirmationDialogue","responseObjects","tuple","Object","entries","push","complete","notificationData","message","addNotification","window","location","redirurl","prototype","click","e","preventDefault","hasClass","forId","attr","removeAttr","hover","append","detailedRating"],"mappings":";;;;;;;;AAuBAA,0CAAO,CAAC,SACJ,iBACA,oBACA,YACA,WACA,qBACA,sBACD,SAASC,EAAGC,UAAWC,aAAcC,KAAMC,IAAKC,aAAcC,iBAEzDC,UAAY,GACZC,cAAgB,gBACXC,iBAGLT,EAAE,gCAAgCU,MAAK,WACnCH,UAAUP,EAAEW,MAAMC,KAAK,gBAAkB,CACrCC,YAAab,EAAEW,MAAMC,KAAK,eAC1BE,MAAO,KACPC,eAAgB,GAChBC,eAAgB,WAIpBC,mBAAqBjB,EAAE,oCAEc,GAAtCiB,mBAAmBL,KAAK,sBAKvBM,SAAWD,mBAAmBL,KAAK,cACnCO,OAASF,mBAAmBL,KAAK,YACjCQ,iBAAmBH,mBAAmBL,KAAK,oBAC3CS,aAAeJ,mBAAmBL,KAAK,gBAE5BT,KAAKmB,KAAK,CACrB,CACIC,WAAY,mCACZC,KAAM,CACFC,iBAAkBL,iBAClBM,WAAYR,SACZS,SAAUR,OACVS,aAAcP,iBAKjB,GAAGQ,MAAK,SAASC,QACtB9B,EAAEU,KAAKoB,OAAOvB,WAAW,eACnBwB,SAAWpB,KACbJ,UAAUwB,SAASlB,aAAnB,YAAiDkB,SAASlB,YAC1DN,UAAUwB,SAASlB,aAAnB,MAA2CkB,SAASjB,MACpDP,UAAUwB,SAASlB,aAAnB,eAAoDkB,SAAShB,eAC7DR,UAAUwB,SAASlB,aAAnB,eAAoDkB,SAASf,eAE7DhB,EAAE,gCAAgCU,MAAK,cAC/BV,EAAEW,MAAMC,KAAK,iBAAmBmB,SAASlB,YAAa,KACpDmB,QAAUhC,EAAEW,MAAMsB,KAAK,gBACrBD,SACAA,QAAQtB,MAAK,eAELwB,SAAWlC,EAAEW,MAAMsB,KAAK,UACxBC,SAAStB,KAAK,WAAamB,SAASjB,OAIF,KAA3BoB,SAAStB,KAAK,UAAsC,OAAnBmB,SAASjB,SAHjDoB,SAASC,YAAY,mBACrBD,SAASC,YAAY,cACrBD,SAASE,SAAS,yBAQ1BrB,eAAiBf,EAAEW,MAAMsB,KAAK,wCAC9BlB,gBAA8C,KAA5BgB,SAAShB,gBAC3BA,eAAesB,KAAKN,SAAShB,oBAE7BC,eAAiBhB,EAAEW,MAAMsB,KAAK,wCAC9BjB,gBAA8C,KAA5Be,SAASf,gBAC3BA,eAAeqB,KAAKN,SAASf,0BAK9CsB,KAAKpC,aAAaqC,qBA6GhBC,cAAcC,UAEnBzC,EAAE,oBAAoBU,MAAK,eACnBgC,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBC,QAAUF,IAAIT,KAAK,wCAAwCI,OAC/DO,QAAsB,mDAAXA,QAAmE,GAAIA,QAClFrC,UAAUmC,IAAI9B,KAAK,gBAAnB,eAAuDgC,WAE3D5C,EAAE,oBAAoBU,MAAK,eACnBgC,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBC,QAAUF,IAAIT,KAAK,wCAAwCI,OAC/DO,QAAsB,mDAAXA,QAAmE,GAAIA,QAClFrC,UAAUmC,IAAI9B,KAAK,gBAAnB,eAAuDgC,eAGvD3B,mBAAqBjB,EAAE,iCACvBmB,OAASF,mBAAmBL,KAAK,YACjCiC,eAAiB5B,mBAAmBL,KAAK,cACzCQ,iBAAmBH,mBAAmBL,KAAK,oBAC3CS,aAAeJ,mBAAmBL,KAAK,mBAC3BK,mBAAmBL,KAAK,cAEvB6B,SAAU,KAEnBK,eAAiB,CACjB,CACIC,IAAK,4BACLC,UAAW,sBAEf,CACID,IAAK,mCACLC,UAAW,qBACXC,MAAO,MACKJ,kBAKpBzC,IAAI8C,YAAYJ,eAAgB,sBAAsBjB,MAAK,SAASsB,oBA+E1CC,MAAOC,oBAAqBjC,iBAAkBC,aAAcF,OAAQZ,UAAWkC,cAC3Ga,yBAA2BlD,IAAImD,WAAW,WAAY,sBACpDC,oBAAsBnD,aAAaoD,OAAO,CAC1CL,MAAOA,MACPM,KAAML,oBACNM,OAAO,EACPC,KAAMvD,aAAawD,MAAMC,cAE7B9D,EAAE+D,KAAKT,yBAA0BE,qBAAqB3B,MAAK,SAASmC,kBAAmBC,OACnFA,MAAMC,kBAAkBF,mBAGxBC,MAAME,OAGNF,MAAMG,UAAUC,GAAG/D,YAAYgE,QAAQ,WAEnCL,MAAMM,QAAQ,OAGlBN,MAAMG,UAAUC,GAAG/D,YAAYkE,MAAM,WACjCC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,gBAnGnEiC,CAAyBvB,SAAS,GAAIA,SAAS,GAAI/B,iBAAkBC,aAAcF,OAAQZ,UAAWkC,aACvGH,KAAKpC,aAAaqC,gBAGrBkC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,mBAalEgC,gBAAgBrD,iBAAkBC,aAAcF,OAAQZ,UAAWkC,cACpEkC,gBAAkB,OACjB,MAAMC,SAASC,OAAOC,QAAQvE,WAChB,OAAbqE,MAAM,IACRD,gBAAgBI,KAAKH,MAAM,IAIhBzE,KAAKmB,KAAK,CACrB,CACIC,WAAY,oCACZC,KAAM,CACFC,iBAAkBL,iBAClBQ,aAAcP,aACdM,SAAUR,OACVZ,UAAWoE,gBACXK,SAAUvC,aAKb,GAAGZ,MAAK,SAASE,UAatB3B,IAAI8C,YAXe,CACf,CACIH,IAAK,iBACLC,UAAW,sBAEf,CACID,IAAK,0BACLC,UAAW,wBAIanB,MAAK,SAASsB,cACxC8B,iBAAmB,GACjBlD,SAASD,QACTmD,iBAAiBC,QAAU/B,SAAS,GACpC8B,iBAAiBrB,KAAO,YAExBqB,iBAAiBC,QAAU/B,SAAS,GACpC8B,iBAAiBrB,KAAO,SAE5B1D,aAAaiF,gBAAgBF,qBAC9B3C,KAAKpC,aAAaqC,WAErB6C,OAAOC,SAAWtD,SAASuD,YAC5BhD,KAAKpC,aAAaqC,kBAjNzB/B,cAAc+E,UAAU9E,eAAiB,WACrCT,EAAE,gBAAgBwF,OAAM,SAASC,GAC7BA,EAAEC,qBAEEhD,IAAM1C,EAAEW,MAAMgC,QAAQ,gCACtBX,QAAUU,IAAIT,KAAK,SAGvBjC,EAAEU,KAAKsB,SAAS,cACRhC,EAAEW,MAAMgF,SAAS,iBAAkB,CACnC3F,EAAEW,MAAMwB,YAAY,iBACpBnC,EAAEW,MAAMyB,SAAS,uBAEbwD,MAAQ5F,EAAEW,MAAMkF,KAAK,OACP7F,EAAE,IAAM4F,OACdE,WAAW,mBAK3B5D,SAAWlC,EAAEW,MAAMsB,KAAK,SAC5BC,SAASC,YAAY,mBACrBD,SAASC,YAAY,cACrBD,SAASE,SAAS,iBAGNpC,EAAE,IAAMkC,SAAS2D,KAAK,QAC5BA,KAAK,UAAW,eAClBhF,YAAc6B,IAAI9B,KAAK,eAKI,KAA3BsB,SAAStB,KAAK,SACdL,UAAUM,aAAV,MAAkC,KAElCN,UAAUM,aAAV,MAAkCqB,SAAStB,KAAK,YAIxDZ,EAAE,qBAAqB+F,OAAM,SAASN,GAClCA,EAAEC,iBAEG1F,EAAEW,MAAMgF,SAAS,mBACd3F,EAAEW,MAAMgF,SAAS,oBACjB3F,EAAEW,MAAMwB,YAAY,mBACpBnC,EAAEW,MAAMyB,SAAS,gBAEjBpC,EAAEW,MAAMyB,SAAS,mBACjBpC,EAAEW,MAAMwB,YAAY,mBAKhCnC,EAAE,uBAAuBwF,OAAM,SAASC,GACpCA,EAAEC,qBAEEhD,IAAM1C,EAAEW,MAAMgC,QAAQ,mCACtB7B,MAAQd,EAAEW,MAAMsB,KAAK,4BAA4BrB,KAAK,SACrC8B,IAAIT,KAAK,wCACf+D,OAAO,WAAalF,MAAQ,iBAI/Cd,EAAE,4BAA4B+F,OAAM,SAASN,GACzCA,EAAEC,iBAEG1F,EAAEW,MAAMgF,SAAS,mBACd3F,EAAEW,MAAMgF,SAAS,oBACjB3F,EAAEW,MAAMwB,YAAY,mBACpBnC,EAAEW,MAAMyB,SAAS,gBAEjBpC,EAAEW,MAAMyB,SAAS,mBACjBpC,EAAEW,MAAMwB,YAAY,mBAKhCnC,EAAE,kBAAkBwF,OAAM,WACtBhD,eAAc,MAGlBxC,EAAE,oBAAoBwF,OAAM,WACxBhD,eAAc,MAGlBxC,EAAE,sBAAsBwF,OAAM,SAASC,GACnCA,EAAEC,qBAEEO,eADMjG,EAAEW,MAAMgC,QAAQ,gCACDV,KAAK,oBAC3BgE,eAAeN,SAAS,WACvBM,eAAe9D,YAAY,UAC3BnC,EAAEW,MAAM0B,KAAK,OAEb4D,eAAe7D,SAAS,UACxBpC,EAAEW,MAAM0B,KAAK,UA2JlB7B"} \ No newline at end of file diff --git a/amd/src/report.js b/amd/src/report.js deleted file mode 100644 index b6ae14d..0000000 --- a/amd/src/report.js +++ /dev/null @@ -1,17 +0,0 @@ -// define(['jquery', -// 'core/templates', -// 'core/notification', -// 'core/ajax', -// 'core/str', -// 'core/modal_factory', -// 'core/modal_events' -// ], function() { -// let init = function (data) { -// this.spiderData = data; -// }; - -// return { -// init: init, -// spiderData: this.spiderData -// }; -// }); \ No newline at end of file diff --git a/classes/model/template/parametrized_template_criterion.php b/classes/model/template/parametrized_template_criterion.php index a4912e2..cfce796 100644 --- a/classes/model/template/parametrized_template_criterion.php +++ b/classes/model/template/parametrized_template_criterion.php @@ -29,6 +29,7 @@ /** * The parametrized template criterion class */ +#[AllowDynamicProperties] class parametrized_template_criterion { /** @var int The id */ public $id; diff --git a/classes/repository/model/db_parametrized_criterion.php b/classes/repository/model/db_parametrized_criterion.php index 12a721c..411dd70 100644 --- a/classes/repository/model/db_parametrized_criterion.php +++ b/classes/repository/model/db_parametrized_criterion.php @@ -28,6 +28,7 @@ /** * The database parametrized criterion class */ +#[AllowDynamicProperties] class db_parametrized_criterion { /** * @var diff --git a/classes/vendor/.DS_Store b/classes/vendor/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/classes/vendor/.DS_Store differ diff --git a/classes/vendor/autoload.php b/classes/vendor/autoload.php deleted file mode 100644 index 04f3f5f..0000000 --- a/classes/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { diff --git a/classes/vendor/composer/InstalledVersions.php b/classes/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..3ccd011 --- /dev/null +++ b/classes/vendor/composer/InstalledVersions.php @@ -0,0 +1,227 @@ + + array ( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'aliases' => + array ( + ), + 'reference' => 'e042d800be37b857ecf2f3e49fafd4942042772b', + 'name' => 'bfh/verbalfeedback', + ), + 'versions' => + array ( + 'bfh/verbalfeedback' => + array ( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'aliases' => + array ( + ), + 'reference' => 'e042d800be37b857ecf2f3e49fafd4942042772b', + ), + 'dallgoot/yaml' => + array ( + 'pretty_version' => '0.9.1.1', + 'version' => '0.9.1.1', + 'aliases' => + array ( + ), + 'reference' => '7e7ce911ad626ae35a6ea2086c000f5ee492607f', + ), + 'goat1000/svggraph' => + array ( + 'pretty_version' => '3.20.0', + 'version' => '3.20.0.0', + 'aliases' => + array ( + ), + 'reference' => '99576c9ad38763b8f10e6b03a9cff1ce32604869', + ), + ), +); + + + + + + + +public static function getInstalledPackages() +{ +return array_keys(self::$installed['versions']); +} + + + + + + + + + +public static function isInstalled($packageName) +{ +return isset(self::$installed['versions'][$packageName]); +} + + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +if (!isset(self::$installed['versions'][$packageName])) { +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + +$ranges = array(); +if (isset(self::$installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = self::$installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', self::$installed['versions'][$packageName])) { +$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', self::$installed['versions'][$packageName])) { +$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', self::$installed['versions'][$packageName])) { +$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + + + + + +public static function getVersion($packageName) +{ +if (!isset(self::$installed['versions'][$packageName])) { +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + +if (!isset(self::$installed['versions'][$packageName]['version'])) { +return null; +} + +return self::$installed['versions'][$packageName]['version']; +} + + + + + +public static function getPrettyVersion($packageName) +{ +if (!isset(self::$installed['versions'][$packageName])) { +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + +if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return self::$installed['versions'][$packageName]['pretty_version']; +} + + + + + +public static function getReference($packageName) +{ +if (!isset(self::$installed['versions'][$packageName])) { +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + +if (!isset(self::$installed['versions'][$packageName]['reference'])) { +return null; +} + +return self::$installed['versions'][$packageName]['reference']; +} + + + + + +public static function getRootPackage() +{ +return self::$installed['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +} +} diff --git a/classes/vendor/composer/autoload_classmap.php b/classes/vendor/composer/autoload_classmap.php index c3a0d5a..80341c1 100644 --- a/classes/vendor/composer/autoload_classmap.php +++ b/classes/vendor/composer/autoload_classmap.php @@ -6,43 +6,5 @@ $baseDir = dirname(dirname($vendorDir)); return array( - 'Dallgoot\\Yaml' => $vendorDir . '/dallgoot/yaml/sources/Yaml.php', - 'Dallgoot\\Yaml\\Builder' => $vendorDir . '/dallgoot/yaml/sources/Builder.php', - 'Dallgoot\\Yaml\\Compact' => $vendorDir . '/dallgoot/yaml/sources/types/Compact.php', - 'Dallgoot\\Yaml\\Dumper' => $vendorDir . '/dallgoot/yaml/sources/Dumper.php', - 'Dallgoot\\Yaml\\DumperHandlers' => $vendorDir . '/dallgoot/yaml/sources/DumperHandlers.php', - 'Dallgoot\\Yaml\\Loader' => $vendorDir . '/dallgoot/yaml/sources/Loader.php', - 'Dallgoot\\Yaml\\NodeFactory' => $vendorDir . '/dallgoot/yaml/sources/NodeFactory.php', - 'Dallgoot\\Yaml\\NodeList' => $vendorDir . '/dallgoot/yaml/sources/NodeList.php', - 'Dallgoot\\Yaml\\Nodes\\Actions' => $vendorDir . '/dallgoot/yaml/sources/nodes/abstract/Actions.php', - 'Dallgoot\\Yaml\\Nodes\\Anchor' => $vendorDir . '/dallgoot/yaml/sources/nodes/Anchor.php', - 'Dallgoot\\Yaml\\Nodes\\Blank' => $vendorDir . '/dallgoot/yaml/sources/nodes/Blank.php', - 'Dallgoot\\Yaml\\Nodes\\Comment' => $vendorDir . '/dallgoot/yaml/sources/nodes/Comment.php', - 'Dallgoot\\Yaml\\Nodes\\CompactMapping' => $vendorDir . '/dallgoot/yaml/sources/nodes/CompactMapping.php', - 'Dallgoot\\Yaml\\Nodes\\CompactSequence' => $vendorDir . '/dallgoot/yaml/sources/nodes/CompactSequence.php', - 'Dallgoot\\Yaml\\Nodes\\Directive' => $vendorDir . '/dallgoot/yaml/sources/nodes/Directive.php', - 'Dallgoot\\Yaml\\Nodes\\DocEnd' => $vendorDir . '/dallgoot/yaml/sources/nodes/DocEnd.php', - 'Dallgoot\\Yaml\\Nodes\\DocStart' => $vendorDir . '/dallgoot/yaml/sources/nodes/DocStart.php', - 'Dallgoot\\Yaml\\Nodes\\Item' => $vendorDir . '/dallgoot/yaml/sources/nodes/Item.php', - 'Dallgoot\\Yaml\\Nodes\\JSON' => $vendorDir . '/dallgoot/yaml/sources/nodes/JSON.php', - 'Dallgoot\\Yaml\\Nodes\\Key' => $vendorDir . '/dallgoot/yaml/sources/nodes/Key.php', - 'Dallgoot\\Yaml\\Nodes\\Literal' => $vendorDir . '/dallgoot/yaml/sources/nodes/Literal.php', - 'Dallgoot\\Yaml\\Nodes\\LiteralFolded' => $vendorDir . '/dallgoot/yaml/sources/nodes/LiteralFolded.php', - 'Dallgoot\\Yaml\\Nodes\\Literals' => $vendorDir . '/dallgoot/yaml/sources/nodes/abstract/Literals.php', - 'Dallgoot\\Yaml\\Nodes\\NodeGeneric' => $vendorDir . '/dallgoot/yaml/sources/nodes/abstract/NodeGeneric.php', - 'Dallgoot\\Yaml\\Nodes\\Partial' => $vendorDir . '/dallgoot/yaml/sources/nodes/Partial.php', - 'Dallgoot\\Yaml\\Nodes\\Quoted' => $vendorDir . '/dallgoot/yaml/sources/nodes/Quoted.php', - 'Dallgoot\\Yaml\\Nodes\\Root' => $vendorDir . '/dallgoot/yaml/sources/nodes/Root.php', - 'Dallgoot\\Yaml\\Nodes\\Scalar' => $vendorDir . '/dallgoot/yaml/sources/nodes/Scalar.php', - 'Dallgoot\\Yaml\\Nodes\\SetKey' => $vendorDir . '/dallgoot/yaml/sources/nodes/SetKey.php', - 'Dallgoot\\Yaml\\Nodes\\SetValue' => $vendorDir . '/dallgoot/yaml/sources/nodes/SetValue.php', - 'Dallgoot\\Yaml\\Nodes\\Tag' => $vendorDir . '/dallgoot/yaml/sources/nodes/Tag.php', - 'Dallgoot\\Yaml\\Regex' => $vendorDir . '/dallgoot/yaml/sources/Regex.php', - 'Dallgoot\\Yaml\\TagFactory' => $vendorDir . '/dallgoot/yaml/sources/tag/TagFactory.php', - 'Dallgoot\\Yaml\\Tag\\CoreSchema' => $vendorDir . '/dallgoot/yaml/sources/tag/CoreSchema.php', - 'Dallgoot\\Yaml\\Tag\\SchemaInterface' => $vendorDir . '/dallgoot/yaml/sources/tag/SchemaInterface.php', - 'Dallgoot\\Yaml\\Tag\\SymfonySchema' => $vendorDir . '/dallgoot/yaml/sources/tag/SymfonySchema.php', - 'Dallgoot\\Yaml\\Tagged' => $vendorDir . '/dallgoot/yaml/sources/types/Tagged.php', - 'Dallgoot\\Yaml\\YamlObject' => $vendorDir . '/dallgoot/yaml/sources/types/YamlObject.php', - 'Dallgoot\\Yaml\\YamlProperties' => $vendorDir . '/dallgoot/yaml/sources/YamlProperties.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', ); diff --git a/classes/vendor/composer/autoload_psr4.php b/classes/vendor/composer/autoload_psr4.php index a1853fc..1f7be17 100644 --- a/classes/vendor/composer/autoload_psr4.php +++ b/classes/vendor/composer/autoload_psr4.php @@ -7,4 +7,5 @@ return array( 'Goat1000\\SVGGraph\\' => array($vendorDir . '/goat1000/svggraph'), + 'Dallgoot\\Yaml\\' => array($vendorDir . '/dallgoot/yaml/src'), ); diff --git a/classes/vendor/composer/autoload_real.php b/classes/vendor/composer/autoload_real.php index ae19197..0895b5a 100644 --- a/classes/vendor/composer/autoload_real.php +++ b/classes/vendor/composer/autoload_real.php @@ -22,13 +22,15 @@ public static function getLoader() return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInit0b5f153730a4a4fe6e88cb8865fd9823', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit0b5f153730a4a4fe6e88cb8865fd9823', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; + require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823::getInitializer($loader)); } else { diff --git a/classes/vendor/composer/autoload_static.php b/classes/vendor/composer/autoload_static.php index 80bdb87..6403051 100644 --- a/classes/vendor/composer/autoload_static.php +++ b/classes/vendor/composer/autoload_static.php @@ -11,6 +11,10 @@ class ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823 array ( 'Goat1000\\SVGGraph\\' => 18, ), + 'D' => + array ( + 'Dallgoot\\Yaml\\' => 14, + ), ); public static $prefixDirsPsr4 = array ( @@ -18,48 +22,14 @@ class ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823 array ( 0 => __DIR__ . '/..' . '/goat1000/svggraph', ), + 'Dallgoot\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/dallgoot/yaml/src', + ), ); public static $classMap = array ( - 'Dallgoot\\Yaml' => __DIR__ . '/..' . '/dallgoot/yaml/sources/Yaml.php', - 'Dallgoot\\Yaml\\Builder' => __DIR__ . '/..' . '/dallgoot/yaml/sources/Builder.php', - 'Dallgoot\\Yaml\\Compact' => __DIR__ . '/..' . '/dallgoot/yaml/sources/types/Compact.php', - 'Dallgoot\\Yaml\\Dumper' => __DIR__ . '/..' . '/dallgoot/yaml/sources/Dumper.php', - 'Dallgoot\\Yaml\\DumperHandlers' => __DIR__ . '/..' . '/dallgoot/yaml/sources/DumperHandlers.php', - 'Dallgoot\\Yaml\\Loader' => __DIR__ . '/..' . '/dallgoot/yaml/sources/Loader.php', - 'Dallgoot\\Yaml\\NodeFactory' => __DIR__ . '/..' . '/dallgoot/yaml/sources/NodeFactory.php', - 'Dallgoot\\Yaml\\NodeList' => __DIR__ . '/..' . '/dallgoot/yaml/sources/NodeList.php', - 'Dallgoot\\Yaml\\Nodes\\Actions' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/abstract/Actions.php', - 'Dallgoot\\Yaml\\Nodes\\Anchor' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Anchor.php', - 'Dallgoot\\Yaml\\Nodes\\Blank' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Blank.php', - 'Dallgoot\\Yaml\\Nodes\\Comment' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Comment.php', - 'Dallgoot\\Yaml\\Nodes\\CompactMapping' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/CompactMapping.php', - 'Dallgoot\\Yaml\\Nodes\\CompactSequence' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/CompactSequence.php', - 'Dallgoot\\Yaml\\Nodes\\Directive' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Directive.php', - 'Dallgoot\\Yaml\\Nodes\\DocEnd' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/DocEnd.php', - 'Dallgoot\\Yaml\\Nodes\\DocStart' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/DocStart.php', - 'Dallgoot\\Yaml\\Nodes\\Item' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Item.php', - 'Dallgoot\\Yaml\\Nodes\\JSON' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/JSON.php', - 'Dallgoot\\Yaml\\Nodes\\Key' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Key.php', - 'Dallgoot\\Yaml\\Nodes\\Literal' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Literal.php', - 'Dallgoot\\Yaml\\Nodes\\LiteralFolded' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/LiteralFolded.php', - 'Dallgoot\\Yaml\\Nodes\\Literals' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/abstract/Literals.php', - 'Dallgoot\\Yaml\\Nodes\\NodeGeneric' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/abstract/NodeGeneric.php', - 'Dallgoot\\Yaml\\Nodes\\Partial' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Partial.php', - 'Dallgoot\\Yaml\\Nodes\\Quoted' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Quoted.php', - 'Dallgoot\\Yaml\\Nodes\\Root' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Root.php', - 'Dallgoot\\Yaml\\Nodes\\Scalar' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Scalar.php', - 'Dallgoot\\Yaml\\Nodes\\SetKey' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/SetKey.php', - 'Dallgoot\\Yaml\\Nodes\\SetValue' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/SetValue.php', - 'Dallgoot\\Yaml\\Nodes\\Tag' => __DIR__ . '/..' . '/dallgoot/yaml/sources/nodes/Tag.php', - 'Dallgoot\\Yaml\\Regex' => __DIR__ . '/..' . '/dallgoot/yaml/sources/Regex.php', - 'Dallgoot\\Yaml\\TagFactory' => __DIR__ . '/..' . '/dallgoot/yaml/sources/tag/TagFactory.php', - 'Dallgoot\\Yaml\\Tag\\CoreSchema' => __DIR__ . '/..' . '/dallgoot/yaml/sources/tag/CoreSchema.php', - 'Dallgoot\\Yaml\\Tag\\SchemaInterface' => __DIR__ . '/..' . '/dallgoot/yaml/sources/tag/SchemaInterface.php', - 'Dallgoot\\Yaml\\Tag\\SymfonySchema' => __DIR__ . '/..' . '/dallgoot/yaml/sources/tag/SymfonySchema.php', - 'Dallgoot\\Yaml\\Tagged' => __DIR__ . '/..' . '/dallgoot/yaml/sources/types/Tagged.php', - 'Dallgoot\\Yaml\\YamlObject' => __DIR__ . '/..' . '/dallgoot/yaml/sources/types/YamlObject.php', - 'Dallgoot\\Yaml\\YamlProperties' => __DIR__ . '/..' . '/dallgoot/yaml/sources/YamlProperties.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/classes/vendor/composer/installed.json b/classes/vendor/composer/installed.json index 6686f07..ec7fc11 100644 --- a/classes/vendor/composer/installed.json +++ b/classes/vendor/composer/installed.json @@ -1,97 +1,115 @@ -[ - { - "name": "dallgoot/yaml", - "version": "v0.3.2", - "version_normalized": "0.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/dallgoot/yaml.git", - "reference": "505ce0f23b40767d3016ea16e1f101085f3a63c0" +{ + "packages": [ + { + "name": "dallgoot/yaml", + "version": "0.9.1.1", + "version_normalized": "0.9.1.1", + "source": { + "type": "git", + "url": "https://github.com/dallgoot/yaml.git", + "reference": "7e7ce911ad626ae35a6ea2086c000f5ee492607f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dallgoot/yaml/zipball/7e7ce911ad626ae35a6ea2086c000f5ee492607f", + "reference": "7e7ce911ad626ae35a6ea2086c000f5ee492607f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-spl": "*", + "lib-pcre": "*", + "php": ">=8.1.14" + }, + "require-dev": { + "ext-reflection": "*", + "phan/phan": "*", + "phpmetrics/phpmetrics": "*", + "phpunit/phpunit": "*" + }, + "time": "2023-04-11T09:49:37+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Dallgoot\\Yaml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "dallgoot", + "email": "stephane.rebai@gmail.com" + } + ], + "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 8.x", + "homepage": "https://github.com/dallgoot/yaml", + "keywords": [ + "parser", + "reader", + "writer", + "yaml" + ], + "support": { + "issues": "https://github.com/dallgoot/yaml/issues", + "source": "https://github.com/dallgoot/yaml/tree/0.9.1.1" + }, + "funding": [ + { + "url": "https://github.com/dallgoot", + "type": "github" + } + ], + "install-path": "../dallgoot/yaml" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dallgoot/yaml/zipball/505ce0f23b40767d3016ea16e1f101085f3a63c0", - "reference": "505ce0f23b40767d3016ea16e1f101085f3a63c0", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-spl": "*", - "lib-pcre": "*", - "php": ">=7.1.10" - }, - "require-dev": { - "composer/xdebug-handler": "^1.3", - "ext-reflection": "*", - "paulthebaud/phpunit-generator": "^2.1", - "phan/phan": "^1.3", - "phploc/phploc": "^4.0", - "phpmetrics/phpmetrics": "^2.4", - "phpunit/phpunit": "^7", - "roave/better-reflection": "dev-master#c87d856" - }, - "time": "2020-01-08T19:03:03+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "sources" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "dallgoot", - "email": "stephane.rebai@gmail.com" - } - ], - "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 7.x", - "homepage": "https://github.com/dallgoot/yaml", - "keywords": [ - "parser", - "yaml" - ] - }, - { - "name": "goat1000/svggraph", - "version": "3.10.0", - "version_normalized": "3.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/goat1000/SVGGraph.git", - "reference": "e97249ce511b20650b82e4df178c0ec2ea4db20c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/goat1000/SVGGraph/zipball/e97249ce511b20650b82e4df178c0ec2ea4db20c", - "reference": "e97249ce511b20650b82e4df178c0ec2ea4db20c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "lib-pcre": "*", - "php": ">=5.4.0" - }, - "suggest": { - "ext-iconv": "For non-ASCII text measurement support" - }, - "time": "2021-07-19T14:38:40+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Goat1000\\SVGGraph\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-only" - ], - "description": "Generates SVG graphs", - "homepage": "http://www.goat1000.com/svggraph.php" - } -] + { + "name": "goat1000/svggraph", + "version": "3.20.0", + "version_normalized": "3.20.0.0", + "source": { + "type": "git", + "url": "https://github.com/goat1000/SVGGraph.git", + "reference": "99576c9ad38763b8f10e6b03a9cff1ce32604869" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/goat1000/SVGGraph/zipball/99576c9ad38763b8f10e6b03a9cff1ce32604869", + "reference": "99576c9ad38763b8f10e6b03a9cff1ce32604869", + "shasum": "" + }, + "require": { + "ext-json": "*", + "lib-pcre": "*", + "php": ">=5.4.0" + }, + "suggest": { + "ext-iconv": "For non-ASCII text measurement support" + }, + "time": "2023-04-25T08:27:40+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Goat1000\\SVGGraph\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-only" + ], + "description": "Generates SVG graphs", + "homepage": "http://www.goat1000.com/svggraph.php", + "support": { + "issues": "https://github.com/goat1000/SVGGraph/issues", + "source": "https://github.com/goat1000/SVGGraph/tree/3.20.0" + }, + "install-path": "../goat1000/svggraph" + } + ], + "dev": false, + "dev-package-names": [] +} diff --git a/classes/vendor/composer/installed.php b/classes/vendor/composer/installed.php new file mode 100644 index 0000000..fcf5408 --- /dev/null +++ b/classes/vendor/composer/installed.php @@ -0,0 +1,42 @@ + + array ( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'aliases' => + array ( + ), + 'reference' => 'e042d800be37b857ecf2f3e49fafd4942042772b', + 'name' => 'bfh/verbalfeedback', + ), + 'versions' => + array ( + 'bfh/verbalfeedback' => + array ( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'aliases' => + array ( + ), + 'reference' => 'e042d800be37b857ecf2f3e49fafd4942042772b', + ), + 'dallgoot/yaml' => + array ( + 'pretty_version' => '0.9.1.1', + 'version' => '0.9.1.1', + 'aliases' => + array ( + ), + 'reference' => '7e7ce911ad626ae35a6ea2086c000f5ee492607f', + ), + 'goat1000/svggraph' => + array ( + 'pretty_version' => '3.20.0', + 'version' => '3.20.0.0', + 'aliases' => + array ( + ), + 'reference' => '99576c9ad38763b8f10e6b03a9cff1ce32604869', + ), + ), +); diff --git a/classes/vendor/composer/platform_check.php b/classes/vendor/composer/platform_check.php new file mode 100644 index 0000000..941ac20 --- /dev/null +++ b/classes/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 80114)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.14". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/classes/vendor/dallgoot/yaml/CHANGELOG.md b/classes/vendor/dallgoot/yaml/CHANGELOG.md index b1c0cab..4c51ec6 100644 --- a/classes/vendor/dallgoot/yaml/CHANGELOG.md +++ b/classes/vendor/dallgoot/yaml/CHANGELOG.md @@ -1,9 +1,30 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] -Actual version is not stable enough, nor finished, nor fully tested to be used in production +## 0.9.0.0 + +### Changed + +- minimum PHP version supported is now 8.1.14 +- autoloading for PSR-4 (sorry to have polluted autoloads files worldwide 😢) +- parsing in NodeFactory +- logic in Dallgoot\Yaml\Dumper + +### Removed + +- support for PHP before 8.1.14 +- some dev dependencies +- Dallgoot\Yaml class replaced by Dallgoot\Yaml\Yaml + +### Fixed + +- PHP Notice reported by in +- dumping bug in Dallgoot\Yaml\DumperHandlers reported by in > + +## 0.3.2.0 +this version is not stable enough, nor finished, nor fully tested to be used in production, please prefer the 1.0.0 diff --git a/classes/vendor/dallgoot/yaml/README.md b/classes/vendor/dallgoot/yaml/README.md index 71f401a..42fc084 100644 --- a/classes/vendor/dallgoot/yaml/README.md +++ b/classes/vendor/dallgoot/yaml/README.md @@ -1,6 +1,6 @@ -# Dallgoot : YAML library for PHP - Beta !!! +# Dallgoot : YAML library for PHP - Beta -[![Build Status](https://travis-ci.org/dallgoot/yaml.svg?branch=master)](https://travis-ci.org/dallgoot/yaml) [![PHP from Packagist](https://img.shields.io/packagist/php-v/dallgoot/yaml)](https://packagist.org/packages/dallgoot/yaml) [![Packagist](https://img.shields.io/packagist/dt/dallgoot/yaml)](https://packagist.org/packages/dallgoot/yaml) +[![Build Status](https://api.travis-ci.com/dallgoot/yaml.svg?branch=master)](https://travis-ci.org/dallgoot/yaml) [![PHP from Packagist](https://img.shields.io/packagist/php-v/dallgoot/yaml)](https://packagist.org/packages/dallgoot/yaml) [![Packagist](https://img.shields.io/packagist/dt/dallgoot/yaml)](https://packagist.org/packages/dallgoot/yaml) [![Maintainability](https://api.codeclimate.com/v1/badges/dfae4b8e665a1d728e3d/maintainability)](https://codeclimate.com/github/dallgoot/yaml/maintainability) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dallgoot/yaml/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dallgoot/yaml/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/dallgoot/yaml/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/dallgoot/yaml/?branch=master) @@ -12,7 +12,7 @@ PHP library to load and parse YAML file to coherent PHP datatypes equivalent - Dependencies are only useful for building documentation or for code contribution, so the "--update-no-dev" prevent from downloading and managing packages that you probably won't use. -You first need [Composer](https://getcomposer.org/) and PHP ^7.1.10 +You first need [Composer](https://getcomposer.org/) and PHP ^8.1.14 ```bash composer require --update-no-dev dallgoot/yaml @@ -20,9 +20,9 @@ composer require --update-no-dev dallgoot/yaml ## Usage -See examples files in [examples folder](./examples) +See [examples folder](./examples) -## Features: +## Features - *consistent* PHP datatypes : - object for mappings @@ -30,23 +30,23 @@ See examples files in [examples folder](./examples) - common scalars : string, integer, float, INF, NAN - JSON, DateTime(option), etc. - specific types (objects) - - **YamlObject** for each Yaml content (inherits from PHP class ArrayIterator) - - **Compact** for compact/short YAML syntax (inherits from PHP class ArrayIterator) + - **YamlObject** for each Yaml content (multi-documents YAML is an array of YamlObject) + - **Compact** for compact/short YAML syntax - **Tagged** object when tag is not determinable - recover from some parsing errors - tolerant to tabulations - debug levels : - 1 : print each line Node Type class and exit - - 2 : print Loader global map structure and exit + - 2 : print Loader global tree structure and exit - 3 : print each document NodeList and exit -## Support: +## Support - YAML specifications [version 1.2](http://yaml.org/spec/1.2/spec.html) - multi-line values (simple|double quoted or not, compact mapping|sequence or JSON) - multiple documents in a content (file or string) - compact syntax for mappings and sequences -- comments (option : enabled by default) +- comments (not yet implemented) - references (option : enabled by default) - tags with behaviour customization (overriding for common(CoreSchema), or specifying for custom) via implementing Tag/SchemaInterface. @@ -54,14 +54,14 @@ See examples files in [examples folder](./examples) | | YAML version supported | coherent data types | multiple documents | JSON format validation | complex mapping | real reference behaviour | custom tags handling | | -------------------------------------------------------------------- |:----------------------:|:-------------------:|:------------------:|:----------------------:|:---------------:|:------------------------:|:--------------------:| -| [Symfony Yaml](https://symfony.com/doc/current/components/yaml.html) | 1.2 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | -| [php-yaml](https://pecl.php.net/package/yaml) | 1.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| [Symfony Yaml](https://symfony.com/doc/current/components/yaml.html) | 1.2 | ❌ | ❌ | ❌ | ❌ | ❌ | ✔️ | +| [php-yaml](https://pecl.php.net/package/yaml) | 1.1 | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | | [syck](http://pecl.php.net/package/syck) | 1.0 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | [spyc](https://github.com/mustangostang/spyc) | 1.0 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Dallgoot/Yaml** | 1.2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | - coherent data types (see [coherence.md](./documentation/coherence.md) for explanations) -- JSON format validation (Option, Note: if valid as per PHP function *json_encode*) +- JSON format validation (Option, Note: if valid as per PHP function [json_encode](https://www.php.net/manual/en/function.json-encode.php)) - complex mapping (Note: keys are JSON formatted strings) - real reference behaviour : changing reference value modify other reference calls @@ -87,13 +87,18 @@ See examples files in [examples folder](./examples) - OPTION: Force renaming key names that are not valid PHP property name - TAG : function for 'php/object' that provides the correct namespace to build - NEON compatibility??? +- make immutable YamlObject ## Performances - TBD + - TBD + - improved memory using SplFixedArray instead of regular arrays where possible + +## Sponsor +That is greatly appreciated : Buy Me A Coffee ## Thanks -- (https://yaml.org) -- (https://www.json2yaml.com/convert-yaml-to-json) +- https://yaml.org +- https://www.json2yaml.com/convert-yaml-to-json - [Symfony Yaml](https://symfony.com/doc/current/components/yaml.html) diff --git a/classes/vendor/dallgoot/yaml/autoload_classmap.php b/classes/vendor/dallgoot/yaml/autoload_classmap.php new file mode 100644 index 0000000..80341c1 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/autoload_classmap.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', +); diff --git a/classes/vendor/dallgoot/yaml/autoload_namespaces.php b/classes/vendor/dallgoot/yaml/autoload_namespaces.php new file mode 100644 index 0000000..4a9c20b --- /dev/null +++ b/classes/vendor/dallgoot/yaml/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/goat1000/svggraph'), + 'Dallgoot\\Yaml\\' => array($vendorDir . '/dallgoot/yaml/src'), +); diff --git a/classes/vendor/dallgoot/yaml/autoload_real.php b/classes/vendor/dallgoot/yaml/autoload_real.php new file mode 100644 index 0000000..0895b5a --- /dev/null +++ b/classes/vendor/dallgoot/yaml/autoload_real.php @@ -0,0 +1,57 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/classes/vendor/dallgoot/yaml/autoload_static.php b/classes/vendor/dallgoot/yaml/autoload_static.php new file mode 100644 index 0000000..6403051 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/autoload_static.php @@ -0,0 +1,44 @@ + + array ( + 'Goat1000\\SVGGraph\\' => 18, + ), + 'D' => + array ( + 'Dallgoot\\Yaml\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Goat1000\\SVGGraph\\' => + array ( + 0 => __DIR__ . '/..' . '/goat1000/svggraph', + ), + 'Dallgoot\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/dallgoot/yaml/src', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit0b5f153730a4a4fe6e88cb8865fd9823::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/classes/vendor/dallgoot/yaml/composer.json b/classes/vendor/dallgoot/yaml/composer.json index 939c797..b54b649 100644 --- a/classes/vendor/dallgoot/yaml/composer.json +++ b/classes/vendor/dallgoot/yaml/composer.json @@ -1,8 +1,13 @@ { "name": "dallgoot/yaml", - "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 7.x", + "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 8.x", "type": "library", - "keywords": ["yaml", "parser"], + "keywords": [ + "yaml", + "parser", + "reader", + "writer" + ], "homepage": "https://github.com/dallgoot/yaml", "license": "Apache-2.0", "authors": [ @@ -11,22 +16,18 @@ "email": "stephane.rebai@gmail.com" } ], - "autoload": { - "classmap": [ - "sources" - ] + "autoload": { + "psr-4": { + "Dallgoot\\Yaml\\": "src/" + } }, - "autoload-dev": { - "classmap": [ - "tests/CasesTest.php", - "tests/DumpingTest.php", - "tests/SymfonyYamlTest.php", - "tests/units", - "vendor/phpunit" - ] + "autoload-dev": { + "psr-4": { + "Dallgoot\\Yaml\\Tests\\": "tests/" + } }, "require": { - "php": ">=7.1.10", + "php": ">=8.1.14", "ext-json": "*", "ext-pcre": "*", "ext-SPL": "*", @@ -34,19 +35,14 @@ }, "require-dev": { "ext-Reflection": "*", - "phan/phan": "^1.3", - "roave/better-reflection": "dev-master#c87d856", - "composer/xdebug-handler": "^1.3", - "phploc/phploc": "^4.0", - "paulthebaud/phpunit-generator": "^2.1", - "phpmetrics/phpmetrics": "^2.4", - "phpunit/phpunit": "^7" + "phan/phan": "*", + "phpmetrics/phpmetrics": "*", + "phpunit/phpunit": "*" }, - "scripts" : { - "test" : "phpunit --verbose --configuration ./configuration/phpunit.xml --testsuite All", - "metrics" : "phpmetrics --report-html=documentation/phpmetrics_report ./sources", - "phploc" : "phploc sources/ --count-tests --log-xml=./documentation/codecoverage/phploc.xml", - "docs" : "phpdox -f configuration/phpdox.xml", - "phan" : "phan -k configuration/phan.php -C -j2 -3sources/tag" + "scripts": { + "test": "phpunit -c ./configuration/phpunit.xml --no-coverage --testsuite All", + "coverage": "XDEBUG_MODE=coverage phpunit -c ./configuration/phpunit.xml --testsuite All", + "metrics": "phpmetrics --report-html=documentation/phpmetrics_report ./src", + "phan": "phan -k configuration/phan.php -C -j2 -3src/Tag" } -} +} \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/composer.lock b/classes/vendor/dallgoot/yaml/composer.lock index 49749fd..b583855 100644 --- a/classes/vendor/dallgoot/yaml/composer.lock +++ b/classes/vendor/dallgoot/yaml/composer.lock @@ -4,39 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4e98852568c21ec649eef558886bcb85", + "content-hash": "99e92f298d7c52a0955d879093380722", "packages": [], "packages-dev": [ { - "name": "composer/semver", - "version": "1.5.0", + "name": "composer/pcre", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e" + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e", - "reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Composer\\Semver\\": "src" + "Composer\\Pcre\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -44,107 +45,69 @@ "MIT" ], "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", "keywords": [ - "semantic", - "semver", - "validation", - "versioning" + "PCRE", + "preg", + "regex", + "regular expression" ], - "time": "2019-03-19T17:25:45+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "cbe23383749496fe0f373345208b79568e4bc248" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/cbe23383749496fe0f373345208b79568e4bc248", - "reference": "cbe23383749496fe0f373345208b79568e4bc248", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "time": "2019-11-06T16:40:04+00:00" + "time": "2022-11-17T09:50:14+00:00" }, { - "name": "doctrine/collections", - "version": "v1.6.2", + "name": "composer/semver", + "version": "3.3.2", "source": { "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be" + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/c5e0bc17b1620e97c968ac409acbff28b8b850be", - "reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan-shim": "^0.9.2", - "phpunit/phpunit": "^7.0", - "vimeo/psalm": "^3.2.2" + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + "Composer\\Semver\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -153,71 +116,77 @@ ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" }, { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" }, { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" + "url": "https://github.com/composer", + "type": "github" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "time": "2019-06-09T13:48:14+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.3.0", + "name": "composer/xdebug-handler", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^7.1" + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -226,269 +195,143 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Restarts a process without Xdebug.", "keywords": [ - "constructor", - "instantiate" + "Xdebug", + "performance" ], - "time": "2019-10-21T16:45:58+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", - "shasum": "" - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" + "url": "https://packagist.com", + "type": "custom" }, { - "name": "Roman Borschel", - "email": "roman@code-factory.org" + "url": "https://github.com/composer", + "type": "github" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "time": "2019-07-30T19:33:28+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.0.4", + "name": "doctrine/deprecations", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "23366dd0cab0a0f3fd3016bf3c0b36dec74348e7" + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/23366dd0cab0a0f3fd3016bf3c0b36dec74348e7", - "reference": "23366dd0cab0a0f3fd3016bf3c0b36dec74348e7", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", "shasum": "" }, "require": { - "netresearch/jsonmapper": "^1.0", - "php": ">=7.0", - "phpdocumentor/reflection-docblock": "^4.0.0" + "php": "^7.1|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0.0" + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "type": "library", "autoload": { "psr-4": { - "AdvancedJsonRpc\\": "lib/" + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } + "MIT" ], - "description": "A more advanced JSONRPC implementation", - "time": "2019-09-12T22:41:08+00:00" - }, - { - "name": "jetbrains/phpstorm-stubs", - "version": "v2019.2", - "source": { - "type": "git", - "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "0eb16807e8406e775ef602974b104454fc7ffb5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/0eb16807e8406e775ef602974b104454fc7ffb5c", - "reference": "0eb16807e8406e775ef602974b104454fc7ffb5c", - "shasum": "" - }, - "require-dev": { - "nikic/php-parser": "v4.0.1", - "php": "^7.1", - "phpdocumentor/reflection-docblock": "^4.3", - "phpunit/phpunit": "7.1.4" - }, - "type": "library", - "autoload": { - "files": [ - "PhpStormStubsMap.php" - ] + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "PHP runtime & extensions header files for PhpStorm", - "homepage": "https://www.jetbrains.com/phpstorm", - "keywords": [ - "autocomplete", - "code", - "inference", - "inspection", - "jetbrains", - "phpstorm", - "stubs", - "type" - ], - "time": "2019-07-22T14:52:46+00:00" + "time": "2022-05-02T15:47:09+00:00" }, { - "name": "league/flysystem", - "version": "1.0.57", + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a" + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "AdvancedJsonRpc\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "ISC" ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "time": "2019-10-16T21:01:05+00:00" + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" }, { "name": "microsoft/tolerant-php-parser", - "version": "v0.0.17", + "version": "v0.1.2", "source": { "type": "git", - "url": "https://github.com/Microsoft/tolerant-php-parser.git", - "reference": "89386de8dec9c004c8ea832692e236c92f34b542" + "url": "https://github.com/microsoft/tolerant-php-parser.git", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Microsoft/tolerant-php-parser/zipball/89386de8dec9c004c8ea832692e236c92f34b542", - "reference": "89386de8dec9c004c8ea832692e236c92f34b542", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/3eccfd273323aaf69513e2f1c888393f5947804b", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.2" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^8.5.15" }, "type": "library", "autoload": { @@ -509,41 +352,46 @@ } ], "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", - "time": "2019-03-09T19:24:59+00:00" + "support": { + "issues": "https://github.com/microsoft/tolerant-php-parser/issues", + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.2" + }, + "time": "2022-10-05T17:30:19+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -557,20 +405,30 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v1.6.0", + "version": "v4.1.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06" + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06", - "reference": "0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", "shasum": "" }, "require": { @@ -578,11 +436,11 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.6" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4", - "squizlabs/php_codesniffer": "~1.5" + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" }, "type": "library", "autoload": { @@ -597,26 +455,31 @@ "authors": [ { "name": "Christian Weiske", - "role": "Developer", "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/" + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" } ], "description": "Map nested JSON structures onto PHP classes", - "time": "2019-08-15T19:41:25+00:00" + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" + }, + "time": "2022-12-08T20:46:14+00:00" }, { "name": "nikic/php-parser", - "version": "v4.2.5", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/b76bbc3c51f22c570648de48e8c2d941ed5e2cf2", - "reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -624,8 +487,8 @@ "php": ">=7.0" }, "require-dev": { - "ircmaxell/php-yacc": "0.0.4", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -633,7 +496,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -655,107 +518,52 @@ "parser", "php" ], - "time": "2019-10-25T18:33:07+00:00" - }, - { - "name": "paulthebaud/phpunit-generator", - "version": "2.1.5", - "source": { - "type": "git", - "url": "https://github.com/paul-thebaud/phpunit-generator.git", - "reference": "24ca729900187279ff4f83ef0bda0af72cc7c92e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paul-thebaud/phpunit-generator/zipball/24ca729900187279ff4f83ef0bda0af72cc7c92e", - "reference": "24ca729900187279ff4f83ef0bda0af72cc7c92e", - "shasum": "" - }, - "require": { - "doctrine/collections": "^1.5", - "doctrine/lexer": "^1.0", - "league/flysystem": "^1.0", - "nikic/php-parser": "^4.0", - "php": "~7.1", - "psr/container": "^1.0.0", - "respect/validation": "^1.1", - "slim/php-view": "^2.2", - "symfony/console": "^4.0", - "symfony/stopwatch": "^4.0", - "symfony/yaml": "^4.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phploc/phploc": "^4.0", - "phpunit/phpunit": "^8.0|^7.0", - "squizlabs/php_codesniffer": "^3.0" - }, - "bin": [ - "phpunitgen" - ], - "type": "library", - "autoload": { - "psr-4": { - "PhpUnitGen\\": "src/" - } + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paul Thébaud", - "email": "paul.thebaud29@gmail.com" - } - ], - "description": "A PHPUnit 6 / 7 tests skeletons generator", - "homepage": "https://github.com/paul-thebaud/phpunit-generator", - "keywords": [ - "PHP7", - "generator", - "php", - "phpunit", - "test", - "tests", - "unit" - ], - "time": "2019-03-02T19:14:20+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "phan/phan", - "version": "1.3.5", + "version": "5.4.2", "source": { "type": "git", "url": "https://github.com/phan/phan.git", - "reference": "f872949b366d84bd9ce79d8b0ea991edbe258377" + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phan/phan/zipball/f872949b366d84bd9ce79d8b0ea991edbe258377", - "reference": "f872949b366d84bd9ce79d8b0ea991edbe258377", + "url": "https://api.github.com/repos/phan/phan/zipball/4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e", "shasum": "" }, "require": { - "composer/semver": "^1.4", - "composer/xdebug-handler": "^1.3.2", + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0|^3.0", "ext-filter": "*", "ext-json": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "microsoft/tolerant-php-parser": "0.0.17", - "php": "^7.0.0", - "sabre/event": "^5.0", - "symfony/console": "^2.3|^3.0|~4.0", - "symfony/polyfill-mbstring": "^1.11.0" + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.4", + "microsoft/tolerant-php-parser": "0.1.2", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.1.3", + "symfony/console": "^3.2|^4.0|^5.0|^6.0", + "symfony/polyfill-mbstring": "^1.11.0", + "symfony/polyfill-php80": "^1.20.0", + "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" }, "require-dev": { - "brianium/paratest": "^1.1", - "phpunit/phpunit": "^6.3.0" + "phpunit/phpunit": "^8.5.0" }, "suggest": { - "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is recommended, php-ast ^0.1.5|^1.0.0 is needed.", + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.16+ is recommended.", + "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", - "ext-tokenizer": "Needed for non-AST support and file/line-based suppressions." + "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.", + "ext-var_representation": "Suggested for converting values to strings in issue messages" }, "bin": [ "phan", @@ -774,13 +582,13 @@ ], "authors": [ { - "name": "Rasmus Lerdorf" + "name": "Tyson Andre" }, { - "name": "Andrew S. Morrison" + "name": "Rasmus Lerdorf" }, { - "name": "Tyson Andre" + "name": "Andrew S. Morrison" } ], "description": "A static analyzer for PHP", @@ -789,32 +597,37 @@ "php", "static" ], - "time": "2019-05-23T00:25:02+00:00" + "support": { + "issues": "https://github.com/phan/phan/issues", + "source": "https://github.com/phan/phan/tree/5.4.2" + }, + "time": "2023-03-03T17:20:24+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -844,24 +657,28 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -891,32 +708,33 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -943,44 +761,46 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -991,38 +811,53 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "dfc078e8af9c99210337325ff5aa152872c98714" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714", + "reference": "dfc078e8af9c99210337325ff5aa152872c98714", "shasum": "" }, "require": { - "php": "^7.1", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -1041,69 +876,24 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.1" + }, + "time": "2023-03-27T19:02:04+00:00" }, { - "name": "phploc/phploc", - "version": "4.0.1", + "name": "phpmetrics/phpmetrics", + "version": "v2.8.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "6a8a9416517b82d6326ac9c2d040ad53c13654eb" + "url": "https://github.com/phpmetrics/PhpMetrics.git", + "reference": "4b77140a11452e63c7a9b98e0648320bf6710090" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/6a8a9416517b82d6326ac9c2d040ad53c13654eb", - "reference": "6a8a9416517b82d6326ac9c2d040ad53c13654eb", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "sebastian/finder-facade": "^1.1", - "sebastian/version": "^2.0", - "symfony/console": "^2.7|^3.0|^4.0" - }, - "bin": [ - "phploc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "A tool for quickly measuring the size of a PHP project.", - "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2017-11-18T17:35:43+00:00" - }, - { - "name": "phpmetrics/phpmetrics", - "version": "v2.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpmetrics/PhpMetrics.git", - "reference": "39095017413805cd6d9ada16cfaf8aaffcb2fec4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/39095017413805cd6d9ada16cfaf8aaffcb2fec4", - "reference": "39095017413805cd6d9ada16cfaf8aaffcb2fec4", + "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/4b77140a11452e63c7a9b98e0648320bf6710090", + "reference": "4b77140a11452e63c7a9b98e0648320bf6710090", "shasum": "" }, "require": { @@ -1117,20 +907,22 @@ "halleck45/phpmetrics": "*" }, "require-dev": { - "phpunit/phpunit": ">=4.8.27,<=5.7.13", - "sebastian/comparator": ">=1.2.3" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/dom-crawler": "^3.0 || ^4.0 || ^5.0" }, "bin": [ "bin/phpmetrics" ], "type": "library", "autoload": { - "psr-0": { - "Hal\\": "./src/" - }, "files": [ "./src/functions.php" - ] + ], + "psr-0": { + "Hal\\": "./src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1152,107 +944,97 @@ "quality", "testing" ], - "time": "2018-07-10T17:19:33+00:00" + "support": { + "issues": "https://github.com/PhpMetrics/PhpMetrics/issues", + "source": "https://github.com/phpmetrics/PhpMetrics/tree/v2.8.2" + }, + "time": "2023-03-08T15:03:36+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.9.0", + "name": "phpstan/phpdoc-parser", + "version": "1.18.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "882eabc9b6a12e25c27091a261397f9c8792e722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/882eabc9b6a12e25c27091a261397f9c8792e722", + "reference": "882eabc9b6a12e25c27091a261397f9c8792e722", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2019-10-03T11:07:50+00:00" + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.18.0" + }, + "time": "2023-04-06T07:26:43+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "10.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/20800e84296ea4732f9a125e08ce86b4004ae3e4", + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "nikic/php-parser": "^4.15", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^10.0" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-main": "10.0-dev" } }, "autoload": { @@ -1278,32 +1060,42 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-06T13:00:19+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1328,26 +1120,48 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-10T16:53:14+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=8.1" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1364,37 +1178,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.2", + "name": "phpunit/php-text-template", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1413,38 +1237,47 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2023-02-03T06:56:46+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.1", + "name": "phpunit/php-timer", + "version": "6.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1459,65 +1292,71 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.17", + "version": "10.0.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a" + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4c92a15296e58191a4cd74cff3b34fc8e374174a", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20c23e85c86e5c06d63538ba464e8054f4744e62", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.0", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.0", + "sebastian/global-state": "^6.0", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1525,10 +1364,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-main": "10.0-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -1551,29 +1393,48 @@ "testing", "xunit" ], - "time": "2019-10-28T10:37:36+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.19" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-03-27T11:46:33+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1588,7 +1449,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1600,34 +1461,38 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "psr/http-message", - "version": "1.0.1", + "name": "psr/log", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1637,111 +1502,117 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "http", - "http-message", + "log", "psr", - "psr-7", - "request", - "response" + "psr-3" ], - "time": "2016-08-06T14:39:51+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" }, { - "name": "psr/log", - "version": "1.1.2", + "name": "sabre/event", + "version": "5.1.4", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "url": "https://github.com/sabre-io/event.git", + "reference": "d7da22897125d34d7eddf7977758191c06a74497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497", + "reference": "d7da22897125d34d7eddf7977758191c06a74497", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.1 || ^8.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" }, + "type": "library", "autoload": { + "files": [ + "lib/coroutine.php", + "lib/Loop/functions.php", + "lib/Promise/functions.php" + ], "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Sabre\\Event\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "sabre/event is a library for lightweight event-based programming", + "homepage": "http://sabre.io/event/", "keywords": [ - "log", - "psr", - "psr-3" + "EventEmitter", + "async", + "coroutine", + "eventloop", + "events", + "hooks", + "plugin", + "promise", + "reactor", + "signal" ], - "time": "2019-11-01T11:05:21+00:00" + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2021-11-04T06:51:17+00:00" }, { - "name": "respect/validation", - "version": "1.1.31", + "name": "sebastian/cli-parser", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/Respect/Validation.git", - "reference": "45d109fc830644fecc1145200d6351ce4f2769d0" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/45d109fc830644fecc1145200d6351ce4f2769d0", - "reference": "45d109fc830644fecc1145200d6351ce4f2769d0", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=5.4", - "symfony/polyfill-mbstring": "^1.2" + "php": ">=8.1" }, "require-dev": { - "egulias/email-validator": "~1.2 || ~2.1", - "mikey179/vfsstream": "^1.5", - "phpunit/phpunit": "~4.0 || ~5.0", - "symfony/validator": "~2.6.9", - "zendframework/zend-validator": "~2.3" - }, - "suggest": { - "egulias/email-validator": "Strict (RFC compliant) email validation", - "ext-bcmath": "Arbitrary Precision Mathematics", - "ext-mbstring": "Multibyte String Functions", - "friendsofphp/php-cs-fixer": "Fix PSR2 and other coding style issues", - "symfony/validator": "Use Symfony validator through Respect\\Validation", - "zendframework/zend-validator": "Use Zend Framework validator through Respect\\Validation" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "2.0-dev" } }, "autoload": { - "psr-4": { - "Respect\\Validation\\": "library/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1749,206 +1620,164 @@ ], "authors": [ { - "name": "Respect/Validation Contributors", - "homepage": "https://github.com/Respect/Validation/graphs/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "The most awesome validation engine ever created for PHP", - "homepage": "http://respect.github.io/Validation/", - "keywords": [ - "respect", - "validation", - "validator" + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2019-05-28T06:10:06+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { - "name": "roave/better-reflection", - "version": "dev-master", + "name": "sebastian/code-unit", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/Roave/BetterReflection.git", - "reference": "14f329c5a3201ee890d3d8c4959c8779b9de7f63" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/14f329c5a3201ee890d3d8c4959c8779b9de7f63", - "reference": "14f329c5a3201ee890d3d8c4959c8779b9de7f63", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "ext-json": "*", - "jetbrains/phpstorm-stubs": "2019.2", - "nikic/php-parser": "^4.2.1", - "php": ">=7.2.0,<7.5.0", - "phpdocumentor/reflection-docblock": "^4.3.2", - "phpdocumentor/type-resolver": "^1.0.0", - "roave/signature": "^1.0" + "php": ">=8.1" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^8.1.6" - }, - "suggest": { - "composer/composer": "Required to use the ComposerSourceLocator" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { - "psr-4": { - "Roave\\BetterReflection\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "James Titcumb", - "email": "james@asgrim.com", - "homepage": "https://github.com/asgrim" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - }, - { - "name": "Gary Hockin", - "email": "gary@roave.com", - "homepage": "https://github.com/geeh" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + }, + "funding": [ { - "name": "Jaroslav Hanslík", - "email": "kukulich@kukulich.cz", - "homepage": "https://github.com/kukulich" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Better Reflection - an improved code reflection API", - "time": "2019-10-03T09:08:48+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { - "name": "roave/signature", - "version": "1.0.0", + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/Roave/Signature.git", - "reference": "bed4ecbdd7f312ab6bb39561ac191f520bcee386" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/Signature/zipball/bed4ecbdd7f312ab6bb39561ac191f520bcee386", - "reference": "bed4ecbdd7f312ab6bb39561ac191f520bcee386", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": "^7.0|^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^5.6" + "phpunit/phpunit": "^10.0" }, "type": "library", - "autoload": { - "psr-4": { - "Roave\\Signature\\": "src" + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "description": "Sign and verify stuff", - "time": "2017-02-17T13:53:21+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { - "name": "sabre/event", - "version": "5.0.3", + "name": "sebastian/comparator", + "version": "5.0.0", "source": { "type": "git", - "url": "https://github.com/sabre-io/event.git", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/event/zipball/f5cf802d240df1257866d8813282b98aee3bc548", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", + "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", "shasum": "" }, "require": { - "php": ">=7.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": ">=6", - "sabre/cs": "~1.0.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Sabre\\Event\\": "lib/" - }, - "files": [ - "lib/coroutine.php", - "lib/Loop/functions.php", - "lib/Promise/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - } - ], - "description": "sabre/event is a library for lightweight event-based programming", - "homepage": "http://sabre.io/event/", - "keywords": [ - "EventEmitter", - "async", - "coroutine", - "eventloop", - "events", - "hooks", - "plugin", - "promise", - "reactor", - "signal" - ], - "time": "2018-03-05T13:55:47+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1964,38 +1793,64 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:07:16+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.2", + "name": "sebastian/complexity", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2008,57 +1863,51 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2018-07-12T15:12:46+00:00" + "time": "2023-02-03T06:59:47+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^10.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2071,13 +1920,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -2088,27 +1937,38 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-23T05:12:41+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b6f3694c6386c7959915a0037652e0c40f6f69cc", + "reference": "b6f3694c6386c7959915a0037652e0c40f6f69cc", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -2116,7 +1976,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2135,40 +1995,50 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:03:04+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2203,32 +2073,52 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:49+00:00" }, { - "name": "sebastian/finder-facade", - "version": "1.2.2", + "name": "sebastian/global-state", + "version": "6.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "aab257c712de87b90194febd52e4d184551c2d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", - "reference": "4a3174709c2dc565fe5fb26fcf827f6a1fc7b09f", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", + "reference": "aab257c712de87b90194febd52e4d184551c2d44", "shasum": "" }, "require": { - "symfony/finder": "~2.3|~3.0|~4.0", - "theseer/fdomdocument": "~1.3" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2241,41 +2131,51 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2017-11-18T17:31:49+00:00" + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:07:38+00:00" }, { - "name": "sebastian/global-state", + "name": "sebastian/lines-of-code", "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", + "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", "shasum": "" }, "require": { - "php": "^7.0" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -2290,42 +2190,50 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2023-02-03T07:08:02+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2345,32 +2253,42 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2390,32 +2308,42 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2428,44 +2356,57 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:05:40+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.1", + "name": "sebastian/type", + "version": "4.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2480,34 +2421,45 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2528,93 +2480,57 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "slim/php-view", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/slimphp/PHP-View.git", - "reference": "a13ada9d7962ca1b48799c0d9ffbca4c33245aed" + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/PHP-View/zipball/a13ada9d7962ca1b48799c0d9ffbca4c33245aed", - "reference": "a13ada9d7962ca1b48799c0d9ffbca4c33245aed", - "shasum": "" - }, - "require": { - "psr/http-message": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8", - "slim/slim": "^3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Views\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Glenn Eggleton", - "email": "geggleto@gmail.com" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Render PHP view scripts into a PSR-7 Response object.", - "keywords": [ - "framework", - "php", - "phtml", - "renderer", - "slim", - "template", - "view" - ], - "time": "2019-04-15T20:43:28+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "symfony/console", - "version": "v4.3.6", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "136c4bd62ea871d00843d1bc0316de4c4a84bb78" + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/136c4bd62ea871d00843d1bc0316de4c4a84bb78", - "reference": "136c4bd62ea871d00843d1bc0316de4c4a84bb78", + "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3", - "symfony/process": "<3.3" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/var-dumper": "^4.3" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -2623,11 +2539,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -2650,39 +2561,63 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2019-10-30T12:58:49+00:00" + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.2.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-29T21:42:15+00:00" }, { - "name": "symfony/finder", - "version": "v4.3.6", + "name": "symfony/deprecation-contracts", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "72a068f77e317ae77c0a0495236ad292cfb5ce6f" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/72a068f77e317ae77c0a0495236ad292cfb5ce6f", - "reference": "72a068f77e317ae77c0a0495236ad292cfb5ce6f", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2691,34 +2626,54 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2019-10-30T12:53:54+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" @@ -2726,16 +2681,20 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2759,41 +2718,62 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.12.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2809,47 +2789,72 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.12.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -2868,46 +2873,74 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/service-contracts", - "version": "v1.1.7", + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffcde9615dc5bb4825b9f6aed07716f1f57faae0", - "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/container": "^1.0" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { - "symfony/service-implementation": "" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Contracts\\Service\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2924,48 +2957,70 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], - "time": "2019-09-17T11:12:18+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/stopwatch", - "version": "v4.3.6", + "name": "symfony/polyfill-php80", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/1e4ff456bd625be5032fac9be4294e60442e9b71", - "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/service-contracts": "^1.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2974,57 +3029,85 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2019-08-07T11:52:19+00:00" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/yaml", - "version": "v4.4.1", + "name": "symfony/service-contracts", + "version": "v3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "76de473358fe802578a415d5bb43c296cf09d211" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/76de473358fe802578a415d5bb43c296cf09d211", - "reference": "76de473358fe802578a415d5bb43c296cf09d211", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.1", + "psr/container": "^2.0" }, "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "^3.4|^4.0|^5.0" + "ext-psr": "<1.1|>=2" }, "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Contracts\\Service\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "/Test/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3033,77 +3116,148 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Generic abstractions related to writing services", "homepage": "https://symfony.com", - "time": "2019-11-12T14:51:11+00:00" + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" }, { - "name": "theseer/fdomdocument", - "version": "1.6.6", + "name": "symfony/string", + "version": "v6.2.8", "source": { "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca" + "url": "https://github.com/symfony/string.git", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/6e8203e40a32a9c770bcb62fe37e68b948da6dca", - "reference": "6e8203e40a32a9c770bcb62fe37e68b948da6dca", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { - "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "classmap": [ - "src/" + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.2.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-06-30T11:53:12+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3123,33 +3277,111 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "tysonandre/var_representation_polyfill", + "version": "0.1.3", + "source": { + "type": "git", + "url": "https://github.com/TysonAndre/var_representation_polyfill.git", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.2.0|^8.0.0" + }, + "provide": { + "ext-var_representation": "*" + }, + "require-dev": { + "phan/phan": "^5.4.1", + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-var_representation": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, + "autoload": { + "files": [ + "src/var_representation.php" + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + } + ], + "description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export", + "keywords": [ + "var_export", + "var_representation" + ], + "support": { + "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" + }, + "time": "2022-08-31T12:59:22+00:00" }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3171,18 +3403,20 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "roave/better-reflection": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1.10", + "php": ">=8.0.0", "ext-json": "*", "ext-pcre": "*", "ext-spl": "*", @@ -3190,5 +3424,6 @@ }, "platform-dev": { "ext-reflection": "*" - } + }, + "plugin-api-version": "2.3.0" } diff --git a/classes/vendor/dallgoot/yaml/configuration/placeholder.txt b/classes/vendor/dallgoot/yaml/configuration/placeholder.txt deleted file mode 100644 index e69de29..0000000 diff --git a/classes/vendor/dallgoot/yaml/documentation/coherence.md b/classes/vendor/dallgoot/yaml/documentation/coherence.md new file mode 100644 index 0000000..0512700 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/documentation/coherence.md @@ -0,0 +1,16 @@ +# Sometimes the handling of dataypes in other libraries can be confusing + +## Example from Symfony Yaml +```php +$object = new \stdClass(); +$object->foo = 'bar'; + +$dumped = Yaml::dump(['data' => $object], 2, 4, Yaml::DUMP_OBJECT_AS_MAP); +// $dumped = "data:\n foo: bar" +``` + +## Dallgoot\Yaml removes this ambiguity by matching a specific PHP data types with its YAML counterpart like so : +- PHP standard objects -> YAML mapping +- PHP standard array -> YAML sequence +- _Dallgoot\Types\Compact_ -> YAML mapping or sequence according to content +- _Dallgoot\Types\YamlObject_ -> YAML mapping or sequence according to content \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/batch_read.php b/classes/vendor/dallgoot/yaml/examples/batch_read.php index 25fb3f4..2ea9165 100644 --- a/classes/vendor/dallgoot/yaml/examples/batch_read.php +++ b/classes/vendor/dallgoot/yaml/examples/batch_read.php @@ -16,4 +16,4 @@ $yamlObjList[] = $yloader->load($fileName)->parse(); } -var_dump($yamlObjList); +print_r($yamlObjList); diff --git a/classes/vendor/dallgoot/yaml/examples/compact_notation.php b/classes/vendor/dallgoot/yaml/examples/compact_notation.php index 7296b2d..039849e 100644 --- a/classes/vendor/dallgoot/yaml/examples/compact_notation.php +++ b/classes/vendor/dallgoot/yaml/examples/compact_notation.php @@ -12,12 +12,12 @@ $obj = Yaml::parse($yamlContent); //printing specifically some values -var_dump($obj->compact_object->c); -var_dump($obj->compact_array[3]); +print_r($obj->compact_object->c); +print_r($obj->compact_array[3]); //modifying those same values $obj->compact_object->c = 3; $obj->compact_array[3] = 3; //printing the corresponding YAML -var_dump(Yaml::dump($obj)); \ No newline at end of file +print_r(Yaml::dump($obj)); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/load_modify_save.php b/classes/vendor/dallgoot/yaml/examples/load_modify_save.php index edc2d69..b999d07 100644 --- a/classes/vendor/dallgoot/yaml/examples/load_modify_save.php +++ b/classes/vendor/dallgoot/yaml/examples/load_modify_save.php @@ -1,11 +1,11 @@ object->array[3]->integer = '123456789'; //dumping the corresponding YAML -var_dump(Yaml::dump($yamlObject, 0)); \ No newline at end of file +print_r(Yaml::dump($yamlObject, 0)); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/read.php b/classes/vendor/dallgoot/yaml/examples/read.php index 049a769..13dacae 100644 --- a/classes/vendor/dallgoot/yaml/examples/read.php +++ b/classes/vendor/dallgoot/yaml/examples/read.php @@ -10,7 +10,7 @@ */ $yaml = Yaml::parseFile('./examples/dummy.yml', 0, $debug); -var_dump($yaml->object->array[0]); +print_r($yaml->object->array[0]); $yamlContent = <<mapping->somekey->array[0]); \ No newline at end of file +print_r($second_document[1]->mapping->somekey->array[0]); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/references.php b/classes/vendor/dallgoot/yaml/examples/references.php index 59bc2f6..caa56d9 100644 --- a/classes/vendor/dallgoot/yaml/examples/references.php +++ b/classes/vendor/dallgoot/yaml/examples/references.php @@ -1,7 +1,7 @@ anchor_definition); -var_dump($obj->anchor_call); +print_r($obj->anchor_definition); +print_r($obj->anchor_call); echo "\nchange anchor/reference value to 123\n"; $obj->addReference('anchor_name', 123); -var_dump($obj->anchor_definition); -var_dump($obj->anchor_call); +print_r($obj->anchor_definition); +print_r($obj->anchor_call); echo "\nchange one anchor to new value 'abc'\n"; $obj->anchor_definition = 'abc'; -var_dump($obj->anchor_definition); -var_dump($obj->anchor_call); +print_r($obj->anchor_definition); +print_r($obj->anchor_call); echo "\nunset anchor_call and re-set value\n"; unset($obj->anchor_call); $obj->anchor_call = 'xyz'; -var_dump($obj->anchor_definition); -var_dump($obj->anchor_call); +print_r($obj->anchor_definition); +print_r($obj->anchor_call); echo "\nchange anchor/reference value to 789\n"; $obj->addReference('anchor_name', 789); -var_dump($obj->anchor_definition); -var_dump($obj->anchor_call); +print_r($obj->anchor_definition); +print_r($obj->anchor_call); -var_dump($obj); \ No newline at end of file +print_r($obj); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/testing.php b/classes/vendor/dallgoot/yaml/examples/testing.php index a941767..5ea9c7d 100644 --- a/classes/vendor/dallgoot/yaml/examples/testing.php +++ b/classes/vendor/dallgoot/yaml/examples/testing.php @@ -16,9 +16,9 @@ /* USE CASE 1 * load and parse if file exists */ -$content = file_get_contents($file);//var_dump($content); +$content = file_get_contents($file); $yaml = Yaml::parse($content, 0, $debug); echo memory_get_usage() . "\n"; -// var_dump($yaml); -var_dump(json_encode($yaml, JSON_OPTIONS)); \ No newline at end of file + +print_r(json_encode($yaml, JSON_OPTIONS)); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/examples/write.php b/classes/vendor/dallgoot/yaml/examples/write.php index ea524cf..d56315f 100644 --- a/classes/vendor/dallgoot/yaml/examples/write.php +++ b/classes/vendor/dallgoot/yaml/examples/write.php @@ -1,7 +1,7 @@ - * @license Apache 2.0 - * @link https://github.com/dallgoot/yaml - */ -class Dumper -{ - private const LINEFEED = "\n"; - public const INDENT = 2; - // private const WIDTH = 120; //TODO forget this feature for the moment - private const OPTIONS = 0b00000; - public const DATE_FORMAT = 'Y-m-d'; - - public $options; - //options - public const EXPAND_SHORT = 0b00001; - public const SERIALIZE_CUSTOM_OBJECTS = 0b00010; - /** @var int */ - public $floatPrecision = 4; - /** @var bool */ - private $multipleDocs = false; - /** @var bool */ - public $_compactMode = false; - /** @var null|DumperHandlers */ - private $handler; - - - public function __construct($options=null) - { - $this->options = is_int($options) ? $options : self::OPTIONS; - $this->handler = new DumperHandlers($this); - } - /** - * Returns (as a string) the YAML representation of the $dataType provided - * - * @param mixed $dataType The data type - * @param int|null $options The options - * - * @throws \Exception datatype cannot be null - * - * @return string The Yaml string content - */ - public function toString($dataType, int $options = null):string - { - if (empty($dataType)) throw new \Exception(self::class.": No content to convert to Yaml"); - if (is_scalar($dataType)) { - return "--- ".$this->handler->dumpScalar($dataType). self::LINEFEED ; - } - return $this->dump($dataType, 0); - } - - /** - * Calls and saves the result of Dumper::toString to the file $filePath provided - * - * @param string $filePath The file path - * @param mixed $dataType The data type - * @param int|null $options The options - * - * @throws \Exception datatype cannot be null - * - * @return bool true = if the file has been correctly saved ( return value from 'file_put_contents') - */ - public function toFile(string $filePath, $dataType, int $options = null):bool - { - return !is_bool(file_put_contents($filePath, $this->toString($dataType, $options))); - } - - - - public function dump($dataType, int $indent):string - { - if (is_null($dataType)) { - return ''; - } elseif (is_resource($dataType)) { - return get_resource_type($dataType); - } elseif (is_scalar($dataType)) { - return $this->handler->dumpScalar($dataType); - } else { - return $this->handler->dumpCompound($dataType, $indent); - } - } - - - public function dumpMultiDoc($arrayOfYamlObject) - { - $output = ''; - foreach ($arrayOfYamlObject as $key => $yamlObject) { - $output .= "---\n".$this->dumpYamlObject($yamlObject)."\n"; - } - return $output; - } - - /** - * Dumps an yaml object to a YAML string - * - * @param YamlObject $obj The object - * - * @return string YAML formatted string - * @todo export comment from YamlObject - */ - public function dumpYamlObject(YamlObject $obj):string - { - if ($this->multipleDocs || $obj->hasDocStart() || $obj->isTagged()) { - $this->multipleDocs = true; - // && $this->$result instanceof DLL) $this->$result->push("---"); - } - // $this->insertComments($obj->getComment()); - if (count($obj) > 0) { - return $this->iteratorToString($obj, '-', "\n", 0); - } else { - return $this->iteratorToString(new \ArrayIterator(get_object_vars($obj)), '%s:', "\n", 0); - } - } - - - public function iteratorToString(\Iterator $iterable, - string $keyMask, string $itemSeparator, int $indent):string - { - $pairs = []; - $valueIndent = $indent + self::INDENT; - foreach ($iterable as $key => $value) { - $separator = "\n"; - if (is_scalar($value) || $value instanceof Compact || $value instanceof \DateTime) { - $separator = ' '; - $valueIndent = 0; - } - if ($this->_compactMode) { - $pairs[] = sprintf($keyMask, $key).$this->dump($value, $valueIndent); - } else { - $pairs[] = str_repeat(' ', $indent).sprintf($keyMask, $key).$separator.$this->dump($value, $valueIndent); - } - - } - // $processItem = function () - return implode($itemSeparator, $pairs); - // return implode($itemSeparator, array_map(callback, arr1)); - } -} diff --git a/classes/vendor/dallgoot/yaml/sources/DumperHandlers.php b/classes/vendor/dallgoot/yaml/sources/DumperHandlers.php deleted file mode 100644 index f2816c3..0000000 --- a/classes/vendor/dallgoot/yaml/sources/DumperHandlers.php +++ /dev/null @@ -1,142 +0,0 @@ - - * @license Apache 2.0 - * @link https://github.com/dallgoot/yaml - */ -class DumperHandlers -{ - private $dumper; - - public function __construct(Dumper $dumper) - { - $this->dumper = $dumper; - } - - - public function dumpScalar($dataType):string - { - if ($dataType === \INF) return '.inf'; - if ($dataType === -\INF) return '-.inf'; - $precision = "%.".$this->dumper->floatPrecision."F"; - switch (gettype($dataType)) { - case 'boolean': return $dataType ? 'true' : 'false'; - case 'float': //fall through - case 'double': return is_nan((double) $dataType) ? '.nan' : sprintf($precision, $dataType); - } - return $this->dumpString($dataType); - } - - - public function dumpCompound($compound, int $indent):string - { - if ($this->dumper->_compactMode) { - return $this->dumpCompact($compound, $indent); - } else { - if (is_array($compound)) { - if ($compound[0] instanceof YamlObject) { - return $this->dumper->dumpMultiDoc($compound); - } - $iterator = new \ArrayIterator($compound); - $keyMask = '-'; - $refKeys = range(0, count($compound) - 1); - if (array_keys($compound) !== $refKeys) { - $keyMask = '%s:'; - } - return $this->dumper->iteratorToString($iterator, $keyMask, "\n", $indent); - } elseif (is_object($compound) && !is_callable($compound)) { - return $this->dumpObject($compound, $indent); - } - } - throw new \Exception("Dumping Callable|Resource is not currently supported", 1); - } - - private function dumpObject($object, int $indent):string - { - if ($object instanceof YamlObject) { - return $this->dumper->dumpYamlObject($object); - } elseif ($object instanceof Compact) { - return $this->dumpCompact($object, $indent); - } elseif ($object instanceof Tagged) { - return $this->dumpTagged($object, $indent); - } elseif ($object instanceof \DateTime) { - return $object->format($this->dumper::DATE_FORMAT); - } elseif (is_iterable($object)) { - $iterator = $object; - } else { - $iterator = new \ArrayIterator(get_object_vars($object)); - } - return $this->dumper->iteratorToString($iterator, '%s:', "\n", $indent); - } - - - - /** - * Dumps a Compact|mixed (representing an array or object) as the single-line format representation. - * All values inside are assumed single-line as well. - * Note: can NOT use JSON_encode because of possible reference calls or definitions as : '&abc 123', '*fre' - * which would be quoted by json_encode - * - * @param mixed $subject The subject - * @param integer $indent The indent - * - * @return string the string representation (JSON like) of the value - */ - public function dumpCompact($subject, int $indent):string - { - $structureFormat = '{%s}'; - $keyMask = "%s: "; - if (!is_array($subject) && !($subject instanceof \ArrayIterator)) { - $source = get_object_vars($subject); - } else { - $max = count($subject); - $objectAsArray = is_array($subject) ? $subject : $subject->getArrayCopy(); - $source = $objectAsArray; - if (array_keys($objectAsArray) === range(0, $max - 1)) { - $structureFormat = '[%s]'; - $keyMask = ''; - } - } - $previousCompactMode = $this->dumper->_compactMode; - $this->dumper->_compactMode = true; - $result = $this->dumper->iteratorToString(new \ArrayIterator($source), $keyMask, ', ', $indent); - $this->dumper->_compactMode = $previousCompactMode; - return sprintf($structureFormat, $result); - } - - /** - * Dumps a string. Protects it if needed - * - * @param string $str The string - * - * @return string ( description_of_the_return_value ) - * @todo implements checking and protection function - */ - public function dumpString(string $str):string - { - //those characters must be escaped : - : ? { } [ ] # , & * ! > | ' " % - // The “@” (#x40, at) and “`” (#x60, grave accent) are reserved for future use. - // 5.4. Line Break Characters - // Example 5.13. Escaped Characters - - $str = json_encode(ltrim($str)); - return strspn(substr($str,1,-1), "-:?{}[]#,&*!>|'\"%") > 0 ? $str : trim($str, '"'); - } - - public function dumpTagged(Tagged $obj, int $indent):string - { - $separator = ' '; - $valueIndent = 0; - if (!is_scalar($obj->value) && !$this->dumper->_compactMode) { - $separator = "\n"; - $valueIndent = $indent + $this->dumper::INDENT; - } - return $obj->tagName.$separator.$this->dumper->dump($obj->value, $valueIndent); - } -} diff --git a/classes/vendor/dallgoot/yaml/sources/NodeFactory.php b/classes/vendor/dallgoot/yaml/sources/NodeFactory.php deleted file mode 100644 index d3adde2..0000000 --- a/classes/vendor/dallgoot/yaml/sources/NodeFactory.php +++ /dev/null @@ -1,178 +0,0 @@ - - * @license Apache 2.0 - * @link https://github.com/dallgoot/yaml - */ -final class NodeFactory -{ - private const JSON_OPTIONS = \JSON_PARTIAL_OUTPUT_ON_ERROR|\JSON_UNESCAPED_SLASHES; - - final public static function get($nodeString = null, $line = 0):NodeGeneric - { - $trimmed = ltrim($nodeString); - if ($trimmed === '') return new Nodes\Blank($nodeString, $line); - elseif (substr($trimmed, 0, 3) === '...') return new Nodes\DocEnd($nodeString, $line); - elseif ((bool) preg_match(Regex::KEY, $trimmed, $matches)) return new Nodes\Key($nodeString, $line, $matches); - else { - $first = $trimmed[0]; - $stringGroups = ['-', '>|' , '"\'', "#%" , "{[" , ":?" , '*&!']; - $methodGroups = ['Hyphen','Literal','Quoted','Special','Compact','SetElement','NodeAction']; - foreach ($stringGroups as $groupIndex => $stringRef) { - if (is_int(strpos($stringRef, $first))) { - $methodName = 'on'.$methodGroups[$groupIndex]; - try { - return self::$methodName($first, $nodeString, $line); - } catch (\Throwable $e) { - throw new \Exception(" could not create a Node ($methodName) for '$nodeString'", 1, $e); - } - } - } - } - return new Nodes\Scalar($nodeString, $line); - } - - /** - * Return the correct Node Object between NodeComment OR NodeDirective - * - * @param string $nodeString The node string - * @param integer $line The line - * - * @return NodeGeneric - */ - private static function onSpecial(string $first, string $nodeString, int $line):NodeGeneric - { - if ($first === "#") { - return new Nodes\Comment(ltrim($nodeString), $line); - } else { - if (preg_match(Regex::DIRECTIVE_TAG, $nodeString) - || preg_match(Regex::DIRECTIVE_VERSION, $nodeString)) { - return new Nodes\Directive(ltrim($nodeString), $line); - } else { - throw new \ParseError("Invalid/Unknown Directive", 1); - } - } - } - - /** - * Set $node type and value when $nodevalue starts with a quote (simple or double) - * - * @param string $nodeString The node value - * @param int $line The line - * - * @return NodeGeneric - */ - private static function onQuoted(string $first, string $nodeString, int $line):NodeGeneric - { - return Regex::isProperlyQuoted(trim($nodeString)) ? new Nodes\Quoted($nodeString, $line) - : new Nodes\Partial($nodeString, $line); - } - - /** - * Set $node type and value when NodeValue starts with a Set characters "?:" - * - * @param string $nodeString The node value - * @param int $line The line - * - * @return NodeGeneric - */ - private static function onSetElement(string $first, string $nodeString, int $line):NodeGeneric - { - return $first === '?' ? new Nodes\SetKey($nodeString, $line) - : new Nodes\SetValue($nodeString, $line); - } - - /** - * Determines the Node type and value when a compact object/array syntax is found - * - * @param string $nodeString The value assumed to start with { or [ or characters - * @param int $line The line - * - * @return NodeGeneric - */ - private static function onCompact(string $first, string $nodeString, int $line):NodeGeneric - { - json_decode($nodeString, false, 512, self::JSON_OPTIONS); - if (json_last_error() === \JSON_ERROR_NONE) { - return new Nodes\JSON($nodeString, $line); - } else { - $backtrack_setting = "pcre.backtrack_limit"; - ini_set($backtrack_setting, "-1"); - $isMapping = preg_match(Regex::MAPPING, trim($nodeString)); - $isSequence = preg_match(Regex::SEQUENCE, trim($nodeString)); - ini_restore($backtrack_setting); - - if (is_bool($isMapping) || is_bool($isSequence)) { - throw new \Exception("Regex Error for ".(is_bool($isMapping) ? 'mapping:' :'sequence:').preg_last_error()); - } - if ($isMapping) { - // var_dump(Regex::MAPPING, trim($nodeString)); - return new Nodes\CompactMapping($nodeString, $line); - } elseif ($isSequence) { - return new Nodes\CompactSequence($nodeString, $line); - } - } - return new Nodes\Partial($nodeString, $line); - } - - /** - * Determines Node type and value when an hyphen "-" is found - * - * @param string $nodeString The node string value - * @param int $line The line - * - * @return NodeGeneric - */ - private static function onHyphen(string $first, string $nodeString, int $line):NodeGeneric - { - if (substr($nodeString, 0, 3) === '---') return new Nodes\DocStart($nodeString, $line); - elseif ((bool) preg_match(Regex::ITEM, ltrim($nodeString))) return new Nodes\Item($nodeString, $line); - else { - return new Nodes\Scalar($nodeString, $line); - } - } - - /** - * Sets Node type and value according to $nodeString when one of these characters is found : !,&,* - * - * @param string $nodeString The node value - * @param int $line The line - * - *@todo replace $action[0] with $first if applicable - */ - private static function onNodeAction(string $first, string $nodeString, int $line):NodeGeneric - { - if (!((bool) preg_match(Regex::NODE_ACTIONS, trim($nodeString), $matches))) { - // var_dump("ACTION is scalar: '$nodeString'"); - return new Nodes\Scalar($nodeString, $line); - } - if ($first === "!") { - return new Nodes\Tag($nodeString, $line); - } else { - return new Nodes\Anchor($nodeString, $line); - } - } - - private static function onLiteral(string $first, string $nodeString, int $line):NodeGeneric - { - switch ($first) { - case '>': return new Nodes\LiteralFolded($nodeString, $line); - case '|': return new Nodes\Literal($nodeString, $line); - default: - throw new \ParseError("Not a literal node !! '$first' on line:$line"); - } - } - -} \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/sources/YamlProperties.php b/classes/vendor/dallgoot/yaml/sources/YamlProperties.php deleted file mode 100644 index 6a3e973..0000000 --- a/classes/vendor/dallgoot/yaml/sources/YamlProperties.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @license Apache 2.0 - * @link https://github.com/dallgoot/yaml - */ -class YamlProperties -{ - /** @var null|boolean */ - public $_hasDocStart; // null = no docstart, true = docstart before document comments, false = docstart after document comments - /** @var array */ - public $_anchors = []; - /** @var array */ - public $_comments = []; - /** @var array */ - public $_tags = []; - /** @var int */ - public $_options; - /** @var null|string */ - public $value; - - /** - * Creates API object to be used for the document provided as argument - * - * @param YamlObject $obj the YamlObject as the target for all methods call that needs it - */ - public function __construct(int $buildingOptions) - { - $this->_options = $buildingOptions; - } - -} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Comment.php b/classes/vendor/dallgoot/yaml/sources/nodes/Comment.php deleted file mode 100644 index 1cbdd1d..0000000 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Comment.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @license Apache 2.0 - * @link https://github.com/dallgoot/yaml - */ -class Comment extends NodeGeneric -{ - public function specialProcess(NodeGeneric &$previous, array &$emptyLines):bool - { - $previous->getRoot()->add($this); - return true; - } - - public function build(&$parent = null) - { - $root = $this->getRoot(); - $yamlObject = $root->getYamlObject(); - $yamlObject->addComment($this->line, $this->raw); - return null; - } -} \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/sources/Builder.php b/classes/vendor/dallgoot/yaml/src/Builder.php similarity index 86% rename from classes/vendor/dallgoot/yaml/sources/Builder.php rename to classes/vendor/dallgoot/yaml/src/Builder.php index c9bd1da..de3bab5 100644 --- a/classes/vendor/dallgoot/yaml/sources/Builder.php +++ b/classes/vendor/dallgoot/yaml/src/Builder.php @@ -2,11 +2,13 @@ namespace Dallgoot\Yaml; -use Dallgoot\Yaml\Nodes\NodeGeneric; -use Dallgoot\Yaml\NodeList; +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Types/YamlObject.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/YamlProperties.php'); + use Dallgoot\Yaml\Nodes\Root; use Dallgoot\Yaml\Nodes\DocEnd; use Dallgoot\Yaml\Nodes\DocStart; +use Dallgoot\Yaml\Types\YamlObject; /** * Constructs the result (YamlObject or array) according to every Nodes and their values @@ -15,13 +17,12 @@ * @license Apache 2.0 * @link https://github.com/dallgoot/yaml */ -final class Builder +class Builder { - /** @var boolean */ - public $dateAsObject = false; + public bool $dateAsObject = false; - private $_options; - private $_debug = 0; + private int $_options; + private int $_debug = 0; const INVALID_DOCUMENT = "DOCUMENT %d is invalid,"; @@ -39,9 +40,9 @@ public function __construct($options, $debug) */ public function buildContent(Root $root) { - if ($this->_debug === 2) { - print_r($root); - return null; + switch ($this->_debug) { + case 2 : print_r($root); + case 1 : return null; } $documents = []; $buffer = new NodeList(); @@ -70,7 +71,7 @@ public function buildContent(Root $root) * * @return YamlObject the YAML document as an object */ - public function buildDocument(NodeList &$list, int $docNum):YamlObject + public function buildDocument(NodeList &$list, int $docNum): YamlObject { $yamlObject = new YamlObject($this->_options); $rootNode = new Root(); @@ -85,7 +86,7 @@ public function buildDocument(NodeList &$list, int $docNum):YamlObject } return $rootNode->build($yamlObject); } catch (\Throwable $e) { - throw new \ParseError(sprintf(self::INVALID_DOCUMENT, $docNum).':'.$e->getMessage(), 2, $e); + throw new \ParseError(sprintf(self::INVALID_DOCUMENT, $docNum) . ':' . $e->getMessage(), 2, $e); } } @@ -105,6 +106,4 @@ public function saveAndPush(DocStart $child, NodeList &$buffer, array &$document $buffer->push($child); } } - - } diff --git a/classes/vendor/dallgoot/yaml/src/Dumper.php b/classes/vendor/dallgoot/yaml/src/Dumper.php new file mode 100644 index 0000000..bc2b9ea --- /dev/null +++ b/classes/vendor/dallgoot/yaml/src/Dumper.php @@ -0,0 +1,149 @@ + + * @license Apache 2.0 + * @link https://github.com/dallgoot/yaml + */ +class Dumper +{ + public const INDENT = 2; + // private const WIDTH = 120; //TODO forget this feature for the moment + private const OPTIONS = 0b00000; + public const DATE_FORMAT = 'Y-m-d'; + + public $options; + //options + public const EXPAND_SHORT = 0b00001; + public const SERIALIZE_CUSTOM_OBJECTS = 0b00010; + public const USE_TILDE_AS_NULL = 0b00100; + + public int $floatPrecision = 4; + + private bool $multipleDocs = false; + + public bool $_compactMode = false; + + private ?DumperHandlers $handler; + + public const KEY_MASK_SEQ = '- %s'; + public const KEY_MASK_MAP = '%s: %s'; + + public function __construct($options = null) + { + $this->options = is_int($options) ? $options : self::OPTIONS; + $this->handler = new DumperHandlers($this); + } + /** + * Returns (as a string) the YAML representation of the $dataType provided + * + * @param mixed $dataType The data type + * + * @throws \Exception datatype cannot be null + * + * @return string The Yaml string content + */ + public function toString($dataType, ?int $options = null): string + { + if (empty($dataType)) throw new \Exception(self::class . ": No content to convert to Yaml"); + if (is_scalar($dataType)) { + return "--- " . $this->handler->dumpScalar($dataType) . PHP_EOL; + } + return $this->dump($dataType, 0, false, true); + } + + /** + * Calls and saves the result of Dumper::toString to the file $filePath provided + * + * @param mixed $dataType The data type + * + * @throws \Exception datatype cannot be null + * + * @return bool true = if the file has been correctly saved ( return value from 'file_put_contents') + */ + public function toFile(string $filePath, $dataType, ?int $options = null): bool + { + return !is_bool(file_put_contents($filePath, $this->toString($dataType, $options))); + } + + + + public function dump(mixed $dataType, int $indent, bool $isCompact = false, $isRoot = false): string + { + return match(true) { + $dataType instanceof YamlObject => $this->dumpYamlObject($dataType), + is_null($dataType) => $this->options & self::USE_TILDE_AS_NULL ? '~' : '', + is_scalar($dataType) => $this->handler->dumpScalar($dataType), + is_array($dataType) => $this->handler->dumpArray($dataType, $indent, $isCompact, $isRoot), + is_object($dataType) => $this->handler->dumpObject($dataType, $indent, $isCompact, $isRoot), + is_resource($dataType) => get_resource_type($dataType), + is_callable($dataType, false, $callable_name) => $callable_name, + default => '[Unknown Type]', + }; + } + + + public function dumpMultiDoc(array $arrayOfYamlObject): string + { + $docs = []; + foreach ($arrayOfYamlObject as $yamlObject) { + $docs[] = $this->dumpYamlObject($yamlObject); + } + return "---\n" . implode("\n---\n", $docs); + } + + /** + * Dumps an yaml object to a YAML string + * + * @todo export comment from YamlObject + */ + public function dumpYamlObject(YamlObject $obj): string + { + if ($this->multipleDocs || $obj->hasDocStart() || $obj->isTagged()) { + $this->multipleDocs = true; + // && $this->$result instanceof DLL) $this->$result->push("---"); + } + // $this->insertComments($obj->getComment()); + $properties = get_object_vars($obj); + $pairs = []; + if (count($properties) === 0) { + return $this->handler->dumpArray($obj->getArrayCopy(), 0, false, true); + }else { + return $this->handler->dumpObject($obj, 0, false, true); + } + } + + + // public function iteratorToString( + // $compound, + // string $keyMask, + // string $itemSeparator, + // int $indent, + // bool $compact = false + // ): string { + // $pairs = []; + // $valueIndent = $indent + self::INDENT; + // if(is_object($compound)) { + // $compound = get_object_vars($compound); + // } + // foreach ($compound as $key => $value) { + // $separator = "\n"; + // if (is_scalar($value) || $value instanceof \DateTime) { + // $separator = ' '; + // $valueIndent = 0; + // } + // if ($compact) { + // $pairs[] = sprintf($keyMask, $key) . $this->dump($value, $valueIndent); + // } else { + // $pairs[] = str_repeat(' ', $indent) . sprintf($keyMask, $key) . $separator . $this->dump($value, $valueIndent); + // } + // } + // return implode($itemSeparator, $pairs); + // } +} diff --git a/classes/vendor/dallgoot/yaml/src/DumperHandlers.php b/classes/vendor/dallgoot/yaml/src/DumperHandlers.php new file mode 100644 index 0000000..428278e --- /dev/null +++ b/classes/vendor/dallgoot/yaml/src/DumperHandlers.php @@ -0,0 +1,195 @@ + + * @license Apache 2.0 + * @link https://github.com/dallgoot/yaml + */ +class DumperHandlers +{ + private $dumper; + + public function __construct(Dumper $dumper) + { + $this->dumper = $dumper; + } + + + public function dumpScalar($dataType): string + { + if ($dataType === \INF) return '.inf'; + if ($dataType === -\INF) return '-.inf'; + $precision = "%." . $this->dumper->floatPrecision . "F"; + switch (gettype($dataType)) { + case 'boolean': + return $dataType ? 'true' : 'false'; + case 'float': //fall through + case 'double': + return is_nan((float) $dataType) ? '.nan' : sprintf($precision, $dataType); + } + return $this->dumpString($dataType); + } + + + // public function dumpCompound($compound, int $indent, bool $compact=false): string + // { + // if ($compact) { + // return $this->dumpCompact($compound, $indent); + // } else { + // if (is_array($compound)) { + // if (isset($compound[0]) && $compound[0] instanceof YamlObject) { + // return $this->dumper->dumpMultiDoc($compound); + // } + // $keyMask = '-'; + // $refKeys = range(0, count($compound) - 1); + // if (array_keys($compound) !== $refKeys) { + // $keyMask = '%s:'; + // } + // return $this->dumper->iteratorToString($compound, $keyMask, "\n", $indent); + // } elseif (is_object($compound) && !is_callable($compound)) { + // return $this->dumpObject($compound, $indent); + // } + // } + // throw new \Exception("Dumping Callable|Resource is not currently supported", 1); + // } + + public function dumpObject(object $object, int $indent, bool $isCompact = false, bool $isRoot = false): string + { + return match ($object::class) { + Compact::class => $this->dumpCompact($object, $indent), + Tagged::class => $this->dumpTagged($object, $indent), + \DateTime::class => $this->dumpDateTime($object), + default => $this->_object($object, $indent, $isCompact, $isRoot), + }; + } + + + public function dumpCompact(Compact $compact, int $indent, bool $isRoot = false) + { + $arr = $compact->getArrayCopy(); + if (count(get_object_vars($compact)) === 0) { + return $this->dumpArray($arr, $indent, true); + } + return $this->_objectCompact($compact, $indent, $isRoot); + } + + + public function _object(object $o, int $indent, bool $isCompact = false, $isRoot = false): string + { + return $isCompact ? $this->_objectCompact($o, $indent, $isRoot) + : $this->_objectStd($o, $indent, false, $isRoot); + } + + + public function _objectStd(object $o, int $indent, bool $isCompact = false, bool $isRoot = false) + { + $pairs = ['']; + $realIndent = $indent + Dumper::INDENT; + if($isRoot) { + $pairs = []; + $realIndent = 0; + } + foreach (get_object_vars($o) as $key => $value) { + $dumpedValue = $this->dumper->dump($value, $realIndent, $value instanceof Compact, false); + $pairs[] = sprintf("%s%s: %s", str_repeat(' ', $realIndent), $key, $dumpedValue); + } + return implode(PHP_EOL, $pairs); + } + + + public function _objectCompact(object $o, int $indent, bool $isRoot = false) + { + $pairs = []; + foreach ($o as $key => $value) { + $pairs[] = "$key: " . $this->dumper->dump($value, 0, true, false); + } + return '{'. implode(', ', $pairs) . '}'; + } + + + public function dumpArray(array $a, int $indent, bool $isCompact = false, $isRoot = false): string + { + if(isset($a[0]) && $a[0] instanceof YamlObject) { + return $this->dumper->dumpMultiDoc($a); + } + if (array_keys($a) !== range(0, count($a) - 1)) { + return $this->_object((object) $a, $indent, $isCompact, $isRoot); + } + return $isCompact ? $this->_dumpCompactArray($a, $indent) + : $this->_dumpNativeArray($a, $indent, $isRoot); + } + + + public function _dumpNativeArray(array $a, int $indent, $isRoot = false): string + { + $pairs = ['']; + $realIndent = $indent + Dumper::INDENT; + if($isRoot) { + $pairs = []; + $realIndent = 0; + } + foreach ($a as $value) { + $dumpedValue = $this->dumper->dump($value, 0, $value instanceof Compact, false); + $pairs[] = sprintf("%s- %s", str_repeat(' ', $realIndent), $dumpedValue); + } + return implode(PHP_EOL, $pairs); + } + + + public function _dumpCompactArray(array $a, int $indent): string + { + $pairs = []; + foreach ($a as $value) { + $pairs[] = $this->dumper->dump($value, $indent, true); + } + return '[' . implode(', ', $pairs) . ']'; + } + + + public function dumpDateTime(\DateTime $datetime): string + { + return $datetime->format($this->dumper::DATE_FORMAT); + } + + + /** + * Dumps a string. Protects it if needed + * + * @param string $str The string + * + * @return string ( description_of_the_return_value ) + * @todo implements checking and protection function + */ + public function dumpString(string $str): string + { + //those characters must be escaped : - : ? { } [ ] # , & * ! > | ' " % + // The “@” (#x40, at) and “`” (#x60, grave accent) are reserved for future use. + // 5.4. Line Break Characters + // Example 5.13. Escaped Characters + + $str = json_encode(ltrim($str)); + return strspn(substr($str, 1, -1), "-:?{}[]#,&*!>|'\"%") > 0 ? $str : trim($str, '"'); + } + + //TODO : handle 'php/object' + public function dumpTagged(Tagged $obj, int $indent): string + { + $separator = "\n"; + $isCompact = $obj->value instanceof Compact; + if (is_scalar($obj->value) || $isCompact) { + $separator = ' '; + } + return ($obj->tagName) . $separator . $this->dumper->dump($obj->value, $indent, $isCompact); + } + + +} diff --git a/classes/vendor/dallgoot/yaml/sources/Loader.php b/classes/vendor/dallgoot/yaml/src/Loader.php similarity index 53% rename from classes/vendor/dallgoot/yaml/sources/Loader.php rename to classes/vendor/dallgoot/yaml/src/Loader.php index 8193da4..920c4ef 100644 --- a/classes/vendor/dallgoot/yaml/sources/Loader.php +++ b/classes/vendor/dallgoot/yaml/src/Loader.php @@ -1,9 +1,14 @@ dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Builder.php'); + use Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; +use Dallgoot\Yaml\Types\YamlObject; /** * Process reading a Yaml Content (loading file if required) @@ -18,39 +23,29 @@ final class Loader { //public - /* @var null|string */ - public static $error; - public const IGNORE_DIRECTIVES = 0b0001;//DONT include_directive - public const IGNORE_COMMENTS = 0b0010;//DONT include_comments - public const NO_PARSING_EXCEPTIONS = 0b0100;//DONT throw Exception on parsing errors - public const NO_OBJECT_FOR_DATE = 0b1000;//DONT import date strings as dateTime Object + public static ?string $error; + public const IGNORE_DIRECTIVES = 0b0001; //DONT include_directive + public const IGNORE_COMMENTS = 0b0010; //DONT include_comments + public const NO_PARSING_EXCEPTIONS = 0b0100; //DONT throw Exception on parsing errors + public const NO_OBJECT_FOR_DATE = 0b1000; //DONT import date strings as dateTime Object //private - /* @var null|array */ - private $content; - /* @var null|string */ - private $filePath; - /* @var integer */ - private $_debug = 0; - /* @var integer */ - private $_options = 0; - /* @var array */ - private $_blankBuffer = []; + private ?\SplFixedArray $content = null; + private ?string $filePath = null; + private int $_debug = 0; + private int $_options = 0; + private array $_blankBuffer = []; //Exceptions messages - private const INVALID_VALUE = self::class.": at line %d"; - private const EXCEPTION_NO_FILE = self::class.": file '%s' does not exists (or path is incorrect?)"; - private const EXCEPTION_READ_ERROR = self::class.": file '%s' failed to be loaded (permission denied ?)"; - private const EXCEPTION_LINE_SPLIT = self::class.": content is not a string (maybe a file error?)"; + private const INVALID_VALUE = self::class . ": at line %d"; + private const EXCEPTION_NO_FILE = self::class . ": file '%s' does not exists (or path is incorrect?)"; + private const EXCEPTION_READ_ERROR = self::class . ": file '%s' failed to be loaded (permission denied ?)"; + private const EXCEPTION_LINE_SPLIT = self::class . ": content is not a string (maybe a file error?)"; /** * Loader constructor - * - * @param string|null $absolutePath The file absolute path - * @param int|null $options The options (bitmask as int value) - * @param integer|bool|null $debug The debug level as either boolean (true=1) or any integer */ - public function __construct($absolutePath = null, $options = null, $debug = 0) + public function __construct(?string $absolutePath = null, ?int $options = null, ?int $debug = 0) { $this->_debug = is_null($debug) ? 0 : min($debug, 3); $this->_options = is_int($options) ? $options : $this->_options; @@ -68,31 +63,19 @@ public function __construct($absolutePath = null, $options = null, $debug = 0) * * @return self ( returns the same Loader ) */ - public function load(string $absolutePath):Loader + public function load(string $absolutePath): Loader { if (!file_exists($absolutePath)) { throw new \Exception(sprintf(self::EXCEPTION_NO_FILE, $absolutePath)); } $this->filePath = $absolutePath; - $is_php81 = (version_compare(PHP_VERSION, '8.1.0') >= 0); - - // auto_detect_line_endings - $adle_setting = "auto_detect_line_endings"; - if (!$is_php81) { - ini_set($adle_setting, "true"); - } - $content = @file($absolutePath, FILE_IGNORE_NEW_LINES); - if (!$is_php81) { - ini_restore($adle_setting); - } - if (is_bool($content)) { throw new \Exception(sprintf(self::EXCEPTION_READ_ERROR, $absolutePath)); } - $this->content = $content; + $this->content = \SplFixedArray::fromArray($content, false); return $this; } @@ -104,19 +87,21 @@ public function load(string $absolutePath):Loader * @throws \Exception if self::content is empty or splitting on linefeed has failed * @return \Generator The source iterator. */ - private function getSourceGenerator($strContent = null):\Generator + private function getSourceGenerator(?string $strContent = null): \Generator { - if (is_null($strContent) && is_null($this->content)) { - throw new \Exception(self::EXCEPTION_LINE_SPLIT); - } - if (!is_null($this->content)) { - $source = $this->content; + if (is_null($strContent)) { + if(is_null($this->content)) { + throw new \Exception(self::EXCEPTION_LINE_SPLIT); + }else { + $source = $this->content; + } } else { $simplerLineFeeds = preg_replace('/(\r\n|\r)$/', "\n", (string) $strContent); $source = preg_split("/\n/m", $simplerLineFeeds, 0, \PREG_SPLIT_DELIM_CAPTURE); - } - if (!is_array($source) || !count($source)) { - throw new \Exception(self::EXCEPTION_LINE_SPLIT); + if (!is_array($source) || !count($source)) { + throw new \Exception(self::EXCEPTION_LINE_SPLIT); + } + $source = \SplFixedArray::fromArray($source, false); } foreach ($source as $key => $value) { yield ++$key => $value; @@ -126,36 +111,37 @@ private function getSourceGenerator($strContent = null):\Generator /** * Parse Yaml lines into a hierarchy of Node * - * @param string $strContent The Yaml string or null to parse loaded content + * @param ?string $strContent The Yaml string or null to parse loaded content * * @throws \Exception if content is not available as $strContent or as $this->content (from file) * @throws \ParseError if any error during parsing or building * * @return array|YamlObject|null null on errors if NO_PARSING_EXCEPTIONS is set, otherwise an array of YamlObject or just YamlObject */ - public function parse($strContent = null) + public function parse(?string $strContent = null) { + if(!is_null($strContent)) { + $this->content = null; + } $generator = $this->getSourceGenerator($strContent); $previous = $root = new Nodes\Root(); + $debugNodeFactory = $this->_debug === 1; try { foreach ($generator as $lineNB => $lineString) { - $node = NodeFactory::get($lineString, $lineNB); - if ($this->_debug === 1) echo $lineNB.":".get_class($node)."\n"; + $node = NodeFactory::get($lineString, $lineNB, $debugNodeFactory); if ($this->needsSpecialProcess($node, $previous)) continue; $this->_attachBlankLines($previous); - switch ($node->indent <=> $previous->indent) { - case -1: $target = $previous->getTargetOnLessIndent($node); - break; - case 0: $target = $previous->getTargetOnEqualIndent($node); - break; - default: $target = $previous->getTargetOnMoreIndent($node); - } + $target = match ($node->indent <=> $previous->indent) { + -1 => $previous->getTargetOnLessIndent($node), + 0 => $previous->getTargetOnEqualIndent($node), + 1 => $previous->getTargetOnMoreIndent($node) + }; $previous = $target->add($node); } $this->_attachBlankLines($previous); - return $this->_debug === 1 ? null : (new Builder($this->_options, $this->_debug))->buildContent($root); + return (new Builder($this->_options, $this->_debug))->buildContent($root); } catch (\Throwable $e) { - $this->onError($e, $lineNB); + $this->onError($e); } } @@ -163,11 +149,11 @@ public function parse($strContent = null) /** * Attach blank (empty) Nodes saved in $_blankBuffer to their parent (it means they are meaningful content) * - * @param nodes\NodeGeneric $previous The previous Node + * @param NodeGeneric $previous The previous Node * * @return null */ - private function _attachBlankLines(Nodes\NodeGeneric $previous) + private function _attachBlankLines(NodeGeneric $previous) { foreach ($this->_blankBuffer as $blankNode) { if ($blankNode !== $previous) { @@ -180,31 +166,30 @@ private function _attachBlankLines(Nodes\NodeGeneric $previous) /** * For certain (special) Nodes types some actions are required BEFORE parent assignment * - * @param Nodes\NodeGeneric $previous The previous Node + * @param NodeGeneric $previous The previous Node * * @return boolean if True self::parse skips changing previous and adding to parent * @see self::parse */ - private function needsSpecialProcess(Nodes\NodeGeneric $current, Nodes\NodeGeneric $previous):bool + private function needsSpecialProcess(NodeGeneric $current, NodeGeneric $previous): bool { $deepest = $previous->getDeepestNode(); if ($deepest instanceof Nodes\Partial) { return $deepest->specialProcess($current, $this->_blankBuffer); - } elseif(!($current instanceof Nodes\Partial)) { + } elseif (!($current instanceof Nodes\Partial)) { return $current->specialProcess($previous, $this->_blankBuffer); } return false; } - // private function onError(\Throwable $e, \Generator $generator) - private function onError(\Throwable $e, int $lineNB) + private function onError(\Throwable $e) { $file = $this->filePath ? realpath($this->filePath) : '#YAML STRING#'; - $message = $e->getMessage()."\n ".$e->getFile().":".$e->getLine(); + $message = $e->getMessage() . "\n " . $e->getFile() . ":" . $e->getLine(); if ($this->_options & self::NO_PARSING_EXCEPTIONS) { self::$error = $message; return null; } - throw new \Exception($message." for $file:".$lineNB, 1, $e); + throw new \Exception($message . " for $file:" . $e->getLine(), 1, $e); } } diff --git a/classes/vendor/dallgoot/yaml/src/NodeFactory.php b/classes/vendor/dallgoot/yaml/src/NodeFactory.php new file mode 100644 index 0000000..61741c9 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/src/NodeFactory.php @@ -0,0 +1,161 @@ +dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Key.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Anchor.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Blank.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Scalar.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Item.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Quoted.php'); + +use Dallgoot\Yaml\Nodes as Nodes; +use Dallgoot\Yaml\Nodes\Blank; +use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + +/** + * Analyzes $nodeString + * determines the appropriate NodeType + * constructs it + * and returns it + * + * @author Stéphane Rebai + * @license Apache 2.0 + * @link https://github.com/dallgoot/yaml + */ +class NodeFactory +{ + private const JSON_OPTIONS = \JSON_PARTIAL_OUTPUT_ON_ERROR | \JSON_UNESCAPED_SLASHES; + + final public static function get(string $nodeString, int $line = 0, bool $debug = false): NodeGeneric + { + $node = null; + $trimmed = ltrim($nodeString); + $match = (bool) preg_match(Regex::KEY, $trimmed, $matches); + $node = match(true) { + $trimmed === '' => new Blank($nodeString, $line), + str_starts_with($trimmed, '...') => new Nodes\DocEnd($nodeString, $line), + $match => new Nodes\Key($nodeString, $line, $matches), + default => self::onCharacter($trimmed[0], $nodeString, $line) + }; + if ($debug) echo $line . ":" . get_class($node) . "\n"; + return $node; + } + + + private static function onCharacter(string $first, string $nodeString, int $line): NodeGeneric + { + return match ($first) { + '-' => self::onHyphen($nodeString, $line), + '>' => new Nodes\LiteralFolded($nodeString, $line), + '|' => new Nodes\Literal($nodeString, $line), + '"', "'" => self::onQuoted($first, $nodeString, $line), + '#' => new Nodes\Comment(ltrim($nodeString), $line), + '%' => self::onDirective($nodeString, $line), + '{', '[' => self::onCompact($nodeString, $line), + ':' => new Nodes\SetValue($nodeString, $line), + '?' => new Nodes\SetKey($nodeString, $line), + '*', '&' => self::onNodeAction($nodeString, $line), + '!' => new Nodes\Tag($nodeString, $line), + default => new Nodes\Scalar($nodeString, $line), + }; + } + + + /** + * Return the correct Node Object between NodeComment OR NodeDirective + * + * @param string $nodeString The node string + * @param integer $line The line + * + * @return NodeGeneric + */ + private static function onDirective(string $nodeString, int $line): NodeGeneric + { + if ( + (bool) preg_match(Regex::DIRECTIVE_TAG, $nodeString) + || (bool) preg_match(Regex::DIRECTIVE_VERSION, $nodeString) + ) { + return new Nodes\Directive(ltrim($nodeString), $line); + } else { + throw new \ParseError("Invalid/Unknown Directive", 1); + } + } + + /** + * Set $node type and value when $nodevalue starts with a quote (simple or double) + * + * @param string $nodeString The node value + * @param int $line The line + * + * @return NodeGeneric + */ + private static function onQuoted(string $first, string $nodeString, int $line): NodeGeneric + { + return Regex::isProperlyQuoted(trim($nodeString)) ? new Nodes\Quoted($nodeString, $line) + : new Nodes\Partial($nodeString, $line); + } + + /** + * Determines the Node type and value when a compact object/array syntax is found + * + * @param string $nodeString The value assumed to start with { or [ or characters + * @param int $line The line + * + * @return NodeGeneric + */ + private static function onCompact(string $nodeString, int $line): NodeGeneric + { + json_decode($nodeString, false, 512, self::JSON_OPTIONS); + if (json_last_error() === \JSON_ERROR_NONE) { + return new Nodes\JSON($nodeString, $line); + } else { + $backtrack_setting = "pcre.backtrack_limit"; + ini_set($backtrack_setting, "-1"); + $isMapping = (bool) preg_match(Regex::MAPPING, trim($nodeString)); + $isSequence = (bool) preg_match(Regex::SEQUENCE, trim($nodeString)); + ini_restore($backtrack_setting); + + return match(true) { + $isMapping => new Nodes\CompactMapping($nodeString, $line), + $isSequence => new Nodes\CompactSequence($nodeString, $line), + default => new Nodes\Partial($nodeString, $line), + }; + } + } + + /** + * Determines Node type and value when an hyphen "-" is found + * + * @param string $nodeString The node string value + * @param int $line The line + * + * @return NodeGeneric + */ + private static function onHyphen(string $nodeString, int $line): NodeGeneric + { + return match(true) { + str_starts_with($nodeString, '---') => new Nodes\DocStart($nodeString, $line), + (bool) preg_match(Regex::ITEM, ltrim($nodeString)) => new Nodes\Item($nodeString, $line), + default => new Nodes\Scalar($nodeString, $line), + }; + } + + /** + * Sets Node type and value according to $nodeString when one of these characters is found : !,&,* + * + * @param string $nodeString The node value + * @param int $line The line + * + *@todo replace $action[0] with $first if applicable + */ + private static function onNodeAction(string $nodeString, int $line): NodeGeneric + { + if (!((bool) preg_match(Regex::NODE_ACTIONS, trim($nodeString), $matches))) { + return new Nodes\Scalar($nodeString, $line); + } + return new Nodes\Anchor($nodeString, $line); + } + +} diff --git a/classes/vendor/dallgoot/yaml/sources/NodeList.php b/classes/vendor/dallgoot/yaml/src/NodeList.php similarity index 79% rename from classes/vendor/dallgoot/yaml/sources/NodeList.php rename to classes/vendor/dallgoot/yaml/src/NodeList.php index 6f02fff..64f14d1 100644 --- a/classes/vendor/dallgoot/yaml/sources/NodeList.php +++ b/classes/vendor/dallgoot/yaml/src/NodeList.php @@ -2,15 +2,13 @@ namespace Dallgoot\Yaml; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; use Dallgoot\Yaml\Nodes\Directive; use Dallgoot\Yaml\Nodes\Docstart; use Dallgoot\Yaml\Nodes\Item; use Dallgoot\Yaml\Nodes\Key; -use Dallgoot\Yaml\Nodes\SetKey; -use Dallgoot\Yaml\Nodes\SetValue; use Dallgoot\Yaml\Nodes\Scalar; @@ -44,27 +42,29 @@ public function __construct(NodeGeneric $node = null) } } - public function has(string $nodeType):bool + public function has(string $nodeType): bool { $tmp = clone $this; $tmp->rewind(); - $fqn = __NAMESPACE__."\\Nodes\\$nodeType"; + $fqn = __NAMESPACE__ . "\\Nodes\\$nodeType"; foreach ($tmp as $child) { if ($child instanceof $fqn) return true; } return false; } - public function hasContent():bool + public function hasContent(): bool { $tmp = clone $this; $tmp->rewind(); foreach ($tmp as $child) { - if (!($child instanceof Comment) + if ( + !($child instanceof Comment) && !($child instanceof Directive) && !($child instanceof Blank) && !($child instanceof Docstart - && is_null($child->value)) ) return true; + && is_null($child->value)) + ) return true; } return false; } @@ -72,13 +72,13 @@ public function hasContent():bool public function push($node): void { $type = null; - if ($node instanceof Item ) { + if ($node instanceof Item) { $type = self::SEQUENCE; } elseif ($node instanceof Key) { $type = self::MAPPING; - } elseif ($node->isOneOf('SetKey','SetValue')) { + } elseif ($node->isOneOf('SetKey', 'SetValue')) { $type = self::SET; - } elseif ($node instanceof Scalar){ + } elseif ($node instanceof Scalar) { $type = self::MULTILINE; } if (!is_null($type) && $this->checkTypeCoherence($type)) { @@ -95,14 +95,14 @@ public function push($node): void * @return boolean True if coherent, False otherwise * @todo implement invalid cases */ - public function checkTypeCoherence($estimatedType):bool + public function checkTypeCoherence($estimatedType): bool { - // if ($this->type === self::MAPPING) { - // if ($estimatedType === self::SEQUENCE) { - // throw new \ParseError("Error : no coherence in types", 1); - // } - // } - return (bool) $estimatedType; + // if ($this->type === self::MAPPING) { + // if ($estimatedType === self::SEQUENCE) { + // throw new \ParseError("Error : no coherence in types", 1); + // } + // } + return (bool) $estimatedType; } public function build(&$parent = null) @@ -110,7 +110,7 @@ public function build(&$parent = null) switch ($this->type) { case self::MAPPING: //fall through case self::SET: - $collect = $parent ?? new \StdClass; + $collect = $parent ?? new \stdClass; return $this->buildList($collect); case self::SEQUENCE: $collect = $parent ?? []; @@ -131,7 +131,7 @@ public function buildList(&$collector) return $collector; } - public function buildMultiline():string + public function buildMultiline(): string { $output = ''; $list = clone $this; @@ -142,7 +142,7 @@ public function buildMultiline():string foreach ($list as $child) { if ($child instanceof Scalar) { $separator = isset($output[-1]) && $output[-1] === "\n" ? '' : ' '; - $output .= $separator.trim($child->raw); + $output .= $separator . trim($child->raw); } elseif ($child instanceof Blank) { $output .= "\n"; } else { @@ -159,7 +159,7 @@ public function buildMultiline():string * @return NodeList a new NodeList without NodeComment in it * @todo double check that NodeComment are built */ - public function filterComment():NodeList + public function filterComment(): NodeList { $this->rewind(); $out = new NodeList; @@ -167,16 +167,15 @@ public function filterComment():NodeList if ($child instanceof Comment) { // $child->build(); } else { - if($child->value instanceof Comment) { + if ($child->value instanceof Comment) { // $child->value->build(); // $child->value = null; - } elseif($child->value instanceof NodeList) { + } elseif ($child->value instanceof NodeList) { $child->value = $child->value->filterComment(); } $out->push($child); } } - // $this->rewind(); $out->rewind(); return $out; } diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Anchor.php b/classes/vendor/dallgoot/yaml/src/Nodes/Anchor.php similarity index 64% rename from classes/vendor/dallgoot/yaml/sources/nodes/Anchor.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Anchor.php index 7f0a302..df44f7b 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Anchor.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Anchor.php @@ -2,6 +2,11 @@ namespace Dallgoot\Yaml\Nodes; +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Actions.php'); + +use Dallgoot\Yaml\Nodes\Generic\Actions; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + /** * * @author Stéphane Rebai @@ -12,13 +17,13 @@ class Anchor extends Actions { public function &build(&$parent = null) { - $name = substr($this->anchor, 1); + $name = substr((string) $this->anchor, 1); $yamlObject = $this->getRoot()->getYamlObject(); - if ($this->anchor[0] === "*") { + if (str_starts_with((string) $this->anchor, "*")) { try { return $yamlObject->getReference($name); } catch (\Throwable $e) { - throw new \ParseError("Unknown anchor : '$name' this:".$this->anchor,1,$e); + throw new \ParseError("Unknown anchor : '$name' this:" . $this->anchor, 1, $e); } } else { $built = is_null($this->value) ? null : $this->value->build($parent); @@ -26,8 +31,8 @@ public function &build(&$parent = null) } } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { return is_null($this->value); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Blank.php b/classes/vendor/dallgoot/yaml/src/Nodes/Blank.php similarity index 65% rename from classes/vendor/dallgoot/yaml/sources/nodes/Blank.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Blank.php index 08ffb7d..941751a 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Blank.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Blank.php @@ -2,6 +2,9 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\Literals; + /** * * @author Stéphane Rebai @@ -10,16 +13,16 @@ */ class Blank extends NodeGeneric { - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { - if($this->_parent instanceof NodeGeneric) { + if ($this->_parent instanceof NodeGeneric) { return $this->_parent->add($child); } else { - throw new \ParseError(__METHOD__." no parent to add to", 1); + throw new \ParseError(__METHOD__ . " no parent to add to", 1); } } - public function specialProcess(NodeGeneric &$previous, array &$emptyLines):bool + public function specialProcess(NodeGeneric &$previous, array &$emptyLines): bool { $deepest = $previous->getDeepestNode(); if ($previous instanceof Scalar) { @@ -35,13 +38,13 @@ public function build(&$parent = null) return "\n"; } - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): ?NodeGeneric { return $this->getParent($node->indent); } - public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnMoreIndent(NodeGeneric &$node): ?NodeGeneric { return $this->getParent($node->indent); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/src/Nodes/Comment.php b/classes/vendor/dallgoot/yaml/src/Nodes/Comment.php new file mode 100644 index 0000000..c21c303 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Comment.php @@ -0,0 +1,28 @@ + + * @license Apache 2.0 + * @link https://github.com/dallgoot/yaml + */ +class Comment extends NodeGeneric +{ + public function specialProcess(NodeGeneric &$previous, array &$emptyLines): bool + { + $previous->getRoot()->add($this); + return true; + } + + public function build(&$parent = null) + { + $root = $this->getRoot(); + $yamlObject = $root->getYamlObject(); + $yamlObject->addComment($this->line, $this->raw); + return null; + } +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/CompactMapping.php b/classes/vendor/dallgoot/yaml/src/Nodes/CompactMapping.php similarity index 71% rename from classes/vendor/dallgoot/yaml/sources/nodes/CompactMapping.php rename to classes/vendor/dallgoot/yaml/src/Nodes/CompactMapping.php index 8036323..8c74e1f 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/CompactMapping.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/CompactMapping.php @@ -4,8 +4,9 @@ use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Compact; +use Dallgoot\Yaml\Types\Compact; use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -15,19 +16,19 @@ */ class CompactMapping extends NodeGeneric { - public function __construct(string $nodeString, int $line) + public function __construct(string $nodeString, ?int $line) { parent::__construct($nodeString, $line); - preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches); + preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1, -1)), $matches); foreach ($matches['k'] as $index => $property) { - $pair = $property.': '.trim($matches['v'][$index]); - $child = NodeFactory::get($pair, $line); + $pair = $property . ': ' . trim($matches['v'][$index]); + $child = NodeFactory::get($pair, (int) $line); $child->indent = null; $this->add($child); } } - public function build(&$parent = null) + public function build(&$parent = null): ?Compact { if (is_null($this->value)) { return null; @@ -39,4 +40,4 @@ public function build(&$parent = null) $obj = (object) $this->value->build(); return new Compact($obj); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/CompactSequence.php b/classes/vendor/dallgoot/yaml/src/Nodes/CompactSequence.php similarity index 78% rename from classes/vendor/dallgoot/yaml/sources/nodes/CompactSequence.php rename to classes/vendor/dallgoot/yaml/src/Nodes/CompactSequence.php index c55e506..76b127e 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/CompactSequence.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/CompactSequence.php @@ -4,8 +4,9 @@ use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Compact; +use Dallgoot\Yaml\Types\Compact; use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -15,12 +16,12 @@ */ class CompactSequence extends NodeGeneric { - public function __construct(string $nodeString, int $line) + public function __construct(string $nodeString, ?int $line) { parent::__construct($nodeString, $line); - preg_match_all(Regex::SEQUENCE_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches); + preg_match_all(Regex::SEQUENCE_VALUES, trim(substr(trim($nodeString), 1, -1)), $matches); foreach ($matches['item'] as $key => $item) { - $i = new Item('', $line); + $i = new Item('', (int) $line); $i->indent = null; $itemValue = NodeFactory::get(trim($item)); $itemValue->indent = null; @@ -29,7 +30,7 @@ public function __construct(string $nodeString, int $line) } } - public function build(&$parent = null) + public function build(&$parent = null): ?Compact { if (is_null($this->value)) { return null; @@ -41,4 +42,4 @@ public function build(&$parent = null) $arr = (array) $this->value->build(); return new Compact($arr); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Directive.php b/classes/vendor/dallgoot/yaml/src/Nodes/Directive.php similarity index 83% rename from classes/vendor/dallgoot/yaml/sources/nodes/Directive.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Directive.php index 53e61ca..01915cb 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Directive.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Directive.php @@ -2,9 +2,10 @@ namespace Dallgoot\Yaml\Nodes; -use Dallgoot\Yaml; +use Dallgoot\Yaml\Yaml; use Dallgoot\Yaml\Regex; -use Dallgoot\Yaml\TagFactory; +use Dallgoot\Yaml\Tag\TagFactory; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -15,8 +16,8 @@ class Directive extends NodeGeneric { private const ERROR_BUILDING = "Error : can not build Directive"; - private const WARNING_LOWER_VERSION = "The declared version '%s' is obsolete, there may be features that are deprecated and therefore not handled, minimum supported is: ".Yaml::VERSION_SUPPORT; - private const WARNING_HIGHER_VERSION = "The declared version '%s' is not yet supported, minimum supported is: ".Yaml::VERSION_SUPPORT; + private const WARNING_LOWER_VERSION = "The declared version '%s' is obsolete, there may be features that are deprecated and therefore not handled, minimum supported is: " . Yaml::VERSION_SUPPORT; + private const WARNING_HIGHER_VERSION = "The declared version '%s' is not yet supported, minimum supported is: " . Yaml::VERSION_SUPPORT; /** * Builds a Directive : update YamlObject if applicable. @@ -24,10 +25,8 @@ class Directive extends NodeGeneric * @param object|array $parent The parent * * @throws \ParseError If Tag handle has been already set before. - * - * @return null */ - public function build(&$parent = null) + public function build(&$parent = null): void { if (preg_match(Regex::DIRECTIVE_TAG, $this->raw, $matches)) { try { @@ -49,11 +48,11 @@ public function build(&$parent = null) // trigger_error(sprintf(self::WARNING_LOWER_VERSION, $matches['version']), \E_USER_NOTICE ); // } // } - return null; + return; } - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { return $child; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/DocEnd.php b/classes/vendor/dallgoot/yaml/src/Nodes/DocEnd.php similarity index 86% rename from classes/vendor/dallgoot/yaml/sources/nodes/DocEnd.php rename to classes/vendor/dallgoot/yaml/src/Nodes/DocEnd.php index 965d029..2a28662 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/DocEnd.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/DocEnd.php @@ -2,6 +2,8 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + /** * * @author Stéphane Rebai @@ -15,4 +17,4 @@ public function build(&$parent = null) // Does nothing return null; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/DocStart.php b/classes/vendor/dallgoot/yaml/src/Nodes/DocStart.php similarity index 67% rename from classes/vendor/dallgoot/yaml/sources/nodes/DocStart.php rename to classes/vendor/dallgoot/yaml/src/Nodes/DocStart.php index 5552ff4..a2a2e42 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/DocStart.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/DocStart.php @@ -4,6 +4,7 @@ use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -13,18 +14,18 @@ */ class DocStart extends NodeGeneric { - public function __construct(string $nodeString, int $line) + public function __construct(string $nodeString, ?int $line) { parent::__construct($nodeString, $line); $rest = substr(ltrim($nodeString), 3); if (!empty($rest)) { - $n = NodeFactory::get($rest, $line); + $n = NodeFactory::get($rest, (int) $line); $n->indent = null; $this->add($n); } } - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { if ($this->value instanceof NodeGeneric) { return $this->value->add($child); @@ -36,17 +37,14 @@ public function add(NodeGeneric $child):NodeGeneric public function build(&$parent = null) { if (is_null($parent)) { - throw new \Exception(__METHOD__." expects a YamlObject as parent", 1); + throw new \Exception(__METHOD__ . " expects a YamlObject as parent", 1); } if (!is_null($this->value)) { - if ($this->value instanceof Tag){ + if ($this->value instanceof Tag) { preg_match(Regex::TAG_PARTS, $this->value->raw, $tagparts); - if (preg_match("/(?(DEFINE)".Regex::TAG_URI.')(?&url)/', $tagparts['tagname'], $matches)) { - // throw new \UnexpectedValueException("Tag '".$this->value->raw."' is invalid", 1); + if (preg_match("/(?(DEFINE)" . Regex::TAG_URI . ')(?&url)/', $tagparts['tagname'], $matches)) { $parent->addTag($tagparts['handle'], $tagparts['tagname']); - // var_dump('HERE'); } else { - // var_dump('THERE'); $this->value->build($parent); } } else { @@ -57,16 +55,16 @@ public function build(&$parent = null) return null; } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { return $this->value instanceof NodeGeneric && $this->value->isOneOf('Anchor', 'Literal', 'LiteralFolded'); } - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): NodeGeneric { if ($this->value instanceof NodeGeneric) { if ($this->value instanceof Tag) { - if (!preg_match("/".Regex::TAG_URI."/", $this->value->raw)) { + if (!preg_match("/" . Regex::TAG_URI . "/", $this->value->raw)) { return $this->value; } } elseif ($this->value->isAwaitingChild($node)) { @@ -75,4 +73,4 @@ public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric } return $this->getParent(); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/Actions.php b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Actions.php similarity index 83% rename from classes/vendor/dallgoot/yaml/sources/nodes/abstract/Actions.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Generic/Actions.php index 8060571..62a3322 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/Actions.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Actions.php @@ -1,8 +1,10 @@ anchor = $name; } } - - // public function build(&$parent = null) - // { - // // Nothing to do here : on purpose this method is overriden by children - // return null; - // } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/Literals.php b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Literals.php similarity index 80% rename from classes/vendor/dallgoot/yaml/sources/nodes/abstract/Literals.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Generic/Literals.php index f660602..2b9abcf 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/Literals.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Literals.php @@ -1,10 +1,15 @@ value)) $this->value = new NodeList(); $candidate = $child; @@ -41,19 +44,19 @@ public function add(NodeGeneric $child):NodeGeneric return parent::add($candidate); } - protected static function litteralStripLeading(NodeList &$list) + protected static function litteralStripLeading(NodeList &$list): void { $list->rewind(); - while (!$list->isEmpty() && $list->bottom() instanceof Blank) {//remove leading blank + while (!$list->isEmpty() && $list->bottom() instanceof Blank) { //remove leading blank $list->shift(); } $list->rewind(); } - protected static function litteralStripTrailing(NodeList &$list) + protected static function litteralStripTrailing(NodeList &$list): void { $list->rewind(); - while (!$list->isEmpty() && $list->top() instanceof Blank) {//remove trailing blank + while (!$list->isEmpty() && $list->top() instanceof Blank) { //remove trailing blank $list->pop(); } $list->rewind(); @@ -77,7 +80,7 @@ public function build(&$parent = null) } if (!is_null($this->value)) { $tmp = $this->getFinalString($this->value->filterComment()); - $result = $this->identifier === '-' ? $tmp : $tmp."\n"; + $result = $this->identifier === '-' ? $tmp : $tmp . "\n"; } if ($this->_parent instanceof Root) { $this->_parent->getYamlObject()->setText($result); @@ -90,13 +93,9 @@ public function build(&$parent = null) /** * Gets the correct string for child value. * - * @param object $child The child - * @param int|null $refIndent The reference indent - * - * @return string The child value. * @todo double check behaviour for KEY and ITEM */ - protected function getChildValue($child, $refIndent=0):string + protected function getChildValue(NodeGeneric $child, ?int $refIndent = 0): string { $value = $child->value; $start = ''; @@ -110,15 +109,14 @@ protected function getChildValue($child, $refIndent=0):string } } elseif ($value instanceof Scalar) { $value = new NodeList($value); - } elseif ($value instanceof NodeList && !($child instanceof Scalar)) { - $start = ltrim($child->raw)."\n"; + $start = ltrim($child->raw) . "\n"; } - return $start.$this->getFinalString($value, $refIndent); + return $start . $this->getFinalString($value, $refIndent); } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { return true; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/NodeGeneric.php b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php similarity index 68% rename from classes/vendor/dallgoot/yaml/sources/nodes/abstract/NodeGeneric.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php index 36b7d60..ed02334 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/abstract/NodeGeneric.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php @@ -1,8 +1,11 @@ raw = $nodeString; $this->line = (int) $line; @@ -52,11 +62,8 @@ public function __construct(string $nodeString, $line = 0) /** * Sets the parent of the current Node * - * @param NodeGeneric $node The node - * - * @return NodeGeneric The currentNode */ - protected function setParent($node):NodeGeneric + protected function setParent(NodeGeneric $node): NodeGeneric { $this->_parent = $node; return $this; @@ -65,23 +72,22 @@ protected function setParent($node):NodeGeneric /** * Gets the ancestor with specified $indent or the direct $_parent * - * @param int|null $indent The indent - * - * @return NodeGeneric The parent. */ - public function getParent(int $indent = null):NodeGeneric + public function getParent(?int $indent = null): ?NodeGeneric { - if (!is_int($indent)){ + if (!is_int($indent)) { if ($this->_parent instanceof NodeGeneric) { return $this->_parent; } else { - throw new \Exception("Cannnot find a parent for ".get_class($this), 1); + throw new \Exception("Cannnot find a parent for " . get_class($this), 1); } } $cursor = $this->getParent(); - while (!($cursor instanceof Root) - && (is_null($cursor->indent) - || $cursor->indent >= $indent)) { + while ( + !($cursor instanceof Root) + && (is_null($cursor->indent) + || $cursor->indent >= $indent) + ) { if ($cursor->_parent) { $cursor = $cursor->_parent; } else { @@ -95,20 +101,18 @@ public function getParent(int $indent = null):NodeGeneric * Gets the root of the structure map (or current Yaml document) * * @throws \Exception (description) - * - * @return Root The root node. */ - protected function getRoot():Root + protected function getRoot(): Root { if (is_null($this->_parent)) { - throw new \Exception(__METHOD__.": can only be used when Node has a parent set", 1); + throw new \Exception(__METHOD__ . ": can only be used when Node has a parent set", 1); } $pointer = $this; do { if ($pointer->_parent instanceof NodeGeneric) { $pointer = $pointer->_parent; } else { - throw new \Exception("Node has no _parent set : ".get_class($pointer), 1); + throw new \Exception("Node has no _parent set : " . get_class($pointer), 1); } } while (!($pointer instanceof Root)); return $pointer; @@ -120,11 +124,8 @@ protected function getRoot():Root * - if value is Node, then value is a NodeList with (previous value AND $child) * - if value is a NodeList, push $child into * - * @param NodeGeneric $child The child - * - * @return NodeGeneric */ - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { $child->setParent($this); if (is_null($this->value)) { @@ -140,10 +141,8 @@ public function add(NodeGeneric $child):NodeGeneric /** * Gets the deepest node. - * - * @return NodeGeneric The deepest node. */ - public function getDeepestNode():NodeGeneric + public function getDeepestNode(): NodeGeneric { $cursor = $this; while ($cursor->value instanceof NodeGeneric) { @@ -152,19 +151,20 @@ public function getDeepestNode():NodeGeneric return $cursor; } - public function specialProcess(/** @scrutinizer ignore-unused */ NodeGeneric &$previous, /** @scrutinizer ignore-unused */ array &$emptyLines):bool - { + public function specialProcess( + /** @scrutinizer ignore-unused */ + NodeGeneric &$previous, + /** @scrutinizer ignore-unused */ + array &$emptyLines + ): bool { return false; } - /** + /** * Find parent target when current Node indentation is lesser than previous node indentation * - * @param NodeGeneric $node - * - * @return NodeGeneric|Key */ - public function getTargetOnLessIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnLessIndent(NodeGeneric &$node): ?NodeGeneric { $supposedParent = $this->getParent($node->indent); if ($node instanceof Item && $supposedParent instanceof Root) { @@ -185,52 +185,38 @@ public function getTargetOnLessIndent(NodeGeneric &$node):NodeGeneric /** * Find parent target when current Node indentation is equal to previous node indentation * - * @param NodeGeneric $node - * - * @return NodeGeneric */ - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): ?NodeGeneric { return $this->getParent(); } - /** + /** * Find parent target when current Node indentation is superior than previous node indentation * - * @param NodeGeneric $node - * - * @return NodeGeneric */ - public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnMoreIndent(NodeGeneric &$node): ?NodeGeneric { return $this->isAwaitingChild($node) ? $this : $this->getParent(); } - protected function isAwaitingChild(NodeGeneric $node):bool + protected function isAwaitingChild(NodeGeneric $node): bool { return false; } - /** - * - * @param Array|Object|null $parent The parent collector or NULL otherwise - * - * @return mixed whatever the build process returns - */ - public abstract function build(&$parent = null); - /** * Determines if $subject is one of the Node types provided (as strings) in $comparison array * A node type is one of the class found in "nodes" folder. * - * @param string ...$classNameList A list of string whre each is a Node type e.g. 'Key', 'Blank', etc. + * @param string ...$classNameList A list of string where each is a Node type e.g. 'Key', 'Blank', etc. * * @return boolean True if $subject is one of $comparison, False otherwise. */ - public function isOneOf(...$classNameList):bool + public function isOneOf(...$classNameList): bool { foreach ($classNameList as $className) { - $fqn = __NAMESPACE__."\\$className"; + $fqn = "Dallgoot\\Yaml\\Nodes\\$className"; if ($this instanceof $fqn) return true; } return false; @@ -241,7 +227,7 @@ public function isOneOf(...$classNameList):bool * * @return array the Node properties and respective values displayed by 'var_dump' */ - public function __debugInfo():array + public function __debugInfo(): array { $props = []; $props['line->indent'] = "$this->line -> $this->indent"; diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Item.php b/classes/vendor/dallgoot/yaml/src/Nodes/Item.php similarity index 82% rename from classes/vendor/dallgoot/yaml/sources/nodes/Item.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Item.php index f0d2643..59c1384 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Item.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Item.php @@ -2,9 +2,10 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\Regex; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * @@ -26,23 +27,23 @@ public function __construct(string $nodeString, int $line) } } - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { $value = $this->value; if ($value instanceof Key && $child instanceof Key) { if ($value->indent === $child->indent) { return parent::add($child); - } elseif ($value->isAwaitingChild($child)){ + } elseif ($value->isAwaitingChild($child)) { return $value->add($child); } else { // throw new \ParseError('key ('.$value->identifier.')@'.$value->line.' has already a value', 1); - throw new \ParseError('key @'.$value->line.' has already a value', 1); + throw new \ParseError('key @' . $value->line . ' has already a value', 1); } } return parent::add($child); } - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): NodeGeneric { $supposedParent = $this->getParent(); if ($node->indent === $supposedParent->indent) { @@ -51,7 +52,7 @@ public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric return $supposedParent; } - public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnMoreIndent(NodeGeneric &$node): NodeGeneric { return $this->value instanceof NodeGeneric && $this->value->isAwaitingChild($node) ? $this->value : $this; } @@ -62,12 +63,11 @@ public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric * @param array|YamlObject|null $parent The parent * * @throws \Exception if parent is another type than array or object Iterator - * @return null|array */ - public function build(&$parent = null) + public function build(&$parent = null): ?array { if (!is_null($parent) && !is_array($parent) && !($parent instanceof YamlObject)) { - throw new \Exception("parent must be an array or YamlObject not ". + throw new \Exception("parent must be an array or YamlObject not " . (is_object($parent) ? get_class($parent) : gettype($parent))); } $value = $this->value ? $this->value->build() : null; @@ -79,10 +79,11 @@ public function build(&$parent = null) // $key = count($numKeys) > 0 ? max($numKeys) + 1 : 0; // $parent[$key] = $value; $parent[] = $value; + return null; } } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { if (is_null($this->value)) { return true; @@ -92,4 +93,4 @@ public function isAwaitingChild(NodeGeneric $node):bool return $this->getDeepestNode()->isAwaitingChild($node); } } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/JSON.php b/classes/vendor/dallgoot/yaml/src/Nodes/JSON.php similarity index 70% rename from classes/vendor/dallgoot/yaml/sources/nodes/JSON.php rename to classes/vendor/dallgoot/yaml/src/Nodes/JSON.php index 9b14d0e..dd94bd9 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/JSON.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/JSON.php @@ -2,6 +2,8 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + /** * * @author Stéphane Rebai @@ -10,10 +12,10 @@ */ class JSON extends NodeGeneric { - private const JSON_OPTIONS = \JSON_PARTIAL_OUTPUT_ON_ERROR|\JSON_UNESCAPED_SLASHES; + private const JSON_OPTIONS = \JSON_PARTIAL_OUTPUT_ON_ERROR | \JSON_UNESCAPED_SLASHES; public function build(&$parent = null) { return json_decode($this->raw, false, 512, self::JSON_OPTIONS); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Key.php b/classes/vendor/dallgoot/yaml/src/Nodes/Key.php similarity index 81% rename from classes/vendor/dallgoot/yaml/sources/nodes/Key.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Key.php index 4be08e8..c3706b5 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Key.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Key.php @@ -2,6 +2,8 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\Literals; use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\Regex; @@ -13,7 +15,7 @@ */ class Key extends NodeGeneric { - const ERROR_NO_KEYNAME = self::class.": key has NO IDENTIFIER on line %d"; + const ERROR_NO_KEYNAME = self::class . ": key has NO IDENTIFIER on line %d"; public function __construct(string $nodeString, int $line, array $matches = null) { @@ -33,10 +35,10 @@ public function __construct(string $nodeString, int $line, array $matches = null } } - public function setIdentifier(string $keyString) + public function setIdentifier(string $keyString): void { if ($keyString === '') { - throw new \ParseError(sprintf(self::ERROR_NO_KEYNAME, $this->line)); + throw new \ParseError(sprintf(self::ERROR_NO_KEYNAME, $this->line)); } else { $node = NodeFactory::get($keyString); if ($node->isOneOf('Tag', 'Quoted')) { @@ -52,16 +54,16 @@ public function setIdentifier(string $keyString) } } - public function add(NodeGeneric $child):NodeGeneric + public function add(NodeGeneric $child): NodeGeneric { - if ($this->value instanceof NodeGeneric && $this->value->isOneOf('Literal','LiteralFolded', 'Anchor')) { + if ($this->value instanceof NodeGeneric && $this->value->isOneOf('Literal', 'LiteralFolded', 'Anchor')) { return $this->value->add($child); } else { return parent::add($child); } } - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): NodeGeneric { if ($node instanceof Item) { return $this; @@ -69,7 +71,7 @@ public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric return $this->getParent(); } - public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnMoreIndent(NodeGeneric &$node): NodeGeneric { if (!is_null($this->value)) { if ($this->getDeepestNode()->isAwaitingChild($node)) { @@ -80,11 +82,11 @@ public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { if (is_null($this->value) || $node instanceof Comment) { return true; - } elseif($this->value instanceof NodeGeneric) { + } elseif ($this->value instanceof NodeGeneric) { $current = $this->value; } else { $current = $this->value->current(); @@ -114,22 +116,21 @@ public function isAwaitingChild(NodeGeneric $node):bool * @param object|array $parent The parent * * @throws \ParseError if Key has no name(identifier) Note: empty string is allowed - * @return null|\StdClass */ - public function build(&$parent = null) + public function build(&$parent = null): ?object { - // var_dump("DEBUG KEY:".$this->identifier); if ($this->value instanceof Anchor) { $result = &$this->value->build(); } else { $result = is_null($this->value) ? null : $this->value->build(); } if (is_null($parent)) { - $parent = new \StdClass; + $parent = new \stdClass; $parent->{$this->identifier} = &$result; return $parent; } else { $parent->{$this->identifier} = &$result; + return null; } } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Literal.php b/classes/vendor/dallgoot/yaml/src/Nodes/Literal.php similarity index 76% rename from classes/vendor/dallgoot/yaml/sources/nodes/Literal.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Literal.php index 15cb95e..1d625dd 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Literal.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Literal.php @@ -3,6 +3,7 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeList; +use Dallgoot\Yaml\Nodes\Generic\Literals; /** * @@ -12,12 +13,12 @@ */ class Literal extends Literals { - public function getFinalString(NodeList $list, int $refIndent = null):string + public function getFinalString(NodeList $list, ?int $refIndent = null): string { $result = ''; $list = $list->filterComment(); if ($this->identifier !== '+') { - self::litteralStripTrailing($list); + self::litteralStripTrailing($list); } if ($list->count()) { $list->setIteratorMode(NodeList::IT_MODE_DELETE); @@ -28,11 +29,11 @@ public function getFinalString(NodeList $list, int $refIndent = null):string $value = "\n"; if (!($child instanceof Blank)) { $newIndent = $indent > 0 ? $child->indent - $indent : 0; - $value .= str_repeat(' ', $newIndent).$this->getChildValue($child, $indent); + $value .= str_repeat(' ', $newIndent) . $this->getChildValue($child, $indent); } $result .= $value; } } return $result; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/LiteralFolded.php b/classes/vendor/dallgoot/yaml/src/Nodes/LiteralFolded.php similarity index 72% rename from classes/vendor/dallgoot/yaml/sources/nodes/LiteralFolded.php rename to classes/vendor/dallgoot/yaml/src/Nodes/LiteralFolded.php index e5a26e4..ee56860 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/LiteralFolded.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/LiteralFolded.php @@ -3,6 +3,7 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeList; +use Dallgoot\Yaml\Nodes\Generic\Literals; /** * @@ -16,13 +17,13 @@ class LiteralFolded extends Literals * @todo Example 6.1. Indentation Spaces spaces must be considered as content, * Whend indent is reduced : do we insert a line break too ? */ - public function getFinalString(NodeList $value, int $refIndent = null):string + public function getFinalString(NodeList $value, ?int $refIndent = null): string { $result = ''; $list = $value->filterComment(); if ($this->identifier !== '+') { - self::litteralStripLeading($list); - self::litteralStripTrailing($list); + self::litteralStripLeading($list); + self::litteralStripTrailing($list); } if ($list->count()) { $refSeparator = ' '; @@ -31,12 +32,12 @@ public function getFinalString(NodeList $value, int $refIndent = null):string $result = $this->getChildValue($first, $indent); foreach ($list as $child) { $separator = ($result && $result[-1] === "\n") ? '' : $refSeparator; - if($child->indent > $indent || $child instanceof Blank) { + if ($child->indent > $indent || $child instanceof Blank) { $separator = "\n"; } - $result .= $separator .$this->getChildValue($child, $indent); + $result .= $separator . $this->getChildValue($child, $indent); } } return $result; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Partial.php b/classes/vendor/dallgoot/yaml/src/Nodes/Partial.php similarity index 88% rename from classes/vendor/dallgoot/yaml/sources/nodes/Partial.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Partial.php index e425279..9342d10 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Partial.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Partial.php @@ -3,6 +3,7 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeFactory; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -20,7 +21,7 @@ class Partial extends NodeGeneric * * @return boolean true to skip normal Loader process, false to continue */ - public function specialProcess(NodeGeneric &$current, array &$emptyLines):bool + public function specialProcess(NodeGeneric &$current, array &$emptyLines): bool { $parent = $this->getParent(); $addValue = ltrim($current->raw); @@ -32,7 +33,7 @@ public function specialProcess(NodeGeneric &$current, array &$emptyLines):bool $addValue = "\n"; $separator = ''; } - $node = NodeFactory::get($this->raw.$separator.$addValue, $this->line); + $node = NodeFactory::get($this->raw . $separator . $addValue, $this->line); $node->indent = null; $parent->value = null; $parent->add($node); @@ -43,4 +44,4 @@ public function build(&$parent = null) { throw new \ParseError("Partial value found at line $this->line", 1); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Quoted.php b/classes/vendor/dallgoot/yaml/src/Nodes/Quoted.php similarity index 85% rename from classes/vendor/dallgoot/yaml/sources/nodes/Quoted.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Quoted.php index aa8874c..b6ecaa9 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Quoted.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Quoted.php @@ -2,6 +2,8 @@ namespace Dallgoot\Yaml\Nodes; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + /** * * @author Stéphane Rebai @@ -13,6 +15,6 @@ class Quoted extends NodeGeneric public function build(&$parent = null) { // return substr(Scalar::replaceSequences(trim($this->raw)), 1,-1); - return (new Scalar('', 0))->replaceSequences(substr(trim($this->raw), 1,-1)); + return (new Scalar('', 0))->replaceSequences(substr(trim($this->raw), 1, -1)); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Root.php b/classes/vendor/dallgoot/yaml/src/Nodes/Root.php similarity index 56% rename from classes/vendor/dallgoot/yaml/sources/nodes/Root.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Root.php index c54f263..7b78ae0 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Root.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Root.php @@ -3,7 +3,11 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; + +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/NodeList.php'); /** * @@ -13,9 +17,8 @@ */ class Root extends NodeGeneric { - /** @var null|YamlObject */ - private $_yamlObject; - /** @var NodeList */ + private ?YamlObject $_yamlObject = null; + public $value; public function __construct() @@ -23,20 +26,20 @@ public function __construct() $this->value = new NodeList(); } - public function getParent(int $indent = null, $type = 0):NodeGeneric + public function getParent(?int $indent = null, $type = 0): NodeGeneric { if ($this->_parent !== null) { - throw new \ParseError(__CLASS__." can NOT have a parent, something's wrong", 1); + throw new \ParseError(__CLASS__ . " can NOT have a parent, something's wrong", 1); } return $this; } - public function getRoot():Root + public function getRoot(): Root { return $this; } - public function getYamlObject():YamlObject + public function getYamlObject(): YamlObject { if ($this->_yamlObject) { return $this->_yamlObject; @@ -44,19 +47,18 @@ public function getYamlObject():YamlObject throw new \Exception("YamlObject has not been set yet", 1); } - public function build(&$parent = null) + public function build(&$parent = null): YamlObject { return $this->buildFinal($parent); } - private function buildFinal(YamlObject $yamlObject):YamlObject + private function buildFinal(YamlObject $yamlObject): YamlObject { $this->_yamlObject = $yamlObject; $this->value->setIteratorMode(NodeList::IT_MODE_DELETE); - // $this->value->rewind(); foreach ($this->value as $key => $child) { $child->build($yamlObject); } return $yamlObject; } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Scalar.php b/classes/vendor/dallgoot/yaml/src/Nodes/Scalar.php similarity index 70% rename from classes/vendor/dallgoot/yaml/sources/nodes/Scalar.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Scalar.php index 6aa1749..d405a3b 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Scalar.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Scalar.php @@ -3,10 +3,11 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeFactory; -use Dallgoot\Yaml\TagFactory; +use Dallgoot\Yaml\Tag\TagFactory; use Dallgoot\Yaml\NodeList; use Dallgoot\Yaml\Regex; use Dallgoot\Yaml\Loader; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -23,14 +24,14 @@ public function __construct(string $nodeString, int $line) if ($value !== '') { $hasComment = strpos($value, ' #'); if (!is_bool($hasComment)) { - $realValue = trim(substr($value, 0, $hasComment)); - $commentValue = trim(substr($value, $hasComment)); - $realNode = NodeFactory::get($realValue, $line); - $realNode->indent = null; - $commentNode = NodeFactory::get($commentValue, $line); - $commentNode->indent = null; - $this->add($realNode); - $this->add($commentNode); + $realValue = trim(substr($value, 0, $hasComment)); + $commentValue = trim(substr($value, $hasComment)); + $realNode = NodeFactory::get($realValue, $line); + $realNode->indent = null; + $commentNode = NodeFactory::get($commentValue, $line); + $commentNode->indent = null; + $this->add($realNode); + $this->add($commentNode); } } } @@ -47,16 +48,16 @@ public function build(&$parent = null) return is_null($this->value) ? $this->getScalar(trim($this->raw)) : $this->value->build(); } - public function getTargetOnLessIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnLessIndent(NodeGeneric &$node): NodeGeneric { - if ($node instanceof Scalar || $node instanceof Blank ) { + if ($node instanceof Scalar || $node instanceof Blank) { return $this->getParent(); } else { return $this->getParent($node->indent); } } - public function getTargetOnMoreIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnMoreIndent(NodeGeneric &$node): NodeGeneric { return $this->getParent(); } @@ -98,44 +99,41 @@ public function getScalar(string $v, bool $onlyScalar = false) */ if (Regex::isDate($v)) return ($this->getRoot()->getYamlObject()->getOptions() & Loader::NO_OBJECT_FOR_DATE) && !$onlyScalar ? date_create($v) : $v; if (Regex::isNumber($v)) return $this->getNumber($v); - $types = ['yes' => true, - 'no' => false, - 'true' => true, - 'false' => false, - 'null' => null, - '.inf' => \INF, - '-.inf' => -\INF, - '.nan' => \NAN + $types = [ + 'yes' => true, + 'no' => false, + 'true' => true, + 'false' => false, + 'null' => null, + '.inf' => \INF, + '-.inf' => -\INF, + '.nan' => \NAN ]; return array_key_exists(strtolower($v), $types) ? $types[strtolower($v)] : $this->replaceSequences($v); } - public function replaceSequences($value='') + public function replaceSequences(string $value = ''): string { - $replaceUnicodeSeq = function ($matches) { - return json_decode('"'.$matches[1].'"'); - }; - $replaceNonPrintable = function ($matches) { - // var_dump($matches[1]); - return $matches[1].""; - }; -// preg_match( "/[^\x{06F0}-\x{06F9}\x]+/u" , '۱۲۳۴۵۶۷۸۹۰' ); - return preg_replace_callback_array( - [ - '/((? $replaceUnicodeSeq, - '/((? $replaceUnicodeSeq, - '/(\\\\b|\\\\n|\\\\t|\\\\r)/' => $replaceNonPrintable - ], - $value - ); + $replaceUnicodeSeq = function ($matches) { + return json_decode('"' . $matches[1] . '"'); + }; + $replaceNonPrintable = function ($matches) { + return $matches[1] . ""; + }; + return preg_replace_callback_array( + [ + '/((? $replaceUnicodeSeq, + '/((? $replaceUnicodeSeq, + '/(\\\\b|\\\\n|\\\\t|\\\\r)/' => $replaceNonPrintable + ], + $value + ); } /** * Returns the correct PHP type according to the string value * - * @param string $v a string value - * * @return int|float The scalar value with appropriate PHP type * @todo or scientific notation matching the regular expression -? [1-9] ( \. [0-9]* [1-9] )? ( e [-+] [1-9] [0-9]* )? */ @@ -145,5 +143,4 @@ private function getNumber(string $v) if ((bool) preg_match(Regex::HEX_NUM, $v)) return intval(base_convert($v, 16, 10)); return is_bool(strpos($v, '.')) || substr_count($v, '.') > 1 ? intval($v) : floatval($v); } - -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/SetKey.php b/classes/vendor/dallgoot/yaml/src/Nodes/SetKey.php similarity index 83% rename from classes/vendor/dallgoot/yaml/sources/nodes/SetKey.php rename to classes/vendor/dallgoot/yaml/src/Nodes/SetKey.php index d206936..e689f4b 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/SetKey.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/SetKey.php @@ -4,6 +4,7 @@ use Dallgoot\Yaml\NodeFactory; use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -32,15 +33,15 @@ public function __construct(string $nodeString, int $line) public function build(&$parent = null) { $built = is_null($this->value) ? null : $this->value->build(); - $stringKey = is_string($built) && Regex::isProperlyQuoted($built) ? trim($built, '\'" '): $built; - $key = json_encode($stringKey, JSON_PARTIAL_OUTPUT_ON_ERROR|JSON_UNESCAPED_SLASHES); - if (empty($key)) throw new \Exception("Cant serialize complex key: ".var_export($this->value, true)); + $stringKey = is_string($built) && Regex::isProperlyQuoted($built) ? trim($built, '\'" ') : $built; + $key = json_encode($stringKey, JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_UNESCAPED_SLASHES); + if (empty($key)) throw new \Exception("Cant serialize complex key: " . var_export($this->value, true)); $parent->{trim($key, '\'" ')} = null; return null; } - public function isAwaitingChild(NodeGeneric $child):bool + public function isAwaitingChild(NodeGeneric $child): bool { return is_null($this->value); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/SetValue.php b/classes/vendor/dallgoot/yaml/src/Nodes/SetValue.php similarity index 84% rename from classes/vendor/dallgoot/yaml/sources/nodes/SetValue.php rename to classes/vendor/dallgoot/yaml/src/Nodes/SetValue.php index 0cc242e..7b8250a 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/SetValue.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/SetValue.php @@ -3,6 +3,7 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeFactory; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; /** * @@ -32,12 +33,12 @@ public function build(&$parent = null) { $prop = array_keys(get_object_vars($parent)); $key = end($prop); - $parent->{$key} = is_null($this->value) ? null: $this->value->build(); + $parent->{$key} = is_null($this->value) ? null : $this->value->build(); return null; } - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { return is_null($this->value) || $this->getDeepestNode()->isAwaitingChild($node); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/nodes/Tag.php b/classes/vendor/dallgoot/yaml/src/Nodes/Tag.php similarity index 72% rename from classes/vendor/dallgoot/yaml/sources/nodes/Tag.php rename to classes/vendor/dallgoot/yaml/src/Nodes/Tag.php index b60f2f1..eeeb8ae 100644 --- a/classes/vendor/dallgoot/yaml/sources/nodes/Tag.php +++ b/classes/vendor/dallgoot/yaml/src/Nodes/Tag.php @@ -3,9 +3,11 @@ namespace Dallgoot\Yaml\Nodes; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\TagFactory; -use Dallgoot\Yaml\Tagged; +use Dallgoot\Yaml\Tag\TagFactory; +use Dallgoot\Yaml\Types\Tagged; use Dallgoot\Yaml\Regex; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\Actions; /** * @@ -17,12 +19,12 @@ class Tag extends Actions { - public function isAwaitingChild(NodeGeneric $node):bool + public function isAwaitingChild(NodeGeneric $node): bool { return is_null($this->value); } - public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric + public function getTargetOnEqualIndent(NodeGeneric &$node): NodeGeneric { if (is_null($this->value) && $this->indent > 0) { return $this; @@ -36,12 +38,12 @@ public function getTargetOnEqualIndent(NodeGeneric &$node):NodeGeneric * * @param array|object|null $parent The parent * - * @return Tagged|mixed The tag object of class Dallgoot\Yaml\Tagged. + * @return Tagged|mixed The tag object of class Dallgoot\Yaml\Types\Tagged. */ public function build(&$parent = null) { if (is_null($this->value) && $this->getParent() instanceof Root) { - if (!preg_match(Regex::TAG_PARTS, $this->tag, $matches)) { + if (!preg_match(Regex::TAG_PARTS, (string) $this->tag, $matches)) { throw new \UnexpectedValueException("Tag '$this->tag' is invalid", 1); } $handle = $matches['handle']; @@ -51,15 +53,18 @@ public function build(&$parent = null) } $value = $this->value; if (is_null($parent) && $value instanceof NodeGeneric && $value->isOneOf('Item', 'Key')) { - $value = new NodeList(/** @scrutinizer ignore-type */ $value); + $value = new NodeList( + /** @scrutinizer ignore-type */ + $value + ); } try { $transformed = TagFactory::transform((string) $this->tag, $value, $parent); return $transformed; } catch (\UnexpectedValueException $e) { - return new Tagged($this->tag, is_null($value) ? null : $this->value->build($parent)); + return new Tagged((string) $this->tag, is_null($value) ? null : $this->value->build($parent)); } catch (\Throwable $e) { throw new \Exception("Tagged value could not be transformed for tag '$this->tag'", 1, $e);; } } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/sources/Regex.php b/classes/vendor/dallgoot/yaml/src/Regex.php similarity index 100% rename from classes/vendor/dallgoot/yaml/sources/Regex.php rename to classes/vendor/dallgoot/yaml/src/Regex.php diff --git a/classes/vendor/dallgoot/yaml/sources/tag/CoreSchema.php b/classes/vendor/dallgoot/yaml/src/Tag/CoreSchema.php similarity index 85% rename from classes/vendor/dallgoot/yaml/sources/tag/CoreSchema.php rename to classes/vendor/dallgoot/yaml/src/Tag/CoreSchema.php index fc9edc1..b0b8c05 100644 --- a/classes/vendor/dallgoot/yaml/sources/tag/CoreSchema.php +++ b/classes/vendor/dallgoot/yaml/src/Tag/CoreSchema.php @@ -1,9 +1,11 @@ value; } - if ($node instanceof Nodes\NodeGeneric) { + if ($node instanceof NodeGeneric) { $value = trim($node->raw); if ($node instanceof Nodes\Quoted) { $value = $node->build(); @@ -72,7 +74,7 @@ public function str($node, &$parent = null) $list[] = $this->str($child); } // return new Nodes\Scalar(implode('',$list), 0); - return implode('',$list); + return implode('', $list); } } @@ -80,11 +82,10 @@ public function str($node, &$parent = null) * Specific Handler for 'binary' tag * * @param object $node The node or NodeList - * @param object|array|null $parent The parent * * @return string The value considered as 'binary' Note: the difference with strHandler is that multiline have not separation */ - public function binary($node, Nodes\NodeGeneric &$parent = null) + public function binary($node, NodeGeneric &$parent = null) { return $this->str($node, $parent); } @@ -103,7 +104,7 @@ public function set($node, &$parent = null) if (!($node instanceof NodeList)) { throw new \LogicException(self::ERROR_SET); } else { - $list = $parent ?? new \StdClass; + $list = $parent ?? new \stdClass; $node->rewind(); foreach ($node as $key => $item) { $this->omap($item, $list); @@ -126,14 +127,14 @@ public function set($node, &$parent = null) */ public function omap($node, &$parent = null) { - if ($node instanceof Nodes\NodeGeneric) { + if ($node instanceof NodeGeneric) { if ($node instanceof Nodes\Item && $node->value instanceof Nodes\Key) { $key = $node->value; $keyName = $key->identifier; $keyValue = $key->value->build(); if (is_null($parent)) { return [$keyName => $keyValue]; - } else{ + } else { $parent[$keyName] = $keyValue; } } else { @@ -151,5 +152,4 @@ public function omap($node, &$parent = null) } } } - } diff --git a/classes/vendor/dallgoot/yaml/sources/tag/SchemaInterface.php b/classes/vendor/dallgoot/yaml/src/Tag/SchemaInterface.php similarity index 100% rename from classes/vendor/dallgoot/yaml/sources/tag/SchemaInterface.php rename to classes/vendor/dallgoot/yaml/src/Tag/SchemaInterface.php diff --git a/classes/vendor/dallgoot/yaml/sources/tag/SymfonySchema.php b/classes/vendor/dallgoot/yaml/src/Tag/SymfonySchema.php similarity index 62% rename from classes/vendor/dallgoot/yaml/sources/tag/SymfonySchema.php rename to classes/vendor/dallgoot/yaml/src/Tag/SymfonySchema.php index ac8cd9a..e701388 100644 --- a/classes/vendor/dallgoot/yaml/sources/tag/SymfonySchema.php +++ b/classes/vendor/dallgoot/yaml/src/Tag/SymfonySchema.php @@ -1,9 +1,9 @@ raw); // NOTE : we assume this is only used for Object types (if a boolean false is serialized this will FAIL) if (is_bool($phpObject)) { @@ -40,8 +37,15 @@ public final static function PHPobjectHandler(object $node) } } - public function __call($name, $arguments) { + public function __call($name, $arguments) + { //TODO : handle 'php/object' - throw new \Exception("no handler for tag '$name' in ".self::class, 1); + if(in_array($name, ['php/object'])) { + return match($name) { + 'php/object' => self::PHPobjectHandler($arguments), + default => null, + }; + } + throw new \Exception("no handler for tag '$name' in " . self::class, 1); } } diff --git a/classes/vendor/dallgoot/yaml/sources/tag/TagFactory.php b/classes/vendor/dallgoot/yaml/src/Tag/TagFactory.php similarity index 87% rename from classes/vendor/dallgoot/yaml/sources/tag/TagFactory.php rename to classes/vendor/dallgoot/yaml/src/Tag/TagFactory.php index 1e79af9..267d75b 100644 --- a/classes/vendor/dallgoot/yaml/sources/tag/TagFactory.php +++ b/classes/vendor/dallgoot/yaml/src/Tag/TagFactory.php @@ -1,7 +1,10 @@ build($parent)); // } catch (\Throwable $e) { @@ -138,5 +143,4 @@ public static function runHandler($handle, $tagname, $value, &$parent = null) } throw new \UnexpectedValueException("Error Processing tag '$tagname' : in $handle", 1); } - } diff --git a/classes/vendor/dallgoot/yaml/sources/tag/notes.yml b/classes/vendor/dallgoot/yaml/src/Tag/notes.yml similarity index 100% rename from classes/vendor/dallgoot/yaml/sources/tag/notes.yml rename to classes/vendor/dallgoot/yaml/src/Tag/notes.yml diff --git a/classes/vendor/dallgoot/yaml/sources/types/Compact.php b/classes/vendor/dallgoot/yaml/src/Types/Compact.php similarity index 77% rename from classes/vendor/dallgoot/yaml/sources/types/Compact.php rename to classes/vendor/dallgoot/yaml/src/Types/Compact.php index 7c506f6..901777b 100644 --- a/classes/vendor/dallgoot/yaml/sources/types/Compact.php +++ b/classes/vendor/dallgoot/yaml/src/Types/Compact.php @@ -1,6 +1,6 @@ Array indices can be accessed as properties in read/write. - parent::__construct(/** @scrutinizer ignore-type */ $candidate, \ArrayIterator::STD_PROP_LIST|\ArrayIterator::ARRAY_AS_PROPS); + parent::__construct( + /** @scrutinizer ignore-type */ + $candidate, \ArrayIterator::STD_PROP_LIST | \ArrayIterator::ARRAY_AS_PROPS); } /** @@ -28,7 +31,7 @@ public function __construct($candidate = null) * * @return array */ - public function jsonSerialize():array + public function jsonSerialize(): array { $prop = get_object_vars($this); return count($prop) > 0 ? $prop : iterator_to_array($this); diff --git a/classes/vendor/dallgoot/yaml/sources/types/Tagged.php b/classes/vendor/dallgoot/yaml/src/Types/Tagged.php similarity index 86% rename from classes/vendor/dallgoot/yaml/sources/types/Tagged.php rename to classes/vendor/dallgoot/yaml/src/Types/Tagged.php index 2a583d6..979dd15 100644 --- a/classes/vendor/dallgoot/yaml/sources/types/Tagged.php +++ b/classes/vendor/dallgoot/yaml/src/Types/Tagged.php @@ -1,5 +1,6 @@ __yaml__object__api->value ?? serialize($this); } @@ -47,7 +50,6 @@ public function getOptions() /** * Adds a reference. * - * @param string $name The reference name * @param mixed $value The reference value * * @throws \UnexpectedValueException (description) @@ -58,7 +60,6 @@ public function &addReference(string $name, $value) if (empty($name)) { throw new \UnexpectedValueException(self::UNAMED_REFERENCE); } - // var_dump("DEBUG: '$name' added as reference"); $this->__yaml__object__api->_anchors[$name] = $value; return $this->__yaml__object__api->_anchors[$name]; } @@ -66,19 +67,21 @@ public function &addReference(string $name, $value) /** * Return the reference saved by $name * - * @param string $name Name of the reference - * * @return mixed Value of the reference * @throws \UnexpectedValueException if there's no reference by that $name */ - public function &getReference($name) + public function &getReference(string $name) { if (array_key_exists($name, $this->__yaml__object__api->_anchors)) { return $this->__yaml__object__api->_anchors[$name]; } - throw new \UnexpectedValueException(sprintf(self::UNKNOWN_REFERENCE, - $name, implode(',',array_keys($this->__yaml__object__api->_anchors))) - ); + throw new \UnexpectedValueException( + sprintf( + self::UNKNOWN_REFERENCE, + $name, + implode(',', array_keys($this->__yaml__object__api->_anchors)) + ) + ); } /** @@ -86,7 +89,7 @@ public function &getReference($name) * * @return array */ - public function getAllReferences():array + public function getAllReferences(): array { return $this->__yaml__object__api->_anchors; } @@ -99,7 +102,7 @@ public function getAllReferences():array * * @return null */ - public function addComment(int $lineNumber, string $value) + public function addComment(int $lineNumber, string $value): void { $this->__yaml__object__api->_comments[$lineNumber] = $value; } @@ -107,13 +110,11 @@ public function addComment(int $lineNumber, string $value) /** * Gets the comment at $lineNumber * - * @param int|null $lineNumber The line number - * - * @return string|array The comment at $lineNumber OR all comments. + * @return string|array The comment at $lineNumber OR all comments. */ - public function getComment(int $lineNumber = null) + public function getComment(?int $lineNumber = 0) { - if (array_key_exists((int) $lineNumber, $this->__yaml__object__api->_comments)) { + if (array_key_exists((string) $lineNumber, $this->__yaml__object__api->_comments)) { return $this->__yaml__object__api->_comments[$lineNumber]; } return $this->__yaml__object__api->_comments; @@ -121,12 +122,8 @@ public function getComment(int $lineNumber = null) /** * Sets the text when the content is *only* a literal - * - * @param string $value The value - * - * @return YamlObject */ - public function setText(string $value):YamlObject + public function setText(string $value): YamlObject { $this->__yaml__object__api->value .= ltrim($value); return $this; @@ -155,7 +152,7 @@ public function addTag(string $handle, string $prefix) * * @return boolean True if document has start, False otherwise. */ - public function hasDocStart():bool + public function hasDocStart(): bool { return is_bool($this->__yaml__object__api->_hasDocStart); } @@ -187,7 +184,8 @@ public function isTagged() * * @return mixed Array (of object properties or keys) OR string if YAML object only contains LITTERAL (in self::value) */ - public function jsonSerialize(): mixed + #[\ReturnTypeWillChange] + public function jsonSerialize() { $prop = get_object_vars($this); unset($prop["__yaml__object__api"]); diff --git a/classes/vendor/dallgoot/yaml/sources/Yaml.php b/classes/vendor/dallgoot/yaml/src/Yaml.php similarity index 54% rename from classes/vendor/dallgoot/yaml/sources/Yaml.php rename to classes/vendor/dallgoot/yaml/src/Yaml.php index f569530..bcecced 100644 --- a/classes/vendor/dallgoot/yaml/sources/Yaml.php +++ b/classes/vendor/dallgoot/yaml/src/Yaml.php @@ -1,6 +1,18 @@ dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Loader.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Root.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Key.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Dumper.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/NodeFactory.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Regex.php'); + +use Dallgoot\Yaml\Types\YamlObject; +use Dallgoot\Yaml\Dumper; +use Dallgoot\Yaml\Loader; /** * Library that : @@ -24,26 +36,26 @@ final class Yaml * - an array of YamlObject * * @param string $someYaml Some yaml - * @param int|null $options from Loader class, bitwise combination of + * @param ?int $options from Loader class, bitwise combination of * Loader::IGNORE_DIRECTIVES * Loader::IGNORE_COMMENTS * Loader::NO_PARSING_EXCEPTIONS * Loader::NO_OBJECT_FOR_DATE - * @param int|null $debug define the level of debugging (true = default) + * @param ?int $debug define the level of debugging (true = default) * - * @return Yaml\YamlObject|array|null a Yaml document as YamlObject OR multiple documents as an array of YamlObject, + * @return YamlObject|array|null a Yaml document as YamlObject OR multiple documents as an array of YamlObject, * NULL if Error and option Loader::NO_PARSING_EXCEPTIONS is set. * @throws \Exception coming from Dallgoot\Yaml\Loader * @see Dallgoot\Yaml\Loader * * @todo transpose Loader::NO_PARSING_EXCEPTIONS in this class */ - public static function parse(string $someYaml, $options = null, $debug = null) + public static function parse(string $someYaml, ?int $options = null, ?int $debug = null) { try { - return (new Yaml\Loader(null, $options, $debug))->parse($someYaml); + return (new Loader(null, $options, $debug))->parse($someYaml); } catch (\Throwable $e) { - throw new \Exception(__CLASS__." Error while parsing YAML string", 1, $e); + throw new \Exception(__CLASS__ . " Error while parsing YAML string", 1, $e); } } @@ -53,44 +65,43 @@ public static function parse(string $someYaml, $options = null, $debug = null) * - an array of YamlObject * * @param string $fileName Some file path name - * @param int|null $options from Loader class, bitwise combination of + * @param ?int $options from Loader class, bitwise combination of * Loader::IGNORE_DIRECTIVES * Loader::IGNORE_COMMENTS * Loader::NO_PARSING_EXCEPTIONS * Loader::NO_OBJECT_FOR_DATE - * @param int|null $debug define the level of debugging (true = default) + * @param ?int $debug define the level of debugging (true = default) * - * @return Yaml\YamlObject|array|null a Yaml document as YamlObject OR multiple documents as an array of YamlObject, + * @return YamlObject|array|null a Yaml document as YamlObject OR multiple documents as an array of YamlObject, * NULL if Error * @throws \Exception coming from Dallgoot\Yaml\Loader * @see Dallgoot\Yaml\Loader */ - public static function parseFile(string $fileName, $options = null, $debug = null) + public static function parseFile(string $fileName, ?int $options = null, ?int $debug = null) { try { - return (new Yaml\Loader($fileName, $options, (int) $debug))->parse(); + return (new Loader($fileName, $options, (int) $debug))->parse(); } catch (\Throwable $e) { - throw new \Exception(__CLASS__." Error during parsing '$fileName'", 1, $e); + throw new \Exception(__CLASS__ . " Error during parsing '$fileName'", 1, $e); } - } /** * Returns the YAML representation corresponding to given PHP variable * * @param mixed $somePhpVar Some php variable - * @param int|null $options enable/disable some options see Dumper + * @param ?int $options enable/disable some options see Dumper * * @return string ( the representation of $somePhpVar as a YAML content (single or multiple document accordingly) ) * @throws \Exception on errors during building YAML string coming from Dumper class * @see Dumper */ - public static function dump($somePhpVar, $options = null):string + public static function dump($somePhpVar, ?int $options = null): string { try { - return (new Yaml\Dumper($options))->toString($somePhpVar); + return (new Dumper($options))->toString($somePhpVar); } catch (\Throwable $e) { - throw new \Exception(__CLASS__." Error dumping", 1, $e); + throw new \Exception(__CLASS__ . " Error dumping", 1, $e); } } @@ -101,18 +112,18 @@ public static function dump($somePhpVar, $options = null):string * * @param string $fileName The file name * @param mixed $somePhpVar Some php variable - * @param int|null $options Dumper::constants as options + * @param ?int $options Dumper::constants as options * * @return boolean true if YAML built and saved , false if error during writing file * @throws \Exception on errors (from Dumper::toString) during building YAML string * @see Dumper */ - public static function dumpFile(string $fileName, $somePhpVar, $options = null):bool + public static function dumpFile(string $fileName, $somePhpVar, ?int $options = null): bool { try { - return (new Yaml\Dumper($options))->toFile($fileName, $somePhpVar); + return (new Dumper($options))->toFile($fileName, $somePhpVar); } catch (\Throwable $e) { - throw new \Exception(__CLASS__." Error during dumping '$fileName'", 1, $e); + throw new \Exception(__CLASS__ . " Error during dumping '$fileName'", 1, $e); } } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/src/YamlProperties.php b/classes/vendor/dallgoot/yaml/src/YamlProperties.php new file mode 100644 index 0000000..32e2e0a --- /dev/null +++ b/classes/vendor/dallgoot/yaml/src/YamlProperties.php @@ -0,0 +1,35 @@ + + * @license Apache 2.0 + * @link https://github.com/dallgoot/yaml + */ +class YamlProperties +{ + public ?bool $_hasDocStart = null; // null = no docstart, true = docstart before document comments, false = docstart after document comments + + public array $_anchors = []; + + public array $_comments = []; + + public array $_tags = []; + + public int $_options; + + public ?string $value = null; + + /** + * Creates API object to be used for the document provided as argument + * + * @param int $buildingOptions the YamlObject as the target for all methods call that needs it + */ + public function __construct(int $buildingOptions) + { + $this->_options = $buildingOptions; + } +} diff --git a/classes/vendor/dallgoot/yaml/test_all_versions.sh b/classes/vendor/dallgoot/yaml/test_all_versions.sh index 109158b..9577057 100644 --- a/classes/vendor/dallgoot/yaml/test_all_versions.sh +++ b/classes/vendor/dallgoot/yaml/test_all_versions.sh @@ -32,22 +32,21 @@ COMPOSER_CURRENT=$(composer show 'phpunit/phpunit' | grep -Eow "[0-9\.]+" -m 1 ) # fi declare -A versions # 7.key.value -# versions[0]=33 -versions[1]=33 -versions[2]=25 -versions[3]=12 -versions[4]=0 +versions[0]=27 +versions[1]=14 +versions[2]=1 + onlyMinor=1 command="vendor/bin/phpunit \ - --configuration ./configuration/phpunit.xml \ + -c ./configuration/phpunit.xml \ --testsuite All --no-coverage --columns 160 --disallow-test-output" # --testsuite units --no-coverage --columns 160 --disallow-test-output --no-logging" for minor in "${!versions[@]}" do - echo "********************* testing PHP 7.$minor ***************************" + echo "********************* testing PHP 8.$minor ***************************" tag="cli-alpine" if test $minor -eq 0 then @@ -57,13 +56,13 @@ do then for patch in `seq 0 ${versions[$minor]}` do - displayTitle "7.$minor.$patch" - docker run --rm -v $(pwd):/app -w /app php:7.$minor.$patch-$tag $command + displayTitle "8.$minor.$patch" + docker run --rm -v $(pwd):/app -w /app php:8.$minor.$patch-$tag $command done else patch=${versions[$minor]} - displayTitle "7.$minor.$patch" - docker run --rm -v $(pwd):/app -w /app php:7.$minor.$patch-$tag $command + displayTitle "8.$minor.$patch" + docker run --rm -v $(pwd):/app -w /app php:8.$minor.$patch-$tag $command fi done diff --git a/classes/vendor/dallgoot/yaml/tests/CasesTest.php b/classes/vendor/dallgoot/yaml/tests/CasesTest.php index 96e9124..b2c6a92 100644 --- a/classes/vendor/dallgoot/yaml/tests/CasesTest.php +++ b/classes/vendor/dallgoot/yaml/tests/CasesTest.php @@ -1,22 +1,26 @@ $value) { yield [$key, $value]; } @@ -24,19 +28,19 @@ private function getGenerator($array) { return $generator(); } - public function examplesProvider() + public static function examplesProvider() { - $nameResultPair = get_object_vars(Yaml::parseFile(__DIR__.'/definitions/examples_tests.yml')); - $this->assertArrayHasKey('Example_2_01', $nameResultPair, 'ERROR during Yaml::parseFile for ../definitions/examples_tests.yml'); - $this->assertEquals(28, count($nameResultPair)); - return $this->getGenerator($nameResultPair); + $nameResultPair = get_object_vars(Yaml::parseFile(__DIR__ . '/definitions/examples_tests.yml')); + // $this->assertArrayHasKey('Example_2_01', $nameResultPair, 'ERROR during Yaml::parseFile for ../definitions/examples_tests.yml'); + // $this->assertEquals(28, count($nameResultPair)); + return self::getGenerator($nameResultPair); } - public function parsingProvider() + public static function parsingProvider() { - $nameResultPair = get_object_vars(Yaml::parseFile(__DIR__.'/definitions/parsing_tests.yml'));//var_dump($nameResultPair);die(); - $this->assertEquals(58, count($nameResultPair)); - return $this->getGenerator($nameResultPair); + $nameResultPair = get_object_vars(Yaml::parseFile(__DIR__ . '/definitions/parsing_tests.yml')); + // $this->assertEquals(58, count($nameResultPair)); + return self::getGenerator($nameResultPair); } // public function failingProvider() @@ -48,16 +52,17 @@ public function parsingProvider() /** * @dataProvider examplesProvider + * @coversNothing */ public function testBatchExamples($fileName, $expected) { - Yaml\TagFactory::$schemas = []; - Yaml\TagFactory::$schemaHandles = []; - $output = Yaml::parseFile(__DIR__."/cases/examples/$fileName.yml"); + TagFactory::$schemaHandles = []; + TagFactory::$schemas = []; + $output = Yaml::parseFile(__DIR__ . "/cases/examples/$fileName.yml"); $result = json_encode($output, self::JSON_OPTIONS); $this->assertContains(json_last_error(), [JSON_ERROR_NONE, JSON_ERROR_INF_OR_NAN], json_last_error_msg()); // $this->assertEquals($expected, $result, is_array($output) ? $output[0]->getComment(1) : $output->getComment(1)); - $this->assertEquals($expected, $result, $fileName.(is_null($output) ? "\t".Yaml\Loader::$error : '')); + $this->assertEquals($expected, $result, $fileName . (is_null($output) ? "\t" . Loader::$error : '')); } /** @@ -73,16 +78,17 @@ public function testBatchExamples($fileName, $expected) /** * @dataProvider parsingProvider + * @coversNothing * @todo verify that every test file has a result in tests/definitions/parsing.yml */ public function testBatchParsing($fileName, $expected) { - Yaml\TagFactory::$schemas = []; - Yaml\TagFactory::$schemaHandles = []; - $yaml = file_get_contents(__DIR__."/cases/parsing/$fileName.yml"); - $output = Yaml::parse($yaml, Yaml\Loader::NO_PARSING_EXCEPTIONS); + TagFactory::$schemas = []; + TagFactory::$schemaHandles = []; + $yaml = file_get_contents(__DIR__ . "/cases/parsing/$fileName.yml"); + $output = Yaml::parse($yaml, Loader::NO_PARSING_EXCEPTIONS); $result = json_encode($output, self::JSON_OPTIONS); $this->assertContains(json_last_error(), [JSON_ERROR_NONE, JSON_ERROR_INF_OR_NAN], json_last_error_msg()); - $this->assertEquals($expected, $result, $fileName.(is_null($output) ? "\t".Yaml\Loader::$error : '')); + $this->assertEquals($expected, $result, $fileName . (is_null($output) ? "\t" . Loader::$error : '')); } -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/tests/DumpingTest.php b/classes/vendor/dallgoot/yaml/tests/DumpingTest.php index c718c4e..70b8a87 100644 --- a/classes/vendor/dallgoot/yaml/tests/DumpingTest.php +++ b/classes/vendor/dallgoot/yaml/tests/DumpingTest.php @@ -2,14 +2,13 @@ declare(strict_types=1); use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml; +use Dallgoot\Yaml\Yaml; final class DumpingTest extends TestCase { - public function dumpingCasesProvider() + public static function dumpingCasesProvider() { $nameResultPair = get_object_vars(Yaml::parseFile(__DIR__.'/definitions/dumping_tests.yml')); - // var_dump($nameResultPair);//exit(); $generator = function() use($nameResultPair) { foreach ($nameResultPair as $testName => $testResult) { yield [$testName, $testResult]; @@ -22,6 +21,7 @@ public function dumpingCasesProvider() * @dataProvider dumpingCasesProvider * @param string $fileName * @param string $expected + * @coversNothing */ public function test_DumpingCases(string $fileName, string $expected) { diff --git a/classes/vendor/dallgoot/yaml/tests/SymfonyYamlTest.php b/classes/vendor/dallgoot/yaml/tests/SymfonyYamlTest.php index 8d91baf..9de721f 100644 --- a/classes/vendor/dallgoot/yaml/tests/SymfonyYamlTest.php +++ b/classes/vendor/dallgoot/yaml/tests/SymfonyYamlTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Yaml\Yaml; -final class SymfonyYamlCases extends TestCase +final class SymfonyYamlTest extends TestCase { private $testFolder = __DIR__."/cases/"; private const JSON_OPTIONS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_LINE_TERMINATORS | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_PARTIAL_OUTPUT_ON_ERROR; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array.php index 81b2913..85d043a 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array.php @@ -1,9 +1,9 @@ key1 = new Compact([1,2,3]); diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array_in_object.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array_in_object.php index 3634139..fce3445 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array_in_object.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_array_in_object.php @@ -1,11 +1,12 @@ array = [1,2,3]; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object.php index 17eda33..f4c1717 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object.php @@ -1,11 +1,13 @@ key1 = 'a'; $o->key2 = 'b'; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object_in_array.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object_in_array.php index f3853a4..5fb2a43 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object_in_array.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/compact_object_in_array.php @@ -1,10 +1,11 @@ key = 'a'; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/dateTime.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/dateTime.php index 4beffd3..83c5f8b 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/dateTime.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/dateTime.php @@ -1,6 +1,6 @@ new \stdClass, 'version' => 2]; + + + +$enp0s3 = (object) [ + 'addresses' => new Compact(['192.168.1.84/24']), + 'gateway4' => '192.168.1.1', + 'nameservers' => new \stdClass +]; + + +$enp0s3->nameservers->addresses = new Compact(['192.168.1.1']); +$network->ethernets->enp0s3 = $enp0s3; + +$yaml->network = $network; + + +return $yaml; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/stdObject.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/stdObject.php index 2bb0f4d..93e39a1 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/stdObject.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/stdObject.php @@ -1,6 +1,6 @@ prop = "my property"; return $yaml; \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/symfony_custom_tag.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/symfony_custom_tag.php new file mode 100644 index 0000000..0c31499 --- /dev/null +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/symfony_custom_tag.php @@ -0,0 +1,10 @@ +foo = 'bar'; + + +return new Tagged('!php/object', $object); \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/unicodeString.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/unicodeString.php index 3fdba82..a769e1c 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/unicodeString.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/unicodeString.php @@ -1,6 +1,6 @@ str = "☺"; return $yaml; \ No newline at end of file diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_indices.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_indices.php index 0e7d4f6..bd39c94 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_indices.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_indices.php @@ -1,9 +1,9 @@ memberOfO = 'some really really really really really really really really really very long text as a simple string'; diff --git a/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_properties.php b/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_properties.php index 51a88ec..d75d44d 100644 --- a/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_properties.php +++ b/classes/vendor/dallgoot/yaml/tests/cases/dumping/yamlObject_properties.php @@ -1,11 +1,10 @@ memberOfO = 'some really really really really really really really really really very long text as a simple string'; diff --git a/classes/vendor/dallgoot/yaml/tests/definitions/dumping_tests.yml b/classes/vendor/dallgoot/yaml/tests/definitions/dumping_tests.yml index a60e4b6..20eb0fb 100644 --- a/classes/vendor/dallgoot/yaml/tests/definitions/dumping_tests.yml +++ b/classes/vendor/dallgoot/yaml/tests/definitions/dumping_tests.yml @@ -29,25 +29,27 @@ floats_double: |- notANumber: .nan stdObject: |- prop: my property +# symfony_custom_tag: |- +# !php/object 'O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}' yamlObject_indices: |- - - + - - 1 - 2 - 3 - - + - memberOfO: some really really really really really really really really really very long text as a simple string yamlObject_properties: |- - propA: + propA: - 1 - 2 - 3 - propB: + propB: memberOfO: some really really really really really really really really really very long text as a simple string unicodeString: |- str: \u263a -multidoc_yamlObject: | +multidoc_yamlObject: |- --- - - + - - 1 - 2 - 3 @@ -55,3 +57,12 @@ multidoc_yamlObject: | a: 1 --- b: 2 +netplan_example: |- + network: + ethernets: + enp0s3: + addresses: [192.168.1.84\/24] + gateway4: 192.168.1.1 + nameservers: + addresses: [192.168.1.1] + version: 2 diff --git a/classes/vendor/dallgoot/yaml/tests/units/BuilderTest.php b/classes/vendor/dallgoot/yaml/tests/units/BuilderTest.php index 489344d..5a0498c 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/BuilderTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/BuilderTest.php @@ -6,9 +6,9 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\Builder; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\DocStart; use Dallgoot\Yaml\Nodes\DocEnd; @@ -41,7 +41,7 @@ class BuilderTest extends TestCase protected function setUp(): void { /** @todo Maybe add some arguments to this constructor */ - $this->builder = new Builder(0,0); + $this->builder = new Builder(0, 0); } private function buildSimpleMapping() @@ -88,9 +88,9 @@ public function testBuildContent(): void $this->assertEquals($this->builder->buildContent(new Root), null); ob_end_clean(); } - /** + /** * @covers \Dallgoot\Yaml\Builder::buildContent - */ + */ public function testBuildContentMAPPING(): void { //test simple mapping @@ -98,11 +98,11 @@ public function testBuildContentMAPPING(): void $this->assertTrue($yamlMapping instanceof YamlObject); $this->assertTrue(property_exists($yamlMapping, 'key')); $this->assertEquals($yamlMapping->key, 'value'); - } + } /** * @covers \Dallgoot\Yaml\Builder::buildContent - */ + */ public function testBuildContentSEQUENCE(): void { //test simple sequence $yamlSequence = $this->buildSimpleSequence(); @@ -111,9 +111,9 @@ public function testBuildContentSEQUENCE(): void $this->assertEquals($yamlSequence[0], 'itemvalue'); } - /** + /** * @covers \Dallgoot\Yaml\Builder::buildContent - */ + */ public function testBuildContentMULTIDOC(): void { // test multi document @@ -135,13 +135,13 @@ public function testBuildContentMULTIDOC(): void * only JSON content * multidocument */ - public function testBuildContentException(): void - { - $this->expectException(\Exception::class); - $root = new Root; - $root->value = null; - $this->builder->buildContent($root); - } + // public function testBuildContentException(): void + // { + // $this->expectException(\Exception::class); + // $root = new Root; + // $root->value = null; + // $this->builder->buildContent($root); + // } /** * @covers \Dallgoot\Yaml\Builder::buildDocument @@ -160,30 +160,30 @@ public function testBuildDocument(): void public function testBuildDocumentDebug(): void { $output = - "Document #0\n". - "Dallgoot\Yaml\Nodes\Root Object\n". - "(\n". - " [line->indent] => -> -1\n". - " [value] => Dallgoot\Yaml\NodeList Object\n". - " (\n". - " [type] => \n". - " [flags:SplDoublyLinkedList:private] => 0\n". - " [dllist:SplDoublyLinkedList:private] => Array\n". - " (\n". - " )\n". - "\n". - " )\n". - "\n". - " [raw] => \n". - " [parent] => NO PARENT!!!\n". - ")\n"; + "Document #0\n" . + "Dallgoot\Yaml\Nodes\Root Object\n" . + "(\n" . + " [line->indent] => 0 -> -1\n" . + " [value] => Dallgoot\Yaml\NodeList Object\n" . + " (\n" . + " [type] => \n" . + " [flags:SplDoublyLinkedList:private] => 0\n" . + " [dllist:SplDoublyLinkedList:private] => Array\n" . + " (\n" . + " )\n" . + "\n" . + " )\n" . + "\n" . + " [raw] => \n" . + " [parent] => NO PARENT!!!\n" . + ")\n"; $debug = new \ReflectionProperty(Builder::class, '_debug'); $debug->setAccessible(true); - $debug->setValue($this->builder,3); + $debug->setValue($this->builder, 3); $list = new NodeList; $this->builder->buildDocument($list, 0); $this->expectOutputString($output); - $debug->setValue($this->builder,0); + $debug->setValue($this->builder, 0); } /** @@ -193,7 +193,7 @@ public function testBuildDocumentException(): void { $this->expectException(\Error::class); $list = new NodeList(); - $list->push(new \StdClass); + $list->push(new \stdClass); $yamlObject = $this->builder->buildDocument($list, 0); } diff --git a/classes/vendor/dallgoot/yaml/tests/units/DumperHandlersTest.php b/classes/vendor/dallgoot/yaml/tests/units/DumperHandlersTest.php index c981659..5ac7728 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/DumperHandlersTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/DumperHandlersTest.php @@ -7,9 +7,9 @@ use Dallgoot\Yaml\DumperHandlers; use Dallgoot\Yaml\Dumper; -use Dallgoot\Yaml\YamlObject; -use Dallgoot\Yaml\Compact; -use Dallgoot\Yaml\Tagged; +use Dallgoot\Yaml\Types\Compact; +use Dallgoot\Yaml\Types\Tagged; +use Dallgoot\Yaml\Types\YamlObject; /** * Class DumperHandlersTest. @@ -68,50 +68,53 @@ public function testDumpScalar() /** * @covers \Dallgoot\Yaml\DumperHandlers::dumpCompound */ - public function testDumpCompoundException() - { - $callable = function () {return false;}; - $this->expectException(\Exception::class); - $dumpCompound = new \ReflectionMethod($this->dumperHandler, 'dumpCompound'); - $dumpCompound->setAccessible(true); - $dumpCompound->invoke($this->dumperHandler, $callable, 0); - } + // public function testDumpCompoundException() + // { + // $callable = function () { + // return false; + // }; + // $this->expectException(\Exception::class); + // $dumpCompound = new \ReflectionMethod($this->dumperHandler, 'dumpCompound'); + // $dumpCompound->setAccessible(true); + // $dumpCompound->invoke($this->dumperHandler, $callable, 0); + // } /** * @covers \Dallgoot\Yaml\DumperHandlers::dumpCompound + * @todo implement these tests using new DumperHandlers methods */ - public function testDumpCompound() - { - $dumpCompound = new \ReflectionMethod($this->dumperHandler, 'dumpCompound'); - $dumpCompound->setAccessible(true); - $yamlObject = new YamlObject(0); - $yamlObject->a = 1; - $this->assertEquals('a: 1', $dumpCompound->invoke($this->dumperHandler, $yamlObject, 0)); - unset($yamlObject->a); - $yamlObject[0] = 'a'; - $this->assertEquals('- a', $dumpCompound->invoke($this->dumperHandler, $yamlObject, 0)); - $compact = new Compact([1,2,3]); - $this->assertEquals('[1, 2, 3]', $dumpCompound->invoke($this->dumperHandler, $compact, 0)); - $o = new \Stdclass; - $o->a = 1; - $compact = new Compact($o); - $this->assertEquals('{a: 1}', $dumpCompound->invoke($this->dumperHandler, $compact, 0)); - $this->assertEquals("- 1\n- 2\n- 3", $dumpCompound->invoke($this->dumperHandler, [1,2,3], 0)); - $tagged = new Tagged('!!str', 'somestring'); - $this->assertEquals("!!str somestring", $dumpCompound->invoke($this->dumperHandler, $tagged, 0)); - } + // public function testDumpCompound() + // { + // $dumpCompound = new \ReflectionMethod($this->dumperHandler, 'dumpCompound'); + // $dumpCompound->setAccessible(true); + // $yamlObject = new YamlObject(0); + // $yamlObject->a = 1; + // $this->assertEquals('a: 1', $dumpCompound->invoke($this->dumperHandler, $yamlObject, 0)); + // // unset($yamlObject->a); + // // $yamlObject[0] = 'a'; + // $this->assertEquals('- a', $dumpCompound->invoke($this->dumperHandler, ['a'], 0)); + // $compact = new Compact([1, 2, 3]); + // $this->assertEquals('[1, 2, 3]', $dumpCompound->invoke($this->dumperHandler, $compact, 0)); + // $o = new \stdClass; + // $o->a = 1; + // $compact = new Compact($o); + // $this->assertEquals('{a: 1}', $dumpCompound->invoke($this->dumperHandler, $compact, 0)); + // $this->assertEquals("- 1\n- 2\n- 3", $dumpCompound->invoke($this->dumperHandler, [1, 2, 3], 0)); + // $tagged = new Tagged('!!str', 'somestring'); + // $this->assertEquals("!!str somestring", $dumpCompound->invoke($this->dumperHandler, $tagged, 0)); + // } /** * @covers \Dallgoot\Yaml\DumperHandlers::dumpCompact */ public function testDumpCompact() { - $this->assertEquals("[1, 2, 3]", $this->dumperHandler->dumpCompact([1,2,3], 0)); - $o = new \Stdclass; - $o->a = 1; - $o->b = [1, 2]; - $o->c = new \Stdclass; - $o->c->ca = 1; - $this->assertEquals("{a: 1, b: [1, 2], c: {ca: 1}}", $this->dumperHandler->dumpCompact($o, 0)); + $this->assertEquals("[1, 2, 3]", $this->dumperHandler->dumpCompact(new Compact([1, 2, 3]), 0)); + $o = new Compact([]); + $o->a = 1; + $o->b = [1, 2]; + $o->c = new \stdClass; + $o->c->ca = 1; + $this->assertEquals("{a: 1, b: [1, 2], c: {ca: 1}}", $this->dumperHandler->dumpCompact($o, 0)); } /** @@ -119,7 +122,7 @@ public function testDumpCompact() */ public function testDumpString() { - $this->assertEquals('abc ', $this->dumperHandler->dumpString(' abc ', 0)); + $this->assertEquals('abc ', $this->dumperHandler->dumpString(' abc ', 0)); } /** @@ -127,10 +130,14 @@ public function testDumpString() */ public function testDumpTagged() { - $tagged = new Tagged('!!str', 'somestring'); - $this->assertEquals("!!str somestring", $this->dumperHandler->dumpTagged($tagged, 0)); - $tagged = new Tagged('!!omap', [1,2]); - $this->assertEquals("!!omap\n - 1\n - 2", $this->dumperHandler->dumpTagged($tagged, 0)); + $taggedStr = new Tagged('!!str', 'somestring'); + $this->assertEquals("!!str somestring", $this->dumperHandler->dumpTagged($taggedStr, 0)); + $taggedOmap = new Tagged('!!omap', [1, 2]); + $expected = <<assertEquals($expected, $this->dumperHandler->dumpTagged($taggedOmap, 0)); } - -} \ No newline at end of file +} diff --git a/classes/vendor/dallgoot/yaml/tests/units/DumperTest.php b/classes/vendor/dallgoot/yaml/tests/units/DumperTest.php index 7e736a8..81fe1c9 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/DumperTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/DumperTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\Dumper; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * Class DumperTest. @@ -49,7 +49,7 @@ public function test__construct() */ public function testToString(): void { - $this->assertEquals("- 1\n- 2\n- 3", $this->dumper->toString([1,2,3])); + $this->assertEquals("- 1\n- 2\n- 3", $this->dumper->toString([1, 2, 3])); $this->assertEquals("--- some text\n", $this->dumper->toString('some text')); } @@ -59,7 +59,7 @@ public function testToString(): void public function testToFile(): void { $filename = 'dumperTest.yml'; - $result = $this->dumper->toFile($filename, [1,2,3]); + $result = $this->dumper->toFile($filename, [1, 2, 3]); $this->assertTrue($result); $this->assertEquals("- 1\n- 2\n- 3", file_get_contents($filename)); unlink($filename); @@ -72,10 +72,10 @@ public function testDump() $this->assertEquals('', $this->dumper->dump(null, 0)); $this->assertEquals('stream', $this->dumper->dump(fopen(__FILE__, 'r'), 0)); $this->assertEquals('str', $this->dumper->dump('str', 0)); - $this->assertEquals('- 1', $this->dumper->dump([1], 0)); - $o = new \Stdclass; + $this->assertEquals('- 1', $this->dumper->dump([1], 0, false, true)); + $o = new \stdClass; $o->prop = 1; - $this->assertEquals('prop: 1', $this->dumper->dump($o, 0)); + $this->assertEquals('prop: 1', $this->dumper->dump($o, 0, false, true)); } @@ -94,17 +94,4 @@ public function testDumpYamlObject() $this->assertEquals('- a', $dumpYamlObject->invoke($this->dumper, $yamlObject, 0)); } - /** - * @covers \Dallgoot\Yaml\Dumper::IteratorToString - */ - public function testIteratorToString() - { - $iteratorToString = new \ReflectionMethod($this->dumper, 'iteratorToString'); - $iteratorToString->setAccessible(true); - $yamlObject = new YamlObject(0); - $yamlObject[0] = 'a'; - $yamlObject[1] = 'b'; - $this->assertEquals("- a\n- b", $iteratorToString->invoke($this->dumper, $yamlObject, '-', "\n", 0)); - } - } diff --git a/classes/vendor/dallgoot/yaml/tests/units/LoaderTest.php b/classes/vendor/dallgoot/yaml/tests/units/LoaderTest.php index 6a0769d..5d98f2b 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/LoaderTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/LoaderTest.php @@ -7,13 +7,13 @@ use Generator; use Dallgoot\Yaml\Loader; -use Dallgoot\Yaml\YamlObject; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Partial; use Dallgoot\Yaml\Nodes\Root; use Dallgoot\Yaml\Nodes\Scalar; +use Dallgoot\Yaml\Types\YamlObject; /** * Class LoaderTest. @@ -55,7 +55,7 @@ public function testConstruct(): void */ public function testLoad(): void { - $this->assertEquals($this->loader, $this->loader->load(__DIR__.'/../definitions/parsing_tests.yml')); + $this->assertEquals($this->loader, $this->loader->load(__DIR__ . '/../definitions/parsing_tests.yml')); } /** @@ -112,17 +112,17 @@ public function testGetSourceGeneratorException(): void /** * @covers \Dallgoot\Yaml\Loader::getSourceGenerator */ - public function testGetSourceGeneratorExceptionOnNoSource(): void - { - $this->expectException(\Exception::class); - $method = new \ReflectionMethod($this->loader, 'getSourceGenerator'); - $method->setAccessible(true); - $property = new \ReflectionProperty($this->loader, 'content'); - $property->setAccessible(true); - $property->setValue($this->loader, []); - $generator = $method->invoke($this->loader, null); - $generator->next(); - } + // public function testGetSourceGeneratorExceptionOnNoSource(): void + // { + // $this->expectException(\Exception::class); + // $method = new \ReflectionMethod($this->loader, 'getSourceGenerator'); + // $method->setAccessible(true); + // $property = new \ReflectionProperty($this->loader, 'content'); + // $property->setAccessible(true); + // $property->setValue($this->loader, \SplFixedArray::fromArray([])); + // $generator = $method->invoke($this->loader, null); + // $generator->next(); + // } /** * @covers \Dallgoot\Yaml\Loader::parse @@ -202,7 +202,7 @@ public function testNeedsSpecialProcess(): void // $this->assertTrue($this->loader->needsSpecialProcess($current, $previous)); $this->assertTrue($needsSpecialProcessMethod->invoke($this->loader, $current, $previous)); $previous = new Key('key: "partial value', 1); - $current = new Scalar(' end of partial value"',2); + $current = new Scalar(' end of partial value"', 2); // $this->assertTrue($this->loader->needsSpecialProcess($current, $previous)); $this->assertTrue($needsSpecialProcessMethod->invoke($this->loader, $current, $previous)); $current = new Partial(' " oddly quoted'); @@ -216,7 +216,7 @@ public function testNeedsSpecialProcess(): void public function testOnError(): void { $this->expectException(\Exception::class); - $generator = function() { + $generator = function () { yield 1 => 'this is the first line'; yield 2 => 'this is the second line'; }; @@ -232,7 +232,7 @@ public function testOnError(): void public function testOnErrorButNoException(): void { $this->loader = new Loader(null, Loader::NO_PARSING_EXCEPTIONS); - $generator = function() { + $generator = function () { yield 1 => 'this is the first line'; yield 2 => 'this is the second line'; }; diff --git a/classes/vendor/dallgoot/yaml/tests/units/NodeFactoryTest.php b/classes/vendor/dallgoot/yaml/tests/units/NodeFactoryTest.php index c16288e..04335aa 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/NodeFactoryTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/NodeFactoryTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\NodeFactory; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Anchor; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; @@ -69,35 +69,22 @@ public function testGet(): void */ public function testGetException(): void { - $this->expectException(\Exception::class); + $this->expectException(\ParseError::class); $this->nodeFactory::get('%INVALID_DIRECTIVE xxx', 1); } - /** - * @covers \Dallgoot\Yaml\NodeFactory::onSpecial - */ - public function testOnSpecial(): void - { - $reflector = new \ReflectionClass($this->nodeFactory); - $method = $reflector->getMethod('onSpecial'); - $method->setAccessible(true); - $nodeString = '#qsd = 3213'; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Comment, 'Not a NodeComment'); - $nodeString = '%YAML 1.2'; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Directive, 'Not a NodeDirective'); - } /** - * @covers \Dallgoot\Yaml\NodeFactory::onSpecial + * @covers \Dallgoot\Yaml\NodeFactory::onDirective */ - public function testOnSpecialParseError(): void + public function testOnDirectiveParseError(): void { $this->expectException(\ParseError::class); $reflector = new \ReflectionClass($this->nodeFactory); - $method = $reflector->getMethod('onSpecial'); + $method = $reflector->getMethod('onDirective'); $method->setAccessible(true); $nodeString = '%INVALID_DIRECTIVE xxx'; - $method->invoke(null,$nodeString[0], $nodeString, 1); + $method->invoke(null, $nodeString, 1); } /** @@ -109,33 +96,45 @@ public function testOnQuoted(): void $method = $reflector->getMethod('onQuoted'); $method->setAccessible(true); $nodeString = ' "double quoted" '; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Quoted, - 'Not a NodeQuoted'); + $this->assertTrue( + $method->invoke(null, $nodeString[0], $nodeString, 1) instanceof Quoted, + 'Not a NodeQuoted' + ); $nodeString = " 'simple quoted' "; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Quoted, - 'Not a NodeQuoted'); + $this->assertTrue( + $method->invoke(null, $nodeString[0], $nodeString, 1) instanceof Quoted, + 'Not a NodeQuoted' + ); $nodeString = " 'simple partial "; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Partial, - 'Not a NodePartial'); + $this->assertTrue( + $method->invoke(null, $nodeString[0], $nodeString, 1) instanceof Partial, + 'Not a NodePartial' + ); $nodeString = '" double partial '; - $this->assertTrue($method->invoke(null,$nodeString[0], $nodeString, 1) instanceof Partial, - 'Not a NodePartial'); + $this->assertTrue( + $method->invoke(null, $nodeString[0], $nodeString, 1) instanceof Partial, + 'Not a NodePartial' + ); } /** - * @covers \Dallgoot\Yaml\NodeFactory::onSetElement + * @covers \Dallgoot\Yaml\NodeFactory::onCharacter */ public function testOnSetElement(): void { $reflector = new \ReflectionClass($this->nodeFactory); - $method = $reflector->getMethod('onSetElement'); + $method = $reflector->getMethod('onCharacter'); $method->setAccessible(true); $nodeString = ' ? some setkey '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof SetKey, - 'Not a NodeSetKey'); + $this->assertTrue( + $method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof SetKey, + 'Not a NodeSetKey' + ); $nodeString = ' : some setvalue '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof SetValue, - 'Not a NodeSetValue'); + $this->assertTrue( + $method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof SetValue, + 'Not a NodeSetValue' + ); } /** @@ -146,8 +145,10 @@ public function testOnCompactJSON(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = '["a","b","c"]'; - $this->assertTrue($method->invoke(null, '', $nodeString, 1) instanceof JSON, - 'Not a NodeJSON'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof JSON, + 'Not a NodeJSON' + ); } /** * @covers \Dallgoot\Yaml\NodeFactory::onCompact @@ -157,7 +158,7 @@ public function testOnCompactJSONMAPPING(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = '{"key":"value","key1":"value1"}'; - $this->assertTrue($method->invoke(null, '', $nodeString, 1) instanceof JSON, 'Not a NodeJSON'); + $this->assertTrue($method->invoke(null, $nodeString, 1) instanceof JSON, 'Not a NodeJSON'); } /** * @covers \Dallgoot\Yaml\NodeFactory::onCompact @@ -167,8 +168,8 @@ public function testOnCompactMAPPING(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = '{ key : value , key1 : value1 }'; - $output = $method->invoke(null, '', $nodeString, 1); - $this->assertTrue($output instanceof CompactMapping, get_class($output).' instead of a NodeCompactMapping'); + $output = $method->invoke(null, $nodeString, 1); + $this->assertTrue($output instanceof CompactMapping, get_class($output) . ' instead of a NodeCompactMapping'); } /** * @covers \Dallgoot\Yaml\NodeFactory::onCompact @@ -178,8 +179,8 @@ public function testOnCompactSEQUENCE(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = '[a,b,c]'; - $output = $method->invoke(null, '', $nodeString, 1); - $this->assertTrue($output instanceof CompactSequence, get_class($output).' instead of a NodeCompactSequence'); + $output = $method->invoke(null, $nodeString, 1); + $this->assertTrue($output instanceof CompactSequence, get_class($output) . ' instead of a NodeCompactSequence'); } /** * @covers \Dallgoot\Yaml\NodeFactory::onCompact @@ -189,8 +190,8 @@ public function testOnCompactPartialMapping(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = ' { a: b, '; - $output = $method->invoke(null, '', $nodeString, 1); - $this->assertTrue($output instanceof Partial, get_class($output).' instead of a Partial'); + $output = $method->invoke(null, $nodeString, 1); + $this->assertTrue($output instanceof Partial, get_class($output) . ' instead of a Partial'); } /** * @covers \Dallgoot\Yaml\NodeFactory::onCompact @@ -200,8 +201,8 @@ public function testOnCompactPartialSequence(): void $method = new \ReflectionMethod($this->nodeFactory, 'onCompact'); $method->setAccessible(true); $nodeString = ' [ a, b, '; - $output = $method->invoke(null, '', $nodeString, 1); - $this->assertTrue($output instanceof Partial, get_class($output).' instead of a Partial'); + $output = $method->invoke(null, $nodeString, 1); + $this->assertTrue($output instanceof Partial, get_class($output) . ' instead of a Partial'); } /** @@ -213,17 +214,25 @@ public function testOnHyphen(): void $method = $reflector->getMethod('onHyphen'); $method->setAccessible(true); $nodeString = '- '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Item, - 'Not a NodeItem'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Item, + 'Not a NodeItem' + ); $nodeString = '-- '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Scalar, - 'Not a NodeScalar'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Scalar, + 'Not a NodeScalar' + ); $nodeString = '---'; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof DocStart, - 'Not a NodeDocStart'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof DocStart, + 'Not a NodeDocStart' + ); $nodeString = ' - simpleitem '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Item, - 'Not a NodeItem'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Item, + 'Not a NodeItem' + ); } /** @@ -234,50 +243,60 @@ public function testOnNodeAction(): void $method = new \ReflectionMethod($this->nodeFactory, 'onNodeAction'); $method->setAccessible(true); $nodeString = '***'; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Scalar, - 'Not a NodeScalar'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Scalar, + 'Not a NodeScalar' + ); $nodeString = '&emptyanchor'; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Anchor, - 'Not a NodeAnchor'.get_class($method->invoke(null, trim($nodeString)[0], $nodeString, 1))); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Anchor, + 'Not a NodeAnchor' . get_class($method->invoke(null, $nodeString, 1)) + ); $nodeString = '&anchor [1,2,3]'; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Anchor, - 'Not a NodeAnchor'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Anchor, + 'Not a NodeAnchor' + ); $nodeString = '*anchorcall '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Anchor, - 'Not a NodeAnchor'); + $this->assertTrue( + $method->invoke(null, $nodeString, 1) instanceof Anchor, + 'Not a NodeAnchor' + ); + + } + + public function testOnCharacter(): void + { + $method = new \ReflectionMethod($this->nodeFactory, 'onCharacter'); + $method->setAccessible(true); $nodeString = '!!emptytag'; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Tag, - 'Not a NodeTag'); + $tagged = $method->invoke(null, $nodeString[0], $nodeString, 1); + $this->assertTrue($tagged instanceof Tag, 'Not a NodeTag'); + $this->assertEquals('!!emptytag', $tagged->tag); $nodeString = '!!str 345 '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Tag, - 'Not a NodeTag'); + $result = $method->invoke(null, $nodeString[0], $nodeString, 1); + $this->assertTrue($result instanceof Tag,'Not a NodeTag:'.get_class($result)); + $this->assertEquals('!!str', $result->tag); } /** - * @covers \Dallgoot\Yaml\NodeFactory::onLiteral + * @covers \Dallgoot\Yaml\NodeFactory::onCharacter */ public function testOnLiteral(): void { - $method = new \ReflectionMethod($this->nodeFactory, 'onLiteral'); + $method = new \ReflectionMethod($this->nodeFactory, 'onCharacter'); $method->setAccessible(true); $nodeString = ' |- '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Literal, - 'Not a NodeLit'); + $this->assertTrue( + $method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof Literal, + 'Not a NodeLit' + ); $nodeString = ' >+ '; - $this->assertTrue($method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof LiteralFolded, - 'Not a NodeLitFolded'); + $this->assertTrue( + $method->invoke(null, trim($nodeString)[0], $nodeString, 1) instanceof LiteralFolded, + 'Not a NodeLitFolded' + ); } - /** - * @covers \Dallgoot\Yaml\NodeFactory::onLiteral - */ - public function testOnLiteralFail(): void - { - $method = new \ReflectionMethod($this->nodeFactory, 'onLiteral'); - $method->setAccessible(true); - $nodeString = ' x '; - $this->expectException(\ParseError::class); - $method->invoke(null, trim($nodeString)[0], $nodeString, 1); - } } diff --git a/classes/vendor/dallgoot/yaml/tests/units/NodeListTest.php b/classes/vendor/dallgoot/yaml/tests/units/NodeListTest.php index c4ee9f2..1d5ceba 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/NodeListTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/NodeListTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\DocStart; use Dallgoot\Yaml\Nodes\Comment; @@ -136,7 +136,7 @@ public function testBuildList(): void { $arr = []; $this->assertEquals($arr, $this->nodeList->buildList($arr)); - $obj = new \StdClass; + $obj = new \stdClass; $this->assertEquals($obj, $this->nodeList->buildList($obj)); } @@ -149,12 +149,12 @@ public function testBuildMultiline(): void $this->assertEquals(1, $this->nodeList->count(), 'NodeList count is wrong (+1 Nodeblank on setUp)'); $this->assertEquals('', $this->nodeList->buildMultiline(), 'buildMultiline did not return a string'); //test with one child - $this->nodeList->push(new Scalar('some string', 2));//var_dump($this->nodeList); + $this->nodeList->push(new Scalar('some string', 2)); $this->assertEquals(2, $this->nodeList->count(), 'NodeList does NOT contain 2 children'); $this->assertEquals('some string', $this->nodeList->buildMultiline(), 'buildMultiline failed with 2 children'); //test with one child AND one blank - $this->nodeList->push(new Blank('', 2));//var_dump($this->nodeList); - $this->nodeList->push(new Scalar('other string', 3));//var_dump($this->nodeList); + $this->nodeList->push(new Blank('', 2)); + $this->nodeList->push(new Scalar('other string', 3)); $this->assertEquals(4, $this->nodeList->count(), 'NodeList does NOT contain 2 children'); $this->assertEquals("some string\nother string", $this->nodeList->buildMultiline(), 'buildMultiline failed with 2 children'); //test with two child diff --git a/classes/vendor/dallgoot/yaml/tests/units/YamlTest.php b/classes/vendor/dallgoot/yaml/tests/units/YamlTest.php index 640ba63..067bd3e 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/YamlTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/YamlTest.php @@ -5,8 +5,8 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Yaml; +use Dallgoot\Yaml\Types\YamlObject; use Dallgoot\Yaml\Nodes\Root; /** @@ -17,8 +17,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml - */ + * @covers \Dallgoot\Yaml\Yaml */ class YamlTest extends TestCase { /** @@ -36,7 +35,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml::parse + * @covers \Dallgoot\Yaml\Yaml::parse */ public function testParse(): void { @@ -45,7 +44,7 @@ public function testParse(): void } /** - * @covers \Dallgoot\Yaml::parse + * @covers \Dallgoot\Yaml\Yaml::parse */ public function testParseException(): void { @@ -54,15 +53,15 @@ public function testParseException(): void } /** - * @covers \Dallgoot\Yaml::parseFile + * @covers \Dallgoot\Yaml\Yaml::parseFile */ public function testParseFile(): void { - $this->assertTrue($this->yaml::parseFile(__DIR__."/../definitions/parsing_tests.yml") instanceof YamlObject); + $this->assertTrue($this->yaml::parseFile(__DIR__ . "/../definitions/parsing_tests.yml") instanceof YamlObject); } /** - * @covers \Dallgoot\Yaml::parseFile + * @covers \Dallgoot\Yaml\Yaml::parseFile */ public function testParseFileException(): void { @@ -71,16 +70,16 @@ public function testParseFileException(): void } /** - * @covers \Dallgoot\Yaml::dump + * @covers \Dallgoot\Yaml\Yaml::dump */ public function testDump(): void { - $this->assertEquals("- 1\n- 2\n- 3", $this->yaml::dump([1,2,3])); + $this->assertEquals("- 1\n- 2\n- 3", $this->yaml::dump([1, 2, 3])); $this->assertEquals("--- some text\n", $this->yaml::dump('some text')); } /** - * @covers \Dallgoot\Yaml::dump + * @covers \Dallgoot\Yaml\Yaml::dump */ public function testDumpException(): void { @@ -89,19 +88,19 @@ public function testDumpException(): void } /** - * @covers \Dallgoot\Yaml::dumpFile + * @covers \Dallgoot\Yaml\Yaml::dumpFile */ public function testDumpFile(): void { $filename = 'dumperTest.yml'; - $result = $this->yaml::dumpFile($filename, [1,2,3]); + $result = $this->yaml::dumpFile($filename, [1, 2, 3]); $this->assertTrue($result); $this->assertEquals("- 1\n- 2\n- 3", file_get_contents($filename)); unlink($filename); } /** - * @covers \Dallgoot\Yaml::dumpFile + * @covers \Dallgoot\Yaml\Yaml::dumpFile */ public function testDumpFileException(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/AnchorTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/AnchorTest.php index 5115974..4b9997d 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/AnchorTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/AnchorTest.php @@ -5,9 +5,9 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Anchor; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Root; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/BlankTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/BlankTest.php index 6a83a80..305b8b9 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/BlankTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/BlankTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Literal; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/CommentTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/CommentTest.php index 5f65dd7..09a4458 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/CommentTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/CommentTest.php @@ -5,12 +5,12 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Comment; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Root; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * Class CommentTest. diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactMappingTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactMappingTest.php index 945dcf4..1712902 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactMappingTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactMappingTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Compact; +use Dallgoot\Yaml\Types\Compact; use Dallgoot\Yaml\NodeList; use Dallgoot\Yaml\Nodes\CompactMapping; use Dallgoot\Yaml\Nodes\Key; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactSequenceTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactSequenceTest.php index 8dc3995..774b2f4 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactSequenceTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/CompactSequenceTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Compact; +use Dallgoot\Yaml\Types\Compact; use Dallgoot\Yaml\NodeList; use Dallgoot\Yaml\Nodes\CompactSequence; use Dallgoot\Yaml\Nodes\Item; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/DirectiveTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/DirectiveTest.php index e9837ce..90b3887 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/DirectiveTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/DirectiveTest.php @@ -5,12 +5,12 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Directive; use Dallgoot\Yaml\Nodes\Root; -use Dallgoot\Yaml\TagFactory; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Tag\TagFactory; +use Dallgoot\Yaml\Types\YamlObject; /** * Class DirectiveTest. diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/DocStartTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/DocStartTest.php index b31785a..b7a034f 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/DocStartTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/DocStartTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Anchor; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; @@ -16,7 +16,7 @@ use Dallgoot\Yaml\Nodes\Scalar; use Dallgoot\Yaml\Nodes\Tag; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * Class DocStartTest. diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/ItemTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/ItemTest.php index 5423296..422648d 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/ItemTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/ItemTest.php @@ -5,9 +5,9 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Item; use Dallgoot\Yaml\Nodes\Key; @@ -148,7 +148,7 @@ public function testBuildWhenParentIsString() public function testBuildWhenParentIsObject() { $this->expectException(\Exception::class); - $parent = new \StdClass; + $parent = new \stdClass; $this->nodeItem->build($parent); } diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/KeyTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/KeyTest.php index 1000a2a..36aa217 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/KeyTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/KeyTest.php @@ -5,19 +5,19 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Anchor; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; use Dallgoot\Yaml\Nodes\Item; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Literal; -use Dallgoot\Yaml\Nodes\Literals; +use Dallgoot\Yaml\Nodes\Generic\Literals; use Dallgoot\Yaml\Nodes\Root; use Dallgoot\Yaml\Nodes\Scalar; use Dallgoot\Yaml\NodeFactory; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * Class KeyTest. @@ -193,7 +193,7 @@ public function testBuild(): void $this->assertTrue(property_exists($built, 'key')); $this->assertEquals('value', $built->key); // - $parent = new \StdClass; + $parent = new \stdClass; $built = $this->nodeKey->build($parent); $this->assertTrue(property_exists($parent, 'key')); $this->assertEquals('value', $parent->key); diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/PartialTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/PartialTest.php index 1590b5e..3d29984 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/PartialTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/PartialTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Partial; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/RootTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/RootTest.php index 75a9ff9..22236ef 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/RootTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/RootTest.php @@ -5,12 +5,12 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Root; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; /** * Class RootTest. diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/ScalarTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/ScalarTest.php index 10fa311..0ebe172 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/ScalarTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/ScalarTest.php @@ -6,7 +6,7 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; use Dallgoot\Yaml\Nodes\Key; diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/SetKeyTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/SetKeyTest.php index e4a10ba..fa68b43 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/SetKeyTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/SetKeyTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Scalar; use Dallgoot\Yaml\Nodes\SetKey; @@ -50,7 +50,7 @@ public function testConstruct(): void */ public function testBuild(): void { - $parent = new \StdClass; + $parent = new \stdClass; $built = $this->nodeSetKey->build($parent); $this->assertTrue(property_exists($parent, 'someStringKey')); $this->assertEquals(null, $parent->someStringKey); diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/SetValueTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/SetValueTest.php index 94150d3..61f729c 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/SetValueTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/SetValueTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\SetValue; use Dallgoot\Yaml\Nodes\Scalar; @@ -50,7 +50,7 @@ public function testConstruct(): void */ public function testBuild(): void { - $parent = new \StdClass; + $parent = new \stdClass; $parent->lastKey = null; $this->nodeSetValue->build($parent); $this->assertTrue(property_exists($parent, 'lastKey')); diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/TagTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/TagTest.php index 8b06eaa..5701b0a 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/TagTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/TagTest.php @@ -5,14 +5,14 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Root; use Dallgoot\Yaml\Nodes\Tag; -use Dallgoot\Yaml\YamlObject; -use Dallgoot\Yaml\Tagged; +use Dallgoot\Yaml\Types\YamlObject; +use Dallgoot\Yaml\Types\Tagged; /** * Class TagTest. @@ -68,18 +68,19 @@ public function testBuild(): void { // test value tranformed $parent = new Key(' key:',1); + $yamlObject = new YamlObject(0); + $parent->add($this->nodeTag); $built = $this->nodeTag->build(); $this->assertEquals('654', $built); // test apply tag to YamlObject (cause value is null and parent is a NodeRoot) $rootNode = new Root(); - $rootNode->add($this->nodeTag); - $this->nodeTag->value = null; - $yamlObject = new YamlObject(0); $this->assertFalse($yamlObject->isTagged()); + $rootNode->add($this->nodeTag); + //$this->nodeTag->value = null; // add yamlObject to NodeRoot $rootNode->build($yamlObject);// this triggers this->nodeTag->build - $this->assertTrue($yamlObject->isTagged()); + $this->assertFalse($yamlObject->isTagged()); // test "unknown" ag: must return a Tag object $this->nodeTag = new Tag('!!unknown 654',1); $built = $this->nodeTag->build($yamlObject); diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/ActionsTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/ActionsTest.php index 8a50fbe..c15f283 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/ActionsTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/ActionsTest.php @@ -5,7 +5,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Nodes\Actions; +use Dallgoot\Yaml\Nodes\Generic\Actions; use Dallgoot\Yaml\Nodes\Scalar; use Dallgoot\Yaml\Nodes\Tag; @@ -17,7 +17,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\Nodes\Actions + * @covers \Dallgoot\Yaml\Nodes\Generic\Actions */ class ActionsTest extends TestCase { @@ -38,7 +38,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Actions::__construct + * @covers \Dallgoot\Yaml\Nodes\Generic\Actions::__construct */ public function testConstruct(): void { @@ -49,7 +49,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Actions::__construct + * @covers \Dallgoot\Yaml\Nodes\Generic\Actions::__construct */ public function testConstructWithTag(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/LiteralsTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/LiteralsTest.php index 445f7a5..a8721a7 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/LiteralsTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/LiteralsTest.php @@ -6,14 +6,14 @@ use PHPUnit\Framework\TestCase; use Dallgoot\Yaml\NodeList; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Comment; use Dallgoot\Yaml\Nodes\Item; use Dallgoot\Yaml\Nodes\Key; use Dallgoot\Yaml\Nodes\Literal; use Dallgoot\Yaml\Nodes\LiteralFolded; -use Dallgoot\Yaml\Nodes\Literals; +use Dallgoot\Yaml\Nodes\Generic\Literals; use Dallgoot\Yaml\Nodes\Quoted; use Dallgoot\Yaml\Nodes\Scalar; @@ -25,7 +25,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\Nodes\Literals + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals */ class LiteralsTest extends TestCase { @@ -46,7 +46,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::__construct + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::__construct */ public function testConstruct(): void { @@ -78,7 +78,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::add + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::add */ public function testAdd(): void { @@ -94,7 +94,7 @@ public function testAdd(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::litteralStripLeading + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::litteralStripLeading */ public function testLitteralStripLeading(): void { @@ -107,7 +107,7 @@ public function testLitteralStripLeading(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::litteralStripTrailing + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::litteralStripTrailing */ public function testLitteralStripTrailing(): void { @@ -120,7 +120,7 @@ public function testLitteralStripTrailing(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::build + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::build */ public function testBuild(): void { @@ -156,7 +156,7 @@ public function testBuild(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::getChildValue + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::getChildValue */ public function testGetChildValue(): void { @@ -181,7 +181,7 @@ public function testGetChildValue(): void } /** - * @covers \Dallgoot\Yaml\Nodes\Literals::isAwaitingChild + * @covers \Dallgoot\Yaml\Nodes\Generic\Literals::isAwaitingChild */ public function testIsAwaitingChild(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/NodeGenericTest.php b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/NodeGenericTest.php index 0dc7060..37833a4 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/NodeGenericTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/nodes/abstract/NodeGenericTest.php @@ -5,10 +5,10 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml; +use Dallgoot\Yaml\Yaml; use Dallgoot\Yaml\NodeList; use Dallgoot\Yaml\NodeFactory; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Blank; use Dallgoot\Yaml\Nodes\Item; use Dallgoot\Yaml\Nodes\Key; @@ -24,7 +24,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric */ class NodeGenericTest extends TestCase { @@ -45,7 +45,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::__construct + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::__construct */ public function testConstruct(): void { @@ -58,7 +58,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::setParent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::setParent */ public function testSetParent(): void { @@ -75,7 +75,7 @@ public function testSetParent(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getParent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getParent */ public function testGetParent(): void { @@ -96,7 +96,7 @@ public function testGetParent(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getParent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getParent */ public function testGetParentException(): void { @@ -105,7 +105,7 @@ public function testGetParentException(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getRoot + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getRoot */ public function testGetRoot(): void { @@ -123,7 +123,7 @@ public function testGetRoot(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getRoot + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getRoot */ public function testGetRootException(): void { @@ -134,7 +134,7 @@ public function testGetRootException(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::add + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::add */ public function testAdd(): void { @@ -155,18 +155,18 @@ public function testAdd(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getDeepestNode + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getDeepestNode */ public function testGetDeepestNode(): void { $child = NodeFactory::get(' key: &anchor |', 1); - $this->node->add($child);//var_dump($child->getDeepestNode()); + $this->node->add($child); $this->assertTrue($child->getDeepestNode() instanceof Literal); $this->assertTrue($this->node->getDeepestNode() instanceof Literal); } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::specialProcess + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::specialProcess * @todo : test call for ALL NODETYPES using folder "types" listing and object creation */ public function testSpecialProcess(): void @@ -177,7 +177,7 @@ public function testSpecialProcess(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getTargetOnEqualIndent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getTargetOnEqualIndent */ public function testGetTargetOnEqualIndent(): void { @@ -188,7 +188,7 @@ public function testGetTargetOnEqualIndent(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getTargetOnLessIndent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getTargetOnLessIndent * * @todo test with more content before this one */ @@ -204,7 +204,7 @@ public function testGetTargetOnLessIndent(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::getTargetOnMoreIndent + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::getTargetOnMoreIndent */ public function testGetTargetOnMoreIndent(): void { @@ -214,7 +214,7 @@ public function testGetTargetOnMoreIndent(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::isAwaitingChild + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::isAwaitingChild */ public function testIsAwaitingChild(): void { @@ -224,7 +224,7 @@ public function testIsAwaitingChild(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::isOneOf + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::isOneOf */ public function testIsOneOf(): void { @@ -235,7 +235,7 @@ public function testIsOneOf(): void } /** - * @covers \Dallgoot\Yaml\Nodes\NodeGeneric::__debugInfo + * @covers \Dallgoot\Yaml\Nodes\Generic\NodeGeneric::__debugInfo */ public function testDebugInfo(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/tag/TagFactoryTest.php b/classes/vendor/dallgoot/yaml/tests/units/tag/TagFactoryTest.php index 58a88a9..5f9fc14 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/tag/TagFactoryTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/tag/TagFactoryTest.php @@ -5,8 +5,8 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\TagFactory; -use Dallgoot\Yaml\Nodes\NodeGeneric; +use Dallgoot\Yaml\Tag\TagFactory; +use Dallgoot\Yaml\Nodes\Generic\NodeGeneric; use Dallgoot\Yaml\Nodes\Scalar; use Dallgoot\Yaml\Tag\CoreSchema; @@ -19,7 +19,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\TagFactory + * @covers \Dallgoot\Yaml\Tag\TagFactory */ class TagFactoryTest extends TestCase { diff --git a/classes/vendor/dallgoot/yaml/tests/units/types/CompactTest.php b/classes/vendor/dallgoot/yaml/tests/units/types/CompactTest.php index 53d326f..46799c5 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/types/CompactTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/types/CompactTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Compact; +use Dallgoot\Yaml\Types\Compact; /** * Class CompactTest. @@ -14,7 +14,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\Compact + * @covers \Dallgoot\Yaml\Types\Compact */ class CompactTest extends TestCase { @@ -32,7 +32,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\Compact::__construct + * @covers \Dallgoot\Yaml\Types\Compact::__construct */ public function testConstruct(): void { @@ -43,7 +43,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\Compact::jsonSerialize + * @covers \Dallgoot\Yaml\Types\Compact::jsonSerialize */ public function testJsonSerialize(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/types/TaggedTest.php b/classes/vendor/dallgoot/yaml/tests/units/types/TaggedTest.php index 8de54e1..ecbbcac 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/types/TaggedTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/types/TaggedTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\Tagged; +use Dallgoot\Yaml\Types\Tagged; /** * Class TaggedTest. @@ -14,7 +14,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\Tagged + * @covers \Dallgoot\Yaml\Types\Tagged */ class TaggedTest extends TestCase { @@ -32,7 +32,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\Tagged::__construct + * @covers \Dallgoot\Yaml\Types\Tagged::__construct */ public function testConstruct(): void { @@ -41,7 +41,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\Tagged::__construct + * @covers \Dallgoot\Yaml\Types\Tagged::__construct */ public function testConstructEmptyName(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/units/types/YamlObjectTest.php b/classes/vendor/dallgoot/yaml/tests/units/types/YamlObjectTest.php index e10d98f..cbc10ee 100644 --- a/classes/vendor/dallgoot/yaml/tests/units/types/YamlObjectTest.php +++ b/classes/vendor/dallgoot/yaml/tests/units/types/YamlObjectTest.php @@ -4,7 +4,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use Dallgoot\Yaml\YamlObject; +use Dallgoot\Yaml\Types\YamlObject; use Dallgoot\Yaml\YamlProperties; use ReflectionProperty; @@ -16,7 +16,7 @@ * @link https://github.com/dallgoot/yaml * @since File available since Release 1.0.0 * - * @covers \Dallgoot\Yaml\YamlObject + * @covers \Dallgoot\Yaml\Types\YamlObject */ class YamlObjectTest extends TestCase { @@ -37,7 +37,7 @@ protected function setUp(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::__construct + * @covers \Dallgoot\Yaml\Types\YamlObject::__construct */ public function testConstruct(): void { @@ -49,7 +49,7 @@ public function testConstruct(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::__toString + * @covers \Dallgoot\Yaml\Types\YamlObject::__toString */ public function testToString(): void { @@ -58,7 +58,7 @@ public function testToString(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::jsonSerialize + * @covers \Dallgoot\Yaml\Types\YamlObject::jsonSerialize */ public function testJsonSerialize(): void { @@ -66,7 +66,7 @@ public function testJsonSerialize(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::addReference + * @covers \Dallgoot\Yaml\Types\YamlObject::addReference */ public function testAddReference(): void { @@ -76,7 +76,7 @@ public function testAddReference(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::getReference + * @covers \Dallgoot\Yaml\Types\YamlObject::getReference */ public function testGetReference(): void { @@ -86,7 +86,7 @@ public function testGetReference(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::getAllReferences + * @covers \Dallgoot\Yaml\Types\YamlObject::getAllReferences */ public function testGetAllReferences(): void { @@ -96,7 +96,7 @@ public function testGetAllReferences(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::addComment + * @covers \Dallgoot\Yaml\Types\YamlObject::addComment */ public function testAddComment(): void { @@ -106,7 +106,7 @@ public function testAddComment(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::getComment + * @covers \Dallgoot\Yaml\Types\YamlObject::getComment * @depends testAddComment */ public function testGetComment(): void @@ -117,7 +117,7 @@ public function testGetComment(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::setText + * @covers \Dallgoot\Yaml\Types\YamlObject::setText */ public function testSetText(): void { @@ -131,7 +131,7 @@ public function testSetText(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::addTag + * @covers \Dallgoot\Yaml\Types\YamlObject::addTag */ public function testAddTag(): void { @@ -141,7 +141,7 @@ public function testAddTag(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::hasDocStart + * @covers \Dallgoot\Yaml\Types\YamlObject::hasDocStart */ public function testHasDocStart(): void { @@ -155,7 +155,7 @@ public function testHasDocStart(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::setDocStart + * @covers \Dallgoot\Yaml\Types\YamlObject::setDocStart */ public function testSetDocStart(): void { @@ -169,7 +169,7 @@ public function testSetDocStart(): void } /** - * @covers \Dallgoot\Yaml\YamlObject::isTagged + * @covers \Dallgoot\Yaml\Types\YamlObject::isTagged */ public function testIsTagged(): void { diff --git a/classes/vendor/dallgoot/yaml/tests/xdebug-filter.php b/classes/vendor/dallgoot/yaml/tests/xdebug-filter.php deleted file mode 100644 index b84e974..0000000 --- a/classes/vendor/dallgoot/yaml/tests/xdebug-filter.php +++ /dev/null @@ -1,12 +0,0 @@ -. + */ +/** + * For more information, please contact + */ + +namespace Goat1000\SVGGraph; + +/** + * Class for algebraic functions + */ +class Algebraic { + + private $type = 'straight'; + private $coeffs = [0, 1]; + + public function __construct($type) + { + $this->type = $type; + } + + /** + * Sets the coefficients in order, lowest power first + */ + public function setCoefficients(array $coefficients) + { + $this->coeffs = $coefficients; + } + + /** + * Returns the y value for a + bx + cx^2 ... + */ + public function __invoke($x) + { + $val = 0; + foreach($this->coeffs as $p => $c) { + switch($p) { + case 0: $val = bcadd($val, $c); + break; + case 1: $val = bcadd($val, bcmul($c, $x)); + break; + default: + $val = bcadd($val, bcmul($c, bcpow($x, $p))); + break; + } + } + return $val; + } + + /** + * Creates a row of the vandermonde matrix + */ + public function vandermonde($x) + { + $t = $this->type; + return $this->{$t}($x); + } + + private function straight($x) + { + return [$x]; + } + + private function quadratic($x) + { + return [$x, bcmul($x, $x)]; + } + + private function cubic($x) + { + $res = [$x, bcmul($x, $x)]; + $res[] = bcmul($res[1], $x); + return $res; + } + + private function quartic($x) + { + $res = $this->cubic($x); + $res[] = bcmul($res[1], $res[1]); + return $res; + } + + private function quintic($x) + { + $res = $this->cubic($x); + $res[] = bcmul($res[1], $res[1]); + $res[] = bcmul($res[1], $res[2]); + return $res; + } +} + diff --git a/classes/vendor/goat1000/svggraph/Average.php b/classes/vendor/goat1000/svggraph/Average.php index cf43d0e..24a13ee 100644 --- a/classes/vendor/goat1000/svggraph/Average.php +++ b/classes/vendor/goat1000/svggraph/Average.php @@ -1,6 +1,6 @@ getTitle($graph, $avg, $d); - if(strlen($title) > 0) + if($title !== null && strlen($title) > 0) $line[] = $title; $cg = new ColourGroup($graph, null, 0, $d, 'average_colour'); @@ -54,13 +54,12 @@ public function __construct(&$graph, &$values, $datasets) $line['text_colour'] = $cg->stroke(); } - $sw = new Number($graph->getOption(['average_stroke_width', $d], 1)); - $line['stroke_width'] = $sw; + $line['stroke_width'] = new Number($graph->getOption(['average_stroke_width', $d], 1)); + $line['font_size'] = Number::units($graph->getOption(['average_font_size', $d])); $opts = ["opacity", "above", "dash", "title_align", "title_angle", "title_opacity", "title_padding", "title_position", - "font", "font_size", "font_adjust", "font_weight", - "length", "length_units"]; + "font", "font_adjust", "font_weight", "length", "length_units"]; foreach($opts as $opt) { $g_opt = str_replace('title', 'text', $opt); $line[$g_opt] = $graph->getOption(['average_' . $opt, $d]); diff --git a/classes/vendor/goat1000/svggraph/BestFit.php b/classes/vendor/goat1000/svggraph/BestFit.php index c572028..c9b762a 100644 --- a/classes/vendor/goat1000/svggraph/BestFit.php +++ b/classes/vendor/goat1000/svggraph/BestFit.php @@ -1,6 +1,6 @@ graph->getOption(['best_fit', $dataset]); - if($type !== 'straight') + if($type !== 'straight' && $type !== 'curve') return; // range and projection @@ -63,7 +63,10 @@ public function add($dataset, $points) $points = $this->filterPoints($points, $r_start, $r_end); } - $best_fit = new BestFitLine($this->graph, $points); + $class = '\\Goat1000\\SVGGraph\\' . ($type === 'straight' ? 'BestFitLine' : 'BestFitCurve'); + $subtypes = $this->graph->getOption(['best_fit_type', $dataset]); + + $best_fit = new $class($this->graph, $points, $subtypes); $best_fit->calculate($this->bbox, $r_start, $r_end, $p_start, $p_end); if($this->graph->getOption(['best_fit_above', $dataset])) $this->lines_above[$dataset] = $best_fit; @@ -162,6 +165,7 @@ protected function getLinePath($dataset, $line_path, $proj_path) $dash = $this->graph->getOption(['best_fit_dash', $dataset]); $opacity = $this->graph->getOption(['best_fit_opacity', $dataset]); $above = $this->graph->getOption(['best_fit_above', $dataset]); + $type = $this->graph->getOption(['best_fit', $dataset]); $path = [ 'd' => $line_path, 'stroke' => $colour->isNone() ? '#000' : $colour, @@ -172,6 +176,8 @@ protected function getLinePath($dataset, $line_path, $proj_path) $path['stroke-dasharray'] = $dash; if($opacity != 1) $path['opacity'] = $opacity; + if($type != 'straight') + $path['fill'] = 'none'; // don't fill curves $line = $this->graph->element('path', $path); if($proj_path->isEmpty()) diff --git a/classes/vendor/goat1000/svggraph/BestFitCurve.php b/classes/vendor/goat1000/svggraph/BestFitCurve.php new file mode 100644 index 0000000..8e4005a --- /dev/null +++ b/classes/vendor/goat1000/svggraph/BestFitCurve.php @@ -0,0 +1,245 @@ +. + */ +/** + * For more information, please contact + */ + +namespace Goat1000\SVGGraph; + +/** + * Class for calculating a curved best-fit line + */ +class BestFitCurve { + + protected $graph; + protected $points; + protected $line; + protected $projection; + protected $types; + + public function __construct(&$graph, $points, $types = null) + { + $this->graph =& $graph; + $this->line = new PathData; + $this->projection = new PathData; + $this->points = $points; + $this->types = $types === null || is_array($types) ? $types : [$types]; + } + + /** + * Calculates the line and projection + */ + public function calculate(BoundingBox $area, $limit_start, $limit_end, + $project_start, $project_end) + { + // can't draw a line through fewer than 2 points + $count = count($this->points); + if($count < 2) + return false; + + $old_scale = bcscale(50); + $b = []; + $y = new Matrix($count, 1); + foreach($this->points as $p) + $b[] = $p->y; + $y->load($b); + + $supported_types = ['straight', 'quadratic', 'cubic', 'quartic', 'quintic']; + + // choose which functions to fit + if($this->types !== null) { + $types = []; + foreach($this->types as $type) { + if(!in_array($type, $supported_types)) + throw new \Exception("Unknown curve type '{$type}'"); + $types[] = $type; + } + } else { + $types = ['quintic']; + switch($count) + { + case 2 : $types = ['straight']; + break; + case 3 : $types = ['quadratic']; + break; + case 4 : $types = ['cubic']; + break; + case 5 : $types = ['quartic']; + } + } + + // fit the functions, measure the error + $results = []; + $errors = []; + foreach($types as $t) { + $v = $this->vandermonde($t); + $result = $this->solve($v, $y); + if($result !== null) { + $errors[$t] = $this->error($v, $result); + $results[$t] = $result; + } + } + + if(!empty($errors)) { + + // sort by error, best first + uasort($errors, 'bccomp'); + $best = null; + foreach($errors as $k => $v) { + $best = $k; + break; + } + + $r = $results[$best]; + $c = $r->asArray(); + + // plot the function + $fn = new Algebraic($best); + $fn->setCoefficients($c); + $this->buildPaths($fn, $area, $limit_start, $limit_end, + $project_start, $project_end); + } + bcscale($old_scale); + } + + /** + * Calculates the error + */ + protected function error(Matrix $v, Matrix $r) + { + $old_scale = bcscale(50); + $tr = $r->transpose(); + $vr = $v->multiply($tr); + $i = 0; + $err = "0"; + foreach($this->points as $p) { + $diff = bcsub($vr($i, 0), $p->y); + if(bccomp($diff, "0") == -1) + $err = bcsub($err, $diff); + else + $err = bcadd($err, $diff); + ++$i; + } + bcscale($old_scale); + return $err; + } + + /** + * Solves the normal equation + */ + protected function solve(Matrix $v, Matrix $y) + { + $v_t = $v->transpose(); + $v_t_v = $v_t->multiply($v); + $v_t_y = $v_t->multiply($y); + return $v_t_v->gaussian_solve($v_t_y); + } + + /** + * Returns the Vandermonde matrix for the curve type + */ + protected function vandermonde($type) + { + $old_scale = bcscale(50); + + // find size of matrix + $a = new Algebraic($type); + $test = $a->vandermonde(1); + $m = count($this->points); + $n = count($test) + 1; + $v = new Matrix($m, $n); + + $i = 0; + foreach($this->points as $p) + { + $v($i, 0, 1); + $bcx = sprintf("%20.20F", $p->x); + $cols = $a->vandermonde($bcx); + foreach($cols as $k => $value) + $v($i, $k + 1, $value); + ++$i; + } + bcscale($old_scale); + return $v; + } + + /** + * Builds the line and projection paths. + * For vertical lines, $slope = null and $y_int = $x + */ + protected function buildPaths(&$fn, $area, $limit_start, $limit_end, + $project_start, $project_end) + { + + // initialize min and max points of line + $x_min = $limit_start === null ? 0 : max($limit_start, 0); + $x_max = $limit_end === null ? $area->width() : min($limit_end, $area->width()); + $y_min = 0; + $y_max = $area->height(); + $line = new PathData; + $projection = new PathData; + + $step = 1; + if($project_start) + $this->buildPath($projection, $fn, 0, $x_min, $y_min, $y_max, $step, $area); + $this->buildPath($line, $fn, $x_min, $x_max, $y_min, $y_max, $step, $area); + if($project_end) + $this->buildPath($projection, $fn, $x_max, $area->width(), $y_min, $y_max, $step, $area); + + $this->projection = $projection; + $this->line = $line; + return true; + } + + /** + * Builds a single path section between $x1 and $x2 + */ + private function buildPath(&$path, &$fn, $x1, $x2, $y_min, $y_max, $step, $area) + { + $cmd = 'M'; + for($x = $x1; $x <= $x2; $x += $step) { + $y = $fn($x); + if($y < $y_min || $y > $y_max) { + $cmd = 'M'; + continue; + } + $path->add($cmd, $area->x1 + $x, $area->y2 - $y); + switch($cmd) { + case 'M' : $cmd = 'L'; break; + case 'L' : $cmd = ''; break; + } + } + } + + /** + * Returns the best-fit line as PathData + */ + public function getLine() + { + return $this->line; + } + + /** + * Returns the projection line(s) as PathData + */ + public function getProjection() + { + return $this->projection; + } +} + diff --git a/classes/vendor/goat1000/svggraph/CHANGES.txt b/classes/vendor/goat1000/svggraph/CHANGES.txt index 397e460..3fc24c1 100644 --- a/classes/vendor/goat1000/svggraph/CHANGES.txt +++ b/classes/vendor/goat1000/svggraph/CHANGES.txt @@ -1,3 +1,8 @@ +Version 3.20 (24/04/2023) +------------ +- Added support for curved best-fit lines. +- Added support for CSS units in font sizes and line spacing. + Version 3.19 (10/01/2023) ------------ - Added ParetoChart. diff --git a/classes/vendor/goat1000/svggraph/ContextMenu.php b/classes/vendor/goat1000/svggraph/ContextMenu.php index 955492a..9d08d4c 100644 --- a/classes/vendor/goat1000/svggraph/ContextMenu.php +++ b/classes/vendor/goat1000/svggraph/ContextMenu.php @@ -1,6 +1,6 @@ js->addInitFunction('contextMenuInit'); $opts = ['link_target', 'link_underline', 'stroke_width', 'round', 'font', - 'font_size', 'font_weight', 'document_menu', 'spacing', 'min_width', + 'font_weight', 'document_menu', 'spacing', 'min_width', 'shadow_opacity', 'mouseleave']; $colours = ['colour', 'link_colour', 'link_hover_colour', 'back_colour']; $vars = []; foreach($opts as $opt) $vars[$opt] = $this->graph->getOption('context_' . $opt); + $vars['font_size'] = Number::units($this->graph->getOption('context_font_size')); foreach($colours as $opt) $vars[$opt] = new Colour($this->graph, $this->graph->getOption('context_' . $opt)); diff --git a/classes/vendor/goat1000/svggraph/CrossHairs.php b/classes/vendor/goat1000/svggraph/CrossHairs.php index 7f68c25..8caa637 100644 --- a/classes/vendor/goat1000/svggraph/CrossHairs.php +++ b/classes/vendor/goat1000/svggraph/CrossHairs.php @@ -121,6 +121,7 @@ public function getCrossHairs() foreach($text_options as $opt) $t_opt[$opt] = $this->graph->getOption('crosshairs_text_' . $opt); + // text group for grid details $text_group = ['id' => $this->graph->newId(), 'visibility' => 'hidden']; $text_rect = [ @@ -133,7 +134,7 @@ public function getCrossHairs() $text_rect['stroke-width'] = $t_opt['stroke_width']; $text_rect['stroke'] = $t_opt['colour']; } - $font_size = max(3, (int)$t_opt['font_size']); + $font_size = max(3, Number::units($t_opt['font_size'])); $text_element = [ 'x' => 0, 'y' => $font_size, 'font-family' => $t_opt['font'], diff --git a/classes/vendor/goat1000/svggraph/DataLabels.php b/classes/vendor/goat1000/svggraph/DataLabels.php index a778daa..a78bf60 100644 --- a/classes/vendor/goat1000/svggraph/DataLabels.php +++ b/classes/vendor/goat1000/svggraph/DataLabels.php @@ -1,6 +1,6 @@ getOption( ['axis_text_colour_' . $o, $axis_no], 'axis_text_colour', ['@', $styles['colour']])); - $styles['t_line_spacing'] = $get_axis_option('axis_text_line_spacing'); + $styles['t_line_spacing'] = Number::units($get_axis_option('axis_text_line_spacing')); if($styles['t_line_spacing'] === null || $styles['t_line_spacing'] < 1) $styles['t_line_spacing'] = $styles['t_font_size']; $styles['t_back_colour'] = null; @@ -202,9 +202,9 @@ public function __construct(&$graph, &$axis, $axis_no, $orientation, $type, $styles['l_font'] = $graph->getOption( ['label_font_' . $o, $axis_no], 'label_font', ['axis_font_' . $o, $axis_no], 'axis_font'); - $styles['l_font_size'] = $graph->getOption( + $styles['l_font_size'] = Number::units($graph->getOption( ['label_font_size_' . $o, $axis_no], 'label_font_size', - ['axis_font_size_' . $o, $axis_no], 'axis_font_size'); + ['axis_font_size_' . $o, $axis_no], 'axis_font_size')); $styles['l_font_weight'] = $graph->getOption( ['label_font_weight_' . $o, $axis_no], 'label_font_weight'); $styles['l_colour'] = new Colour($graph, $graph->getOption( @@ -213,7 +213,7 @@ public function __construct(&$graph, &$axis, $axis_no, $orientation, $type, ['@', $styles['colour']])); $styles['l_space'] = $graph->getOption('label_space'); $styles['l_pos'] = $get_axis_option('axis_label_position'); - $styles['l_line_spacing'] = $get_axis_option('label_line_spacing'); + $styles['l_line_spacing'] = Number::units($get_axis_option('label_line_spacing')); if($styles['l_line_spacing'] === null || $styles['l_line_spacing'] < 1) $styles['l_line_spacing'] = $styles['l_font_size']; } diff --git a/classes/vendor/goat1000/svggraph/Graph.php b/classes/vendor/goat1000/svggraph/Graph.php index 89f8bee..fb9b530 100644 --- a/classes/vendor/goat1000/svggraph/Graph.php +++ b/classes/vendor/goat1000/svggraph/Graph.php @@ -557,12 +557,12 @@ protected function getTitle() if($svg_text->strlen($info['title']) <= 0) return $info; - $info['font_size'] = $this->getOption('graph_title_font_size'); + $info['font_size'] = Number::units($this->getOption('graph_title_font_size')); $info['weight'] = $this->getOption('graph_title_font_weight'); $info['colour'] = $this->getOption('graph_title_colour'); $info['pos'] = $this->getOption('graph_title_position'); $info['space'] = $this->getOption('graph_title_space'); - $info['line_spacing'] = $this->getOption('graph_title_line_spacing'); + $info['line_spacing'] = Number::units($this->getOption('graph_title_line_spacing')); if($info['line_spacing'] === null || $info['line_spacing'] < 1) $info['line_spacing'] = $info['font_size']; @@ -579,15 +579,15 @@ protected function getTitle() $svg_subtext = new Text($this, $info['sfont']); if($svg_subtext->strlen($info['stitle']) > 0) { - $info['sfont_size'] = $this->getOption('graph_subtitle_font_size', - 'graph_title_font_size'); + $info['sfont_size'] = Number::units($this->getOption('graph_subtitle_font_size', + 'graph_title_font_size')); $info['sweight'] = $this->getOption('graph_subtitle_font_weight', 'graph_title_font_weight'); $info['scolour'] = $this->getOption('graph_subtitle_colour', 'graph_title_colour'); $info['sspace'] = $this->getOption('graph_subtitle_space', 'graph_title_space'); - $info['sline_spacing'] = $this->getOption('graph_subtitle_line_spacing'); + $info['sline_spacing'] = Number::units($this->getOption('graph_subtitle_line_spacing')); if($info['sline_spacing'] === null || $info['sline_spacing'] < 1) $info['sline_spacing'] = $info['sfont_size']; diff --git a/classes/vendor/goat1000/svggraph/Guidelines.php b/classes/vendor/goat1000/svggraph/Guidelines.php index 86330ec..c580b83 100644 --- a/classes/vendor/goat1000/svggraph/Guidelines.php +++ b/classes/vendor/goat1000/svggraph/Guidelines.php @@ -1,6 +1,6 @@ guidelines = []; // set up options - $opts = ['above', 'dash', 'font', 'font_adjust', 'font_size', - 'font_weight', 'length', 'length_units', 'opacity', 'stroke_width', - 'text_align', 'text_angle', 'text_padding', 'text_position', 'line_spacing']; + $opts = ['above', 'dash', 'font', 'font_adjust', 'font_weight', + 'length', 'length_units', 'opacity', 'stroke_width', + 'text_align', 'text_angle', 'text_padding', 'text_position' ]; foreach($opts as $opt) $this->{$opt} = $graph->getOption('guideline_' . $opt); @@ -80,6 +80,8 @@ public function __construct(&$graph, $flip_axes, $assoc, $datetime) $graph->getOption('guideline_text_colour', 'guideline_colour')); $this->text_opacity = $graph->getOption('guideline_text_opacity', 'guideline_opacity'); + $this->font_size = Number::units($graph->getOption('guideline_font_size')); + $this->line_spacing = Number::units($graph->getOption('guideline_line_spacing')); $lines = $this->normalize($lines); foreach($lines as $line) @@ -154,7 +156,6 @@ protected function calculate($g) $text_opts = [ 'opacity' => 'opacity', 'font' => 'font-family', - 'font_size' => 'font-size', 'font_weight' => 'font-weight', 'text_opacity' => 'opacity', // overrides line opacity @@ -164,7 +165,6 @@ protected function calculate($g) 'text_padding' => 'text_padding', 'text_angle' => 'text_angle', 'text_align' => 'text_align', - 'line_spacing' => 'line_spacing', ]; // handle colours first @@ -177,6 +177,12 @@ protected function calculate($g) $topts['fill'] = new Colour($this->graph, $g['text_colour']); } + // font size and line spacing + if(isset($g['font_size'])) + $topts['font-size'] = Number::units($g['font_size']); + if(isset($g['line_spacing'])) + $topts['line_spacing'] = Number::units($g['line_spacing']); + // copy other options to line or text array foreach($line_opts as $okey => $opt) if(isset($g[$okey])) diff --git a/classes/vendor/goat1000/svggraph/Javascript.php b/classes/vendor/goat1000/svggraph/Javascript.php index 6af2a01..9b80ad8 100644 --- a/classes/vendor/goat1000/svggraph/Javascript.php +++ b/classes/vendor/goat1000/svggraph/Javascript.php @@ -1,6 +1,6 @@ addFuncs('getE', 'setattr', 'newel', 'newtext'); - $opts = ['padding', 'colour', 'font', 'font_size', 'font_weight', - 'line_spacing', 'align']; + $opts = ['padding', 'colour', 'font', 'font_weight', 'align']; $vars = []; foreach($opts as $opt) $vars[$opt] = $this->graph->getOption('tooltip_' . $opt); + $vars['font_size'] = Number::units($this->graph->getOption('tooltip_font_size')); + $vars['line_spacing'] = Number::units($this->graph->getOption('tooltip_line_spacing')); $vars['colour'] = new Colour($this->graph, $vars['colour'], false, false); $vars['ttoffset'] = $vars['font_size'] + $vars['padding']; if($vars['line_spacing'] === null || $vars['line_spacing'] < 1) diff --git a/classes/vendor/goat1000/svggraph/Legend.php b/classes/vendor/goat1000/svggraph/Legend.php index 91dea32..b5799df 100644 --- a/classes/vendor/goat1000/svggraph/Legend.php +++ b/classes/vendor/goat1000/svggraph/Legend.php @@ -67,7 +67,7 @@ public function __construct(&$graph) // copy options to class $opts = ['autohide', 'autohide_opacity', 'back_colour', 'colour', 'columns', 'draggable', 'entries', 'entry_height', 'entry_width', 'font', - 'font_adjust', 'font_size', 'font_weight', 'position', 'round', + 'font_adjust', 'font_weight', 'position', 'round', 'shadow_opacity', 'show_empty', 'stroke_colour', 'stroke_width', 'text_side', 'title', 'title_link', 'title_font_weight', 'type', 'unique_fields']; @@ -76,17 +76,18 @@ public function __construct(&$graph) } // slightly more complicated options + $this->font_size = Number::units($graph->getOption('legend_font_size')); $this->title_colour = $graph->getOption('legend_title_colour', 'legend_colour'); $this->title_font = $graph->getOption('legend_title_font', 'legend_font'); $this->title_font_adjust = $graph->getOption('legend_title_font_adjust', 'legend_font_adjust'); - $this->title_font_size = $graph->getOption('legend_title_font_size', - 'legend_font_size'); - $this->line_spacing = $graph->getOption('legend_line_spacing'); + $this->title_font_size = Number::units($graph->getOption('legend_title_font_size', + 'legend_font_size')); + $this->line_spacing = Number::units($graph->getOption('legend_line_spacing')); if($this->line_spacing === null || $this->line_spacing < 1) $this->line_spacing = $this->font_size; - $this->title_line_spacing = $graph->getOption('legend_title_line_spacing'); + $this->title_line_spacing = Number::units($graph->getOption('legend_title_line_spacing')); if($this->title_line_spacing === null || $this->title_line_spacing < 1) $this->title_line_spacing = $this->title_font_size; } diff --git a/classes/vendor/goat1000/svggraph/Matrix.php b/classes/vendor/goat1000/svggraph/Matrix.php new file mode 100644 index 0000000..a00b1e3 --- /dev/null +++ b/classes/vendor/goat1000/svggraph/Matrix.php @@ -0,0 +1,346 @@ +. + */ +/** + * For more information, please contact + */ + +namespace Goat1000\SVGGraph; + +/** + * Class for matrix maths + */ +class Matrix { + private $rows = 0; + private $cols = 0; + private $data = []; + const MAX_SIZE = 100000; + + public function __construct($r, $c) + { + if(!is_int($c) || !is_int($r) || $c < 1 || $r < 1) + throw new \InvalidArgumentException("{$r}\u{00d7}{$c} matrix size invalid"); + if($c * $r > Matrix::MAX_SIZE) + throw new \InvalidArgumentException("{$r}\u{00d7}{$c} matrix too large"); + + $this->rows = $r; + $this->cols = $c; + $this->data = array_fill(0, $c * $r, 0); + } + + /** + * Returns the number of rows and cols in an array + */ + public function dimensions() + { + return [$this->rows, $this->cols]; + } + + /** + * Returns the size as a string + */ + public function size() + { + return $this->rows . "\u{00d7}" . $this->cols; + } + + /** + * Element access + */ + public function &__invoke($r, $c, $v = null) + { + if($c < 0 || $r < 0 || $c >= $this->cols || $r >= $this->rows) + throw new \InvalidArgumentException("({$r},{$c}) out of range of " . + $this->size() . " matrix"); + + $item = $this->cols * $r + $c; + if($v !== null) { + if(!is_numeric($v)) + throw new \InvalidArgumentException("Matrix values must be numeric"); + if(is_string($v)) + $this->data[$item] = $v; + elseif(is_int($v)) + $this->data[$item] = (string)$v; + else + $this->data[$item] = sprintf("%.40F", $v); + } + return $this->data[$item]; + } + + /** + * Fill the array with values (row-major order) + */ + public function load(array $values) + { + for($i = 0; $i < $this->rows * $this->cols; ++$i) { + $value = $values[$i]; + if(isset($value) && is_numeric($value)) { + $this->data[$i] = is_int($value) ? (string)$value : + sprintf("%.40F", $value); + } + } + } + + /** + * Sets the identity matrix + */ + public function identity() + { + if($this->rows != $this->cols) + throw new \Exception($this->size() . " not a square matrix"); + $this->data = array_fill(0, $this->rows * $this->cols, 0); + for($i = 0; $i < $this->rows; ++$i) + $this->data[($i * $this->rows) + $i] = 1; + } + + /** + * Return the transpose of the matrix + */ + public function transpose() + { + $tc = $this->rows; + $tr = $this->cols; + $result = new Matrix($tr, $tc); + + // row or column vector = same data when transposed + if($tc == 1 || $tr == 1) { + $result->data = $this->data; + return $result; + } + + for($c = 0; $c < $tc; ++$c) { + for($r = 0; $r < $tr; ++$r) { + $result($r, $c, $this($c, $r)); + } + } + return $result; + } + + /** + * Add two matrices + */ + public function add(Matrix $m, $bcscale = 50) + { + if($m->rows != $this->rows || $m->cols != $this->cols) + throw new \InvalidArgumentException("Cannot add " . $this->size() . + " and " . $m->size() . " matrices."); + + $old_scale = bcscale($bcscale); + $result = new Matrix($this->cols, $this->rows); + foreach($this->data as $k => $value) + $result->data[$k] = bcadd($value, $m->data[$k]); + + bcscale($old_scale); + return $result; + } + + /** + * Subtract a matrix + */ + public function subtract(Matrix $m, $bcscale = 50) + { + if($m->rows != $this->rows || $m->cols != $this->cols) + throw new \InvalidArgumentException("Cannot subtract " . $m->size() . + " matrix from " . $this->size() . " matrix."); + + $old_scale = bcscale($bcscale); + $result = new Matrix($this->cols, $this->rows); + foreach($this->data as $k => $value) + $result->data[$k] = bcsub($value, $m->data[$k]); + + bcscale($old_scale); + return $result; + } + + /** + * Multiplication by a matrix + */ + public function multiply(Matrix $m1, $bcscale = 50) + { + if($this->cols != $m1->rows) + throw new \InvalidArgumentException("Cannot multiply " . $this->size() . + " matrix by " . $m1->size() . " matrix."); + $m = $this->rows; + $n = $this->cols; + $p = $m1->cols; + + $old_scale = bcscale($bcscale); + $result = new Matrix($m, $p); + for($i = 0; $i < $m; ++$i) { + for($j = 0; $j < $p; ++$j) { + $value = "0"; + for($k = 0; $k < $n; ++$k) { + $value = bcadd($value, bcmul($this($i, $k), $m1($k, $j))); + } + $result($i, $j, $value); + } + } + + bcscale($old_scale); + return $result; + } + + /** + * Gaussian elimination + */ + public function gaussian($bcscale = 50) + { + $old_scale = bcscale($bcscale); + + $argmax = function($a, $b, $m, $col) { + $max = 0; + $max_i = 0; + for($i = $a; $i < $b; ++$i) { + $value = $m($a, $col); + if(bccomp($value, "0") == -1) + $value = bcmul($value, "-1"); + if(bccomp($value, $max) == 1) { + $max_i = $i; + $max = $value; + } + return $max_i; + } + }; + + $m = $this->rows; + $n = $this->cols; + $h = $k = 0; + while($h < $m && $k < $n) { + $i_max = $argmax($h, $m, $this, $k); + if($this($i_max, $k) == 0) { + ++$k; + } else { + $this->rowSwap($h, $i_max); + for($i = $h + 1; $i < $m; ++$i) { + $f = bcdiv($this($i, $k), $this($h, $k)); + $this($i, $k, 0); + for($j = $k + 1; $j < $n; ++$j) { + $val = bcsub($this($i, $j), bcmul($this($h, $j), $f)); + $this($i, $j, $val); + } + } + ++$h; + ++$k; + } + } + + bcscale($old_scale); + } + + /** + * Use Gaussian elimination to solve the equations with given RHS + */ + public function gaussian_solve(Matrix $rhs, $bcscale = 50) + { + $a = $this->augment($rhs); + $a->gaussian($bcscale); + return $this->solve($a, $bcscale); + } + + /** + * Creates a new matrix with $this on left and $rhs on right + */ + public function augment(Matrix $rhs) + { + $m = $this->rows; + $n = $this->cols + $rhs->cols; + $aug = new Matrix($m, $n); + + $c = 0; + for($i = 0; $i < $m; ++$i) { + for($j = 0; $j < $this->cols; ++$j) + $aug->data[$c++] = $this($i, $j); + for($j = 0; $j < $rhs->cols; ++$j) + $aug->data[$c++] = $rhs($i, $j); + } + return $aug; + } + + /** + * Solves simultaneous equations using Gaussian elimination + */ + public function solve(Matrix $a, $bcscale) + { + $result = new Matrix(1, $a->rows); + $old_scale = bcscale($bcscale); + + // back substitution + $m = $a->rows; + $n = $a->cols; + for($i = $m - 1; $i >= 0; --$i) { + for($j = $n - 2; $j > $i; --$j) { + $value = bcsub($a($i, $n - 1), + bcmul($a($i, $j), $result(0, $j))); + $a($i, $n - 1, $value); + $a($i, $j, 0); + } + $d = $a($i, $i); + if($d == 0) + return null; + $value = bcdiv($a($i, $n - 1), $a($i, $i)); + $result(0, $i, $value); + } + + bcscale($old_scale); + return $result; + } + + /** + * Swaps two rows + */ + public function rowSwap($r1, $r2) + { + for($i = 0; $i < $this->cols; ++$i) { + $c = $this($r1, $i); + $this($r1, $i, $this($r2, $i)); + $this($r2, $i, $c); + } + } + + /** + * Output as string for debugging + */ + public function __toString() + { + $str = ''; + $m = 0; + foreach($this->data as $v) { + $m1 = abs($v); + if($m1 > $m) + $m = $m1; + } + + $digits = max(9,(int)log($m, 10) + 6); + for($r = 0; $r < $this->rows; ++$r) { + $str .= "\t"; + $r_offset = $r * $this->cols; + for($c = 0; $c < $this->cols; ++$c) { + $str .= sprintf(" %{$digits}.4f", $this->data[$r_offset + $c]); + } + $str .= "\n"; + } + return $str; + } + + /** + * Returns the data array + */ + public function asArray() + { + return $this->data; + } +} diff --git a/classes/vendor/goat1000/svggraph/Number.php b/classes/vendor/goat1000/svggraph/Number.php index 504198d..24fb373 100644 --- a/classes/vendor/goat1000/svggraph/Number.php +++ b/classes/vendor/goat1000/svggraph/Number.php @@ -1,6 +1,6 @@ units_before . $s . $this->units; } + + /** + * Converts a string with units to a value in SVG user units + */ + public static function units($value) + { + if(is_numeric($value) || $value === null) + return $value; + if(!is_string($value)) + throw new \InvalidArgumentException("Unit value not a string"); + + if(!preg_match('/^([0-9.]+)(px|in|cm|mm|pt|pc)$/', $value, $parts)) + throw new \InvalidArgumentException("Unit value {$value} not in supported format"); + + $count = (float)$parts[1]; + $units = $parts[2]; + $umap = [ + 'px' => 1.0, 'in' => 96.0, 'cm' => 37.795, 'mm' => 3.7795, 'pt' => 1.3333, 'pc' => 16.0 + ]; + return $count * $umap[$units]; + } } diff --git a/classes/vendor/goat1000/svggraph/README.txt b/classes/vendor/goat1000/svggraph/README.txt index 0012f90..31cc981 100644 --- a/classes/vendor/goat1000/svggraph/README.txt +++ b/classes/vendor/goat1000/svggraph/README.txt @@ -1,4 +1,4 @@ -SVGGraph Library version 3.19 +SVGGraph Library version 3.20 ============================= This library provides PHP classes and functions for easily creating SVG diff --git a/classes/vendor/goat1000/svggraph/SVGGraph.php b/classes/vendor/goat1000/svggraph/SVGGraph.php index 16a2fd1..6c7b3d9 100644 --- a/classes/vendor/goat1000/svggraph/SVGGraph.php +++ b/classes/vendor/goat1000/svggraph/SVGGraph.php @@ -25,7 +25,7 @@ class SVGGraph { use SVGGraphTrait; - const VERSION = 'SVGGraph 3.19'; + const VERSION = 'SVGGraph 3.20'; private $width = 100; private $height = 100; private $settings = []; diff --git a/classes/vendor/goat1000/svggraph/Text.php b/classes/vendor/goat1000/svggraph/Text.php index b72abd5..da3dd69 100644 --- a/classes/vendor/goat1000/svggraph/Text.php +++ b/classes/vendor/goat1000/svggraph/Text.php @@ -1,6 +1,6 @@ 0 ? $this->splitLines($text) : [$text]; $width = $height = 0; foreach($lines as $l) { @@ -259,6 +265,9 @@ private function getCacheKey($text, $font_size, $angle, $line_spacing) */ public function baseline($font_size) { + if(!is_numeric($font_size)) + throw new \InvalidArgumentException("Font size is not numeric"); + $metrics = $this->no_metrics ? false : $this->loadMetrics($this->font); if($metrics) { @@ -298,6 +307,9 @@ public function text($text, $line_spacing, $attribs, $styles = null) return $this->graph->element('text', $attribs, $styles, $content); } + if($line_spacing !== 0 && !is_numeric($line_spacing)) + throw new \InvalidArgumentException("Line spacing is not numeric"); + $lines = $this->splitLines($text); $content = ''; $group = 'text'; diff --git a/classes/vendor/goat1000/svggraph/TextShape.php b/classes/vendor/goat1000/svggraph/TextShape.php index bf9e7c7..04c5926 100644 --- a/classes/vendor/goat1000/svggraph/TextShape.php +++ b/classes/vendor/goat1000/svggraph/TextShape.php @@ -1,6 +1,6 @@ =7.1.10" + "php": ">=8.1.14" }, "require-dev": { - "composer/xdebug-handler": "^1.3", "ext-reflection": "*", - "paulthebaud/phpunit-generator": "^2.1", - "phan/phan": "^1.3", - "phploc/phploc": "^4.0", - "phpmetrics/phpmetrics": "^2.4", - "phpunit/phpunit": "^7", - "roave/better-reflection": "dev-master#c87d856" + "phan/phan": "*", + "phpmetrics/phpmetrics": "*", + "phpunit/phpunit": "*" }, "type": "library", "autoload": { - "classmap": [ - "sources" - ] + "psr-4": { + "Dallgoot\\Yaml\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -53,13 +49,65 @@ "email": "stephane.rebai@gmail.com" } ], - "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 7.x", + "description": "Provides loader, dumper and an API for YAML content. Loader builds to equivalent data types in PHP 8.x", "homepage": "https://github.com/dallgoot/yaml", "keywords": [ "parser", + "reader", + "writer", "yaml" ], - "time": "2020-01-08T19:03:03+00:00" + "support": { + "issues": "https://github.com/dallgoot/yaml/issues", + "source": "https://github.com/dallgoot/yaml/tree/0.9.1.1" + }, + "funding": [ + { + "url": "https://github.com/dallgoot", + "type": "github" + } + ], + "time": "2023-04-11T09:49:37+00:00" + }, + { + "name": "goat1000/svggraph", + "version": "3.20.0", + "source": { + "type": "git", + "url": "https://github.com/goat1000/SVGGraph.git", + "reference": "99576c9ad38763b8f10e6b03a9cff1ce32604869" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/goat1000/SVGGraph/zipball/99576c9ad38763b8f10e6b03a9cff1ce32604869", + "reference": "99576c9ad38763b8f10e6b03a9cff1ce32604869", + "shasum": "" + }, + "require": { + "ext-json": "*", + "lib-pcre": "*", + "php": ">=5.4.0" + }, + "suggest": { + "ext-iconv": "For non-ASCII text measurement support" + }, + "type": "library", + "autoload": { + "psr-4": { + "Goat1000\\SVGGraph\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-only" + ], + "description": "Generates SVG graphs", + "homepage": "http://www.goat1000.com/svggraph.php", + "support": { + "issues": "https://github.com/goat1000/SVGGraph/issues", + "source": "https://github.com/goat1000/SVGGraph/tree/3.20.0" + }, + "time": "2023-04-25T08:27:40+00:00" } ], "packages-dev": [], @@ -70,5 +118,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/db/install.php b/db/install.php index 56aa56b..1db8b75 100644 --- a/db/install.php +++ b/db/install.php @@ -24,9 +24,12 @@ */ defined('MOODLE_INTERNAL') || die(); -require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/autoload.php'); require_once($CFG->dirroot . '/mod/verbalfeedback/db/upgradelib.php'); -require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/sources/Yaml.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Yaml.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Loader.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Root.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Generic/NodeGeneric.php'); +require_once($CFG->dirroot . '/mod/verbalfeedback/classes/vendor/dallgoot/yaml/src/Nodes/Generic/Actions.php'); use mod_verbalfeedback\model\language; use mod_verbalfeedback\model\localized_string; @@ -40,7 +43,7 @@ use mod_verbalfeedback\repository\template_criterion_repository; use mod_verbalfeedback\repository\template_repository; use mod_verbalfeedback\model\subrating; -use Dallgoot\Yaml; +use Dallgoot\Yaml\Yaml; /** * Install the plugin. diff --git a/thirdpartylibs.xml b/thirdpartylibs.xml index 38f8693..1cf22fa 100644 --- a/thirdpartylibs.xml +++ b/thirdpartylibs.xml @@ -10,7 +10,7 @@ classes/vendor/dallgoot/yaml/ Dallgoot : YAML library for PHP - v0.3.2 + 0.9.1.1 Apache 2.0