You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownew \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
203
+
}
204
+
205
+
thrownew \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
206
+
}
207
+
208
+
if (self::$caseCheck && $message = $this->checkCase($refl, $file, $class)) {
209
+
thrownew \RuntimeException(sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', $message[0], $message[1], $message[2]));
210
+
}
211
+
}
211
212
212
-
if (isset(self::$final[$parent])) {
213
-
@trigger_error(sprintf('The "%s" class is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $name), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s" %s %s "%s" that is deprecated%s.', $name, $type, $verb, $use, self::$deprecated[$use]), E_USER_DEPRECATED);
227
-
}
228
-
if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) {
229
-
@trigger_error(sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $name), E_USER_DEPRECATED);
230
-
}
239
+
if (!isset(self::$checkedClasses[$parent])) {
240
+
$this->checkClass($parent);
231
241
}
232
242
233
-
// Inherit @final and @internal annotations for methods
$deprecations[] = sprintf('The "%s" class is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $class);
@trigger_error(sprintf('The "%s::%s()" method is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $name), E_USER_DEPRECATED);
253
-
}
257
+
$deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s.', $class, $type, $verb, $use, self::$deprecated[$use]);
258
+
}
259
+
if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) {
260
+
$deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class);
261
+
}
262
+
}
254
263
255
-
if (isset(self::$internalMethods[$name][$method->name])) {
@trigger_error(sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $name), E_USER_DEPRECATED);
259
-
}
260
-
}
264
+
if (\trait_exists($class)) {
265
+
return$deprecations;
266
+
}
261
267
262
-
// Method from a trait
263
-
if ($method->getFilename() !== $refl->getFileName()) {
264
-
continue;
268
+
// Inherit @final and @internal annotations for methods
$deprecations[] = sprintf('The "%s::%s()" method is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
287
+
}
288
+
289
+
if (isset(self::$internalMethods[$class][$method->name])) {
$deprecations[] = sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $class);
277
293
}
278
294
}
279
295
280
-
if (isset(self::$php7Reserved[\strtolower($refl->getShortName())])) {
281
-
@trigger_error(sprintf('The "%s" class uses the reserved name "%s", it will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED);
296
+
// Detect method annotations
297
+
if (!$doc = $method->getDocComment()) {
298
+
continue;
282
299
}
283
-
}
284
300
285
-
if ($file) {
286
-
if (!$exists) {
287
-
if (false !== strpos($class, '/')) {
288
-
thrownew \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
thrownew \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
thrownew \RuntimeException(sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)));
0 commit comments