prestaconcept / PrestaSitemapBundle

A symfony bundle that provides tools to build a rich application sitemap. The main goals are : simple, no databases, various namespace (eg. google image), respect constraints etc.
MIT License
347 stars 100 forks source link

Fixed stream_get_meta_data uri is always defined #347

Closed yann-eugone closed 2 weeks ago

yann-eugone commented 2 weeks ago

OK... Now that I fixed PhpStan error in https://github.com/prestaconcept/PrestaSitemapBundle/pull/345

 ------ ---------------------------------------------------------------------- 
  Line   Sitemap/DumpingUrlset.php                                             
 ------ ---------------------------------------------------------------------- 
  62     Offset 'uri' does not exist on array{timed_out: bool, blocked: bool,  
         eof: bool, unread_bytes: int, stream_type: string, wrapper_type:      
         string, wrapper_data: mixed, mode: string, ...}.                      
 ------ ---------------------------------------------------------------------- 

And now that we are running tests on PHP 8.3, we have the opposite error

 ------ ---------------------------------------------------------------------- 
  Line   Sitemap/DumpingUrlset.php                                             
 ------ ---------------------------------------------------------------------- 
  61     Offset 'uri' on array{timed_out: bool, blocked: bool, eof: bool,      
         unread_bytes: int, stream_type: string, wrapper_type: string,         
         wrapper_data: mixed, mode: string, ...} in isset() always exists and  
         is not nullable.                                                      
 ------ ---------------------------------------------------------------------- 

I decided to just ignore this error, because this is no big deal, and it really depends on the PHP version, and we are not even close to only support PHP >= 8.3