@@ -70,23 +70,19 @@ final public function __construct(protected readonly Rfc3986Uri|WhatWgUrl|Psr7Ur
7070    {
7171    }
7272
73-     /** 
74-      * @param UriFactoryInterface|null $uriFactory deprecated, will be removed in the next major release 
75-      */ 
76-     public  static  function  from (Rfc3986Uri WhatWgUrl Stringable string  $ uriUriFactoryInterface $ uriFactorynull ): static 
73+     public  static  function  wrap (Rfc3986Uri WhatWgUrl Stringable string  $ uristatic 
7774    {
7875        return  new  static (match  (true ) {
7976            $ uriinstanceof  self => $ uriuri ,
8077            $ uriinstanceof  Psr7UriInterface,
8178            $ uriinstanceof  UriInterface,
8279            $ uriinstanceof  Rfc3986Uri,
8380            $ uriinstanceof  WhatWgUrl => $ uri
84-             $ uriFactoryinstanceof  UriFactoryInterface => $ uriFactorycreateUri ((string ) $ uri// using UriFactoryInterface is deprecated 
8581            default  => Uri::new ($ uri
8682        });
8783    }
8884
89-     public  function  uri (): Rfc3986Uri WhatWgUrl Psr7UriInterface UriInterface 
85+     public  function  unwrap (): Rfc3986Uri WhatWgUrl Psr7UriInterface UriInterface 
9086    {
9187        return  $ this uri ;
9288    }
@@ -1151,32 +1147,56 @@ public function getIdnUriString(): string
11511147
11521148    public  function  appendFragmentDirectives (FragmentDirectives Directive Stringable string  ...$ directivesstatic 
11531149    {
1154-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->append (...$ directives
1150+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->append (...$ directives
11551151    }
11561152
11571153    public  function  prependFragmentDirectives (FragmentDirectives Directive Stringable string  ...$ directivesstatic 
11581154    {
1159-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->prepend (...$ directives
1155+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->prepend (...$ directives
11601156    }
11611157
11621158    public  function  removeFragmentDirectives (int  ...$ offsetstatic 
11631159    {
1164-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->remove (...$ offset
1160+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->remove (...$ offset
11651161    }
11661162
11671163    public  function  replaceFragmentDirective (int  $ offsetDirective Stringable string  $ directivestatic 
11681164    {
1169-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->replace ($ offset$ directive
1165+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->replace ($ offset$ directive
11701166    }
11711167
11721168    public  function  sliceFragmentDirectives (int  $ offsetint  $ lengthstatic 
11731169    {
1174-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->slice ($ offset$ length
1170+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->slice ($ offset$ length
11751171    }
11761172
11771173    public  function  filterFragmentDirectives (callable  $ callbackstatic 
11781174    {
1179-         return  $ this withFragment (FragmentDirectives::fromUri ($ this uri ())->filter ($ callback
1175+         return  $ this withFragment (FragmentDirectives::fromUri ($ this unwrap ())->filter ($ callback
1176+     }
1177+ 
1178+ 
1179+     /** 
1180+      * DEPRECATION WARNING! This method will be removed in the next major point release. 
1181+      * 
1182+      * @deprecated Since version 7.6.0 
1183+      * @codeCoverageIgnore 
1184+      * @see Modifier::wrap() 
1185+      * 
1186+      * @param UriFactoryInterface|null $uriFactory deprecated, will be removed in the next major release 
1187+      */ 
1188+     #[Deprecated(message:'use League\Uri\Modifier::wrap() instead ' , since:'league/uri-components:7.6.0 ' )]
1189+     public  static  function  from (Rfc3986Uri WhatWgUrl Stringable string  $ uriUriFactoryInterface $ uriFactorynull ): static 
1190+     {
1191+         return  new  static (match  (true ) {
1192+             $ uriinstanceof  self => $ uriuri ,
1193+             $ uriinstanceof  Psr7UriInterface,
1194+             $ uriinstanceof  UriInterface,
1195+             $ uriinstanceof  Rfc3986Uri,
1196+             $ uriinstanceof  WhatWgUrl => $ uri
1197+             $ uriFactoryinstanceof  UriFactoryInterface => $ uriFactorycreateUri ((string ) $ uri// using UriFactoryInterface is deprecated 
1198+             default  => Uri::new ($ uri
1199+         });
11801200    }
11811201
11821202    /** 
@@ -1247,7 +1267,7 @@ public function removeQueryPairs(string ...$keys): static
12471267     * 
12481268     * @deprecated Since version 7.6.0 
12491269     * @codeCoverageIgnore 
1250-      * @see Modifier::uri () 
1270+      * @see Modifier::unwrap () 
12511271     * 
12521272     * Remove query data according to their key name. 
12531273     */ 
0 commit comments