Jeroen De Dauw has submitted this change and it was merged.
Change subject: Update entry point and gitignore to work with composer
......................................................................
Update entry point and gitignore to work with composer
Change-Id: I3bba7fbd7204054ebefc76abb4555e7564df294b
---
M .gitignore
M Ask.php
A composer.lock
3 files changed, 80 insertions(+), 5 deletions(-)
Approvals:
Jeroen De Dauw: Verified; Looks good to me, approved
diff --git a/.gitignore b/.gitignore
index dbfbd8f..df7f783 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*~
*.kate-swp
.*.swp
+vendor/
!.gitignore
!.gitreview
diff --git a/Ask.php b/Ask.php
index efb6684..0b19e8e 100644
--- a/Ask.php
+++ b/Ask.php
@@ -30,19 +30,20 @@
// 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' ) ) {
- @include_once( __DIR__ . '/../DataValues/DataValues.php' );
+if ( !defined( 'DataValues_VERSION' ) && file_exists( __DIR__ .
'/../DataValues/DataValues.php' ) ) {
+ include_once( __DIR__ . '/../DataValues/DataValues.php' );
}
// Attempt to include the DataValues lib if that hasn't been done yet.
// This is the path to the autoloader generated by composer in case of a
composer install.
-if ( !defined( 'DataValues_VERSION' ) ) {
- @include_once( __DIR__ . '/vendor/autoload.php' );
+if ( !defined( 'DataValues_VERSION' ) && file_exists( __DIR__ .
'/vendor/autoload.php' ) ) {
+ include_once( __DIR__ . '/vendor/autoload.php' );
}
// Only initialize the extension when all dependencies are present.
if ( !defined( 'DataValues_VERSION' ) ) {
- throw new Exception( 'You need to have the DataValues library loaded in
order to use Ask' );
+ // TODO: reenable once the DataValues composer setup has been fixed
+ //throw new Exception( 'You need to have the DataValues library loaded
in order to use Ask' );
}
define( 'Ask_VERSION', '0.1 alpha' );
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..da8b597
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,73 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
+ ],
+ "hash": "2d54f6b20e21f9afdd6b5a5650a37fe4",
+ "packages": [
+ {
+ "name": "mediawiki/data-values",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url":
"https://github.com/wikimedia/mediawiki-extensions-DataValues.git",
+ "reference": "c3850a7d11bc66a1bea73942cc0cabf9e8370b57"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/wikimedia/mediawiki-extensions-DataValues/zipball/c3850a7d11bc66a1bea73942cc0cabf9e8370b57",
+ "reference": "c3850a7d11bc66a1bea73942cc0cabf9e8370b57",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "DataTypes/",
+ "DataValues/",
+ "ValueFormatters/",
+ "ValueParsers/",
+ "ValueValidators/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0+"
+ ],
+ "authors": [
+ {
+ "name": "Jeroen De Dauw",
+ "email": "[email protected]",
+ "homepage": "http://jeroendedauw.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A set of simple libraries",
+ "homepage": "https://www.mediawiki.org/wiki/Extension:DataValues",
+ "keywords": [
+ "datatypes",
+ "datavalues",
+ "valueformatters",
+ "valueparsers",
+ "valuevalidators"
+ ],
+ "time": "2013-06-06 17:36:32"
+ }
+ ],
+ "packages-dev": null,
+ "aliases": [
+
+ ],
+ "minimum-stability": "stable",
+ "stability-flags": {
+ "mediawiki/data-values": 20
+ },
+ "platform": {
+ "php": ">=5.3.0"
+ },
+ "platform-dev": [
+
+ ]
+}
--
To view, visit https://gerrit.wikimedia.org/r/67329
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3bba7fbd7204054ebefc76abb4555e7564df294b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
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