Paladox has uploaded a new change for review.
https://gerrit.wikimedia.org/r/276971
Change subject: Add composer.json
......................................................................
Add composer.json
Also add phplint to composer.json
Add required package jumbojett/openid-connect-php to composer.json.
Change-Id: Ic8c454472b3ca2412532788d1c95965be4ec8f59
---
M OpenIDConnect.php
A composer.json
2 files changed, 25 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenIDConnect
refs/changes/71/276971/1
diff --git a/OpenIDConnect.php b/OpenIDConnect.php
index 698cad8..c95862d 100644
--- a/OpenIDConnect.php
+++ b/OpenIDConnect.php
@@ -22,7 +22,15 @@
* DEALINGS IN THE SOFTWARE.
*/
-$wgExtensionFunctions[] = function () {
+if ( isset( $GLOBALS['wgWikimediaJenkinsCI'] ) &&
$GLOBALS['wgWikimediaJenkinsCI'] == true ) {
+ if ( file_exists( __DIR__ . '/../../vendor/autoload.php' ) ) {
+ include_once __DIR__ . '/../../vendor/autoload.php';
+ }
+} elseif ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
+ include_once __DIR__ . '/vendor/autoload.php';
+}
+
+$GLOBALS['wgExtensionFunctions'][] = function () {
if ( !class_exists( 'PluggableAuth' ) ) {
die( '<b>Error:</b> This extension requires the PluggableAuth
extension to be included first' );
}
@@ -32,24 +40,21 @@
die( '<b>Error:</b> A value for $PluggableAuth_Class has already been
set.' );
}
-$GLOBALS['wgExtensionCredits']['other'][] = array (
+$GLOBALS['wgExtensionCredits']['other'][] = array(
'path' => __FILE__,
'name' => 'OpenID Connect',
- 'version' => '1.2',
+ 'version' => '1.3',
'author' => array(
'[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy
Cicalese]'
),
'descriptionmsg' => 'openidconnect-desc',
- 'url' =>
-
'https://www.mediawiki.org/wiki/Extension:OpenID_Connect',
+ 'url' => 'https://www.mediawiki.org/wiki/Extension:OpenID_Connect',
);
$GLOBALS['PluggableAuth_Class'] = 'OpenIDConnect';
$GLOBALS['wgAutoloadClasses']['OpenIDConnect'] =
__DIR__ . '/OpenIDConnect.class.php';
-$GLOBALS['wgAutoloadClasses']['OpenIDConnectClient'] =
- __DIR__ . '/OpenID-Connect-PHP/OpenIDConnectClient.php';
$GLOBALS['wgMessagesDirs']['OpenIDConnect'] = __DIR__ . '/i18n';
$GLOBALS['wgExtensionMessagesFiles']['OpenIDConnect'] =
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..03da270
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "require": {
+ "jumbojett/openid-connect-php ": "0.1.0"
+ },
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "0.9.2"
+ },
+ "scripts": {
+ "test": [
+ "parallel-lint . --exclude vendor"
+ ]
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/276971
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8c454472b3ca2412532788d1c95965be4ec8f59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenIDConnect
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits