1313
1414namespace League \Uri \Components ;
1515
16+ use Deprecated ;
1617use Iterator ;
1718use League \Uri \Contracts \PathInterface ;
1819use League \Uri \Contracts \SegmentedPathInterface ;
@@ -447,12 +448,13 @@ private function buildBasename(string $extension, string $ext, ?string $param =
447448 * DEPRECATION WARNING! This method will be removed in the next major point release.
448449 *
449450 * @deprecated Since version 7.0.0
450- * @see Domain ::getIterator()
451+ * @see HierarchicalPath ::getIterator()
451452 *
452453 * @codeCoverageIgnore
453454 *
454455 * Returns a new instance from a string or a stringable object.
455456 */
457+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::getIterator() instead ' , since:'league/uri-components:7.0.0 ' )]
456458 public function segments (): array
457459 {
458460 return $ this ->segments ;
@@ -468,6 +470,7 @@ public function segments(): array
468470 *
469471 * Returns a new instance from a string or a stringable object.
470472 */
473+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::new() instead ' , since:'league/uri-components:7.0.0 ' )]
471474 public static function createFromString (Stringable |string $ path ): self
472475 {
473476 return self ::new ($ path );
@@ -481,6 +484,7 @@ public static function createFromString(Stringable|string $path): self
481484 *
482485 * @codeCoverageIgnore
483486 */
487+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::new() instead ' , since:'league/uri-components:7.0.0 ' )]
484488 public static function createFromPath (PathInterface $ path ): self
485489 {
486490 return self ::new ($ path );
@@ -498,6 +502,7 @@ public static function createFromPath(PathInterface $path): self
498502 *
499503 * @deprecated Since version 7.0.0
500504 */
505+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::fromRelative() instead ' , since:'league/uri-components:7.0.0 ' )]
501506 public static function createRelativeFromSegments (iterable $ segments ): self
502507 {
503508 return self ::fromRelative (...$ segments );
@@ -515,6 +520,7 @@ public static function createRelativeFromSegments(iterable $segments): self
515520 *
516521 * @deprecated Since version 7.0.0
517522 */
523+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::fromAbsolute() instead ' , since:'league/uri-components:7.0.0 ' )]
518524 public static function createAbsoluteFromSegments (iterable $ segments ): self
519525 {
520526 return self ::fromAbsolute (...$ segments );
@@ -530,6 +536,7 @@ public static function createAbsoluteFromSegments(iterable $segments): self
530536 *
531537 * Create a new instance from a URI object.
532538 */
539+ #[Deprecated(message:'use League\Uri\Components\HierarchicalPath::fromUri() instead ' , since:'league/uri-components:7.0.0 ' )]
533540 public static function createFromUri (Psr7UriInterface |UriInterface $ uri ): self
534541 {
535542 return self ::fromUri ($ uri );
0 commit comments