I installed MediaWiki 1.33 + Wikibase in an organisation where Internet was available only through a HTTP proxy. Consequently the script ImportConstraintEntities.php was not able to download Wikidata constraints. This script should use $wgHTTPProxy when it is non-empty.
I added the following code to be able to download Wikidata constraints:
diff --git a/maintenance/ImportConstraintEntities.php b/maintenance/ImportConstraintEntities.php index 8af9dec..da9314c 100644 --- a/maintenance/ImportConstraintEntities.php +++ b/maintenance/ImportConstraintEntities.php @@ -130,8 +130,16 @@ class ImportConstraintEntities extends Maintenance { * @return string local entity ID */ private function importEntityFromWikidata( $wikidataEntityId ) { + + $paramsContext = [ + 'http' => [ + 'proxy' => 'tcp://proxy.example.org:8080', + ], + ]; + $context = stream_context_create( $paramsContext ); + $wikidataEntityUrl = "https://www.wikidata.org/wiki/Special:EntityData/$wikidataEntityId.json"; - $wikidataEntitiesJson = file_get_contents( $wikidataEntityUrl ); + $wikidataEntitiesJson = file_get_contents( $wikidataEntityUrl, false, $context ); return $this->importEntityFromJson( $wikidataEntityId, $wikidataEntitiesJson ); }