質問編集履歴

1

エラーが出ているコードを追加しました。

2019/06/29 21:10

投稿

dauto
dauto

スコア38

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ```log
12
12
 
13
- local.ERROR: Class hash does not exist {"exception":"[object] (ReflectionException(code: -1): Class hash does not exist at /var/www/html/siro/vendor/laravel/framework/src/Illuminate/Container/Container.php:790)
13
+ local.ERROR: Class hash does not exist {"exception":"[object] (ReflectionException(code: -1): Class hash does not exist at /var/www/html/Laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:790)
14
14
 
15
15
  ```
16
16
 
@@ -19,3 +19,105 @@
19
19
 
20
20
 
21
21
  キャッシュをクリアして見ましたが、効果はありませんでした。
22
+
23
+
24
+
25
+ ### 追記
26
+
27
+ エラーが出ているコードはこちらになります。
28
+
29
+
30
+
31
+ /var/www/html/Laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php
32
+
33
+ ```php
34
+
35
+ public function build($concrete)
36
+
37
+ {
38
+
39
+ // If the concrete type is actually a Closure, we will just execute it and
40
+
41
+ // hand back the results of the functions, which allows functions to be
42
+
43
+ // used as resolvers for more fine-tuned resolution of these objects.
44
+
45
+ if ($concrete instanceof Closure) {
46
+
47
+ return $concrete($this, $this->getLastParameterOverride());
48
+
49
+ }
50
+
51
+
52
+
53
+ $reflector = new ReflectionClass($concrete); // ここがエラーが出ている790行目
54
+
55
+
56
+
57
+ // If the type is not instantiable, the developer is attempting to resolve
58
+
59
+ // an abstract type such as an Interface or Abstract Class and there is
60
+
61
+ // no binding registered for the abstractions so we need to bail out.
62
+
63
+ if (! $reflector->isInstantiable()) {
64
+
65
+ return $this->notInstantiable($concrete);
66
+
67
+ }
68
+
69
+
70
+
71
+ $this->buildStack[] = $concrete;
72
+
73
+
74
+
75
+ $constructor = $reflector->getConstructor();
76
+
77
+
78
+
79
+ // If there are no constructors, that means there are no dependencies then
80
+
81
+ // we can just resolve the instances of the objects right away, without
82
+
83
+ // resolving any other types or dependencies out of these containers.
84
+
85
+ if (is_null($constructor)) {
86
+
87
+ array_pop($this->buildStack);
88
+
89
+
90
+
91
+ return new $concrete;
92
+
93
+ }
94
+
95
+
96
+
97
+ $dependencies = $constructor->getParameters();
98
+
99
+
100
+
101
+ // Once we have all the constructor's parameters we can create each of the
102
+
103
+ // dependency instances and then use the reflection instances to make a
104
+
105
+ // new instance of this class, injecting the created dependencies in.
106
+
107
+ $instances = $this->resolveDependencies(
108
+
109
+ $dependencies
110
+
111
+ );
112
+
113
+
114
+
115
+ array_pop($this->buildStack);
116
+
117
+
118
+
119
+ return $reflector->newInstanceArgs($instances);
120
+
121
+ }
122
+
123
+ ```