jenkins-bot has submitted this change and it was merged.
Change subject: Add composer.json, use it for autoloading
......................................................................
Add composer.json, use it for autoloading
Change-Id: Ifc0e3e8a6ecd2097c9161650cbf0023c0bffe863
---
M .gitignore
A composer.json
M demos/widgets.php
3 files changed, 14 insertions(+), 28 deletions(-)
Approvals:
Trevor Parscal: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.gitignore b/.gitignore
index 7a41fcc..03663d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
node_modules
npm-debug.log
*.rtl.css
+vendor
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..7d0c612
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,12 @@
+{
+ "name": "oojs/ui",
+ "homepage": "https://www.mediawiki.org/wiki/OOjs_UI",
+ "license": "MIT",
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "autoload": {
+ "classmap": ["php/"]
+ }
+}
+
diff --git a/demos/widgets.php b/demos/widgets.php
index 3b2f064..faf2959 100644
--- a/demos/widgets.php
+++ b/demos/widgets.php
@@ -10,34 +10,7 @@
<div class="oo-ui-demo">
<div class="oo-ui-demo-container">
<?php
- require_once '../php/OoUiTag.php';
- require_once '../php/OoUiElement.php';
- require_once '../php/OoUiElementMixin.php';
- require_once '../php/OoUiLayout.php';
- require_once '../php/OoUiWidget.php';
- require_once
'../php/elements/OoUiButtonElement.php';
- require_once
'../php/elements/OoUiLabelElement.php';
- require_once
'../php/elements/OoUiIconElement.php';
- require_once
'../php/elements/OoUiIndicatorElement.php';
- require_once
'../php/elements/OoUiTitledElement.php';
- require_once
'../php/elements/OoUiFlaggedElement.php';
- require_once
'../php/elements/OoUiGroupElement.php';
- require_once
'../php/widgets/OoUiButtonWidget.php';
- require_once
'../php/widgets/OoUiButtonGroupWidget.php';
- require_once
'../php/widgets/OoUiIconWidget.php';
- require_once
'../php/widgets/OoUiIndicatorWidget.php';
- require_once
'../php/widgets/OoUiLabelWidget.php';
- require_once
'../php/widgets/OoUiInputWidget.php';
- require_once
'../php/widgets/OoUiButtonInputWidget.php';
- require_once
'../php/widgets/OoUiCheckboxInputWidget.php';
- require_once
'../php/widgets/OoUiTextInputWidget.php';
- require_once '../php/OoUiTheme.php';
- require_once
'../php/layouts/OoUiFieldLayout.php';
- require_once
'../php/layouts/OoUiFieldsetLayout.php';
- require_once
'../php/layouts/OoUiFormLayout.php';
- require_once
'../php/layouts/OoUiPanelLayout.php';
- require_once
'../php/layouts/OoUiGridLayout.php';
- require_once
'../php/themes/OoUiMediaWikiTheme.php';
+ require_once '../vendor/autoload.php';
new OoUiMediaWikiTheme();
?>
--
To view, visit https://gerrit.wikimedia.org/r/167712
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc0e3e8a6ecd2097c9161650cbf0023c0bffe863
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits