summaryrefslogtreecommitdiff
path: root/www/wiki/vendor
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2019-08-22 21:22:00 -0300
committerYaco <franco@reevo.org>2019-08-22 21:22:00 -0300
commit34956fa757491949dc68396d090580d500249546 (patch)
treebfa500efa885912165bda62e7b40bd6cb1dff953 /www/wiki/vendor
parent92d1eb656bbc80dcc33e0c17eefaff80537f7d02 (diff)
agrega ModernTimeline y actualiza otras extensiones
Diffstat (limited to 'www/wiki/vendor')
-rw-r--r--www/wiki/vendor/composer/autoload_classmap.php51
-rw-r--r--www/wiki/vendor/composer/autoload_files.php1
-rw-r--r--www/wiki/vendor/composer/autoload_psr4.php3
-rw-r--r--www/wiki/vendor/composer/autoload_static.php67
-rw-r--r--www/wiki/vendor/composer/installed.json178
-rw-r--r--www/wiki/vendor/composer/installers/composer.json2
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php10
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php20
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/Installer.php4
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php11
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php100
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php1
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php10
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php12
-rw-r--r--www/wiki/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php13
-rw-r--r--www/wiki/vendor/param-processor/param-processor/.travis.yml4
-rw-r--r--www/wiki/vendor/param-processor/param-processor/IdeHelper.php10
-rw-r--r--www/wiki/vendor/param-processor/param-processor/README.md80
-rw-r--r--www/wiki/vendor/param-processor/param-processor/composer.json14
-rw-r--r--www/wiki/vendor/param-processor/param-processor/phpcs.xml12
-rw-r--r--www/wiki/vendor/param-processor/param-processor/phpmd.xml16
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Definition/DimensionParam.php65
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Definition/StringParam.php4
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/IParam.php4
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/IParamDefinition.php37
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Options.php6
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/DimensionParser.php44
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/Param.php418
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/ParamType.php58
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Param.php516
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ParamDefinition.php360
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ParamDefinitionFactory.php171
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ParameterTypes.php71
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ProcessingError.php12
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ProcessingErrorHandler.php28
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/ProcessingResult.php13
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Processor.php92
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/Settings.php2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/src/TopologicalSort.php15
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/BoolParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/BoolParamTest.php)2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/FloatParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/FloatParamTest.php)2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/IntParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/IntParamTest.php)2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/NumericParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/NumericParamTest.php)2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/ParamDefinitionTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/ParamDefinitionTest.php)15
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/StringParamTest.php)13
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/DimensionTypeTest.php208
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Integration/ProcessorTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessorTest.php)33
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/OptionsTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/OptionsTest.php)12
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/PackagePrivate/DimensionParserTest.php51
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamAliasTest.php21
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamDefinitionFactoryTest.php140
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamTest.php)6
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/ParameterTypesTest.php75
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/ProcessingResultTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessingResultTest.php)36
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php (renamed from www/wiki/vendor/param-processor/param-processor/tests/phpunit/SettingsTest.php)2
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/DimensionParamTest.php106
-rw-r--r--www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamDefinitionFactoryTest.php23
57 files changed, 1893 insertions, 1391 deletions
diff --git a/www/wiki/vendor/composer/autoload_classmap.php b/www/wiki/vendor/composer/autoload_classmap.php
index 03595271..f092b4f6 100644
--- a/www/wiki/vendor/composer/autoload_classmap.php
+++ b/www/wiki/vendor/composer/autoload_classmap.php
@@ -45,6 +45,7 @@ return array(
'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
+ 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
@@ -62,6 +63,7 @@ return array(
'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
+ 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
@@ -96,6 +98,7 @@ return array(
'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
+ 'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
@@ -106,6 +109,7 @@ return array(
'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
+ 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
@@ -596,6 +600,7 @@ return array(
'Maps\\Presentation\\CoordinateFormatter' => $baseDir . '/extensions/Maps/src/Presentation/CoordinateFormatter.php',
'Maps\\Presentation\\ElementJsonSerializer' => $baseDir . '/extensions/Maps/src/Presentation/ElementJsonSerializer.php',
'Maps\\Presentation\\KmlFormatter' => $baseDir . '/extensions/Maps/src/Presentation/KmlFormatter.php',
+ 'Maps\\Presentation\\MapHtmlBuilder' => $baseDir . '/extensions/Maps/src/Presentation/MapHtmlBuilder.php',
'Maps\\Presentation\\MapsDistanceParser' => $baseDir . '/extensions/Maps/src/Presentation/MapsDistanceParser.php',
'Maps\\Presentation\\ParameterExtractor' => $baseDir . '/extensions/Maps/src/Presentation/ParameterExtractor.php',
'Maps\\Presentation\\WikitextParser' => $baseDir . '/extensions/Maps/src/Presentation/WikitextParser.php',
@@ -648,6 +653,25 @@ return array(
'Maps\\Tests\\Unit\\Semantic\\DataValues\\CoordinateValueTest' => $baseDir . '/extensions/Maps/tests/Unit/Semantic/DataValues/CoordinateValueTest.php',
'Maps\\Tests\\Util\\PageCreator' => $baseDir . '/extensions/Maps/tests/Util/PageCreator.php',
'Maps\\Tests\\Util\\TestFactory' => $baseDir . '/extensions/Maps/tests/Util/TestFactory.php',
+ 'Mermaid\\HookRegistry' => $baseDir . '/extensions/Mermaid/src/HookRegistry.php',
+ 'Mermaid\\MermaidParserFunction' => $baseDir . '/extensions/Mermaid/src/MermaidParserFunction.php',
+ 'ModernTimeline\\Event' => $baseDir . '/extensions/ModernTimeline/src/Event.php',
+ 'ModernTimeline\\JsonBuilder' => $baseDir . '/extensions/ModernTimeline/src/JsonBuilder.php',
+ 'ModernTimeline\\ModernTimelinePrinter' => $baseDir . '/extensions/ModernTimeline/src/ModernTimelinePrinter.php',
+ 'ModernTimeline\\ModernTimelineSetup' => $baseDir . '/extensions/ModernTimeline/src/ModernTimelineSetup.php',
+ 'ModernTimeline\\ResultFacade\\PropertyValueCollection' => $baseDir . '/extensions/ModernTimeline/src/ResultFacade/PropertyValueCollection.php',
+ 'ModernTimeline\\ResultFacade\\ResultSimplifier' => $baseDir . '/extensions/ModernTimeline/src/ResultFacade/ResultSimplifier.php',
+ 'ModernTimeline\\ResultFacade\\Subject' => $baseDir . '/extensions/ModernTimeline/src/ResultFacade/Subject.php',
+ 'ModernTimeline\\ResultFacade\\SubjectCollection' => $baseDir . '/extensions/ModernTimeline/src/ResultFacade/SubjectCollection.php',
+ 'ModernTimeline\\SlidePresenter\\SimpleSlidePresenter' => $baseDir . '/extensions/ModernTimeline/src/SlidePresenter/SimpleSlidePresenter.php',
+ 'ModernTimeline\\SlidePresenter\\SlidePresenter' => $baseDir . '/extensions/ModernTimeline/src/SlidePresenter/SlidePresenter.php',
+ 'ModernTimeline\\SlidePresenter\\TemplateSlidePresenter' => $baseDir . '/extensions/ModernTimeline/src/SlidePresenter/TemplateSlidePresenter.php',
+ 'ModernTimeline\\Tests\\Integration\\OptionsTest' => $baseDir . '/extensions/ModernTimeline/tests/Integration/OptionsTest.php',
+ 'ModernTimeline\\Tests\\System\\JsonScriptTest' => $baseDir . '/extensions/ModernTimeline/tests/System/JsonScriptTest.php',
+ 'ModernTimeline\\Tests\\Unit\\JsonBuilderTest' => $baseDir . '/extensions/ModernTimeline/tests/Unit/JsonBuilderTest.php',
+ 'ModernTimeline\\Tests\\Unit\\SlidePresenter\\TemplateSlidePresenterTest' => $baseDir . '/extensions/ModernTimeline/tests/Unit/SlidePresenter/TemplateSlidePresenterTest.php',
+ 'ModernTimeline\\TimelineOptions' => $baseDir . '/extensions/ModernTimeline/src/TimelineOptions.php',
+ 'ModernTimeline\\TimelinePresenter' => $baseDir . '/extensions/ModernTimeline/src/TimelinePresenter.php',
'Net_SMTP' => $vendorDir . '/pear/net_smtp/Net/SMTP.php',
'Net_Socket' => $vendorDir . '/pear/net_socket/Net/Socket.php',
'OOUI\\AccessKeyedElement' => $vendorDir . '/oojs/oojs-ui/php/mixins/AccessKeyedElement.php',
@@ -777,13 +801,14 @@ return array(
'PEAR_ErrorStack' => $vendorDir . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => $vendorDir . '/pear/pear_exception/PEAR/Exception.php',
'PEAR_ExceptionTest' => $vendorDir . '/pear/pear_exception/tests/PEAR/ExceptionTest.php',
- 'ParamProcessor\\Definition\\DimensionParam' => $vendorDir . '/param-processor/param-processor/src/Definition/DimensionParam.php',
'ParamProcessor\\Definition\\StringParam' => $vendorDir . '/param-processor/param-processor/src/Definition/StringParam.php',
'ParamProcessor\\IParam' => $vendorDir . '/param-processor/param-processor/src/IParam.php',
'ParamProcessor\\IParamDefinition' => $vendorDir . '/param-processor/param-processor/src/IParamDefinition.php',
'ParamProcessor\\MediaWikiTitleValue' => $baseDir . '/extensions/Validator/src/ParamProcessor/MediaWikiTitleValue.php',
'ParamProcessor\\Options' => $vendorDir . '/param-processor/param-processor/src/Options.php',
- 'ParamProcessor\\Param' => $vendorDir . '/param-processor/param-processor/src/Param.php',
+ 'ParamProcessor\\PackagePrivate\\DimensionParser' => $vendorDir . '/param-processor/param-processor/src/PackagePrivate/DimensionParser.php',
+ 'ParamProcessor\\PackagePrivate\\Param' => $vendorDir . '/param-processor/param-processor/src/PackagePrivate/Param.php',
+ 'ParamProcessor\\PackagePrivate\\ParamType' => $vendorDir . '/param-processor/param-processor/src/PackagePrivate/ParamType.php',
'ParamProcessor\\ParamDefinition' => $vendorDir . '/param-processor/param-processor/src/ParamDefinition.php',
'ParamProcessor\\ParamDefinitionFactory' => $vendorDir . '/param-processor/param-processor/src/ParamDefinitionFactory.php',
'ParamProcessor\\ParameterTypes' => $vendorDir . '/param-processor/param-processor/src/ParameterTypes.php',
@@ -794,8 +819,6 @@ return array(
'ParamProcessor\\Processor' => $vendorDir . '/param-processor/param-processor/src/Processor.php',
'ParamProcessor\\Settings' => $vendorDir . '/param-processor/param-processor/src/Settings.php',
'ParamProcessor\\TSNode' => $vendorDir . '/param-processor/param-processor/src/TopologicalSort.php',
- 'ParamProcessor\\Tests\\Definitions\\NumericParamTest' => $vendorDir . '/param-processor/param-processor/tests/phpunit/Definitions/NumericParamTest.php',
- 'ParamProcessor\\Tests\\Definitions\\ParamDefinitionTest' => $vendorDir . '/param-processor/param-processor/tests/phpunit/Definitions/ParamDefinitionTest.php',
'ParamProcessor\\TitleParser' => $baseDir . '/extensions/Validator/src/ParamProcessor/TitleParser.php',
'ParamProcessor\\TopologicalSort' => $vendorDir . '/param-processor/param-processor/src/TopologicalSort.php',
'ParserHook' => $baseDir . '/extensions/Validator/src/legacy/ParserHook.php',
@@ -919,7 +942,6 @@ return array(
'SFS\\Output' => $baseDir . '/extensions/SemanticFormsSelect/src/Output.php',
'SFS\\SelectField' => $baseDir . '/extensions/SemanticFormsSelect/src/SelectField.php',
'SFS\\SemanticFormsSelectInput' => $baseDir . '/extensions/SemanticFormsSelect/src/SemanticFormsSelectInput.php',
- 'SMWBibTeXEntry' => $baseDir . '/extensions/SemanticResultFormats/formats/bibtex/SRF_BibTeX.php',
'SMWCategoryResultPrinter' => $baseDir . '/extensions/SemanticMediaWiki/includes/IdeAliases.php',
'SMWConceptValue' => $baseDir . '/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Concept.php',
'SMWDIBlob' => $baseDir . '/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Blob.php',
@@ -1714,7 +1736,6 @@ return array(
'SMW\\Utils\\Tokenizer' => $baseDir . '/extensions/SemanticMediaWiki/src/Utils/Tokenizer.php',
'SMW\\WantedPropertiesQueryPage' => $baseDir . '/extensions/SemanticMediaWiki/includes/querypages/WantedPropertiesQueryPage.php',
'SRFArray' => $baseDir . '/extensions/SemanticResultFormats/formats/array/SRF_Array.php',
- 'SRFBibTeX' => $baseDir . '/extensions/SemanticResultFormats/formats/bibtex/SRF_BibTeX.php',
'SRFBoilerplate' => $baseDir . '/extensions/SemanticResultFormats/formats/boilerplate/SRF_Boilerplate.php',
'SRFCHistoricalDate' => $baseDir . '/extensions/SemanticResultFormats/formats/calendar/SRFC_HistoricalDate.php',
'SRFCalendar' => $baseDir . '/extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php',
@@ -1723,16 +1744,12 @@ return array(
'SRFExhibit' => $baseDir . '/extensions/SemanticResultFormats/formats/Exhibit/SRF_Exhibit.php',
'SRFGoogleBar' => $baseDir . '/extensions/SemanticResultFormats/formats/googlecharts/SRF_GoogleBar.php',
'SRFGooglePie' => $baseDir . '/extensions/SemanticResultFormats/formats/googlecharts/SRF_GooglePie.php',
- 'SRFGraph' => $baseDir . '/extensions/SemanticResultFormats/formats/graphviz/SRF_Graph.php',
'SRFHash' => $baseDir . '/extensions/SemanticResultFormats/formats/array/SRF_Hash.php',
'SRFHooks' => $baseDir . '/extensions/SemanticResultFormats/SemanticResultFormats.hooks.php',
'SRFIncoming' => $baseDir . '/extensions/SemanticResultFormats/formats/incoming/SRF_Incoming.php',
'SRFJitGraph' => $baseDir . '/extensions/SemanticResultFormats/formats/JitGraph/SRF_JitGraph.php',
'SRFListWidget' => $baseDir . '/extensions/SemanticResultFormats/formats/widget/SRF_ListWidget.php',
'SRFMath' => $baseDir . '/extensions/SemanticResultFormats/formats/math/SRF_Math.php',
- 'SRFOutline' => $baseDir . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
- 'SRFOutlineItem' => $baseDir . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
- 'SRFOutlineTree' => $baseDir . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
'SRFPageWidget' => $baseDir . '/extensions/SemanticResultFormats/formats/widget/SRF_PageWidget.php',
'SRFParserFunctions' => $baseDir . '/extensions/SemanticResultFormats/SemanticResultFormats.parser.php',
'SRFProcess' => $baseDir . '/extensions/SemanticResultFormats/formats/graphviz/SRF_Process.php',
@@ -1744,6 +1761,8 @@ return array(
'SRFTimeseries' => $baseDir . '/extensions/SemanticResultFormats/formats/timeseries/SRF_Timeseries.php',
'SRFUtils' => $baseDir . '/extensions/SemanticResultFormats/SemanticResultFormats.utils.php',
'SRFValueRank' => $baseDir . '/extensions/SemanticResultFormats/formats/valuerank/SRF_ValueRank.php',
+ 'SRF\\BibTex\\BibTexFileExportPrinter' => $baseDir . '/extensions/SemanticResultFormats/src/BibTex/BibTexFileExportPrinter.php',
+ 'SRF\\BibTex\\Item' => $baseDir . '/extensions/SemanticResultFormats/src/BibTex/Item.php',
'SRF\\DataTables' => $baseDir . '/extensions/SemanticResultFormats/formats/datatables/DataTables.php',
'SRF\\EventCalendar' => $baseDir . '/extensions/SemanticResultFormats/formats/calendar/EventCalendar.php',
'SRF\\Filtered\\Filter\\DistanceFilter' => $baseDir . '/extensions/SemanticResultFormats/formats/filtered/src/Filters/DistanceFilter.php',
@@ -1762,9 +1781,19 @@ return array(
'SRF\\Formats\\Tree\\TreeNodePrinter' => $baseDir . '/extensions/SemanticResultFormats/formats/tree/TreeNodeVisitor.php',
'SRF\\Formats\\Tree\\TreeResultPrinter' => $baseDir . '/extensions/SemanticResultFormats/formats/tree/TreeResultPrinter.php',
'SRF\\Gallery' => $baseDir . '/extensions/SemanticResultFormats/formats/gallery/Gallery.php',
+ 'SRF\\Gantt\\Gantt' => $baseDir . '/extensions/SemanticResultFormats/formats/Gantt/src/Gantt.php',
+ 'SRF\\Gantt\\GanttPrinter' => $baseDir . '/extensions/SemanticResultFormats/formats/Gantt/GanttPrinter.php',
+ 'SRF\\Gantt\\GanttSection' => $baseDir . '/extensions/SemanticResultFormats/formats/Gantt/src/GanttSection.php',
+ 'SRF\\Gantt\\GanttTask' => $baseDir . '/extensions/SemanticResultFormats/formats/Gantt/src/GanttTask.php',
+ 'SRF\\Graph\\GraphPrinter' => $baseDir . '/extensions/SemanticResultFormats/src/Graph/GraphPrinter.php',
'SRF\\MediaPlayer' => $baseDir . '/extensions/SemanticResultFormats/formats/media/MediaPlayer.php',
+ 'SRF\\Outline\\ListTreeBuilder' => $baseDir . '/extensions/SemanticResultFormats/src/Outline/ListTreeBuilder.php',
+ 'SRF\\Outline\\OutlineItem' => $baseDir . '/extensions/SemanticResultFormats/src/Outline/OutlineItem.php',
+ 'SRF\\Outline\\OutlineResultPrinter' => $baseDir . '/extensions/SemanticResultFormats/src/Outline/OutlineResultPrinter.php',
+ 'SRF\\Outline\\OutlineTree' => $baseDir . '/extensions/SemanticResultFormats/src/Outline/OutlineTree.php',
+ 'SRF\\Outline\\TemplateBuilder' => $baseDir . '/extensions/SemanticResultFormats/src/Outline/TemplateBuilder.php',
'SRF\\ResourceFormatter' => $baseDir . '/extensions/SemanticResultFormats/src/ResourceFormatter.php',
- 'SRF\\SRFExcel' => $baseDir . '/extensions/SemanticResultFormats/formats/excel/SRF_Excel.php',
+ 'SRF\\SpreadsheetPrinter' => $baseDir . '/extensions/SemanticResultFormats/formats/spreadsheet/SpreadsheetPrinter.php',
'SRF\\TagCloud' => $baseDir . '/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php',
'SRF\\iCalendar\\IcalTimezoneFormatter' => $baseDir . '/extensions/SemanticResultFormats/src/iCalendar/IcalTimezoneFormatter.php',
'SRF\\iCalendar\\iCalendarFileExportPrinter' => $baseDir . '/extensions/SemanticResultFormats/src/iCalendar/iCalendarFileExportPrinter.php',
diff --git a/www/wiki/vendor/composer/autoload_files.php b/www/wiki/vendor/composer/autoload_files.php
index b32426db..cc6650f8 100644
--- a/www/wiki/vendor/composer/autoload_files.php
+++ b/www/wiki/vendor/composer/autoload_files.php
@@ -18,6 +18,7 @@ return array(
'23842c11409ef125f7fd90c8b167279e' => $vendorDir . '/wikimedia/at-ease/src/MediaWiki/Functions.php',
'eccc0347283a01e62f5536bcf76b6e62' => $vendorDir . '/wikimedia/at-ease/src/Wikimedia/Functions.php',
'909f49809564e82b2d61096b70b21283' => $baseDir . '/extensions/Bootstrap/Bootstrap.php',
+ '5a1406346dc1f0175f8532cdd2e4a952' => $baseDir . '/extensions/Mermaid/Mermaid.php',
'c3ae67574219cc56cab6c30ef8877b85' => $baseDir . '/extensions/Validator/Validator.php',
'd5ece1612187536cca0f0d445ce68f45' => $baseDir . '/skins/chameleon/Chameleon.php',
'cb42de33506561e6b5fe72b72238a9a0' => $baseDir . '/skins/chameleon/src/SkinChameleon.php',
diff --git a/www/wiki/vendor/composer/autoload_psr4.php b/www/wiki/vendor/composer/autoload_psr4.php
index 4e71ca4f..b9cf4e20 100644
--- a/www/wiki/vendor/composer/autoload_psr4.php
+++ b/www/wiki/vendor/composer/autoload_psr4.php
@@ -39,6 +39,9 @@ return array(
'Onoi\\CallbackContainer\\' => array($vendorDir . '/onoi/callback-container/src'),
'Onoi\\Cache\\' => array($vendorDir . '/onoi/cache/src'),
'Onoi\\BlobStore\\' => array($vendorDir . '/onoi/blob-store/src'),
+ 'ModernTimeline\\Tests\\' => array($baseDir . '/extensions/ModernTimeline/tests'),
+ 'ModernTimeline\\' => array($baseDir . '/extensions/ModernTimeline/src'),
+ 'Mermaid\\' => array($baseDir . '/extensions/Mermaid/src'),
'Maps\\Tests\\' => array($baseDir . '/extensions/Maps/tests'),
'Maps\\' => array($baseDir . '/extensions/Maps/src'),
'Jeroen\\SimpleGeocoder\\' => array($vendorDir . '/jeroen/simple-geocoder/src'),
diff --git a/www/wiki/vendor/composer/autoload_static.php b/www/wiki/vendor/composer/autoload_static.php
index e9970072..58689690 100644
--- a/www/wiki/vendor/composer/autoload_static.php
+++ b/www/wiki/vendor/composer/autoload_static.php
@@ -19,6 +19,7 @@ class ComposerStaticInit_mediawiki_vendor
'23842c11409ef125f7fd90c8b167279e' => __DIR__ . '/..' . '/wikimedia/at-ease/src/MediaWiki/Functions.php',
'eccc0347283a01e62f5536bcf76b6e62' => __DIR__ . '/..' . '/wikimedia/at-ease/src/Wikimedia/Functions.php',
'909f49809564e82b2d61096b70b21283' => __DIR__ . '/../..' . '/extensions/Bootstrap/Bootstrap.php',
+ '5a1406346dc1f0175f8532cdd2e4a952' => __DIR__ . '/../..' . '/extensions/Mermaid/Mermaid.php',
'c3ae67574219cc56cab6c30ef8877b85' => __DIR__ . '/../..' . '/extensions/Validator/Validator.php',
'd5ece1612187536cca0f0d445ce68f45' => __DIR__ . '/../..' . '/skins/chameleon/Chameleon.php',
'cb42de33506561e6b5fe72b72238a9a0' => __DIR__ . '/../..' . '/skins/chameleon/src/SkinChameleon.php',
@@ -87,6 +88,9 @@ class ComposerStaticInit_mediawiki_vendor
),
'M' =>
array (
+ 'ModernTimeline\\Tests\\' => 21,
+ 'ModernTimeline\\' => 15,
+ 'Mermaid\\' => 8,
'Maps\\Tests\\' => 11,
'Maps\\' => 5,
),
@@ -261,6 +265,18 @@ class ComposerStaticInit_mediawiki_vendor
array (
0 => __DIR__ . '/..' . '/onoi/blob-store/src',
),
+ 'ModernTimeline\\Tests\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/extensions/ModernTimeline/tests',
+ ),
+ 'ModernTimeline\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/extensions/ModernTimeline/src',
+ ),
+ 'Mermaid\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/extensions/Mermaid/src',
+ ),
'Maps\\Tests\\' =>
array (
0 => __DIR__ . '/../..' . '/extensions/Maps/tests',
@@ -428,6 +444,7 @@ class ComposerStaticInit_mediawiki_vendor
'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
+ 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
@@ -445,6 +462,7 @@ class ComposerStaticInit_mediawiki_vendor
'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
+ 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
@@ -479,6 +497,7 @@ class ComposerStaticInit_mediawiki_vendor
'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
+ 'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
@@ -489,6 +508,7 @@ class ComposerStaticInit_mediawiki_vendor
'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
+ 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
@@ -979,6 +999,7 @@ class ComposerStaticInit_mediawiki_vendor
'Maps\\Presentation\\CoordinateFormatter' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/CoordinateFormatter.php',
'Maps\\Presentation\\ElementJsonSerializer' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/ElementJsonSerializer.php',
'Maps\\Presentation\\KmlFormatter' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/KmlFormatter.php',
+ 'Maps\\Presentation\\MapHtmlBuilder' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/MapHtmlBuilder.php',
'Maps\\Presentation\\MapsDistanceParser' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/MapsDistanceParser.php',
'Maps\\Presentation\\ParameterExtractor' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/ParameterExtractor.php',
'Maps\\Presentation\\WikitextParser' => __DIR__ . '/../..' . '/extensions/Maps/src/Presentation/WikitextParser.php',
@@ -1031,6 +1052,25 @@ class ComposerStaticInit_mediawiki_vendor
'Maps\\Tests\\Unit\\Semantic\\DataValues\\CoordinateValueTest' => __DIR__ . '/../..' . '/extensions/Maps/tests/Unit/Semantic/DataValues/CoordinateValueTest.php',
'Maps\\Tests\\Util\\PageCreator' => __DIR__ . '/../..' . '/extensions/Maps/tests/Util/PageCreator.php',
'Maps\\Tests\\Util\\TestFactory' => __DIR__ . '/../..' . '/extensions/Maps/tests/Util/TestFactory.php',
+ 'Mermaid\\HookRegistry' => __DIR__ . '/../..' . '/extensions/Mermaid/src/HookRegistry.php',
+ 'Mermaid\\MermaidParserFunction' => __DIR__ . '/../..' . '/extensions/Mermaid/src/MermaidParserFunction.php',
+ 'ModernTimeline\\Event' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/Event.php',
+ 'ModernTimeline\\JsonBuilder' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/JsonBuilder.php',
+ 'ModernTimeline\\ModernTimelinePrinter' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ModernTimelinePrinter.php',
+ 'ModernTimeline\\ModernTimelineSetup' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ModernTimelineSetup.php',
+ 'ModernTimeline\\ResultFacade\\PropertyValueCollection' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ResultFacade/PropertyValueCollection.php',
+ 'ModernTimeline\\ResultFacade\\ResultSimplifier' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ResultFacade/ResultSimplifier.php',
+ 'ModernTimeline\\ResultFacade\\Subject' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ResultFacade/Subject.php',
+ 'ModernTimeline\\ResultFacade\\SubjectCollection' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/ResultFacade/SubjectCollection.php',
+ 'ModernTimeline\\SlidePresenter\\SimpleSlidePresenter' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/SlidePresenter/SimpleSlidePresenter.php',
+ 'ModernTimeline\\SlidePresenter\\SlidePresenter' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/SlidePresenter/SlidePresenter.php',
+ 'ModernTimeline\\SlidePresenter\\TemplateSlidePresenter' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/SlidePresenter/TemplateSlidePresenter.php',
+ 'ModernTimeline\\Tests\\Integration\\OptionsTest' => __DIR__ . '/../..' . '/extensions/ModernTimeline/tests/Integration/OptionsTest.php',
+ 'ModernTimeline\\Tests\\System\\JsonScriptTest' => __DIR__ . '/../..' . '/extensions/ModernTimeline/tests/System/JsonScriptTest.php',
+ 'ModernTimeline\\Tests\\Unit\\JsonBuilderTest' => __DIR__ . '/../..' . '/extensions/ModernTimeline/tests/Unit/JsonBuilderTest.php',
+ 'ModernTimeline\\Tests\\Unit\\SlidePresenter\\TemplateSlidePresenterTest' => __DIR__ . '/../..' . '/extensions/ModernTimeline/tests/Unit/SlidePresenter/TemplateSlidePresenterTest.php',
+ 'ModernTimeline\\TimelineOptions' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/TimelineOptions.php',
+ 'ModernTimeline\\TimelinePresenter' => __DIR__ . '/../..' . '/extensions/ModernTimeline/src/TimelinePresenter.php',
'Net_SMTP' => __DIR__ . '/..' . '/pear/net_smtp/Net/SMTP.php',
'Net_Socket' => __DIR__ . '/..' . '/pear/net_socket/Net/Socket.php',
'OOUI\\AccessKeyedElement' => __DIR__ . '/..' . '/oojs/oojs-ui/php/mixins/AccessKeyedElement.php',
@@ -1160,13 +1200,14 @@ class ComposerStaticInit_mediawiki_vendor
'PEAR_ErrorStack' => __DIR__ . '/..' . '/pear/pear-core-minimal/src/PEAR/ErrorStack.php',
'PEAR_Exception' => __DIR__ . '/..' . '/pear/pear_exception/PEAR/Exception.php',
'PEAR_ExceptionTest' => __DIR__ . '/..' . '/pear/pear_exception/tests/PEAR/ExceptionTest.php',
- 'ParamProcessor\\Definition\\DimensionParam' => __DIR__ . '/..' . '/param-processor/param-processor/src/Definition/DimensionParam.php',
'ParamProcessor\\Definition\\StringParam' => __DIR__ . '/..' . '/param-processor/param-processor/src/Definition/StringParam.php',
'ParamProcessor\\IParam' => __DIR__ . '/..' . '/param-processor/param-processor/src/IParam.php',
'ParamProcessor\\IParamDefinition' => __DIR__ . '/..' . '/param-processor/param-processor/src/IParamDefinition.php',
'ParamProcessor\\MediaWikiTitleValue' => __DIR__ . '/../..' . '/extensions/Validator/src/ParamProcessor/MediaWikiTitleValue.php',
'ParamProcessor\\Options' => __DIR__ . '/..' . '/param-processor/param-processor/src/Options.php',
- 'ParamProcessor\\Param' => __DIR__ . '/..' . '/param-processor/param-processor/src/Param.php',
+ 'ParamProcessor\\PackagePrivate\\DimensionParser' => __DIR__ . '/..' . '/param-processor/param-processor/src/PackagePrivate/DimensionParser.php',
+ 'ParamProcessor\\PackagePrivate\\Param' => __DIR__ . '/..' . '/param-processor/param-processor/src/PackagePrivate/Param.php',
+ 'ParamProcessor\\PackagePrivate\\ParamType' => __DIR__ . '/..' . '/param-processor/param-processor/src/PackagePrivate/ParamType.php',
'ParamProcessor\\ParamDefinition' => __DIR__ . '/..' . '/param-processor/param-processor/src/ParamDefinition.php',
'ParamProcessor\\ParamDefinitionFactory' => __DIR__ . '/..' . '/param-processor/param-processor/src/ParamDefinitionFactory.php',
'ParamProcessor\\ParameterTypes' => __DIR__ . '/..' . '/param-processor/param-processor/src/ParameterTypes.php',
@@ -1177,8 +1218,6 @@ class ComposerStaticInit_mediawiki_vendor
'ParamProcessor\\Processor' => __DIR__ . '/..' . '/param-processor/param-processor/src/Processor.php',
'ParamProcessor\\Settings' => __DIR__ . '/..' . '/param-processor/param-processor/src/Settings.php',
'ParamProcessor\\TSNode' => __DIR__ . '/..' . '/param-processor/param-processor/src/TopologicalSort.php',
- 'ParamProcessor\\Tests\\Definitions\\NumericParamTest' => __DIR__ . '/..' . '/param-processor/param-processor/tests/phpunit/Definitions/NumericParamTest.php',
- 'ParamProcessor\\Tests\\Definitions\\ParamDefinitionTest' => __DIR__ . '/..' . '/param-processor/param-processor/tests/phpunit/Definitions/ParamDefinitionTest.php',
'ParamProcessor\\TitleParser' => __DIR__ . '/../..' . '/extensions/Validator/src/ParamProcessor/TitleParser.php',
'ParamProcessor\\TopologicalSort' => __DIR__ . '/..' . '/param-processor/param-processor/src/TopologicalSort.php',
'ParserHook' => __DIR__ . '/../..' . '/extensions/Validator/src/legacy/ParserHook.php',
@@ -1302,7 +1341,6 @@ class ComposerStaticInit_mediawiki_vendor
'SFS\\Output' => __DIR__ . '/../..' . '/extensions/SemanticFormsSelect/src/Output.php',
'SFS\\SelectField' => __DIR__ . '/../..' . '/extensions/SemanticFormsSelect/src/SelectField.php',
'SFS\\SemanticFormsSelectInput' => __DIR__ . '/../..' . '/extensions/SemanticFormsSelect/src/SemanticFormsSelectInput.php',
- 'SMWBibTeXEntry' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/bibtex/SRF_BibTeX.php',
'SMWCategoryResultPrinter' => __DIR__ . '/../..' . '/extensions/SemanticMediaWiki/includes/IdeAliases.php',
'SMWConceptValue' => __DIR__ . '/../..' . '/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Concept.php',
'SMWDIBlob' => __DIR__ . '/../..' . '/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Blob.php',
@@ -2097,7 +2135,6 @@ class ComposerStaticInit_mediawiki_vendor
'SMW\\Utils\\Tokenizer' => __DIR__ . '/../..' . '/extensions/SemanticMediaWiki/src/Utils/Tokenizer.php',
'SMW\\WantedPropertiesQueryPage' => __DIR__ . '/../..' . '/extensions/SemanticMediaWiki/includes/querypages/WantedPropertiesQueryPage.php',
'SRFArray' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/array/SRF_Array.php',
- 'SRFBibTeX' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/bibtex/SRF_BibTeX.php',
'SRFBoilerplate' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/boilerplate/SRF_Boilerplate.php',
'SRFCHistoricalDate' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/calendar/SRFC_HistoricalDate.php',
'SRFCalendar' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/calendar/SRF_Calendar.php',
@@ -2106,16 +2143,12 @@ class ComposerStaticInit_mediawiki_vendor
'SRFExhibit' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/Exhibit/SRF_Exhibit.php',
'SRFGoogleBar' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/googlecharts/SRF_GoogleBar.php',
'SRFGooglePie' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/googlecharts/SRF_GooglePie.php',
- 'SRFGraph' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/graphviz/SRF_Graph.php',
'SRFHash' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/array/SRF_Hash.php',
'SRFHooks' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/SemanticResultFormats.hooks.php',
'SRFIncoming' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/incoming/SRF_Incoming.php',
'SRFJitGraph' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/JitGraph/SRF_JitGraph.php',
'SRFListWidget' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/widget/SRF_ListWidget.php',
'SRFMath' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/math/SRF_Math.php',
- 'SRFOutline' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
- 'SRFOutlineItem' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
- 'SRFOutlineTree' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/outline/SRF_Outline.php',
'SRFPageWidget' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/widget/SRF_PageWidget.php',
'SRFParserFunctions' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/SemanticResultFormats.parser.php',
'SRFProcess' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/graphviz/SRF_Process.php',
@@ -2127,6 +2160,8 @@ class ComposerStaticInit_mediawiki_vendor
'SRFTimeseries' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/timeseries/SRF_Timeseries.php',
'SRFUtils' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/SemanticResultFormats.utils.php',
'SRFValueRank' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/valuerank/SRF_ValueRank.php',
+ 'SRF\\BibTex\\BibTexFileExportPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/BibTex/BibTexFileExportPrinter.php',
+ 'SRF\\BibTex\\Item' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/BibTex/Item.php',
'SRF\\DataTables' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/datatables/DataTables.php',
'SRF\\EventCalendar' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/calendar/EventCalendar.php',
'SRF\\Filtered\\Filter\\DistanceFilter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/filtered/src/Filters/DistanceFilter.php',
@@ -2145,9 +2180,19 @@ class ComposerStaticInit_mediawiki_vendor
'SRF\\Formats\\Tree\\TreeNodePrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/tree/TreeNodeVisitor.php',
'SRF\\Formats\\Tree\\TreeResultPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/tree/TreeResultPrinter.php',
'SRF\\Gallery' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/gallery/Gallery.php',
+ 'SRF\\Gantt\\Gantt' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/Gantt/src/Gantt.php',
+ 'SRF\\Gantt\\GanttPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/Gantt/GanttPrinter.php',
+ 'SRF\\Gantt\\GanttSection' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/Gantt/src/GanttSection.php',
+ 'SRF\\Gantt\\GanttTask' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/Gantt/src/GanttTask.php',
+ 'SRF\\Graph\\GraphPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Graph/GraphPrinter.php',
'SRF\\MediaPlayer' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/media/MediaPlayer.php',
+ 'SRF\\Outline\\ListTreeBuilder' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Outline/ListTreeBuilder.php',
+ 'SRF\\Outline\\OutlineItem' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Outline/OutlineItem.php',
+ 'SRF\\Outline\\OutlineResultPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Outline/OutlineResultPrinter.php',
+ 'SRF\\Outline\\OutlineTree' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Outline/OutlineTree.php',
+ 'SRF\\Outline\\TemplateBuilder' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/Outline/TemplateBuilder.php',
'SRF\\ResourceFormatter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/ResourceFormatter.php',
- 'SRF\\SRFExcel' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/excel/SRF_Excel.php',
+ 'SRF\\SpreadsheetPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/spreadsheet/SpreadsheetPrinter.php',
'SRF\\TagCloud' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/formats/tagcloud/TagCloud.php',
'SRF\\iCalendar\\IcalTimezoneFormatter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/iCalendar/IcalTimezoneFormatter.php',
'SRF\\iCalendar\\iCalendarFileExportPrinter' => __DIR__ . '/../..' . '/extensions/SemanticResultFormats/src/iCalendar/iCalendarFileExportPrinter.php',
diff --git a/www/wiki/vendor/composer/installed.json b/www/wiki/vendor/composer/installed.json
index fc2bb924..604f3d8a 100644
--- a/www/wiki/vendor/composer/installed.json
+++ b/www/wiki/vendor/composer/installed.json
@@ -1,17 +1,17 @@
[
{
"name": "composer/installers",
- "version": "v1.6.0",
- "version_normalized": "1.6.0.0",
+ "version": "v1.7.0",
+ "version_normalized": "1.7.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
"shasum": ""
},
"require": {
@@ -25,7 +25,7 @@
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "^4.8.36"
},
- "time": "2018-08-27T06:10:37+00:00",
+ "time": "2019-08-12T15:00:31+00:00",
"type": "composer-plugin",
"extra": {
"class": "Composer\\Installers\\Plugin",
@@ -69,6 +69,7 @@
"RadPHP",
"SMF",
"Thelia",
+ "Whmcs",
"WolfCMS",
"agl",
"aimeos",
@@ -91,6 +92,7 @@
"installer",
"itop",
"joomla",
+ "known",
"kohana",
"laravel",
"lavalite",
@@ -1133,17 +1135,17 @@
},
{
"name": "mediawiki/maps",
- "version": "7.3.2",
- "version_normalized": "7.3.2.0",
+ "version": "7.4.0",
+ "version_normalized": "7.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/JeroenDeDauw/Maps.git",
- "reference": "57e5b822dacb7ed4eacb4a2d996ce8e6be4ae13a"
+ "reference": "d4d195d5f3e57d5361882b94284286b7599e23dc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/JeroenDeDauw/Maps/zipball/57e5b822dacb7ed4eacb4a2d996ce8e6be4ae13a",
- "reference": "57e5b822dacb7ed4eacb4a2d996ce8e6be4ae13a",
+ "url": "https://api.github.com/repos/JeroenDeDauw/Maps/zipball/d4d195d5f3e57d5361882b94284286b7599e23dc",
+ "reference": "d4d195d5f3e57d5361882b94284286b7599e23dc",
"shasum": ""
},
"require": {
@@ -1155,7 +1157,7 @@
"jeroen/simple-geocoder": "~1.2",
"mediawiki/parser-hooks": "~1.5",
"mediawiki/validator": "~2.2",
- "param-processor/param-processor": "~1.4.2",
+ "param-processor/param-processor": "^1.4.2",
"php": ">=7.1"
},
"replace": {
@@ -1167,7 +1169,7 @@
"suggest": {
"mediawiki/semantic-media-wiki": "Add, edit, aggregate and visualize structured coordinate data stored with Semantic MediaWiki"
},
- "time": "2019-07-25T04:17:46+00:00",
+ "time": "2019-08-09T18:15:24+00:00",
"type": "mediawiki-extension",
"extra": {
"branch-alias": {
@@ -1213,6 +1215,59 @@
]
},
{
+ "name": "mediawiki/mermaid",
+ "version": "2.1.1",
+ "version_normalized": "2.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/SemanticMediaWiki/Mermaid.git",
+ "reference": "9fe1279a9aed7afdecbbed4c183a81302ce63dce"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/SemanticMediaWiki/Mermaid/zipball/9fe1279a9aed7afdecbbed4c183a81302ce63dce",
+ "reference": "9fe1279a9aed7afdecbbed4c183a81302ce63dce",
+ "shasum": ""
+ },
+ "require": {
+ "composer/installers": "1.*,>=1.0.1",
+ "php": ">=5.6.0"
+ },
+ "time": "2019-05-20T10:17:44+00:00",
+ "type": "mediawiki-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "Mermaid.php"
+ ],
+ "psr-4": {
+ "Mermaid\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "James Hong Kong",
+ "role": "Developer"
+ }
+ ],
+ "description": "Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language",
+ "homepage": "https://github.com/SemanticMediaWiki/Mermaid",
+ "keywords": [
+ "mediawiki",
+ "mermaid",
+ "parser function"
+ ]
+ },
+ {
"name": "mediawiki/page-forms",
"version": "4.5.1",
"version_normalized": "4.5.1.0",
@@ -1504,36 +1559,38 @@
},
{
"name": "mediawiki/semantic-result-formats",
- "version": "3.0.1",
- "version_normalized": "3.0.1.0",
+ "version": "3.1.0",
+ "version_normalized": "3.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/SemanticMediaWiki/SemanticResultFormats.git",
- "reference": "e1956df8796b8df9a156083801e7dcc0ab2b9a25"
+ "reference": "aa0649f28e536fd9da363dcdff9405dc402ff275"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/zipball/e1956df8796b8df9a156083801e7dcc0ab2b9a25",
- "reference": "e1956df8796b8df9a156083801e7dcc0ab2b9a25",
+ "url": "https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/zipball/aa0649f28e536fd9da363dcdff9405dc402ff275",
+ "reference": "aa0649f28e536fd9da363dcdff9405dc402ff275",
"shasum": ""
},
"require": {
"composer/installers": "1.*,>=1.0.1",
"data-values/geo": "~4.0|~3.0|~2.0",
+ "mediawiki/mermaid": "~2.1",
"mediawiki/semantic-media-wiki": "~3.0",
"nicmart/tree": "^0.2.7",
- "php": ">=5.6.0",
+ "php": ">=7.0",
"symfony/css-selector": "^3.3"
},
"suggest": {
"mediawiki/graph-viz": "Required for 'format=graph' and 'format=process'",
- "phpoffice/phpexcel": "Required for 'format=excel'"
+ "phpoffice/phpexcel": "Required for 'format=excel'",
+ "phpoffice/phpspreadsheet": "Required for 'format=spreadsheet'"
},
- "time": "2019-03-27T22:43:56+00:00",
+ "time": "2019-08-18T17:55:25+00:00",
"type": "mediawiki-extension",
"extra": {
"branch-alias": {
- "dev-master": "3.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"installation-source": "dist",
@@ -2167,17 +2224,17 @@
},
{
"name": "param-processor/param-processor",
- "version": "1.4.2",
- "version_normalized": "1.4.2.0",
+ "version": "1.10.0",
+ "version_normalized": "1.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/JeroenDeDauw/ParamProcessor.git",
- "reference": "40cd2140aa339f59c5500760a9f6f1fa6c0ef0a6"
+ "reference": "5dec3e41bdc684640faf334db650e9bd32092e23"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/JeroenDeDauw/ParamProcessor/zipball/40cd2140aa339f59c5500760a9f6f1fa6c0ef0a6",
- "reference": "40cd2140aa339f59c5500760a9f6f1fa6c0ef0a6",
+ "url": "https://api.github.com/repos/JeroenDeDauw/ParamProcessor/zipball/5dec3e41bdc684640faf334db650e9bd32092e23",
+ "reference": "5dec3e41bdc684640faf334db650e9bd32092e23",
"shasum": ""
},
"require": {
@@ -2193,11 +2250,11 @@
"phpunit/phpunit": "~7.4",
"squizlabs/php_codesniffer": "~3.3"
},
- "time": "2018-11-26T05:02:09+00:00",
+ "time": "2019-08-03T15:18:54+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.x-dev"
}
},
"installation-source": "dist",
@@ -2205,10 +2262,6 @@
"psr-4": {
"ParamProcessor\\": "src"
},
- "classmap": [
- "tests/phpunit/Definitions/ParamDefinitionTest.php",
- "tests/phpunit/Definitions/NumericParamTest.php"
- ],
"files": [
"DefaultConfig.php"
]
@@ -2613,6 +2666,65 @@
]
},
{
+ "name": "professional-wiki/modern-timeline",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ProfessionalWiki/ModernTimeline.git",
+ "reference": "458b66e8c1e4d05ba3819a0f73b655b97203144c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ProfessionalWiki/ModernTimeline/zipball/458b66e8c1e4d05ba3819a0f73b655b97203144c",
+ "reference": "458b66e8c1e4d05ba3819a0f73b655b97203144c",
+ "shasum": ""
+ },
+ "require": {
+ "composer/installers": "^1.0.1",
+ "param-processor/param-processor": "~1.10",
+ "php": ">=7.1"
+ },
+ "time": "2019-08-16T00:14:56+00:00",
+ "type": "mediawiki-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "ModernTimeline\\": "src/",
+ "ModernTimeline\\Tests\\": "tests/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Professional.Wiki",
+ "role": "Creator",
+ "email": "info@professional.wiki",
+ "homepage": "https://professional.wiki"
+ },
+ {
+ "name": "Jeroen De Dauw",
+ "role": "Creator and lead developer",
+ "email": "jeroendedauw@gmail.com",
+ "homepage": "https://www.entropywins.wtf"
+ }
+ ],
+ "description": "Adds a modern timeline visualization as Semantic MediaWiki result format",
+ "homepage": "https://github.com/ProfessionalWiki/ModernTimeline",
+ "keywords": [
+ "Result format",
+ "Semantic MediaWiki",
+ "mediawiki",
+ "timeline",
+ "timelineJS3",
+ "visualization",
+ "wiki"
+ ]
+ },
+ {
"name": "psr/log",
"version": "1.0.2",
"version_normalized": "1.0.2.0",
diff --git a/www/wiki/vendor/composer/installers/composer.json b/www/wiki/vendor/composer/installers/composer.json
index 6de40853..1f68e72a 100644
--- a/www/wiki/vendor/composer/installers/composer.json
+++ b/www/wiki/vendor/composer/installers/composer.json
@@ -31,6 +31,7 @@
"iTop",
"Joomla",
"Kanboard",
+ "Known",
"Kohana",
"Lan Management System",
"Laravel",
@@ -65,6 +66,7 @@
"symfony",
"Thelia",
"TYPO3",
+ "WHMCS",
"WolfCMS",
"WordPress",
"YAWIK",
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
new file mode 100644
index 00000000..70788163
--- /dev/null
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Composer\Installers;
+
+class DframeInstaller extends BaseInstaller
+{
+ protected $locations = array(
+ 'module' => 'modules/{$vendor}/{$name}/',
+ );
+}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
index fef7c525..f520bfe2 100644
--- a/www/wiki/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
@@ -4,13 +4,17 @@ namespace Composer\Installers;
class DrupalInstaller extends BaseInstaller
{
protected $locations = array(
- 'core' => 'core/',
- 'module' => 'modules/{$name}/',
- 'theme' => 'themes/{$name}/',
- 'library' => 'libraries/{$name}/',
- 'profile' => 'profiles/{$name}/',
- 'drush' => 'drush/{$name}/',
- 'custom-theme' => 'themes/custom/{$name}/',
- 'custom-module' => 'modules/custom/{$name}/',
+ 'core' => 'core/',
+ 'module' => 'modules/{$name}/',
+ 'theme' => 'themes/{$name}/',
+ 'library' => 'libraries/{$name}/',
+ 'profile' => 'profiles/{$name}/',
+ 'drush' => 'drush/{$name}/',
+ 'custom-theme' => 'themes/custom/{$name}/',
+ 'custom-module' => 'modules/custom/{$name}/',
+ 'custom-profile' => 'profiles/custom/{$name}/',
+ 'drupal-multisite' => 'sites/{$name}/',
+ 'console' => 'console/{$name}/',
+ 'console-language' => 'console/language/{$name}/',
);
}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/Installer.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/Installer.php
index 352cb7fa..651c1904 100644
--- a/www/wiki/vendor/composer/installers/src/Composer/Installers/Installer.php
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/Installer.php
@@ -35,6 +35,7 @@ class Installer extends LibraryInstaller
'concrete5' => 'Concrete5Installer',
'craft' => 'CraftInstaller',
'croogo' => 'CroogoInstaller',
+ 'dframe' => 'DframeInstaller',
'dokuwiki' => 'DokuWikiInstaller',
'dolibarr' => 'DolibarrInstaller',
'decibel' => 'DecibelInstaller',
@@ -53,6 +54,7 @@ class Installer extends LibraryInstaller
'joomla' => 'JoomlaInstaller',
'kanboard' => 'KanboardInstaller',
'kirby' => 'KirbyInstaller',
+ 'known' => 'KnownInstaller',
'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
'lms' => 'LanManagementSystemInstaller',
@@ -85,6 +87,7 @@ class Installer extends LibraryInstaller
'phifty' => 'PhiftyInstaller',
'porto' => 'PortoInstaller',
'redaxo' => 'RedaxoInstaller',
+ 'redaxo5' => 'Redaxo5Installer',
'reindex' => 'ReIndexInstaller',
'roundcube' => 'RoundcubeInstaller',
'shopware' => 'ShopwareInstaller',
@@ -93,6 +96,7 @@ class Installer extends LibraryInstaller
'smf' => 'SMFInstaller',
'sydes' => 'SyDESInstaller',
'symfony1' => 'Symfony1Installer',
+ 'tao' => 'TaoInstaller',
'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller',
'typo3-cms' => 'TYPO3CmsInstaller',
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
new file mode 100644
index 00000000..c5d08c5f
--- /dev/null
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
@@ -0,0 +1,11 @@
+<?php
+namespace Composer\Installers;
+
+class KnownInstaller extends BaseInstaller
+{
+ protected $locations = array(
+ 'plugin' => 'IdnoPlugins/{$name}/',
+ 'theme' => 'Themes/{$name}/',
+ 'console' => 'ConsolePlugins/{$name}/',
+ );
+}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
index 4bbbec8c..b7d97039 100644
--- a/www/wiki/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
@@ -4,12 +4,12 @@ namespace Composer\Installers;
class MicroweberInstaller extends BaseInstaller
{
protected $locations = array(
- 'module' => 'userfiles/modules/{$name}/',
- 'module-skin' => 'userfiles/modules/{$name}/templates/',
- 'template' => 'userfiles/templates/{$name}/',
- 'element' => 'userfiles/elements/{$name}/',
- 'vendor' => 'vendor/{$name}/',
- 'components' => 'components/{$name}/'
+ 'module' => 'userfiles/modules/{$install_item_dir}/',
+ 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
+ 'template' => 'userfiles/templates/{$install_item_dir}/',
+ 'element' => 'userfiles/elements/{$install_item_dir}/',
+ 'vendor' => 'vendor/{$install_item_dir}/',
+ 'components' => 'components/{$install_item_dir}/'
);
/**
@@ -22,89 +22,97 @@ class MicroweberInstaller extends BaseInstaller
*/
public function inflectPackageVars($vars)
{
- if ($vars['type'] === 'microweber-template') {
- return $this->inflectTemplateVars($vars);
- }
- if ($vars['type'] === 'microweber-templates') {
- return $this->inflectTemplatesVars($vars);
- }
- if ($vars['type'] === 'microweber-core') {
- return $this->inflectCoreVars($vars);
- }
- if ($vars['type'] === 'microweber-adapter') {
- return $this->inflectCoreVars($vars);
- }
- if ($vars['type'] === 'microweber-module') {
- return $this->inflectModuleVars($vars);
- }
- if ($vars['type'] === 'microweber-modules') {
- return $this->inflectModulesVars($vars);
- }
- if ($vars['type'] === 'microweber-skin') {
- return $this->inflectSkinVars($vars);
- }
- if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
- return $this->inflectElementVars($vars);
+
+
+ if ($this->package->getTargetDir()) {
+ $vars['install_item_dir'] = $this->package->getTargetDir();
+ } else {
+ $vars['install_item_dir'] = $vars['name'];
+ if ($vars['type'] === 'microweber-template') {
+ return $this->inflectTemplateVars($vars);
+ }
+ if ($vars['type'] === 'microweber-templates') {
+ return $this->inflectTemplatesVars($vars);
+ }
+ if ($vars['type'] === 'microweber-core') {
+ return $this->inflectCoreVars($vars);
+ }
+ if ($vars['type'] === 'microweber-adapter') {
+ return $this->inflectCoreVars($vars);
+ }
+ if ($vars['type'] === 'microweber-module') {
+ return $this->inflectModuleVars($vars);
+ }
+ if ($vars['type'] === 'microweber-modules') {
+ return $this->inflectModulesVars($vars);
+ }
+ if ($vars['type'] === 'microweber-skin') {
+ return $this->inflectSkinVars($vars);
+ }
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
+ return $this->inflectElementVars($vars);
+ }
}
+
return $vars;
}
protected function inflectTemplateVars($vars)
{
- $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
- $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectTemplatesVars($vars)
{
- $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
- $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectCoreVars($vars)
{
- $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
- $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
- $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectModuleVars($vars)
{
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
- $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectModulesVars($vars)
{
- $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
- $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectSkinVars($vars)
{
- $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
- $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
return $vars;
}
protected function inflectElementVars($vars)
{
- $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
- $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
- $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
- $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
+ $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
return $vars;
}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
index a89c82f7..75dbe71b 100644
--- a/www/wiki/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
@@ -20,6 +20,7 @@ class MoodleInstaller extends BaseInstaller
'calendartype' => 'calendar/type/{$name}/',
'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/',
+ 'customcertelement' => 'mod/customcert/element/{$name}/',
'datafield' => 'mod/data/field/{$name}/',
'datapreset' => 'mod/data/preset/{$name}/',
'editor' => 'lib/editor/{$name}/',
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
new file mode 100644
index 00000000..23a20347
--- /dev/null
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
@@ -0,0 +1,10 @@
+<?php
+namespace Composer\Installers;
+
+class Redaxo5Installer extends BaseInstaller
+{
+ protected $locations = array(
+ 'addon' => 'redaxo/src/addons/{$name}/',
+ 'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
+ );
+}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
new file mode 100644
index 00000000..108def15
--- /dev/null
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
@@ -0,0 +1,12 @@
+<?php
+namespace Composer\Installers;
+
+/**
+ * An installer to handle TAO extensions.
+ */
+class TaoInstaller extends BaseInstaller
+{
+ protected $locations = array(
+ 'extension' => '{$name}'
+ );
+}
diff --git a/www/wiki/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php b/www/wiki/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
index 2cbb4a46..b65dbbaf 100644
--- a/www/wiki/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
+++ b/www/wiki/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
@@ -5,6 +5,17 @@ namespace Composer\Installers;
class WHMCSInstaller extends BaseInstaller
{
protected $locations = array(
- 'gateway' => 'modules/gateways/{$name}/',
+ 'addons' => 'modules/addons/{$vendor}_{$name}/',
+ 'fraud' => 'modules/fraud/{$vendor}_{$name}/',
+ 'gateways' => 'modules/gateways/{$vendor}_{$name}/',
+ 'notifications' => 'modules/notifications/{$vendor}_{$name}/',
+ 'registrars' => 'modules/registrars/{$vendor}_{$name}/',
+ 'reports' => 'modules/reports/{$vendor}_{$name}/',
+ 'security' => 'modules/security/{$vendor}_{$name}/',
+ 'servers' => 'modules/servers/{$vendor}_{$name}/',
+ 'social' => 'modules/social/{$vendor}_{$name}/',
+ 'support' => 'modules/support/{$vendor}_{$name}/',
+ 'templates' => 'templates/{$vendor}_{$name}/',
+ 'includes' => 'includes/{$vendor}_{$name}/'
);
}
diff --git a/www/wiki/vendor/param-processor/param-processor/.travis.yml b/www/wiki/vendor/param-processor/param-processor/.travis.yml
index bebb02de..b773815d 100644
--- a/www/wiki/vendor/param-processor/param-processor/.travis.yml
+++ b/www/wiki/vendor/param-processor/param-processor/.travis.yml
@@ -3,14 +3,14 @@ language: php
php:
- 7.1
- 7.2
- - master
+ - 7.3
install: travis_retry composer install
script: composer ci
after_success:
- - if [[ "`phpenv version-name`" != "7.2" ]]; then exit 0; fi
+ - if [[ "`phpenv version-name`" != "7.3" ]]; then exit 0; fi
- vendor/bin/phpunit --coverage-clover coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
diff --git a/www/wiki/vendor/param-processor/param-processor/IdeHelper.php b/www/wiki/vendor/param-processor/param-processor/IdeHelper.php
new file mode 100644
index 00000000..a5292e0d
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/IdeHelper.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace ParamProcessor;
+
+/**
+ * Deprecated since 1.0 - this class is for internal use only
+ */
+class Param extends PackagePrivate\Param {
+
+} \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/README.md b/www/wiki/vendor/param-processor/param-processor/README.md
index 753b299f..c3ec4ebf 100644
--- a/www/wiki/vendor/param-processor/param-processor/README.md
+++ b/www/wiki/vendor/param-processor/param-processor/README.md
@@ -172,7 +172,7 @@ The requires fields currently are: name and message
<li>minlength: int or false</li>
<li>maxlength: int or false</li>
<li>regex: string</li>
- <ul>
+ </ul>
</td>
</tr>
<tr>
@@ -190,7 +190,7 @@ The requires fields currently are: name and message
<li>upperbound: int, float or false</li>
<li>range: [lowerbound, upperbound]</li>
<li>withinrange: [float $point, float $deviation]</li>
- <ul>
+ </ul>
</td>
</tr>
<tr>
@@ -214,7 +214,7 @@ The requires fields currently are: name and message
<li>defaultunit: string</li>
<li>lowerbound: int, float or false</li>
<li>upperbound: int, float or false</li>
- <ul>
+ </ul>
</td>
</tr>
</table>
@@ -284,12 +284,6 @@ $processor->setFunctionParams(
);
```
-## Tests
-
-This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these
-tests using the PHPUnit configuration file found in the root directory. The tests can also be run
-via TravisCI, as a TravisCI configuration file is also provided in the root directory.
-
## Contributing
* [File an issue](https://github.com/JeroenDeDauw/ParamProcessor/issues)
@@ -297,12 +291,76 @@ via TravisCI, as a TravisCI configuration file is also provided in the root dire
## Authors
-ParamProcessor has been written by [Jeroen De Dauw](https://github.com/JeroenDeDauw) to
+ParamProcessor has been written by [Jeroen De Dauw](https://www.entropywins.wtf/) to
support the [Maps](https://github.com/JeroenDeDauw/Maps) and
[Semantic MediaWiki](https://semantic-mediawiki.org/) projects.
## Release notes
+### 1.10.0 (2019-08-03)
+
+* Removed `DimensionParam`
+* Fixed bug in parsing of parameters of type `dimension`
+
+### 1.9.0 (2019-08-03)
+
+* Added `ParamDefinitionFactory::newDefinitionsFromArrays`
+
+### 1.8.0 (2019-08-03)
+
+* Removed `ParamDefinitionFactory::getComponentForType`
+* Added `ParamDefinitionFactory` constructor
+* Added `ParameterTypes` constructor
+* Added `ParameterTypes::addType`
+* Added `ParameterTypes::newCoreTypes`
+* Added `ProcessingResult::getParameterArray`
+
+### 1.7.0 (2019-08-02)
+
+* Added `ParameterTypes` public constants: `BOOLEAN`, `FLOAT`, `INTEGER`, `STRING`, `DIMENSION`
+* Deprecated `ParamDefinition::getCleanDefinitions` in favour of `ParamDefinitionFactory`
+* Deprecated `ParamDefinition::setDefault` in favour of constructor parameter
+* Deprecated `Processor::getParameterValues` in favour of `processParameters` and `ProcessingResult`
+* Deprecated `Processor::getErrors` in favour of `processParameters` and `ProcessingResult`
+* Deprecated `Processor::getErrorMessages` in favour of `processParameters` and `ProcessingResult`
+* Deprecated `Processor::hasErrors` in favour of `processParameters` and `ProcessingResult`
+* Deprecated `Processor::hasFatalError` in favour of `processParameters` and `ProcessingResult`
+* Deprecated parameter dependencies
+ * Deprecated `ParamDefinition::hasDependency`
+ * Deprecated `ParamDefinition::addDependencies`
+ * Deprecated `ParamDefinition::getDependencies`
+ * Deprecated `dependencies` key in `ParamDefinition::setArrayValues` parameter
+ * Deprecated `TopologicalSort`
+ * Deprecated `TSNode`
+* Deprecated extending `ParamDefinition`
+* Deprecated `StringParam`
+* Deprecated `DimensionParam`
+* Deprecated `ParamDefinition::setArrayValues`
+* Deprecated `ParamDefinition::$acceptOverriding`
+* Deprecated `ParamDefinition::$accumulateParameterErrors`
+* Deprecated `Param::$accumulateParameterErrors`
+* Deprecated `Settings`
+* Deprecated `Options::setRawStringInputs`
+* Deprecated `Options::isStringlyTyped`
+
+### 1.6.1 (2019-07-28)
+
+* Fixed message defaulting bug in `ParamDefinition`
+
+### 1.6.0 (2019-07-28)
+
+* Added `Processor::setParameterDefinitions`
+* Deprecated second parameter of `Processor::setParameters` in favour of `setParameterDefinitions`
+* Deprecated second parameter of `Processor::setFunctionParams` in favour of `setParameterDefinitions`
+* Deprecated second parameter of `ParamDefinitionFactory::newDefinitionFromArray`
+* Deprecated return value of `ParamDefinitionFactory::registerType`
+* Deprecated `ParamDefinitionFactory::registerGlobals`
+* Deprecated `typed-parser` key in parameter type definitions
+
+### 1.5.0 (2019-07-28)
+
+* Improved code comments and added extra type checks
+
### 1.4.2 (2018-11-26)
* Fixed defaulting behaviour of list parameters
@@ -315,6 +373,8 @@ support the [Maps](https://github.com/JeroenDeDauw/Maps) and
* Dropped support for PHP older than 7.1
* Added `ParameterTypes` to allow gradual migration away from the now deprecated `$wgParamDefinitions`
+* Deprecated `$wgParamDefinitions`
+* Deprecated `$egValidatorSettings`
### 1.3.4 (2018-05-05)
diff --git a/www/wiki/vendor/param-processor/param-processor/composer.json b/www/wiki/vendor/param-processor/param-processor/composer.json
index 5827117b..df8036f1 100644
--- a/www/wiki/vendor/param-processor/param-processor/composer.json
+++ b/www/wiki/vendor/param-processor/param-processor/composer.json
@@ -39,17 +39,18 @@
"psr-4": {
"ParamProcessor\\": "src"
},
- "classmap": [
- "tests/phpunit/Definitions/ParamDefinitionTest.php",
- "tests/phpunit/Definitions/NumericParamTest.php"
- ],
"files": [
"DefaultConfig.php"
]
},
+ "autoload-dev": {
+ "psr-4": {
+ "ParamProcessor\\Tests\\": "tests"
+ }
+ },
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.x-dev"
}
},
"scripts": {
@@ -63,7 +64,8 @@
"@phpmd"
],
"ci": [
- "@test"
+ "@test",
+ "@cs"
],
"phpcs": [
"vendor/bin/phpcs src/* tests/* --standard=phpcs.xml --extensions=php -sp"
diff --git a/www/wiki/vendor/param-processor/param-processor/phpcs.xml b/www/wiki/vendor/param-processor/param-processor/phpcs.xml
index 20f96009..b9008d97 100644
--- a/www/wiki/vendor/param-processor/param-processor/phpcs.xml
+++ b/www/wiki/vendor/param-processor/param-processor/phpcs.xml
@@ -6,15 +6,17 @@
<ruleset name="MediaWiki">
<rule ref="Generic.Classes" />
<rule ref="Generic.CodeAnalysis" />
+ <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
+ <severity>0</severity>
+ </rule>
<rule ref="Generic.ControlStructures" />
<rule ref="Generic.Files.ByteOrderMark" />
- <rule ref="Generic.Files.EndFileNewline" />
<rule ref="Generic.Files.LineEndings" />
<rule ref="Generic.Files.LineLength">
<properties>
- <property name="lineLimit" value="125" />
- <property name="absoluteLineLimit" value="125" />
+ <property name="lineLimit" value="140" />
+ <property name="absoluteLineLimit" value="140" />
</properties>
</rule>
<rule ref="Generic.Files.OneClassPerFile" />
@@ -27,8 +29,8 @@
<rule ref="Generic.Metrics.NestingLevel">
<properties>
- <property name="nestingLevel" value="3" />
- <property name="absoluteNestingLevel" value="3" />
+ <property name="nestingLevel" value="5" />
+ <property name="absoluteNestingLevel" value="5" />
</properties>
</rule>
diff --git a/www/wiki/vendor/param-processor/param-processor/phpmd.xml b/www/wiki/vendor/param-processor/param-processor/phpmd.xml
index 95a85368..66bfad24 100644
--- a/www/wiki/vendor/param-processor/param-processor/phpmd.xml
+++ b/www/wiki/vendor/param-processor/param-processor/phpmd.xml
@@ -4,19 +4,9 @@
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
- <rule ref="rulesets/codesize.xml">
- <exclude name="TooManyMethods" />
- <exclude name="ExcessiveClassComplexity" />
- </rule>
- <rule ref="rulesets/codesize.xml/TooManyMethods">
- <properties>
- <property name="maxmethods" value="20" />
- </properties>
- </rule>
-
- <!-- todo: enable the camel case method rule for non-tests -->
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCaseMethodName" />
+ <exclude name="Superglobals" />
</rule>
<rule ref="rulesets/design.xml" />
@@ -25,8 +15,4 @@
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
</rule>
-
- <rule ref="rulesets/unusedcode.xml">
- <exclude name="UnusedLocalVariable" />
- </rule>
</ruleset> \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Definition/DimensionParam.php b/www/wiki/vendor/param-processor/param-processor/src/Definition/DimensionParam.php
deleted file mode 100644
index 1bf272cc..00000000
--- a/www/wiki/vendor/param-processor/param-processor/src/Definition/DimensionParam.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
-namespace ParamProcessor\Definition;
-
-use Exception;
-use ParamProcessor\ParamDefinition;
-use ParamProcessor\IParam;
-use ParamProcessor\IParamDefinition;
-
-/**
- * Defines the dimension parameter type.
- * This parameter describes the size of a dimension (ie width) in some unit (ie px) or a percentage.
- * Specifies the type specific validation and formatting logic.
- *
- * TODO: this class is silly, should be handled by a dedicated formatting object/function.
- *
- * @since 1.0
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
-class DimensionParam extends ParamDefinition {
-
- /**
- * Formats the parameter value to it's final result.
- * @see ParamDefinition::formatValue
- *
- * @since 1.0
- *
- * @param mixed $value
- * @param IParam $param
- * @param IParamDefinition[] $definitions
- * @param IParam[] $params
- *
- * @return mixed
- * @throws Exception
- */
- protected function formatValue( $value, IParam $param, array &$definitions, array $params ) {
- if ( $value === 'auto' ) {
- return $value;
- }
-
- /**
- * @var \ValueValidators\DimensionValidator $validator
- */
- $validator = $this->getValueValidator();
-
- if ( get_class( $validator ) === 'ValueValidators\DimensionValidator' ) {
- foreach ( $validator->getAllowedUnits() as $unit ) {
- if ( $unit !== '' && strpos( $value, $unit ) !== false ) {
- return $value;
- }
- }
-
- return $value . $validator->getDefaultUnit();
- }
- else {
- throw new Exception(
- 'ValueValidator of a DimensionParam should be a ValueValidators\DimensionValidator and not a '
- . get_class( $validator )
- );
- }
- }
-
-}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Definition/StringParam.php b/www/wiki/vendor/param-processor/param-processor/src/Definition/StringParam.php
index 6488f697..3c74716d 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/Definition/StringParam.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/Definition/StringParam.php
@@ -9,7 +9,7 @@ use ParamProcessor\IParam;
* Defines the string parameter type.
* Specifies the type specific validation and formatting logic.
*
- * @since 1.0
+ * @deprecated since 1.7
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
@@ -75,4 +75,4 @@ class StringParam extends ParamDefinition {
$this->toLower = $toLower;
}
-} \ No newline at end of file
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/IParam.php b/www/wiki/vendor/param-processor/param-processor/src/IParam.php
index 31766d6c..ebb0a548 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/IParam.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/IParam.php
@@ -3,10 +3,10 @@
namespace ParamProcessor;
/**
- * Interface for objects representing an "instance" of a parameter.
- *
* NOTE: as of version 1.0, this class is for internal use only!
*
+ * Interface for objects representing an "instance" of a parameter.
+ *
* @since 1.0
* @deprecated since 1.0
*
diff --git a/www/wiki/vendor/param-processor/param-processor/src/IParamDefinition.php b/www/wiki/vendor/param-processor/param-processor/src/IParamDefinition.php
index 38b07179..410b8096 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/IParamDefinition.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/IParamDefinition.php
@@ -53,7 +53,7 @@ interface IParamDefinition {
*
* @return string[]
*/
- public function getAliases();
+ public function getAliases(): array;
/**
* Returns the default value.
@@ -72,7 +72,7 @@ interface IParamDefinition {
*
* @return string
*/
- public function getDelimiter();
+ public function getDelimiter(): string;
/**
* Returns a list of dependencies the parameter has, in the form of
@@ -82,7 +82,7 @@ interface IParamDefinition {
*
* @return string[]
*/
- public function getDependencies();
+ public function getDependencies(): array;
/**
* Returns a message that will act as a description message for the parameter.
@@ -91,7 +91,7 @@ interface IParamDefinition {
*
* @return string
*/
- public function getMessage();
+ public function getMessage(): string;
/**
* Returns the parameters main name.
@@ -100,7 +100,7 @@ interface IParamDefinition {
*
* @return string
*/
- public function getName();
+ public function getName(): string;
/**
* Returns an identifier for the type of the parameter.
@@ -109,7 +109,7 @@ interface IParamDefinition {
*
* @return string
*/
- public function getType();
+ public function getType(): string;
/**
* Returns if the parameter has a certain alias.
@@ -120,7 +120,7 @@ interface IParamDefinition {
*
* @return boolean
*/
- public function hasAlias( $alias );
+ public function hasAlias( string $alias ): bool;
/**
* Returns if the parameter has a certain dependency.
@@ -131,7 +131,7 @@ interface IParamDefinition {
*
* @return boolean
*/
- public function hasDependency( $dependency );
+ public function hasDependency( string $dependency ): bool;
/**
* Returns if the parameter is a list or not.
@@ -140,7 +140,7 @@ interface IParamDefinition {
*
* @return boolean
*/
- public function isList();
+ public function isList(): bool;
/**
* Returns if the parameter is a required one or not.
@@ -149,7 +149,7 @@ interface IParamDefinition {
*
* @return boolean
*/
- public function isRequired();
+ public function isRequired(): bool;
/**
* Sets the default parameter value. Null indicates no default,
@@ -170,7 +170,7 @@ interface IParamDefinition {
*
* @param $delimiter string
*/
- public function setDelimiter( $delimiter );
+ public function setDelimiter( string $delimiter );
/**
* Set if the parameter manipulations should be applied to the default value.
@@ -179,19 +179,17 @@ interface IParamDefinition {
*
* @param boolean $manipulateDefault
*/
- public function setDoManipulationOfDefault( $manipulateDefault );
+ public function setDoManipulationOfDefault( bool $manipulateDefault );
/**
* Sets a message for the parameter that will act as description.
- * This should be a message key, ie something that can be passed
- * to wfMsg. Not an actual text. If you do not have a message key,
- * but only a text, use setDescription instead.
+ *
*
* @since 1.0
*
* @param string $message
*/
- public function setMessage( $message );
+ public function setMessage( string $message );
/**
* Returns if the parameter manipulations should be applied to the default value.
@@ -200,7 +198,7 @@ interface IParamDefinition {
*
* @return boolean
*/
- public function shouldManipulateDefault();
+ public function shouldManipulateDefault(): bool;
/**
* Returns a message key for a message describing the parameter type.
@@ -209,11 +207,10 @@ interface IParamDefinition {
*
* @return string
*/
- public function getTypeMessage();
+ public function getTypeMessage(): string;
/**
* Returns if the value should be trimmed before validation and any further processing.
- * @see IParamDefinition::trimDuringClean
*
* @since 1.0
*
@@ -267,7 +264,7 @@ interface IParamDefinition {
*
* @param callable $validationFunction
*/
- public function setValidationCallback( /* callable */ $validationFunction );
+ public function setValidationCallback( callable $validationFunction );
/**
* Sets the parameter definition values contained in the provided array.
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Options.php b/www/wiki/vendor/param-processor/param-processor/src/Options.php
index 897ed25c..99e11b45 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/Options.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/Options.php
@@ -39,6 +39,9 @@ class Options {
$this->lowercaseNames = $lowercase;
}
+ /**
+ * @deprecated since 1.7
+ */
public function setRawStringInputs( bool $rawInputs ) {
$this->rawStringInputs = $rawInputs;
}
@@ -67,6 +70,9 @@ class Options {
return $this->lowercaseNames;
}
+ /**
+ * @deprecated since 1.7
+ */
public function isStringlyTyped(): bool {
return $this->rawStringInputs;
}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/DimensionParser.php b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/DimensionParser.php
new file mode 100644
index 00000000..06aa2ad5
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/DimensionParser.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace ParamProcessor\PackagePrivate;
+
+use ValueParsers\ParseException;
+use ValueParsers\ParserOptions;
+use ValueParsers\ValueParser;
+
+/**
+ * Package private
+ */
+class DimensionParser implements ValueParser {
+
+ public const DEFAULT_UNIT = 'defaultunit';
+
+ public const PIXELS = 'px';
+
+ private $defaultUnit;
+
+ public function __construct( ParserOptions $options = null ) {
+ $options = $options ?? new ParserOptions();
+
+ $this->defaultUnit = $options->hasOption( self::DEFAULT_UNIT ) ? $options->getOption( self::DEFAULT_UNIT ) : self::PIXELS;
+ }
+
+ public function parse( $value ) {
+ if ( !is_string( $value ) ) {
+ throw new ParseException( 'Not a string' );
+ }
+
+ $value = $this->removeWhitespace( $value );
+
+ if ( preg_match( '/^(\d|\.)+$/', $value ) ) {
+ $value .= $this->defaultUnit;
+ }
+
+ return $value;
+ }
+
+ private function removeWhitespace( string $string ): string {
+ return preg_replace( '/\s+/', '', $string );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/Param.php b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/Param.php
new file mode 100644
index 00000000..49011579
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/Param.php
@@ -0,0 +1,418 @@
+<?php
+
+namespace ParamProcessor\PackagePrivate;
+
+use DataValues\DataValue;
+use Exception;
+use ParamProcessor\IParam;
+use ParamProcessor\IParamDefinition;
+use ParamProcessor\Options;
+use ParamProcessor\ParamDefinition;
+use ParamProcessor\ParamDefinitionFactory;
+use ParamProcessor\ProcessingError;
+use ValueParsers\NullParser;
+use ValueParsers\ParseException;
+use ValueParsers\ValueParser;
+
+/**
+ * Package private!
+ *
+ * Parameter class, representing the "instance" of a parameter.
+ * Holds a ParamDefinition, user provided input (name & value) and processing state.
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ */
+class Param implements IParam {
+
+ /**
+ * Indicates whether parameters not found in the criteria list
+ * should be stored in case they are not accepted. The default is false.
+ *
+ * @deprecated since 1.7
+ */
+ public static $accumulateParameterErrors = false;
+
+ /**
+ * The original parameter name as provided by the user. This can be the
+ * main name or an alias.
+ * @var string
+ */
+ protected $originalName;
+
+ /**
+ * The original value as provided by the user. This is mainly retained for
+ * usage in error messages when the parameter turns out to be invalid.
+ * @var string
+ */
+ protected $originalValue;
+
+ /**
+ * @var mixed
+ */
+ protected $value;
+
+ /**
+ * Keeps track of how many times the parameter has been set by the user.
+ * This is used to detect overrides and for figuring out a parameter is missing.
+ * @var integer
+ */
+ protected $setCount = 0;
+
+ /**
+ * @var ProcessingError[]
+ */
+ protected $errors = [];
+
+ /**
+ * Indicates if the parameter was set to it's default.
+ * @var boolean
+ */
+ protected $defaulted = false;
+
+ /**
+ * @var ParamDefinition
+ */
+ protected $definition;
+
+ public function __construct( IParamDefinition $definition ) {
+ $this->definition = $definition;
+ }
+
+ /**
+ * Sets and cleans the original value and name.
+ */
+ public function setUserValue( string $paramName, $paramValue, Options $options ): bool {
+ if ( $this->setCount > 0 && !$options->acceptOverriding() ) {
+ // TODO
+ return false;
+ }
+
+ $this->originalName = $paramName;
+ $this->originalValue = $paramValue;
+
+ $this->cleanValue( $options );
+
+ $this->setCount++;
+
+ return true;
+ }
+
+ /**
+ * @param mixed $value
+ */
+ public function setValue( $value ) {
+ $this->value = $value;
+ }
+
+ /**
+ * Sets the $value to a cleaned value of $originalValue.
+ */
+ protected function cleanValue( Options $options ) {
+ if ( $this->definition->isList() ) {
+ $this->value = explode( $this->definition->getDelimiter(), $this->originalValue );
+ }
+ else {
+ $this->value = $this->originalValue;
+ }
+
+ if ( $this->shouldTrim( $options ) ) {
+ $this->trimValue();
+ }
+
+ if ( $this->shouldLowercase( $options ) ) {
+ $this->lowercaseValue();
+ }
+ }
+
+ private function shouldTrim( Options $options ): bool {
+ $trim = $this->definition->trimDuringClean();
+
+ if ( $trim === true ) {
+ return true;
+ }
+
+ return is_null( $trim ) && $options->trimValues();
+ }
+
+ private function trimValue() {
+ if ( is_string( $this->value ) ) {
+ $this->value = trim( $this->value );
+ }
+ elseif ( $this->definition->isList() ) {
+ foreach ( $this->value as &$element ) {
+ if ( is_string( $element ) ) {
+ $element = trim( $element );
+ }
+ }
+ }
+ }
+
+ private function shouldLowercase( Options $options ): bool {
+ if ( $options->lowercaseValues() ) {
+ return true;
+ }
+
+ $definitionOptions = $this->definition->getOptions();
+
+ return array_key_exists( 'tolower', $definitionOptions ) && $definitionOptions['tolower'];
+ }
+
+ private function lowercaseValue() {
+ if ( $this->definition->isList() ) {
+ foreach ( $this->value as &$element ) {
+ if ( is_string( $element ) ) {
+ $element = strtolower( $element );
+ }
+ }
+ }
+ elseif ( is_string( $this->value ) ) {
+ $this->value = strtolower( $this->value );
+ }
+ }
+
+ /**
+ * Parameter processing entry point.
+ * Processes the parameter. This includes parsing, validation and additional formatting.
+ *
+ * @param ParamDefinition[] $definitions
+ * @param Param[] $params
+ * @param Options $options
+ *
+ * @throws Exception
+ */
+ public function process( array &$definitions, array $params, Options $options ) {
+ if ( $this->setCount == 0 ) {
+ if ( $this->definition->isRequired() ) {
+ // This should not occur, so throw an exception.
+ throw new Exception( 'Attempted to validate a required parameter without first setting a value.' );
+ }
+ else {
+ $this->setToDefault();
+ }
+ }
+ else {
+ $this->parseAndValidate( $options );
+ }
+
+ if ( !$this->hasFatalError() && ( $this->definition->shouldManipulateDefault() || !$this->wasSetToDefault() ) ) {
+ $this->definition->format( $this, $definitions, $params );
+ }
+ }
+
+ public function getValueParser( Options $options ): ValueParser {
+ $parser = $this->definition->getValueParser();
+
+ if ( !( $parser instanceof NullParser ) ) {
+ return $parser;
+ }
+
+ // TODO: inject factory
+ $type = ParamDefinitionFactory::singleton()->getType( $this->definition->getType() );
+
+ $parserClass = $options->isStringlyTyped() ? $type->getStringParserClass() : $type->getTypedParserClass();
+
+ return new $parserClass( new \ValueParsers\ParserOptions( $this->definition->getOptions() ) );
+ }
+
+ protected function parseAndValidate( Options $options ) {
+ $parser = $this->getValueParser( $options );
+
+ if ( $this->definition->isList() ) {
+ $values = [];
+
+ foreach ( $this->getValue() as $value ) {
+ $parsedValue = $this->parseAndValidateValue( $parser, $value );
+
+ if ( is_array( $parsedValue ) ) {
+ $values[] = $parsedValue[0];
+ }
+ }
+
+ $this->value = $values;
+ }
+ else {
+ $parsedValue = $this->parseAndValidateValue( $parser, $this->getValue() );
+
+ if ( is_array( $parsedValue ) ) {
+ $this->value = $parsedValue[0];
+ }
+ }
+
+ $this->setToDefaultIfNeeded();
+ }
+
+ /**
+ * Parses and validates the provided with with specified parser.
+ * The result is returned in an array on success. On fail, false is returned.
+ * The result is wrapped in an array since we need to be able to distinguish
+ * between the method returning false and the value being false.
+ *
+ * Parsing and validation errors get added to $this->errors.
+ *
+ * @since 1.0
+ *
+ * @param ValueParser $parser
+ * @param mixed $value
+ *
+ * @return array|bool
+ */
+ protected function parseAndValidateValue( ValueParser $parser, $value ) {
+ try {
+ $value = $parser->parse( $value );
+ }
+ catch ( ParseException $parseException ) {
+ $this->registerProcessingError( $parseException->getMessage() );
+ return false;
+ }
+
+ if ( $value instanceof DataValue ) {
+ $value = $value->getValue();
+ }
+
+ $this->validateValue( $value );
+
+ return [ $value ];
+ }
+
+ protected function registerProcessingError( string $message ) {
+ $this->errors[] = $this->newProcessingError( $message );
+ }
+
+ protected function newProcessingError( string $message ): ProcessingError {
+ $severity = $this->isRequired() ? ProcessingError::SEVERITY_FATAL : ProcessingError::SEVERITY_NORMAL;
+ return new ProcessingError( $message, $severity );
+ }
+
+ /**
+ * @param mixed $value
+ */
+ protected function validateValue( $value ) {
+ $validationCallback = $this->definition->getValidationCallback();
+
+ if ( $validationCallback !== null && $validationCallback( $value ) !== true ) {
+ $this->registerProcessingError( 'Validation callback failed' );
+ }
+ else {
+ $validator = $this->definition->getValueValidator();
+ if ( method_exists( $validator, 'setOptions' ) ) {
+ $validator->setOptions( $this->definition->getOptions() );
+ }
+ $validationResult = $validator->validate( $value );
+
+ if ( !$validationResult->isValid() ) {
+ foreach ( $validationResult->getErrors() as $error ) {
+ $this->registerProcessingError( $error->getText() );
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the parameter value to the default if needed.
+ */
+ protected function setToDefaultIfNeeded() {
+ if ( $this->shouldSetToDefault() ) {
+ $this->setToDefault();
+ }
+ }
+
+ private function shouldSetToDefault(): bool {
+ if ( $this->hasFatalError() ) {
+ return false;
+ }
+
+ if ( $this->definition->isList() ) {
+ return $this->errors !== [] && $this->value === [];
+ }
+
+ return $this->errors !== [];
+ }
+
+ /**
+ * Returns the original use-provided name.
+ *
+ * @throws Exception
+ * @return string
+ */
+ public function getOriginalName(): string {
+ if ( $this->setCount == 0 ) {
+ throw new Exception( 'No user input set to the parameter yet, so the original name does not exist' );
+ }
+ return $this->originalName;
+ }
+
+ /**
+ * Returns the original use-provided value.
+ *
+ * @throws Exception
+ * @return mixed
+ */
+ public function getOriginalValue() {
+ if ( $this->setCount == 0 ) {
+ throw new Exception( 'No user input set to the parameter yet, so the original value does not exist' );
+ }
+ return $this->originalValue;
+ }
+
+ /**
+ * Returns all validation errors that occurred so far.
+ *
+ * @return ProcessingError[]
+ */
+ public function getErrors(): array {
+ return $this->errors;
+ }
+
+ /**
+ * Sets the parameter value to the default.
+ */
+ protected function setToDefault() {
+ $this->defaulted = true;
+ $this->value = $this->definition->getDefault();
+ }
+
+ public function wasSetToDefault(): bool {
+ return $this->defaulted;
+ }
+
+ public function hasFatalError(): bool {
+ foreach ( $this->errors as $error ) {
+ if ( $error->isFatal() ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the ParamDefinition this Param was constructed from.
+ */
+ public function getDefinition(): ParamDefinition {
+ return $this->definition;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function &getValue() {
+ return $this->value;
+ }
+
+ public function isRequired(): bool {
+ return $this->definition->isRequired();
+ }
+
+ public function getName(): string {
+ return $this->definition->getName();
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getAliases(): array {
+ return $this->definition->getAliases();
+ }
+
+} \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/ParamType.php b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/ParamType.php
new file mode 100644
index 00000000..01022a1d
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/src/PackagePrivate/ParamType.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace ParamProcessor\PackagePrivate;
+
+use ParamProcessor\ParamDefinition;
+use ValueParsers\NullParser;
+use ValueValidators\NullValidator;
+
+/**
+ * Package private
+ */
+class ParamType {
+
+ private $typeId;
+
+ private $className;
+ private $stringParser;
+ private $typedParser;
+ private $validator;
+ private $validationCallback;
+
+ private function __construct( string $typeId ) {
+ $this->typeId = $typeId;
+ }
+
+ public static function newFromArray( string $typeId, array $spec ): self {
+ $type = new self( $typeId );
+
+ $type->className = array_key_exists( 'definition', $spec ) ? $spec['definition'] : ParamDefinition::class;
+ $type->stringParser = array_key_exists( 'string-parser', $spec ) ? $spec['string-parser'] : NullParser::class;
+ $type->typedParser = array_key_exists( 'typed-parser', $spec ) ? $spec['typed-parser'] : NullParser::class;
+ $type->validator = array_key_exists( 'validator', $spec ) ? $spec['validator'] : NullValidator::class;
+ $type->validationCallback = array_key_exists( 'validation-callback', $spec ) ? $spec['validation-callback'] : null;
+
+ return $type;
+ }
+
+ public function getClassName(): string {
+ return $this->className;
+ }
+
+ public function getValidatorClass(): string {
+ return $this->validator;
+ }
+
+ public function getValidationCallback(): ?callable {
+ return $this->validationCallback;
+ }
+
+ public function getStringParserClass(): string {
+ return $this->stringParser;
+ }
+
+ public function getTypedParserClass(): string {
+ return $this->typedParser;
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Param.php b/www/wiki/vendor/param-processor/param-processor/src/Param.php
index 826cf9a4..aa05c78c 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/Param.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/Param.php
@@ -1,517 +1,3 @@
<?php
-namespace ParamProcessor;
-
-use Exception;
-use ValueParsers\NullParser;
-use ValueParsers\ParseException;
-use ValueParsers\ValueParser;
-
-/**
- * Parameter class, representing the "instance" of a parameter.
- * Holds a ParamDefinition, user provided input (name & value) and processing state.
- *
- * NOTE: as of version 1.0, this class is for internal use only!
- *
- * @since 1.0
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
-final class Param implements IParam {
-
- /**
- * Indicates whether parameters not found in the criteria list
- * should be stored in case they are not accepted. The default is false.
- *
- * @since 1.0
- *
- * @var boolean
- */
- public static $accumulateParameterErrors = false;
-
- /**
- * The original parameter name as provided by the user. This can be the
- * main name or an alias.
- *
- * @since 1.0
- *
- * @var string
- */
- protected $originalName;
-
- /**
- * The original value as provided by the user. This is mainly retained for
- * usage in error messages when the parameter turns out to be invalid.
- *
- * @since 1.0
- *
- * @var string
- */
- protected $originalValue;
-
- /**
- * The value of the parameter.
- *
- * @since 1.0
- *
- * @var mixed
- */
- protected $value;
-
- /**
- * Keeps track of how many times the parameter has been set by the user.
- * This is used to detect overrides and for figuring out a parameter is missing.
- *
- * @since 1.0
- *
- * @var integer
- */
- protected $setCount = 0;
-
- /**
- * List of validation errors for this parameter.
- *
- * @since 1.0
- *
- * @var array of ProcessingError
- */
- protected $errors = [];
-
- /**
- * Indicates if the parameter was set to it's default.
- *
- * @since 1.0
- *
- * @var boolean
- */
- protected $defaulted = false;
-
- /**
- * @since 1.0
- *
- * @var ParamDefinition
- */
- protected $definition;
-
- /**
- * Constructor.
- *
- * @since 1.0
- *
- * @param IParamDefinition $definition
- */
- public function __construct( IParamDefinition $definition ) {
- $this->definition = $definition;
- }
-
- /**
- * Sets and cleans the original value and name.
- * @see IParam::setUserValue
- *
- * @since 1.0
- *
- * @param string $paramName
- * @param string $paramValue
- * @param Options $options
- *
- * @return boolean
- */
- public function setUserValue( $paramName, $paramValue, Options $options ) {
- if ( $this->setCount > 0 && !$options->acceptOverriding() ) {
- // TODO
- return false;
- }
- else {
- $this->originalName = $paramName;
- $this->originalValue = $paramValue;
-
- $this->cleanValue( $options );
-
- $this->setCount++;
-
- return true;
- }
- }
-
- /**
- * Sets the value.
- *
- * @since 1.0
- *
- * @param mixed $value
- */
- public function setValue( $value ) {
- $this->value = $value;
- }
-
- /**
- * Sets the $value to a cleaned value of $originalValue.
- *
- * TODO: the per-parameter lowercaseing and trimming here needs some thought
- *
- * @since 1.0
- *
- * @param Options $options
- */
- protected function cleanValue( Options $options ) {
- $this->value = $this->originalValue;
-
- $trim = $this->getDefinition()->trimDuringClean();
-
- if ( $trim === true || ( is_null( $trim ) && $options->trimValues() ) ) {
- if ( is_string( $this->value ) ) {
- $this->value = trim( $this->value );
- }
- }
-
-
- if ( $this->definition->isList() ) {
- $this->value = explode( $this->definition->getDelimiter(), $this->value );
-
- if ( $trim === true || ( is_null( $trim ) && $options->trimValues() ) ) {
- foreach ( $this->value as &$element ) {
- if ( is_string( $element ) ) {
- $element = trim( $element );
- }
- }
- }
- }
-
- $definitionOptions = $this->definition->getOptions();
-
- if ( $options->lowercaseValues() || ( array_key_exists( 'tolower', $definitionOptions ) && $definitionOptions['tolower'] ) ) {
- if ( $this->definition->isList() ) {
- foreach ( $this->value as &$element ) {
- if ( is_string( $element ) ) {
- $element = strtolower( $element );
- }
- }
- }
- elseif ( is_string( $this->value ) ) {
- $this->value = strtolower( $this->value );
- }
- }
- }
-
- /**
- * Parameter processing entry point.
- * Processes the parameter. This includes parsing, validation and additional formatting.
- *
- * @since 1.0
- *
- * @param $definitions array of IParamDefinition
- * @param $params array of IParam
- * @param Options $options
- *
- * @throws Exception
- */
- public function process( array &$definitions, array $params, Options $options ) {
- if ( $this->setCount == 0 ) {
- if ( $this->definition->isRequired() ) {
- // This should not occur, so throw an exception.
- throw new Exception( 'Attempted to validate a required parameter without first setting a value.' );
- }
- else {
- $this->setToDefault();
- }
- }
- else {
- $this->parseAndValidate( $options );
- }
-
- if ( !$this->hasFatalError() && ( $this->definition->shouldManipulateDefault() || !$this->wasSetToDefault() ) ) {
- $this->definition->format( $this, $definitions, $params );
- }
- }
-
- /**
- * @since 1.0
- *
- * @param Options $options
- *
- * @return ValueParser
- */
- public function getValueParser( Options $options ) {
- $parser = $this->definition->getValueParser();
-
- if ( get_class( $parser ) === NullParser::class ) {
- $parserType = $options->isStringlyTyped() ? 'string-parser' : 'typed-parser';
-
- // TODO: inject factory
- $parserClass = ParamDefinitionFactory::singleton()->getComponentForType( $this->definition->getType(), $parserType );
-
- if ( $parserClass !== NullParser::class ) {
- $parser = new $parserClass( new \ValueParsers\ParserOptions() );
- }
- }
-
- return $parser;
- }
-
- /**
- * @since 1.0
- *
- * @param Options $options
- */
- protected function parseAndValidate( Options $options ) {
- $parser = $this->getValueParser( $options );
-
- if ( $this->definition->isList() ) {
- $values = [];
-
- foreach ( $this->getValue() as $value ) {
- $parsedValue = $this->parseAndValidateValue( $parser, $value );
-
- if ( is_array( $parsedValue ) ) {
- $values[] = $parsedValue[0];
- }
- }
-
- $this->value = $values;
- }
- else {
- $parsedValue = $this->parseAndValidateValue( $parser, $this->getValue() );
-
- if ( is_array( $parsedValue ) ) {
- $this->value = $parsedValue[0];
- }
- }
-
- $this->setToDefaultIfNeeded();
- }
-
- /**
- * Parses and validates the provided with with specified parser.
- * The result is returned in an array on success. On fail, false is returned.
- * The result is wrapped in an array since we need to be able to distinguish
- * between the method returning false and the value being false.
- *
- * Parsing and validation errors get added to $this->errors.
- *
- * @since 1.0
- *
- * @param ValueParser $parser
- * @param mixed $value
- *
- * @return array|bool
- */
- protected function parseAndValidateValue( ValueParser $parser, $value ) {
- try {
- $value = $parser->parse( $value );
- }
- catch ( ParseException $parseException ) {
- $this->registerProcessingError( $parseException->getMessage() );
- return false;
- }
-
- if ( $value instanceof \DataValues\DataValue ) {
- $value = $value->getValue();
- }
-
- $this->validateValue( $value );
-
- return [ $value ];
- }
-
- /**
- * @since 1.0
- *
- * @param string $message
- */
- protected function registerProcessingError( $message ) {
- $this->errors[] = $this->newProcessingError( $message );
- }
-
- /**
- * @since 1.0
- *
- * @param string $message
- *
- * @return ProcessingError
- */
- protected function newProcessingError( $message ) {
- $severity = $this->isRequired() ? ProcessingError::SEVERITY_FATAL : ProcessingError::SEVERITY_NORMAL;
- return new ProcessingError( $message, $severity );
- }
-
- /**
- * @since 1.0
- *
- * @param mixed $value
- */
- protected function validateValue( $value ) {
- $validationCallback = $this->definition->getValidationCallback();
-
- if ( $validationCallback !== null && $validationCallback( $value ) !== true ) {
- $this->registerProcessingError( 'Validation callback failed' );
- }
- else {
- $validator = $this->definition->getValueValidator();
- if ( method_exists( $validator, 'setOptions' ) ) {
- $validator->setOptions( $this->definition->getOptions() );
- }
- $validationResult = $validator->validate( $value );
-
- if ( !$validationResult->isValid() ) {
- foreach ( $validationResult->getErrors() as $error ) {
- $this->registerProcessingError( $error->getText() );
- }
- }
- }
- }
-
- /**
- * Sets the parameter value to the default if needed.
- *
- * @since 1.0
- */
- protected function setToDefaultIfNeeded() {
- if ( $this->shouldSetToDefault() ) {
- $this->setToDefault();
- }
- }
-
- private function shouldSetToDefault(): bool {
- if ( $this->hasFatalError() ) {
- return false;
- }
-
- if ( $this->definition->isList() ) {
- return $this->errors !== [] && $this->value === [];
- }
-
- return $this->errors !== [];
- }
-
- /**
- * Returns the original use-provided name.
- *
- * @since 1.0
- *
- * @throws Exception
- * @return string
- */
- public function getOriginalName() {
- if ( $this->setCount == 0 ) {
- throw new Exception( 'No user input set to the parameter yet, so the original name does not exist' );
- }
- return $this->originalName;
- }
-
- /**
- * Returns the original use-provided value.
- *
- * @since 1.0
- *
- * @throws Exception
- * @return string
- */
- public function getOriginalValue() {
- if ( $this->setCount == 0 ) {
- throw new Exception( 'No user input set to the parameter yet, so the original value does not exist' );
- }
- return $this->originalValue;
- }
-
- /**
- * Returns all validation errors that occurred so far.
- *
- * @since 1.0
- *
- * @return ProcessingError[]
- */
- public function getErrors() {
- return $this->errors;
- }
-
- /**
- * Sets the parameter value to the default.
- *
- * @since 1.0
- */
- protected function setToDefault() {
- $this->defaulted = true;
- $this->value = $this->definition->getDefault();
- }
-
- /**
- * Gets if the parameter was set to it's default.
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function wasSetToDefault() {
- return $this->defaulted;
- }
-
- /**
- * @return boolean
- */
- public function hasFatalError() {
- foreach ( $this->errors as $error ) {
- if ( $error->isFatal() ) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Returns the IParamDefinition this IParam was constructed from.
- *
- * @since 1.0
- *
- * @return IParamDefinition
- */
- public function getDefinition() {
- return $this->definition;
- }
-
- /**
- * Returns the parameters value.
- *
- * @since 1.0
- *
- * @return mixed
- */
- public function &getValue() {
- return $this->value;
- }
-
- /**
- * Returns if the parameter is required or not.
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function isRequired() {
- return $this->definition->isRequired();
- }
-
- /**
- * Returns if the name of the parameter.
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function getName() {
- return $this->definition->getName();
- }
-
- /**
- * Returns the parameter name aliases.
- *
- * @since 1.0
- *
- * @return string[]
- */
- public function getAliases() {
- return $this->definition->getAliases();
- }
-
-} \ No newline at end of file
+class_alias(\ParamProcessor\PackagePrivate\Param::class, 'ParamProcessor\Param'); \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ParamDefinition.php b/www/wiki/vendor/param-processor/param-processor/src/ParamDefinition.php
index 3990e757..1f49bb4a 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ParamDefinition.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ParamDefinition.php
@@ -3,19 +3,17 @@
namespace ParamProcessor;
use Exception;
-
-use ValueParsers\ValueParser;
+use ParamProcessor\PackagePrivate\Param;
use ValueParsers\NullParser;
-
-use ValueValidators\ValueValidator;
+use ValueParsers\ValueParser;
use ValueValidators\NullValidator;
+use ValueValidators\ValueValidator;
/**
- * Parameter definition.
* Specifies what kind of values are accepted, how they should be validated,
* how they should be formatted, what their dependencies are and how they should be described.
*
- * Try to avoid using this interface outside of ParamProcessor for anything else then defining parameters.
+ * Try to avoid using this interface outside of ParamProcessor for anything else than defining parameters.
* In particular, do not derive from this class to implement methods such as formatValue.
*
* @since 1.0
@@ -23,13 +21,13 @@ use ValueValidators\NullValidator;
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-class ParamDefinition implements IParamDefinition {
+/* final */ class ParamDefinition implements IParamDefinition {
/**
* Indicates whether parameters that are provided more then once should be accepted,
* and use the first provided value, or not, and generate an error.
*
- * @since 1.0
+ * @deprected since 1.7
*
* @var boolean
*/
@@ -39,65 +37,44 @@ class ParamDefinition implements IParamDefinition {
* Indicates whether parameters not found in the criteria list
* should be stored in case they are not accepted. The default is false.
*
- * @since 1.0
+ * @deprected since 1.7
*
* @var boolean
*/
public static $accumulateParameterErrors = false;
+ protected $type;
+ protected $name;
+ protected $default;
+ protected $isList;
+
/**
- * Indicates if the parameter value should trimmed during the clean process.
- *
- * @since 1.0
+ * A message that acts as description for the parameter or false when there is none.
+ * Can be obtained via getMessage and set via setMessage.
*
+ * @var string
+ */
+ protected $message;
+
+ /**
+ * Indicates if the parameter value should trimmed during the clean process.
* @var boolean|null
*/
protected $trimValue = null;
/**
* Indicates if the parameter manipulations should be applied to the default value.
- *
- * @since 1.0
- *
* @var boolean
*/
protected $applyManipulationsToDefault = true;
/**
* Dependency list containing parameters that need to be handled before this one.
- *
- * @since 1.0
- *
* @var string[]
*/
protected $dependencies = [];
/**
- * The default value for the parameter, or null when the parameter is required.
- *
- * @since 1.0
- *
- * @var mixed
- */
- protected $default;
-
- /**
- * The main name of the parameter.
- *
- * @since 1.0
- *
- * @var string
- */
- protected $name;
-
- /**
- * @since 1.0
- * @var boolean
- */
- protected $isList;
-
- /**
- * @since 1.0
* @var string
*/
protected $delimiter = ',';
@@ -105,75 +82,43 @@ class ParamDefinition implements IParamDefinition {
/**
* List of aliases for the parameter name.
*
- * @since 1.0
- *
* @var string[]
*/
protected $aliases = [];
/**
- * A message that acts as description for the parameter or false when there is none.
- * Can be obtained via getMessage and set via setMessage.
- *
- * @since 1.0
- *
- * @var string
- */
- protected $message = 'validator-message-nodesc';
-
- /**
* Original array definition of the parameter
- *
- * @since 1.0
- *
* @var array
*/
protected $options = [];
/**
- * @since 1.0
- *
* @var ValueParser|null
*/
protected $parser = null;
/**
- * @since 1.0
- *
* @var ValueValidator|null
*/
protected $validator = null;
/**
- * @since 0.1
- *
* @var callable|null
*/
protected $validationFunction = null;
/**
- * @since 0.1
- *
- * @var string
- */
- protected $type;
-
- /**
- * Constructor.
- *
- * @since 1.0
- *
* @param string $type
* @param string $name
* @param mixed $default Use null for no default (which makes the parameter required)
* @param string $message
* @param boolean $isList
*/
- public function __construct( $type, $name, $default = null, $message = null, $isList = false ) {
+ public function __construct( string $type, string $name, $default = null, string $message = null, bool $isList = false ) {
$this->type = $type;
$this->name = $name;
$this->default = $default;
- $this->message = $message;
+ $this->message = $message ?? 'validator-message-nodesc';
$this->isList = $isList;
$this->postConstruct();
@@ -190,61 +135,39 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::trimDuringClean
- *
- * @since 1.0
- *
- * @return boolean|null
+ * Returns if the value should be trimmed before validation and any further processing.
+ * - true: always trim
+ * - false: never trim
+ * - null: trim based on context settings
*/
- public function trimDuringClean() {
+ public function trimDuringClean(): ?bool {
return $this->trimValue;
}
/**
- * @see IParamDefinition::getAliases
- *
- * @since 1.0
- *
+ * Returns the parameter name aliases.
* @return string[]
*/
- public function getAliases() {
+ public function getAliases(): array {
return $this->aliases;
}
- /**
- * @see IParamDefinition::hasAlias
- *
- * @since 1.0
- *
- * @param string $alias
- *
- * @return boolean
- */
- public function hasAlias( $alias ) {
+ public function hasAlias( string $alias ): bool {
return in_array( $alias, $this->getAliases() );
}
/**
- * @see IParamDefinition::hasDependency
- *
- * @since 1.0
- *
- * @param string $dependency
- *
- * @return boolean
+ * @deprecated since 1.7
+ * Returns if the parameter has a certain dependency.
*/
- public function hasDependency( $dependency ) {
+ public function hasDependency( string $dependency ): bool {
return in_array( $dependency, $this->getDependencies() );
}
/**
* Returns the list of allowed values, or an empty array if there is no such restriction.
- *
- * @since 1.0
- *
- * @return array
*/
- public function getAllowedValues() {
+ public function getAllowedValues(): array {
$allowedValues = [];
if ( $this->validator !== null && method_exists( $this->validator, 'getWhitelistedValues' ) ) {
@@ -263,9 +186,7 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::setDefault
- *
- * @since 1.0
+ * @deprecated since 1.7
*
* @param mixed $default
* @param boolean $manipulate Should the default be manipulated or not? Since 0.4.6.
@@ -276,10 +197,7 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::getDefault
- *
- * @since 1.0
- *
+ * Returns the default value.
* @return mixed
*/
public function getDefault() {
@@ -287,53 +205,33 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::getMessage
- *
- * @since 1.0
- *
- * @return string
+ * Returns a message describing the parameter.
*/
- public function getMessage() {
+ public function getMessage(): string {
return $this->message;
}
/**
- * @see IParamDefinition::setMessage
- *
- * @since 1.0
- *
- * @param string $message
+ * This should be a message key, ie something that can be passed
+ * to wfMsg. Not an actual text.
*/
- public function setMessage( $message ) {
+ public function setMessage( string $message ) {
$this->message = $message;
}
/**
- * @see IParamDefinition::setDoManipulationOfDefault
- *
- * @since 1.0
- *
- * @param boolean $doOrDoNotThereIsNoTry
+ * Set if the parameter manipulations should be applied to the default value.
*/
- public function setDoManipulationOfDefault( $doOrDoNotThereIsNoTry ) {
+ public function setDoManipulationOfDefault( bool $doOrDoNotThereIsNoTry ) {
$this->applyManipulationsToDefault = $doOrDoNotThereIsNoTry;
}
- /**
- * @see IParamDefinition::shouldManipulateDefault
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function shouldManipulateDefault() {
+ public function shouldManipulateDefault(): bool {
return $this->applyManipulationsToDefault;
}
/**
- * @see IParamDefinition::addAliases
- *
- * @since 1.0
+ * Adds one or more aliases for the parameter name.
*
* @param string|string[] $aliases
*/
@@ -343,9 +241,8 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::addDependencies
- *
- * @since 1.0
+ * Adds one or more dependencies. There are the names of parameters
+ * that need to be validated and formatted before this one.
*
* @param string|string[] $dependencies
*/
@@ -354,25 +251,14 @@ class ParamDefinition implements IParamDefinition {
$this->dependencies = array_merge( $this->dependencies, is_array( $args[0] ) ? $args[0] : $args );
}
- /**
- * @see IParamDefinition::getName
- *
- * @since 1.0
- *
- * @return string
- */
- public function getName() {
+ public function getName(): string {
return $this->name;
}
/**
* Returns a message key for a message describing the parameter type.
- *
- * @since 1.0
- *
- * @return string
*/
- public function getTypeMessage() {
+ public function getTypeMessage(): string {
$message = 'validator-type-' . $this->getType();
if ( $this->isList() ) {
@@ -383,66 +269,45 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::getDependencies
- *
- * @since 1.0
+ * @deprecated since 1.7
+ * Returns a list of dependencies the parameter has, in the form of
+ * other parameter names.
*
* @return string[]
*/
- public function getDependencies() {
+ public function getDependencies(): array {
return $this->dependencies;
}
- /**
- * @see IParamDefinition::isRequired
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function isRequired() {
+ public function isRequired(): bool {
return is_null( $this->default );
}
- /**
- * @see IParamDefinition::isList
- *
- * @since 1.0
- *
- * @return boolean
- */
- public function isList() {
+ public function isList(): bool {
return $this->isList;
}
/**
- * @see IParamDefinition::getDelimiter
- *
- * @since 1.0
- *
- * @return string
+ * Returns the delimiter to use to split the raw value in case the
+ * parameter is a list.
*/
- public function getDelimiter() {
+ public function getDelimiter(): string {
return $this->delimiter;
}
/**
- * @see IParamDefinition::setDelimiter
- *
- * @since 1.0
- *
- * @param $delimiter string
+ * Sets the delimiter to use to split the raw value in case the
+ * parameter is a list.
*/
- public function setDelimiter( $delimiter ) {
+ public function setDelimiter( string $delimiter ) {
$this->delimiter = $delimiter;
}
/**
- * @see IParamDefinition::setArrayValues
+ * Sets the parameter definition values contained in the provided array.
*
- * @since 1.0
- *
- * @param array $param
+ * @deprecated since 1.7
+ * TODO: provide alternative in ParamDefinitionFactory
*/
public function setArrayValues( array $param ) {
if ( array_key_exists( 'aliases', $param ) ) {
@@ -471,7 +336,6 @@ class ParamDefinition implements IParamDefinition {
/**
* @see IParamDefinition::format
*
- * @since 1.0
* @deprecated
*
* @param IParam $param
@@ -479,6 +343,10 @@ class ParamDefinition implements IParamDefinition {
* @param IParam[] $params
*/
public function format( IParam $param, array &$definitions, array $params ) {
+ /**
+ * @var Param $param
+ */
+
if ( $this->isList() && is_array( $param->getValue() ) ) {
// TODO: if isList returns true, the value should be an array.
// The second check here is to avoid a mysterious error.
@@ -516,7 +384,6 @@ class ParamDefinition implements IParamDefinition {
* @param $params array of IParam
*/
protected function formatList( IParam $param, array &$definitions, array $params ) {
- // TODO
}
/**
@@ -534,7 +401,6 @@ class ParamDefinition implements IParamDefinition {
*/
protected function formatValue( $value, IParam $param, array &$definitions, array $params ) {
return $value;
- // No-op
}
/**
@@ -543,54 +409,28 @@ class ParamDefinition implements IParamDefinition {
* ParamDefinition classes and having all keys set to the names of the
* corresponding parameters.
*
- * @since 1.0
+ * @deprecated since 1.7 - use ParamDefinitionFactory
*
- * @param IParamDefinition[] $definitions
+ * @param ParamDefinition[] $definitions
*
- * @return IParamDefinition[]
+ * @return ParamDefinition[]
* @throws Exception
*/
- public static function getCleanDefinitions( array $definitions ) {
- $cleanList = [];
-
- foreach ( $definitions as $key => $definition ) {
- if ( is_array( $definition ) ) {
- if ( !array_key_exists( 'name', $definition ) && is_string( $key ) ) {
- $definition['name'] = $key;
- }
-
- $definition = ParamDefinitionFactory::singleton()->newDefinitionFromArray( $definition );
- }
-
- if ( !( $definition instanceof IParamDefinition ) ) {
- throw new Exception( '$definition not an instance of IParamDefinition' );
- }
-
- $cleanList[$definition->getName()] = $definition;
- }
-
- return $cleanList;
+ public static function getCleanDefinitions( array $definitions ): array {
+ return ParamDefinitionFactory::singleton()->newDefinitionsFromArrays( $definitions );
}
/**
- * @see IParamDefinition::getType
- *
- * @since 1.0
- *
- * @return string
+ * Returns an identifier for the type of the parameter.
*/
- public function getType() {
+ public function getType(): string {
return $this->type;
}
/**
- * @see IParamDefinition::getValueParser
- *
- * @since 1.0
- *
- * @return ValueParser
+ * Returns a ValueParser object to parse the parameters value.
*/
- public function getValueParser() {
+ public function getValueParser(): ValueParser {
if ( $this->parser === null ) {
$this->parser = new NullParser();
}
@@ -599,13 +439,9 @@ class ParamDefinition implements IParamDefinition {
}
/**
- * @see IParamDefinition::getValueValidator
- *
- * @since 1.0
- *
- * @return ValueValidator
+ * Returns a ValueValidator that can be used to validate the parameters value.
*/
- public function getValueValidator() {
+ public function getValueValidator(): ValueValidator {
if ( $this->validator === null ) {
$this->validator = new NullValidator();
}
@@ -613,56 +449,32 @@ class ParamDefinition implements IParamDefinition {
return $this->validator;
}
- /**
- * @see IParamDefinition::setValueParser
- *
- * @since 1.0
- *
- * @param ValueParser $parser
- */
public function setValueParser( ValueParser $parser ) {
$this->parser = $parser;
}
- /**
- * @see IParamDefinition::setValueValidator
- *
- * @since 1.0
- *
- * @param ValueValidator $validator
- */
public function setValueValidator( ValueValidator $validator ) {
$this->validator = $validator;
}
/**
- * @see IParamDefinition::setValidationCallback
+ * Sets a validation function that will be run before the ValueValidator.
*
- * @since 1.0
- *
- * @param callable $validationFunction
+ * This can be used instead of a ValueValidator where validation is very
+ * trivial, ie checking if something is a boolean can be done with is_bool.
*/
- public function setValidationCallback( /* callable */ $validationFunction ) {
+ public function setValidationCallback( ?callable $validationFunction ) {
$this->validationFunction = $validationFunction;
}
/**
- * @see IParamDefinition::getValidationCallback
- *
- * @since 1.0
- *
- * @return callable|null
+ * @see setValidationCallback
*/
- public function getValidationCallback() {
+ public function getValidationCallback(): ?callable {
return $this->validationFunction;
}
- /**
- * @since 0.1
- *
- * @return array
- */
- public function getOptions() {
+ public function getOptions(): array {
return $this->options;
}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ParamDefinitionFactory.php b/www/wiki/vendor/param-processor/param-processor/src/ParamDefinitionFactory.php
index f582d67f..dcf72839 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ParamDefinitionFactory.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ParamDefinitionFactory.php
@@ -4,42 +4,39 @@ namespace ParamProcessor;
use Exception;
use OutOfBoundsException;
+use ParamProcessor\PackagePrivate\ParamType;
+use ValueValidators\NullValidator;
/**
- * Factory for IParamDefinition implementing objects.
+ * Factory for ParamDefinition implementing objects.
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class ParamDefinitionFactory {
+ private $types;
+
/**
- * Maps parameter type to handling IParameterDefinition implementing class.
- *
- * @since 1.0
- *
- * @var array
+ * @since 1.8
*/
- private $typeToClass = [];
+ public function __construct( ParameterTypes $types = null ) {
+ $this->types = $types ?? new ParameterTypes();
+ }
/**
- * Maps parameter type to its associated components.
- *
- * @since 1.0
+ * Returns a ParamDefinitionFactory that already has the core parameter types (@see ParameterTypes) registered.
*
- * @var array
+ * @since 1.6
*/
- private $typeToComponent = [];
+ public static function newDefault(): self {
+ return new self( ParameterTypes::newCoreTypes() );
+ }
/**
- * Singleton.
- *
- * @since 1.0
* @deprecated since 1.0
- *
- * @return ParamDefinitionFactory
*/
- public static function singleton() {
+ public static function singleton(): self {
static $instance = false;
if ( $instance === false ) {
@@ -52,8 +49,7 @@ class ParamDefinitionFactory {
/**
* Registers the parameter types specified in the global $wgParamDefinitions.
- *
- * @since 1.0
+ * @deprecated since 1.6
*/
public function registerGlobals() {
if ( array_key_exists( 'wgParamDefinitions', $GLOBALS ) ) {
@@ -75,7 +71,7 @@ class ParamDefinitionFactory {
*
* - string-parser: the parser to use to transform string values
* This class needs to implement ValueParser. Default: NullParser
- * - typed-parser: the parser to use to transform typed PHP values
+ * - typed-parser: DEPRECATED since 1.6 - the parser to use to transform typed PHP values
* This class needs to implement ValueParser. Default: NullParser
* - validator: the validation object to use
* This class needs to implement ValueValidator. Default: NullValidator
@@ -87,71 +83,56 @@ class ParamDefinitionFactory {
* @param string $type
* @param array $data
*
- * @return boolean Indicates if the type was registered
+ * @return boolean DEPRECATED since 1.6 - Indicates if the type was registered
*/
public function registerType( $type, array $data ) {
- if ( array_key_exists( $type, $this->typeToClass ) ) {
+ if ( $this->types->hasType( $type ) ) {
return false;
}
- $class = array_key_exists( 'definition', $data ) ? $data['definition'] : 'ParamProcessor\ParamDefinition';
- $this->typeToClass[$type] = $class;
-
- $defaults = [
- 'string-parser' => 'ValueParsers\NullParser',
- 'typed-parser' => 'ValueParsers\NullParser',
- 'validator' => 'ValueValidators\NullValidator',
- 'validation-callback' => null,
- ];
-
- $this->typeToComponent[$type] = [];
-
- foreach ( $defaults as $component => $default ) {
- $this->typeToComponent[$type][$component] = array_key_exists( $component, $data ) ? $data[$component] : $default;
- }
+ $this->types->addType( $type, $data );
return true;
}
/**
- * Creates a new instance of a IParamDefinition based on the provided type.
- *
- * @since 1.0
+ * Creates a new instance of a ParamDefinition based on the provided type.
*
- * @param string $type
+ * @param string $typeName
* @param string $name
* @param mixed $default
* @param string $message
* @param boolean $isList
*
- * @return IParamDefinition
+ * @return ParamDefinition
* @throws OutOfBoundsException
*/
- public function newDefinition( $type, $name, $default, $message, $isList = false ) {
- if ( !array_key_exists( $type, $this->typeToClass ) ) {
- throw new OutOfBoundsException( 'Unknown parameter type "' . $type . '".' );
+ public function newDefinition( string $typeName, string $name, $default, string $message, bool $isList = false ): ParamDefinition {
+ if ( !$this->types->hasType( $typeName ) ) {
+ throw new OutOfBoundsException( 'Unknown parameter type "' . $typeName . '".' );
}
- $class = $this->typeToClass[$type];
+ $type = $this->types->getType( $typeName );
+ $class = $type->getClassName();
/**
- * @var IParamDefinition $definition
+ * @var ParamDefinition $definition
*/
$definition = new $class(
- $type,
+ $typeName,
$name,
$default,
$message,
$isList
);
- $validator = $this->typeToComponent[$type]['validator'];
+ $validator = $type->getValidatorClass();
- if ( $validator !== '\ValueValidators\NullValidator' ) {
+ if ( $validator !== NullValidator::class ) {
$definition->setValueValidator( new $validator() );
}
- $validationCallback = $this->typeToComponent[$type]['validation-callback'];
+ $validationCallback = $type->getValidationCallback();
if ( $validationCallback !== null ) {
$definition->setValidationCallback( $validationCallback );
@@ -161,43 +142,22 @@ class ParamDefinitionFactory {
}
/**
- * Returns the specified component for the provided parameter type.
- * This method is likely to change in the future in a compat breaking way.
- *
- * @since 1.0
- *
- * @param string $paramType
- * @param string $componentType
- *
- * @throws Exception
- * @return mixed
+ * Package private
*/
- public function getComponentForType( $paramType, $componentType ) {
- if ( !array_key_exists( $paramType, $this->typeToComponent ) ) {
- throw new Exception( 'Unknown parameter type "' . $paramType . '".' );
- }
-
- if ( !array_key_exists( $componentType, $this->typeToComponent[$paramType] ) ) {
- throw new Exception( 'Unknown parameter component type "' . $paramType . '".' );
- }
-
- return $this->typeToComponent[$paramType][$componentType];
+ public function getType( string $typeName ): ParamType {
+ return $this->types->getType( $typeName );
}
/**
- * Construct a new ParamDefinition from an array.
- *
- * @since 1.0
+ * @param array $definitionArray
+ * @param bool $getMad DEPRECATED since 1.6
*
- * @param array $param
- * @param bool $getMad
- *
- * @return IParamDefinition|false
+ * @return ParamDefinition|false
* @throws Exception
*/
- public function newDefinitionFromArray( array $param, $getMad = true ) {
+ public function newDefinitionFromArray( array $definitionArray, $getMad = true ) {
foreach ( [ 'name', 'message' ] as $requiredElement ) {
- if ( !array_key_exists( $requiredElement, $param ) ) {
+ if ( !array_key_exists( $requiredElement, $definitionArray ) ) {
if ( $getMad ) {
throw new Exception( 'Could not construct a ParamDefinition from an array without ' . $requiredElement . ' element' );
}
@@ -206,17 +166,50 @@ class ParamDefinitionFactory {
}
}
- $parameter = $this->newDefinition(
- array_key_exists( 'type', $param ) ? $param['type'] : 'string',
- $param['name'],
- array_key_exists( 'default', $param ) ? $param['default'] : null,
- $param['message'],
- array_key_exists( 'islist', $param ) ? $param['islist'] : false
+ $definition = $this->newDefinition(
+ array_key_exists( 'type', $definitionArray ) ? $definitionArray['type'] : 'string',
+ $definitionArray['name'],
+ array_key_exists( 'default', $definitionArray ) ? $definitionArray['default'] : null,
+ $definitionArray['message'],
+ array_key_exists( 'islist', $definitionArray ) ? $definitionArray['islist'] : false
);
- $parameter->setArrayValues( $param );
+ $definition->setArrayValues( $definitionArray );
+
+ return $definition;
+ }
+
+ /**
+ * @since 1.9
+ *
+ * @param array $definitionArrays Each element must either be
+ * - A definition array with "name" key
+ * - A name key pointing to a definition array
+ * - A ParamDefinition instance (discouraged)
+ *
+ * @return ParamDefinition[]
+ * @throws Exception
+ */
+ public function newDefinitionsFromArrays( array $definitionArrays ): array {
+ $cleanList = [];
+
+ foreach ( $definitionArrays as $key => $definitionArray ) {
+ if ( is_array( $definitionArray ) ) {
+ if ( !array_key_exists( 'name', $definitionArray ) && is_string( $key ) ) {
+ $definitionArray['name'] = $key;
+ }
+
+ $definitionArray = $this->newDefinitionFromArray( $definitionArray );
+ }
+
+ if ( !( $definitionArray instanceof IParamDefinition ) ) {
+ throw new Exception( 'Parameter definition not an instance of IParamDefinition' );
+ }
+
+ $cleanList[$definitionArray->getName()] = $definitionArray;
+ }
- return $parameter;
+ return $cleanList;
}
}
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ParameterTypes.php b/www/wiki/vendor/param-processor/param-processor/src/ParameterTypes.php
index ca4e66bc..4f984e51 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ParameterTypes.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ParameterTypes.php
@@ -4,8 +4,9 @@ declare( strict_types = 1 );
namespace ParamProcessor;
-use ParamProcessor\Definition\DimensionParam;
use ParamProcessor\Definition\StringParam;
+use ParamProcessor\PackagePrivate\DimensionParser;
+use ParamProcessor\PackagePrivate\ParamType;
use ValueParsers\BoolParser;
use ValueParsers\FloatParser;
use ValueParsers\IntParser;
@@ -14,37 +15,89 @@ use ValueValidators\RangeValidator;
use ValueValidators\StringValidator;
/**
- * @since 1.4
- *
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class ParameterTypes {
+ /**
+ * @since 1.7
+ */
+ public const BOOLEAN = 'boolean';
+ public const FLOAT = 'float';
+ public const INTEGER = 'integer';
+ public const STRING = 'string';
+ public const DIMENSION = 'dimension';
+
+ /**
+ * @var ParamType[]
+ */
+ private $types = [];
+
+ /**
+ * @param array[] $typeSpecs
+ */
+ public function __construct( array $typeSpecs = [] ) {
+ foreach ( $typeSpecs as $typeName => $typeSpec ) {
+ $this->addType( $typeName, $typeSpec );
+ }
+ }
+
+ /**
+ * @since 1.8
+ */
+ public function addType( string $typeName, array $typeSpec ) {
+ $this->types[$typeName] = ParamType::newFromArray( $typeName, $typeSpec );
+ }
+
+ /**
+ * Package private
+ */
+ public function hasType( string $typeName ): bool {
+ return array_key_exists( $typeName, $this->types );
+ }
+
+ /**
+ * Package private
+ */
+ public function getType( string $typeName ): ParamType {
+ return $this->types[$typeName];
+ }
+
+ /**
+ * @since 1.8
+ */
+ public static function newCoreTypes(): self {
+ return new self( self::getCoreTypes() );
+ }
+
+ /**
+ * @since 1.4
+ */
public static function getCoreTypes(): array {
return [
- 'boolean' => [
+ self::BOOLEAN => [
'string-parser' => BoolParser::class,
'validation-callback' => 'is_bool',
],
- 'float' => [
+ self::FLOAT => [
'string-parser' => FloatParser::class,
'validation-callback' => function( $value ) {
return is_float( $value ) || is_int( $value );
},
'validator' => RangeValidator::class,
],
- 'integer' => [
+ self::INTEGER => [
'string-parser' => IntParser::class,
'validation-callback' => 'is_int',
'validator' => RangeValidator::class,
],
- 'string' => [
+ self::STRING => [
'validator' => StringValidator::class,
'definition' => StringParam::class,
],
- 'dimension' => [
- 'definition' => DimensionParam::class,
+ self::DIMENSION => [
+ 'string-parser' => DimensionParser::class,
'validator' => DimensionValidator::class,
],
];
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ProcessingError.php b/www/wiki/vendor/param-processor/param-processor/src/ProcessingError.php
index 03418661..2e5cd51a 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ProcessingError.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ProcessingError.php
@@ -83,7 +83,7 @@ class ProcessingError {
/**
* Returns the severity of the error.
- * @return integer Element of the ProcessingError::SEVERITY_ enum
+ * @return integer Element of the self::SEVERITY_ enum
*/
public function getSeverity(): int {
return $this->severity;
@@ -113,16 +113,16 @@ class ProcessingError {
/**
* Returns the action associated with the errors severity.
*
- * @return integer Element of the ProcessingError::ACTION_ enum
+ * @return integer Element of the self::ACTION_ enum
* @throws \Exception
*/
public function getAction(): int {
// TODO: as option
$errorActions = [
- ProcessingError::SEVERITY_MINOR => ProcessingError::ACTION_LOG,
- ProcessingError::SEVERITY_LOW => ProcessingError::ACTION_WARN,
- ProcessingError::SEVERITY_NORMAL => ProcessingError::ACTION_SHOW,
- ProcessingError::SEVERITY_HIGH => ProcessingError::ACTION_DEMAND,
+ self::SEVERITY_MINOR => self::ACTION_LOG,
+ self::SEVERITY_LOW => self::ACTION_WARN,
+ self::SEVERITY_NORMAL => self::ACTION_SHOW,
+ self::SEVERITY_HIGH => self::ACTION_DEMAND,
];
if ( $this->severity === self::SEVERITY_FATAL ) {
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ProcessingErrorHandler.php b/www/wiki/vendor/param-processor/param-processor/src/ProcessingErrorHandler.php
index 8ce9e8ca..faa6fcea 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ProcessingErrorHandler.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ProcessingErrorHandler.php
@@ -4,7 +4,7 @@ namespace ParamProcessor;
/**
* Static class for error handling.
- *
+ *
* @since 0.4
* @deprecated since 1.0
*
@@ -12,48 +12,48 @@ namespace ParamProcessor;
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
final class ProcessingErrorHandler {
-
+
/**
* @since 0.4
- *
+ *
* @var array of ProcessingError
*/
private static $errors = [];
-
+
/**
* Adds a single ProcessingError.
- *
+ *
* @since 0.4
- *
+ *
* @param string $errorMessage
* @param integer $severity
*/
public static function addError( ProcessingError $error ) {
self::$errors[$error->getElement()][] = $error;
}
-
+
/**
* Adds a list of ProcessingError.
- *
+ *
* @since 0.4
- *
+ *
* @param array $errors
- */
+ */
public static function addErrors( array $errors ) {
foreach ( $errors as $error ) {
self::addError( $error );
}
}
-
+
/**
* Returns a list of all registered errors.
- *
+ *
* @since 0.4
- *
+ *
* @return array of ProcessingError
*/
public static function getErrors() {
return self::$errors;
}
-
+
} \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/src/ProcessingResult.php b/www/wiki/vendor/param-processor/param-processor/src/ProcessingResult.php
index 1f519156..f184808f 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/ProcessingResult.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/ProcessingResult.php
@@ -30,6 +30,19 @@ class ProcessingResult {
}
/**
+ * @since 1.8
+ */
+ public function getParameterArray(): array {
+ $parameters = [];
+
+ foreach ( $this->parameters as $parameter ) {
+ $parameters[$parameter->getName()] = $parameter->getValue();
+ }
+
+ return $parameters;
+ }
+
+ /**
* @return ProcessingError[]
*/
public function getErrors(): array {
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Processor.php b/www/wiki/vendor/param-processor/param-processor/src/Processor.php
index a6f2cb46..73a8d67a 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/Processor.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/Processor.php
@@ -2,6 +2,8 @@
namespace ParamProcessor;
+use ParamProcessor\PackagePrivate\Param;
+
/**
* Class for parameter validation of a single parser hook or other parametrized construct.
*
@@ -41,7 +43,7 @@ class Processor {
private $paramsToHandle = [];
/**
- * @var IParamDefinition[]
+ * @var ParamDefinition[]
*/
private $paramDefinitions = [];
@@ -58,10 +60,6 @@ class Processor {
/**
* Constructs and returns a Validator object based on the default options.
- *
- * @since 1.0
- *
- * @return Processor
*/
public static function newDefault(): self {
return new Processor( new Options() );
@@ -69,12 +67,6 @@ class Processor {
/**
* Constructs and returns a Validator object based on the provided options.
- *
- * @since 1.0
- *
- * @param Options $options
- *
- * @return Processor
*/
public static function newFromOptions( Options $options ): self {
return new Processor( $options );
@@ -82,10 +74,6 @@ class Processor {
/**
* Returns the options used by this Validator object.
- *
- * @since 1.0
- *
- * @return Options
*/
public function getOptions(): Options {
return $this->options;
@@ -98,18 +86,14 @@ class Processor {
* @since 0.4
*
* @param string[] $rawParams
- * @param array $parameterDefinitions
+ * @param ParamDefinition[]|array[] $parameterDefinitions DEPRECATED! Use @see setParameterDefinitions instead
* @param array $defaultParams array of strings or array of arrays to define which parameters can be used unnamed.
* The second value in array-form is reserved for flags. Currently, Processor::PARAM_UNNAMED determines that
* the parameter has no name which can be used to set it. Therefore all these parameters must be set before
* any named parameter. The effect is, that '=' within the string won't confuse the parameter anymore like
* it would happen with default parameters that still have a name as well.
*/
- public function setFunctionParams( array $rawParams, array $parameterDefinitions, array $defaultParams = [] ) {
- $parameters = [];
-
- $nr = 0;
- $defaultNr = 0;
+ public function setFunctionParams( array $rawParams, array $parameterDefinitions = [], array $defaultParams = [] ) {
$lastUnnamedDefaultNr = -1;
/*
@@ -118,7 +102,7 @@ class Processor {
* after the first named param. Wouldn't be possible to determine which unnamed value
* belongs to which parameter otherwise.
*/
- for( $i = count( $defaultParams ) - 1; $i >= 0 ; $i-- ) {
+ for( $i = count( $defaultParams ) - 1; $i >= 0; $i-- ) {
$dflt = $defaultParams[$i];
if( is_array( $dflt ) && !empty( $dflt[1] ) && ( $dflt[1] | self::PARAM_UNNAMED ) ) {
$lastUnnamedDefaultNr = $i;
@@ -126,6 +110,10 @@ class Processor {
}
}
+ $parameters = [];
+ $nr = 0;
+ $defaultNr = 0;
+
foreach ( $rawParams as $arg ) {
// Only take into account strings. If the value is not a string,
// it is not a raw parameter, and can not be parsed correctly in all cases.
@@ -150,9 +138,6 @@ class Processor {
];
$defaultNr++;
}
- else {
- // It might be nice to have some sort of warning or error here, as the value is simply ignored.
- }
} else {
$paramName = trim( strtolower( $parts[0] ) );
@@ -167,7 +152,9 @@ class Processor {
$newDefaults = [];
foreach( $defaultParams as $defaultParam ) {
- if ( $defaultParam != $paramName ) $newDefaults[] = $defaultParam;
+ if ( $defaultParam != $paramName ) {
+ $newDefaults[] = $defaultParam;
+ }
}
$defaultParams = $newDefaults;
@@ -181,13 +168,21 @@ class Processor {
}
/**
+ * @since 1.6.0
+ * @param ParamDefinition[] $paramDefinitions
+ */
+ public function setParameterDefinitions( array $paramDefinitions ) {
+ $this->paramDefinitions = $paramDefinitions;
+ }
+
+ /**
* Loops through a list of provided parameters, resolves aliasing and stores errors
* for unknown parameters and optionally for parameter overriding.
*
* @param array $parameters Parameter name as key, parameter value as value
- * @param IParamDefinition[] $paramDefinitions List of parameter definitions. Either ParamDefinition objects or equivalent arrays.
+ * @param ParamDefinition[]|array[] $paramDefinitions DEPRECATED! Use @see setParameterDefinitions instead
*/
- public function setParameters( array $parameters, array $paramDefinitions ) {
+ public function setParameters( array $parameters, array $paramDefinitions = [] ) {
$this->paramDefinitions = ParamDefinition::getCleanDefinitions( $paramDefinitions );
// Loop through all the user provided parameters, and distinguish between those that are allowed and those that are not.
@@ -208,10 +203,10 @@ class Processor {
/**
* @param string $message
- * @param mixed $tags string or array
+ * @param string[] $tags
* @param integer $severity
*/
- private function registerNewError( $message, $tags = [], $severity = ProcessingError::SEVERITY_NORMAL ) {
+ private function registerNewError( string $message, array $tags = [], int $severity = ProcessingError::SEVERITY_NORMAL ) {
$this->registerError(
new ProcessingError(
$message,
@@ -247,7 +242,7 @@ class Processor {
foreach ( $this->rawParameters as $paramName => $paramValue ) {
$this->registerNewError(
$paramName . ' is not a valid parameter', // TODO
- $paramName
+ [ $paramName ]
);
}
}
@@ -262,9 +257,6 @@ class Processor {
$this->params = [];
}
- /**
- * @var Param $parameter
- */
foreach ( $this->params as $parameter ) {
// TODO
$processedParam = new ProcessedParam(
@@ -289,9 +281,6 @@ class Processor {
);
}
- /**
- * Does the actual parameter processing.
- */
private function doParamProcessing() {
$this->errors = [];
@@ -361,7 +350,7 @@ class Processor {
}
/**
- * @param IParamDefinition[] $paramDefinitions
+ * @param ParamDefinition[] $paramDefinitions
* @param string[] $paramsToHandle
*
* @return array
@@ -376,8 +365,8 @@ class Processor {
throw new \UnexpectedValueException( 'Unexpected parameter name "' . $paramName . '"' );
}
- if ( !is_object( $paramDefinitions[$paramName] ) || !( $paramDefinitions[$paramName] instanceof IParamDefinition ) ) {
- throw new \UnexpectedValueException( 'Parameter "' . $paramName . '" is not a IParamDefinition' );
+ if ( !is_object( $paramDefinitions[$paramName] ) || !( $paramDefinitions[$paramName] instanceof ParamDefinition ) ) {
+ throw new \UnexpectedValueException( 'Parameter "' . $paramName . '" is not a ParamDefinition' );
}
// Only include dependencies that are in the list of parameters to handle.
@@ -420,34 +409,24 @@ class Processor {
}
/**
- * Returns the parameters.
- *
- * @since 0.4
* @deprecated since 1.0
- *
- * @return IParam[]
+ * @return Param[]
*/
public function getParameters(): array {
return $this->params;
}
/**
- * Returns a single parameter.
- *
- * @since 0.4
* @deprecated since 1.0
- *
- * @param string $parameterName The name of the parameter to return
- *
- * @return IParam
*/
- public function getParameter( string $parameterName ): IParam {
+ public function getParameter( string $parameterName ): Param {
return $this->params[$parameterName];
}
/**
* Returns an associative array with the parameter names as key and their
* corresponding values as value.
+ * @deprecated since 1.7 - use processParameters() return value
*/
public function getParameterValues(): array {
$parameters = [];
@@ -460,6 +439,7 @@ class Processor {
}
/**
+ * @deprecated since 1.7 - use processParameters() return value
* @return ProcessingError[]
*/
public function getErrors(): array {
@@ -467,6 +447,7 @@ class Processor {
}
/**
+ * @deprecated since 1.7 - use processParameters() return value
* @return string[]
*/
public function getErrorMessages(): array {
@@ -480,15 +461,14 @@ class Processor {
}
/**
- * Returns if there where any errors during validation.
+ * @deprecated since 1.7 - use processParameters() return value
*/
public function hasErrors(): bool {
return !empty( $this->errors );
}
/**
- * Returns false when there are no fatal errors or an ProcessingError when one is found.
- *
+ * @deprecated since 1.7 - use processParameters() return value
* @return ProcessingError|boolean false
*/
public function hasFatalError() {
diff --git a/www/wiki/vendor/param-processor/param-processor/src/Settings.php b/www/wiki/vendor/param-processor/param-processor/src/Settings.php
index c43a94cd..b38c59e6 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/Settings.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/Settings.php
@@ -10,7 +10,7 @@ namespace ParamProcessor;
* Changing one of these settings can be done by assigning to $egValidatorSettings,
* AFTER the inclusion of the extension itself.
*
- * @since 1.0
+ * @deprecated since 1.7
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
diff --git a/www/wiki/vendor/param-processor/param-processor/src/TopologicalSort.php b/www/wiki/vendor/param-processor/param-processor/src/TopologicalSort.php
index 9833e5a3..ccb79eac 100644
--- a/www/wiki/vendor/param-processor/param-processor/src/TopologicalSort.php
+++ b/www/wiki/vendor/param-processor/param-processor/src/TopologicalSort.php
@@ -7,19 +7,8 @@ namespace ParamProcessor;
*
* Based on http://blog.metafoundry.com/2007/09/topological-sort-in-php.html
*
- * usage:
- * $t = new TopologicalSort($dependency_pairs);
- * $load_order = $t->doSort();
- *
- * where dependency_pairs is in the form:
- * $name => (depends on) $value
- *
- * @author Eddie Haber
- * @author Jeroen De Dauw
- *
+ * @deprecated since 1.7
* @codingStandardsIgnoreFile
- *
- * TODO: handle dependency loops and other crap more nicely
*/
class TopologicalSort {
@@ -155,7 +144,7 @@ class TopologicalSort {
}
/**
- * Node class for Topological Sort Class
+ * @deprecated since 1.7
*/
class TSNode {
public $name;
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/BoolParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/BoolParamTest.php
index 875a05fb..d8b23f06 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/BoolParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/BoolParamTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
/**
* @licence GNU GPL v2+
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/FloatParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/FloatParamTest.php
index b86fd77a..742f1342 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/FloatParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/FloatParamTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
/**
* @licence GNU GPL v2+
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/IntParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/IntParamTest.php
index 6a7f4e87..4e8872e8 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/IntParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/IntParamTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
/**
* @licence GNU GPL v2+
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/NumericParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/NumericParamTest.php
index 4d40eeda..2af9a2b0 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/NumericParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/NumericParamTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
use ParamProcessor\Options;
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/ParamDefinitionTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/ParamDefinitionTest.php
index 08e22ce0..64ac9004 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/ParamDefinitionTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/ParamDefinitionTest.php
@@ -1,11 +1,11 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
+use ParamProcessor\IParamDefinition;
use ParamProcessor\Options;
+use ParamProcessor\PackagePrivate\Param;
use ParamProcessor\ParamDefinition;
-use ParamProcessor\IParamDefinition;
-use ParamProcessor\Param;
use ParamProcessor\ParamDefinitionFactory;
use PHPUnit\Framework\TestCase;
@@ -82,7 +82,7 @@ abstract class ParamDefinitionTest extends TestCase {
/**
* @dataProvider instanceProvider
*/
- public function testGetType( IParamDefinition $definition ) {
+ public function testGetType( IParamDefinition $definition ) {
$this->assertEquals( $this->getType(), $definition->getType() );
}
@@ -156,4 +156,11 @@ abstract class ParamDefinitionTest extends TestCase {
$this->assertEquals( $validity, $param->getErrors() === [] );
}
+ public function testConstructingWithoutMessageLeadsToDefaultMessage() {
+ $this->assertSame(
+ 'validator-message-nodesc',
+ ( new ParamDefinition( 'type', 'name' ) )->getMessage()
+ );
+ }
+
} \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/StringParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php
index dea22920..2fb31db1 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/StringParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests\Definitions;
+namespace ParamProcessor\Tests\Integration\Definitions;
/**
* @licence GNU GPL v2+
@@ -9,17 +9,6 @@ namespace ParamProcessor\Tests\Definitions;
class StringParamTest extends ParamDefinitionTest {
/**
- * @see ParamDefinitionTest::getDefinitions
- */
- public function getDefinitions() {
- $params = parent::getDefinitions();
-
-
-
- return $params;
- }
-
- /**
* @see ParamDefinitionTest::valueProvider
*
* @param boolean $stringlyTyped
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Integration/DimensionTypeTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/DimensionTypeTest.php
new file mode 100644
index 00000000..9fdac669
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/DimensionTypeTest.php
@@ -0,0 +1,208 @@
+<?php
+
+declare( strict_types = 1 );
+
+namespace ParamProcessor\Tests\Integration;
+
+use ParamProcessor\ParamDefinitionFactory;
+use ParamProcessor\ParameterTypes;
+use ParamProcessor\ProcessingResult;
+use ParamProcessor\Processor;
+use PHPUnit\Framework\TestCase;
+
+class DimensionTypeTest extends TestCase {
+
+ /**
+ * @dataProvider widthProvider
+ */
+ public function testWidth( string $input, string $expected ) {
+ $parameters = $this->process(
+ [
+ 'width' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'width' => $input,
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( $expected, $parameters['width'] );
+ }
+
+ public function widthProvider() {
+ yield [ '10', '10px' ];
+ yield [ '10px', '10px' ];
+ yield [ '10%', '10%' ];
+ yield [ '10em', '10em' ];
+ yield [ '10ex', '10ex' ];
+ yield [ 'auto', 'auto' ];
+ yield [ ' 10 ', '10px' ];
+ yield [ ' 1 ', '1px' ];
+ yield [ '1 px', '1px' ];
+ yield [ '1 ex', '1ex' ];
+ // TODO: make sure unit is after the value
+ // TODO: make sure only the unit is present
+ }
+
+ private function process( array $definitionArrays, array $userInput ): ProcessingResult {
+ $processor = Processor::newDefault();
+
+ $processor->setParameters( $userInput );
+ $processor->setParameterDefinitions(
+ ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays( $definitionArrays )
+ );
+
+ return $processor->processParameters();
+ }
+
+ /**
+ * @dataProvider heightProvider
+ */
+ public function testHeight( string $input, string $expected ) {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => $input,
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( $expected, $parameters['height'] );
+ }
+
+ public function heightProvider() {
+ yield [ '10', '10px' ];
+ yield [ '10px', '10px' ];
+ yield [ '10em', '10em' ];
+ yield [ '10ex', '10ex' ];
+ }
+
+ public function testAlternateDefaultUnit() {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'defaultunit' => '%',
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => '2.5',
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( '2.5%', $parameters['height'] );
+ }
+
+ /**
+ * @dataProvider invalidDimensionProvider
+ */
+ public function testInvalidInputsDefault( string $invalidDimension ) {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'default' => '42%',
+ 'lowerbound' => 20,
+ 'upperbound' => 80,
+ 'minpercentage' => 30,
+ 'maxpercentage' => 70,
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => $invalidDimension,
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( '42%', $parameters['height'] );
+ }
+
+ public function invalidDimensionProvider() {
+ yield [ 'invalid' ];
+ yield [ 'px' ];
+ yield [ '19' ];
+ yield [ '81' ];
+ yield [ '29%' ];
+ yield [ '71%' ];
+ yield 'auto not allowed' => [ 'auto' ];
+ yield 'unit not allowed' => [ '1 wtf' ];
+ }
+
+ /**
+ * @dataProvider validBoundsInput
+ */
+ public function testValidInputWithBounds( string $valid ) {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'default' => '42%',
+ 'lowerbound' => 20,
+ 'upperbound' => 80,
+ 'minpercentage' => 30,
+ 'maxpercentage' => 70,
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => $valid,
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( $valid, $parameters['height'] );
+ }
+
+ public function validBoundsInput() {
+ yield [ '20px' ];
+ yield [ '21px' ];
+ yield [ '80px' ];
+ yield [ '79px' ];
+ // FIXME
+// yield [ '30%' ];
+// yield [ '31%' ];
+// yield [ '70%' ];
+// yield [ '69%' ];
+ }
+
+ public function testAllowAuto() {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'allowauto' => true,
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => 'auto',
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( 'auto', $parameters['height'] );
+ }
+
+ public function testCanUseSpecialUnit() {
+ $parameters = $this->process(
+ [
+ 'height' => [
+ 'type' => ParameterTypes::DIMENSION,
+ 'units' => [ 'wtf' ],
+ 'message' => 'test-message'
+ ]
+ ],
+ [
+ 'height' => '4.2 wtf',
+ ]
+ )->getParameterArray();
+
+ $this->assertSame( '4.2wtf', $parameters['height'] );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessorTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/ProcessorTest.php
index 936c3118..cf1acde5 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessorTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/ProcessorTest.php
@@ -1,12 +1,13 @@
<?php
-namespace ParamProcessor\Tests;
+declare( strict_types = 1 );
-use ParamProcessor\ProcessedParam;
-use ParamProcessor\ProcessingError;
+namespace ParamProcessor\Tests\Integration;
+
+use ParamProcessor\Options;
+use ParamProcessor\ParamDefinitionFactory;
use ParamProcessor\ProcessingResult;
use ParamProcessor\Processor;
-use ParamProcessor\Options;
use PHPUnit\Framework\TestCase;
/**
@@ -458,4 +459,28 @@ class ProcessorTest extends TestCase {
);
}
+ public function testSetParameterDefinitions() {
+ $processor = Processor::newDefault();
+
+ $processor->setFunctionParams( [ 'some-list=42,23,9001' ] );
+
+ $processor->setParameterDefinitions(
+ [
+ ( ParamDefinitionFactory::newDefault() )->newDefinitionFromArray(
+ [
+ 'name' => 'some-list',
+ 'type' => 'integer',
+ 'message' => 'test',
+ 'islist' => true
+ ]
+ )
+ ]
+ );
+
+ $this->assertSame(
+ [ 42, 23, 9001 ],
+ $processor->processParameters()->getParameters()['some-list']->getValue()
+ );
+ }
+
}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/OptionsTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/OptionsTest.php
index 044a4f59..76b826ca 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/OptionsTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/OptionsTest.php
@@ -1,6 +1,8 @@
<?php
-namespace ParamProcessor\Tests;
+declare( strict_types = 1 );
+
+namespace ParamProcessor\Tests\Unit;
use ParamProcessor\Options;
use PHPUnit\Framework\TestCase;
@@ -13,10 +15,6 @@ use PHPUnit\Framework\TestCase;
*/
class OptionsTest extends TestCase {
- protected function getInstance() {
- return new Options();
- }
-
public function testBooleanSettersAndGetters() {
$methods = [
'setUnknownInvalid' => 'unknownIsInvalid',
@@ -28,7 +26,7 @@ class OptionsTest extends TestCase {
];
foreach ( $methods as $setter => $getter ) {
- $options = $this->getInstance();
+ $options = new Options();
foreach ( [ false, true, false ] as $boolean ) {
call_user_func_array( [ $options, $setter ], [ $boolean ] );
@@ -39,7 +37,7 @@ class OptionsTest extends TestCase {
}
public function testSetAndGetName() {
- $options = $this->getInstance();
+ $options = new Options();
foreach ( [ 'foo', 'bar baz' ] as $name ) {
$options->setName( $name );
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Unit/PackagePrivate/DimensionParserTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/PackagePrivate/DimensionParserTest.php
new file mode 100644
index 00000000..e82bb8b7
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/PackagePrivate/DimensionParserTest.php
@@ -0,0 +1,51 @@
+<?php
+
+declare( strict_types = 1 );
+
+namespace ParamProcessor\Tests\Unit\PackagePrivate;
+
+use ParamProcessor\PackagePrivate\DimensionParser;
+use PHPUnit\Framework\TestCase;
+use ValueParsers\ParseException;
+use ValueParsers\ParserOptions;
+
+class DimensionParserTest extends TestCase {
+
+ public function testParserExceptionOnNonString() {
+ $this->expectException( ParseException::class );
+ $this->parse( 32202 );
+ }
+
+ private function parse( $input ) {
+ return ( new DimensionParser() )->parse( $input );
+ }
+
+ /**
+ * @dataProvider validDimensionProvider
+ */
+ public function testParsingValidInputs( string $input, string $expected ) {
+ $this->assertSame( $expected, $this->parse( $input ) );
+ }
+
+ public function validDimensionProvider() {
+ yield [ '10px', '10px' ];
+ yield [ '10ex', '10ex' ];
+ yield [ '10em', '10em' ];
+ yield [ '2.5px', '2.5px' ];
+
+ yield [ '10 px', '10px' ];
+ yield [ '10 px', '10px' ];
+ yield [ ' 10 px ', '10px' ];
+
+ yield [ '10', '10px' ];
+ yield [ '2.5', '2.5px' ];
+ }
+
+ public function testAlternateDefaultUnit() {
+ $this->assertSame(
+ '1%',
+ ( new DimensionParser( new ParserOptions( [ DimensionParser::DEFAULT_UNIT => '%' ] ) ) )->parse( '1' )
+ );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamAliasTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamAliasTest.php
new file mode 100644
index 00000000..bd57dbd3
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamAliasTest.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace ParamProcessor\Tests\Unit;
+
+use ParamProcessor\Param;
+use ParamProcessor\ParamDefinition;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ */
+class ParamAliasTest extends TestCase {
+
+ public function testListParamProcessingWithEmptyListAsDefault() {
+ $definition = new ParamDefinition( 'string', 'something' );
+ $param = new Param( $definition );
+ $this->assertTrue( $param->isRequired() );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamDefinitionFactoryTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamDefinitionFactoryTest.php
new file mode 100644
index 00000000..1e727713
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamDefinitionFactoryTest.php
@@ -0,0 +1,140 @@
+<?php
+
+namespace ParamProcessor\Tests\Unit;
+
+use ParamProcessor\ParamDefinition;
+use ParamProcessor\ParamDefinitionFactory;
+use ParamProcessor\ParameterTypes;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * @covers \ParamProcessor\ParamDefinitionFactory
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ */
+class ParamDefinitionFactoryTest extends TestCase {
+
+ public function testNewDefinitionFromArray() {
+ $definition = ParamDefinitionFactory::newDefault()->newDefinitionFromArray(
+ [
+ 'name' => 'some-list',
+ 'type' => 'integer',
+ 'message' => 'test-message',
+ 'islist' => true
+ ]
+ );
+
+ $this->assertSame( 'some-list', $definition->getName() );
+ $this->assertSame( 'integer', $definition->getType() );
+ $this->assertSame( 'test-message', $definition->getMessage() );
+ $this->assertTrue( $definition->isList() );
+ $this->assertTrue( $definition->isRequired() );
+ }
+
+ public function testNewDefinition() {
+ $definition = ParamDefinitionFactory::newDefault()->newDefinition(
+ 'integer',
+ 'some-list',
+ null,
+ 'test-message',
+ true
+ );
+
+ $this->assertSame( 'some-list', $definition->getName() );
+ $this->assertSame( 'integer', $definition->getType() );
+ $this->assertSame( 'test-message', $definition->getMessage() );
+ $this->assertTrue( $definition->isList() );
+ $this->assertTrue( $definition->isRequired() );
+ }
+
+ public function testNewDefinitionFromArray_typeDefaultsToString() {
+ $this->assertSame( 'string', $this->newBasicParamFromArray()->getType() );
+ }
+
+ private function newBasicParamFromArray(): ParamDefinition {
+ return ParamDefinitionFactory::newDefault()->newDefinitionFromArray(
+ [
+ 'name' => 'irrelevant',
+ 'message' => 'irrelevant'
+ ]
+ );
+ }
+
+ public function testNewDefinitionFromArray_isListDefaultsToFalse() {
+ $this->assertFalse( $this->newBasicParamFromArray()->isList() );
+ }
+
+ public function testNewDefinitionFromArray_isRequiredDefaultsToTrue() {
+ $this->assertTrue( $this->newBasicParamFromArray()->isRequired() );
+ }
+
+ public function testNewDefinitionFromArray_optionsAreSet() {
+ $arrayDefinition = [
+ 'name' => 'some-list',
+ 'type' => 'integer',
+ 'message' => 'test-message',
+ 'islist' => true
+ ];
+
+ $definition = ParamDefinitionFactory::newDefault()->newDefinitionFromArray( $arrayDefinition );
+
+ $this->assertSame( $arrayDefinition, $definition->getOptions() );
+ }
+
+ public function testNewDefinitionsFromArrays_preservesDefinitionInstances() {
+ $this->assertEquals(
+ [
+ 'kittens' => new ParamDefinition( ParameterTypes::STRING, 'kittens' ),
+ 'cats' => new ParamDefinition( ParameterTypes::INTEGER, 'cats' ),
+ ],
+ ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays(
+ [
+ new ParamDefinition( ParameterTypes::STRING, 'kittens' ),
+ new ParamDefinition( ParameterTypes::INTEGER, 'cats' ),
+ ]
+ )
+ );
+ }
+
+ public function testNewDefinitionsFromArrays_handlesNamesAsKeys() {
+ $definitions = ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays(
+ [
+ 'kittens' => [
+ 'type' => ParameterTypes::STRING,
+ 'message' => 'test-message',
+ ]
+ ]
+ );
+
+ $this->assertSame( 'kittens', $definitions['kittens']->getName() );
+ }
+
+ public function testNewDefinitionsFromArrays_nameFieldTakesPriorityOverKey() {
+ $definitions = ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays(
+ [
+ 'cats' => [
+ 'name' => 'kittens',
+ 'type' => ParameterTypes::STRING,
+ 'message' => 'test-message',
+ ]
+ ]
+ );
+
+ $this->assertSame( 'kittens', $definitions['kittens']->getName() );
+ }
+
+ public function testNewDefinitionsFromArrays_missingNameLeadsToException() {
+ $this->expectException( \Exception::class );
+
+ ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays(
+ [
+ [
+ 'type' => ParameterTypes::STRING,
+ 'message' => 'test-message',
+ ]
+ ]
+ );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamTest.php
index f25e4af3..4510409d 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParamTest.php
@@ -1,14 +1,14 @@
<?php
-namespace ParamProcessor\Tests;
+namespace ParamProcessor\Tests\Unit;
use ParamProcessor\Options;
-use ParamProcessor\Param;
+use ParamProcessor\PackagePrivate\Param;
use ParamProcessor\ParamDefinition;
use PHPUnit\Framework\TestCase;
/**
- * @covers \ParamProcessor\Param
+ * @covers \ParamProcessor\PackagePrivate\Param
*
* @licence GNU GPL v2+
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParameterTypesTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParameterTypesTest.php
new file mode 100644
index 00000000..7f4970a6
--- /dev/null
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ParameterTypesTest.php
@@ -0,0 +1,75 @@
+<?php
+
+namespace ParamProcessor\Tests\Unit;
+
+use ParamProcessor\ParameterTypes;
+use PHPUnit\Framework\TestCase;
+use ValueParsers\NullParser;
+use ValueValidators\NullValidator;
+
+/**
+ * @covers \ParamProcessor\ParameterTypes
+ */
+class ParameterTypesTest extends TestCase {
+
+ public function testAddType_defaultsAreSet() {
+ $types = new ParameterTypes();
+
+ $types->addType(
+ 'kitten',
+ []
+ );
+
+ $type = $types->getType( 'kitten' );
+
+ $this->assertSame(
+ NullParser::class,
+ $type->getStringParserClass()
+ );
+
+ $this->assertSame(
+ NullParser::class,
+ $type->getTypedParserClass()
+ );
+
+ $this->assertSame(
+ NullValidator::class,
+ $type->getValidatorClass()
+ );
+
+ $this->assertNull(
+ $type->getValidationCallback()
+ );
+ }
+
+ public function testRegisterType_parametersAreUsed() {
+ $types = new ParameterTypes();
+
+ $types->addType(
+ 'kitten',
+ [
+ 'string-parser' => 'KittenParser',
+ 'validation-callback' => 'is_int',
+ 'validator' => 'KittenValidator',
+ ]
+ );
+
+ $type = $types->getType( 'kitten' );
+
+ $this->assertSame(
+ 'KittenParser',
+ $type->getStringParserClass()
+ );
+
+ $this->assertSame(
+ 'KittenValidator',
+ $type->getValidatorClass()
+ );
+
+ $this->assertSame(
+ 'is_int',
+ $type->getValidationCallback()
+ );
+ }
+
+}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessingResultTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ProcessingResultTest.php
index 078f86df..e90209a4 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ProcessingResultTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/ProcessingResultTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests;
+namespace ParamProcessor\Tests\Unit;
use ParamProcessor\ProcessedParam;
use ParamProcessor\ProcessingError;
@@ -17,7 +17,7 @@ class ProcessingResultTest extends TestCase {
public function testGetParameters() {
$processedParams = [
- $this->newMockParam()
+ $this->createMock( ProcessedParam::class )
];
$result = new ProcessingResult( $processedParams );
@@ -25,14 +25,9 @@ class ProcessingResultTest extends TestCase {
$this->assertEquals( $processedParams, $result->getParameters() );
}
- private function newMockParam() {
- return $this->getMockBuilder( ProcessedParam::class )
- ->disableOriginalConstructor()->getMock();
- }
-
public function testGetErrors() {
$errors = [
- $this->newMockError()
+ $this->createMock( ProcessingError::class )
];
$result = new ProcessingResult( [], $errors );
@@ -40,11 +35,6 @@ class ProcessingResultTest extends TestCase {
$this->assertEquals( $errors, $result->getErrors() );
}
- private function newMockError() {
- return $this->getMockBuilder( ProcessingError::class )
- ->disableOriginalConstructor()->getMock();
- }
-
public function testGivenNoErrors_HasNoFatal() {
$this->assertNoFatalForErrors( [] );
}
@@ -76,4 +66,24 @@ class ProcessingResultTest extends TestCase {
$this->assertTrue( $result->hasFatal() );
}
+ public function testGetParameterArrayWithNoParameters() {
+ $this->assertSame(
+ [],
+ ( new ProcessingResult( [] ) )->getParameterArray()
+ );
+ }
+
+ public function testGetParameterArray() {
+ $this->assertSame(
+ [
+ 'first' => 42,
+ 'second' => 23,
+ ],
+ ( new ProcessingResult( [
+ new ProcessedParam( 'first', 42, false ),
+ new ProcessedParam( 'second', 23, true )
+ ] ) )->getParameterArray()
+ );
+ }
+
} \ No newline at end of file
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/SettingsTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php
index c2491cf5..eec970d9 100644
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/SettingsTest.php
+++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php
@@ -1,6 +1,6 @@
<?php
-namespace ParamProcessor\Tests;
+namespace ParamProcessor\Tests\Unit;
use ParamProcessor\Settings;
use PHPUnit\Framework\TestCase;
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/DimensionParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/DimensionParamTest.php
deleted file mode 100644
index 52afad5d..00000000
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/Definitions/DimensionParamTest.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-
-namespace ParamProcessor\Tests\Definitions;
-
-/**
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
-class DimensionParamTest extends ParamDefinitionTest {
-
- /**
- * @see ParamDefinitionTest::getDefinitions
- * @return array
- */
- public function getDefinitions() {
- $params = parent::getDefinitions();
-
- $params['auto'] = [
- 'allowauto' => true,
- ];
-
- $params['allunits'] = [
- 'units' => [ 'px', 'ex', 'em', '%', '' ],
- ];
-
- $params['bounds'] = [
- 'lowerbound' => 42,
- 'upperbound' => 9000,
- 'maxpercentage' => 34,
- 'minpercentage' => 23,
- 'units' => [ 'px', 'ex', '%', '' ],
- ];
-
- return $params;
- }
-
- /**
- * @see ParamDefinitionTest::valueProvider
- *
- * @param boolean $stringlyTyped
- *
- * @return array
- */
- public function valueProvider( $stringlyTyped = true ) {
- $values = [
- 'empty' => [
- [ '100px', true, '100px' ],
- [ '100', true, '100px' ],
- [ 42, true, '42px' ],
- [ 42.5, true, '42.5px' ],
- [ 'over9000', false ],
- [ 'yes', false ],
- [ 'auto', false ],
- [ '100%', false ],
- ],
- 'values' => [
- [ 1, true, '1px' ],
-// array( 2, false ),
- [ 'yes', false ],
- [ 'no', false ],
- ],
- 'auto' => [
- [ 'auto', true, 'auto' ],
- ],
- 'allunits' => [
- [ '100%', true, '100%' ],
- [ '100em', true, '100em' ],
- [ '100ex', true, '100ex' ],
- [ '101%', false ],
- ],
- 'bounds' => [
- [ '30%', true, '30%' ],
- [ '20%', false ],
- [ '40%', false ],
- [ '100px', true, '100px' ],
- [ '100ex', true, '100ex' ],
- [ '10px', false ],
- [ '9001ex', false ],
- ],
- ];
-
- if ( $stringlyTyped ) {
- foreach ( $values as &$set ) {
- foreach ( $set as &$value ) {
- if ( is_int( $value[0] ) || is_float( $value[0] ) ) {
- $value[0] = (string)$value[0];
- }
- }
- }
-
-// $values['empty'][] = array( 42, false );
-// $values['empty'][] = array( 42.5, false );
- }
-
- return $values;
- }
-
- /**
- * @see ParamDefinitionTest::getType
- * @return string
- */
- public function getType() {
- return 'dimension';
- }
-
-}
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamDefinitionFactoryTest.php b/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamDefinitionFactoryTest.php
deleted file mode 100644
index c48e4bf0..00000000
--- a/www/wiki/vendor/param-processor/param-processor/tests/phpunit/ParamDefinitionFactoryTest.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-namespace ParamProcessor\Tests;
-
-use ParamProcessor\ParamDefinitionFactory;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @covers \ParamProcessor\ParamDefinitionFactory
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < jeroendedauw@gmail.com >
- */
-class ParamDefinitionFactoryTest extends TestCase {
-
- public function testCanConstruct() {
- new ParamDefinitionFactory();
- $this->assertTrue( true );
- }
-
- // TODO: test other methods
-
-}