Legoktm has uploaded a new change for review. ( )

Change subject: Add script to get phan version from extra.phan-version in 

Add script to get phan version from extra.phan-version in composer.json

It defaults to 0.8 during the migraiton period but it will throw an
exception in the future. This allows each repository to set their own
phan version and control upgrades, but it can't be set in "require-dev"
due to the PHP 7.0 dependency.

Change-Id: Ie9a7b83f3446a339378ff5f7928ca60d6f941bac
A bin/
1 file changed, 27 insertions(+), 0 deletions(-)

  git pull ssh:// 

diff --git a/bin/ b/bin/
new file mode 100755
index 0000000..af604fc
--- /dev/null
+++ b/bin/
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+extract version number out of composer.json
+Copyright (C) 2017 Kunal Mehta <>
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import json
+with open('composer.json') as f:
+    d = json.load(f)
+print(d.get('extra', {}).get('phan-version', 0.8))

To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9a7b83f3446a339378ff5f7928ca60d6f941bac
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Legoktm <>

MediaWiki-commits mailing list

Reply via email to