Jeroen De Dauw has submitted this change and it was merged.
Change subject: Add composer.json and composer autoloader support
......................................................................
Add composer.json and composer autoloader support
Change-Id: If36c846c003f5d92826ddd38cf912595f6a7f862
---
M DataTypes.php
A composer.json
2 files changed, 45 insertions(+), 0 deletions(-)
Approvals:
Jeroen De Dauw: Verified; Looks good to me, approved
diff --git a/DataTypes.php b/DataTypes.php
index 35e0980..bcaa409 100644
--- a/DataTypes.php
+++ b/DataTypes.php
@@ -55,6 +55,12 @@
define( 'DataTypes_VERSION', '0.1 alpha' );
+// Attempt to include the dependencies if one has not been loaded yet.
+// This is the path to the autoloader generated by composer in case of a
composer install.
+if ( ( !defined( 'DataValues_VERSION' ) ) && is_readable( __DIR__ .
'/vendor/autoload.php' ) ) {
+ include_once( __DIR__ . '/vendor/autoload.php' );
+}
+
// Attempt to include the DataValues lib if that hasn't been done yet.
// This is the path the DataValues entry point will be at when loaded as
MediaWiki extension.
if ( !defined( 'DataValues_VERSION' ) && is_readable( __DIR__ .
'/../DataValues/DataValues.php' ) ) {
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..816b355
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,39 @@
+{
+ "name": "data-values/data-types",
+ "type": "library",
+ "description": "Contains a class with which a type of value can be
defined",
+ "keywords": [
+ "datavalues",
+ "datatypes"
+ ],
+ "homepage": "https://www.mediawiki.org/wiki/Extension:DataTypes",
+ "license": "GPL-2.0+",
+ "authors": [
+ {
+ "name": "Jeroen De Dauw",
+ "email": "[email protected]",
+ "homepage": "http://jeroendedauw.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Wikidata community",
+ "homepage": "https://wikidata.org",
+ "role": "Developer"
+ }
+ ],
+ "support": {
+ "issues": "https://bugzilla.wikimedia.org/",
+ "irc": "irc://irc.freenode.net/wikimedia-wikidata",
+ "forum":
"https://www.mediawiki.org/wiki/Extension_talk:DataTypes",
+ "wiki": "https://www.mediawiki.org/wiki/Extension:DataTypes"
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "data-values/data-values": "dev-master"
+ },
+ "autoload": {
+ "files" : [
+ "DataTypes.php"
+ ]
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/74278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If36c846c003f5d92826ddd38cf912595f6a7f862
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataTypes
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits