mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-04 14:10:00 +09:00
upgrade to laravel 8.0
This commit is contained in:
committed by
Attila Jozsef Kerekes
parent
43f894b58d
commit
27f58c0866
@@ -142,7 +142,7 @@ EOF
|
||||
|
||||
switch ($format) {
|
||||
case 'xlf20': $xliffVersion = '2.0';
|
||||
// no break
|
||||
// no break
|
||||
case 'xlf12': $format = 'xlf';
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ EOF
|
||||
|
||||
if ($force) {
|
||||
foreach ($providerTranslations->getCatalogues() as $catalogue) {
|
||||
$operation = new TargetOperation((new MessageCatalogue($catalogue->getLocale())), $catalogue);
|
||||
$operation = new TargetOperation(new MessageCatalogue($catalogue->getLocale()), $catalogue);
|
||||
if ($intlIcu) {
|
||||
$operation->moveMessagesToIntlDomainsIfPossible();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class IcuResFileDumper extends FileDumper
|
||||
$data .= pack('V', \strlen($target))
|
||||
.mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8')
|
||||
.$this->writePadding($data)
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
$resOffset = $this->getPosition($data);
|
||||
@@ -56,7 +56,7 @@ class IcuResFileDumper extends FileDumper
|
||||
.$indexes
|
||||
.$this->writePadding($data)
|
||||
.$resources
|
||||
;
|
||||
;
|
||||
|
||||
$bundleTop = $this->getPosition($data);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class MoFileDumper extends FileDumper
|
||||
.$targetOffsets
|
||||
.$sources
|
||||
.$targets
|
||||
;
|
||||
;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class PhpFileLoader extends FileLoader
|
||||
*/
|
||||
protected function loadResource(string $resource)
|
||||
{
|
||||
if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) {
|
||||
if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) {
|
||||
self::$cache = null;
|
||||
}
|
||||
|
||||
|
||||
19
vendor/symfony/translation/MessageCatalogue.php
vendored
19
vendor/symfony/translation/MessageCatalogue.php
vendored
@@ -155,19 +155,14 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf
|
||||
*/
|
||||
public function add(array $messages, string $domain = 'messages')
|
||||
{
|
||||
if (!isset($this->messages[$domain])) {
|
||||
$this->messages[$domain] = [];
|
||||
}
|
||||
$intlDomain = $domain;
|
||||
if (!str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) {
|
||||
$intlDomain .= self::INTL_DOMAIN_SUFFIX;
|
||||
}
|
||||
$altDomain = str_ends_with($domain, self::INTL_DOMAIN_SUFFIX) ? substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)) : $domain.self::INTL_DOMAIN_SUFFIX;
|
||||
foreach ($messages as $id => $message) {
|
||||
if (isset($this->messages[$intlDomain]) && \array_key_exists($id, $this->messages[$intlDomain])) {
|
||||
$this->messages[$intlDomain][$id] = $message;
|
||||
} else {
|
||||
$this->messages[$domain][$id] = $message;
|
||||
}
|
||||
unset($this->messages[$altDomain][$id]);
|
||||
$this->messages[$domain][$id] = $message;
|
||||
}
|
||||
|
||||
if ([] === ($this->messages[$altDomain] ?? null)) {
|
||||
unset($this->messages[$altDomain]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ final class PseudoLocalizationTranslator implements TranslatorInterface
|
||||
}
|
||||
|
||||
$visibleLength = $this->strlen($visibleText);
|
||||
$missingLength = (int) (ceil($visibleLength * $this->expansionFactor)) - $visibleLength;
|
||||
$missingLength = (int) ceil($visibleLength * $this->expansionFactor) - $visibleLength;
|
||||
if ($this->brackets) {
|
||||
$missingLength -= 2;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if ('cli' !== \PHP_SAPI) {
|
||||
throw new Exception('This script must be run from the command line.');
|
||||
}
|
||||
|
||||
$usageInstructions = <<<END
|
||||
|
||||
Usage instructions
|
||||
|
||||
Reference in New Issue
Block a user