Skip to content

Commit 68eb6f5

Browse files
committed
Replace deprecated method use
1 parent fe9abf8 commit 68eb6f5

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/Routing/Loader/AttributeLoader.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,32 @@ public function load(mixed $class, ?string $type = null): RouteCollection
8585
return $collection;
8686
}
8787

88-
/** @var AsMessageHandler $attrib */
89-
$attrib = $attribute->newInstance();
88+
/** @var AsMessageHandler $attr */
89+
$attr = $attribute->newInstance();
9090

91-
if ($attrib->getEnv() && $attrib->getEnv() !== $this->env) {
91+
if ($attr->envs && !\in_array($this->env, $attr->envs, true)) {
9292
return $collection;
9393
}
9494

95-
$requirements = $attrib->getRequirements();
95+
$requirements = $attr->requirements;
9696

9797
foreach ($requirements as $placeholder => $requirement) {
9898
if (\is_int($placeholder)) {
9999
throw new \InvalidArgumentException(\sprintf('A placeholder name must be a string (%d given). Did you forget to specify the placeholder key for the requirement "%s" of the route in "%s"?', $placeholder, $requirement, $class->getName()));
100100
}
101101
}
102102

103-
$name = $attrib->getName() ?? $this->getDefaultRouteName($class);
104-
$defaults = $attrib->getDefaults();
105-
$options = $attrib->getOptions();
106-
$schemes = $attrib->getSchemes();
107-
$methods = $attrib->getMethods();
103+
$name = $attr->name ?? $this->getDefaultRouteName($class);
104+
$defaults = $attr->defaults;
105+
$options = $attr->options;
106+
$schemes = $attr->schemes;
107+
$methods = $attr->methods;
108108

109-
$host = $attrib->getHost() ?? '';
110-
$condition = $attrib->getCondition() ?? '';
111-
$priority = $attrib->getPriority() ?? 0;
109+
$host = $attr->host ?? '';
110+
$condition = $attr->condition ?? '';
111+
$priority = $attr->priority ?? 0;
112112

113-
$path = $attrib->getLocalizedPaths() ?: $attrib->getPath();
113+
$path = $attr->path;
114114
$paths = [];
115115

116116
if (\is_array($path)) {

0 commit comments

Comments
 (0)