(bug 37194) remove obsoletes *.deps.php
authorAntoine Musso <hashar@free.fr>
Tue, 29 May 2012 12:05:03 +0000 (14:05 +0200)
committerAntoine Musso <hashar@free.fr>
Tue, 29 May 2012 12:05:03 +0000 (14:05 +0200)
PHP had a nasty bug related to late/early binding and referenced at
https://bugs.php.net/bug.php?id=56776 . The workaround was to add some
.deps.php files to make sure code is loaded early.

Upstream PHP issue #56778 was fixed in PHP 5.1.

See also:
http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html

Change-Id: I4c85f65c6b5f3df3218bb107881547d44f0cf107

14 files changed:
includes/Skin.php
languages/Language.php
languages/classes/LanguageIu.deps.php [deleted file]
languages/classes/LanguageKk.deps.php [deleted file]
languages/classes/LanguageKu.deps.php [deleted file]
languages/classes/LanguageShi.deps.php [deleted file]
languages/classes/LanguageSr.deps.php [deleted file]
languages/classes/LanguageZh.deps.php [deleted file]
skins/Chick.deps.php [deleted file]
skins/Modern.deps.php [deleted file]
skins/MonoBook.deps.php [deleted file]
skins/MySkin.deps.php [deleted file]
skins/Simple.deps.php [deleted file]
skins/Vector.deps.php [deleted file]

index 64cf569..56355bb 100644 (file)
@@ -164,11 +164,6 @@ abstract class Skin extends ContextSource {
                if ( !MWInit::classExists( $className ) ) {
 
                        if ( !defined( 'MW_COMPILED' ) ) {
-                               // Preload base classes to work around APC/PHP5 bug
-                               $deps = "{$wgStyleDirectory}/{$skinName}.deps.php";
-                               if ( file_exists( $deps ) ) {
-                                       include_once( $deps );
-                               }
                                require_once( "{$wgStyleDirectory}/{$skinName}.php" );
                        }
 
index 9f00d04..be9764e 100644 (file)
@@ -284,10 +284,6 @@ class Language {
                }
 
                if ( !defined( 'MW_COMPILED' ) ) {
-                       // Preload base classes to work around APC/PHP5 bug
-                       if ( file_exists( "$IP/languages/classes/$class.deps.php" ) ) {
-                               include_once( "$IP/languages/classes/$class.deps.php" );
-                       }
                        if ( file_exists( "$IP/languages/classes/$class.php" ) ) {
                                include_once( "$IP/languages/classes/$class.php" );
                        }
diff --git a/languages/classes/LanguageIu.deps.php b/languages/classes/LanguageIu.deps.php
deleted file mode 100644 (file)
index 3b78d87..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageIu.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
-
-require_once( dirname(__FILE__).'/../LanguageConverter.php' );
diff --git a/languages/classes/LanguageKk.deps.php b/languages/classes/LanguageKk.deps.php
deleted file mode 100644 (file)
index 0a2a8af..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageKk.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageKk_cyrl.php' );
diff --git a/languages/classes/LanguageKu.deps.php b/languages/classes/LanguageKu.deps.php
deleted file mode 100644 (file)
index a187b77..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageKu.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
-require_once( dirname( __FILE__ ) . '/LanguageKu_ku.php' );
diff --git a/languages/classes/LanguageShi.deps.php b/languages/classes/LanguageShi.deps.php
deleted file mode 100644 (file)
index 3b78d87..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageIu.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
-
-require_once( dirname(__FILE__).'/../LanguageConverter.php' );
diff --git a/languages/classes/LanguageSr.deps.php b/languages/classes/LanguageSr.deps.php
deleted file mode 100644 (file)
index a377037..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageSr.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-require_once( dirname( __FILE__ ) . '/LanguageSr_ec.php' );
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
diff --git a/languages/classes/LanguageZh.deps.php b/languages/classes/LanguageZh.deps.php
deleted file mode 100644 (file)
index 41874ff..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// LanguageZh.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-require_once( dirname( __FILE__ ) . '/LanguageZh_hans.php' );
-require_once( dirname( __FILE__ ) . '/../LanguageConverter.php' );
diff --git a/skins/Chick.deps.php b/skins/Chick.deps.php
deleted file mode 100644 (file)
index a7cb084..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// Chick.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
-require_once( dirname(__FILE__) . '/MonoBook.php' );
-
diff --git a/skins/Modern.deps.php b/skins/Modern.deps.php
deleted file mode 100644 (file)
index e76ab99..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// Modern.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php' );
-
diff --git a/skins/MonoBook.deps.php b/skins/MonoBook.deps.php
deleted file mode 100644 (file)
index dda24e0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// MonoBook.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
-
diff --git a/skins/MySkin.deps.php b/skins/MySkin.deps.php
deleted file mode 100644 (file)
index b589cc5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// MySkin.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
-require_once( dirname(__FILE__) . '/MonoBook.php' );
-
diff --git a/skins/Simple.deps.php b/skins/Simple.deps.php
deleted file mode 100644 (file)
index 99fadc6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// Simple.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
-require_once( dirname(__FILE__) . '/MonoBook.php' );
-
diff --git a/skins/Vector.deps.php b/skins/Vector.deps.php
deleted file mode 100644 (file)
index 7a8c288..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-// This file exists to ensure that base classes are preloaded before
-// MonoBook.php is compiled, working around a bug in the APC opcode
-// cache on PHP 5, where cached code can break if the include order
-// changed on a subsequent page view.
-// see http://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
-
-if ( ! defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
-require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');