EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173330
Change subject: Doc: Mention the php command in autoload.php to regenerate it
......................................................................
Doc: Mention the php command in autoload.php to regenerate it
Adds a comment to the top of the generated autoload.php directing
developers to the command to regenerate the file so they may just
copy and paste the command.
Change-Id: If098a1eb51ed732378677215c0e438c73d506697
---
M autoload.php
M includes/utils/AutoloadGenerator.php
M maintenance/generateLocalAutoload.php
3 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/30/173330/1
diff --git a/autoload.php b/autoload.php
index c5fc22c..488f9dd 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1,5 +1,5 @@
<?php
-// This file is generated, do not adjust manually
+// This file is generated by maintenance/generateLocalAutoload.php, do not
adjust manually
global $wgAutoloadLocalClasses;
diff --git a/includes/utils/AutoloadGenerator.php
b/includes/utils/AutoloadGenerator.php
index bcd3393..4d2ee09 100644
--- a/includes/utils/AutoloadGenerator.php
+++ b/includes/utils/AutoloadGenerator.php
@@ -118,8 +118,11 @@
/**
* Write out all known classes to autoload.php in
* the provided basedir
+ *
+ * @param string $commandName Value used in file comment to direct
+ * developers towards the appropriate way to update the autoload.
*/
- public function generateAutoload() {
+ public function generateAutoload( $commandName = 'AutoloadGenerator' ) {
$content = array();
// We need to generate a line each rather than exporting the
@@ -152,7 +155,7 @@
$this->basepath . '/autoload.php',
<<<EOD
<?php
-// This file is generated, do not adjust manually
+// This file is generated by $commandName, do not adjust manually
global \${$this->variableName};
diff --git a/maintenance/generateLocalAutoload.php
b/maintenance/generateLocalAutoload.php
index 78e66b7..01c0fdd 100644
--- a/maintenance/generateLocalAutoload.php
+++ b/maintenance/generateLocalAutoload.php
@@ -17,5 +17,5 @@
$generator->forceClassPath( 'MyLocalSettingsGenerator',
"$base/mw-config/overrides.php" );
// Write out the autoload
-$generator->generateAutoload();
+$generator->generateAutoload( 'maintenance/generateLocalAutoload.php' );
--
To view, visit https://gerrit.wikimedia.org/r/173330
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If098a1eb51ed732378677215c0e438c73d506697
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits