File: 0003-Load-lazy-loaded-classes-from-installed-location.patch

package info (click to toggle)
php-nesbot-carbon 2.73.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,884 kB
  • sloc: php: 158,586; xml: 99; makefile: 33; sh: 14
file content (64 lines) | stat: -rw-r--r-- 2,823 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From: Robin Gustafsson <robin@rgson.se>
Date: Fri, 31 Dec 2021 15:45:07 +0100
Subject: Load lazy-loaded classes from installed location

Forwarded: not-needed
---
 src/Carbon/MessageFormatter/MessageFormatterMapper.php | 4 ++--
 src/Carbon/PHPStan/Macro.php                           | 8 ++++----
 src/Carbon/Translator.php                              | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Carbon/MessageFormatter/MessageFormatterMapper.php b/src/Carbon/MessageFormatter/MessageFormatterMapper.php
index c054808..99b9e64 100644
--- a/src/Carbon/MessageFormatter/MessageFormatterMapper.php
+++ b/src/Carbon/MessageFormatter/MessageFormatterMapper.php
@@ -19,8 +19,8 @@ use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
 $transMethod = new ReflectionMethod(MessageFormatterInterface::class, 'format');
 
 require $transMethod->getParameters()[0]->hasType()
-    ? __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php'
-    : __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php';
+    ? __DIR__.'/MessageFormatterMapperStrongType.php'
+    : __DIR__.'/MessageFormatterMapperWeakType.php';
 // @codeCoverageIgnoreEnd
 
 final class MessageFormatterMapper extends LazyMessageFormatter
diff --git a/src/Carbon/PHPStan/Macro.php b/src/Carbon/PHPStan/Macro.php
index de3e51f..4b5ac1c 100644
--- a/src/Carbon/PHPStan/Macro.php
+++ b/src/Carbon/PHPStan/Macro.php
@@ -20,14 +20,14 @@ use ReflectionMethod;
 $method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection');
 
 require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class
-    ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php'
-    : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php';
+    ? __DIR__.'/AbstractMacroStatic.php'
+    : __DIR__.'/AbstractMacroBuiltin.php';
 
 $method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName');
 
 require $method->hasReturnType()
-    ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php'
-    : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php';
+    ? __DIR__.'/MacroStrongType.php'
+    : __DIR__.'/MacroWeakType.php';
 
 final class Macro extends LazyMacro
 {
diff --git a/src/Carbon/Translator.php b/src/Carbon/Translator.php
index 491c9e7..1861048 100644
--- a/src/Carbon/Translator.php
+++ b/src/Carbon/Translator.php
@@ -23,8 +23,8 @@ $transMethod = new ReflectionMethod(
 );
 
 require $transMethod->hasReturnType()
-    ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php'
-    : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php';
+    ? __DIR__.'/TranslatorStrongType.php'
+    : __DIR__.'/TranslatorWeakType.php';
 
 class Translator extends LazyTranslator
 {