Skip to content

PHP 8.1Β #70

@mmenavas

Description

@mmenavas

Overview

Given that PHP 8.0 EOL is on November 2023, I'd like to know if there's any ongoing effort to make this library compatible with php 8.1.

Below are the results of running PHPStan agains the src directory. Since I'm working on a project that uses this library, I'd be more than happy to help out with this effort.

 ------ ----------------------------------------------------------------------------------- 
  Line   Fields/BaseField.php                                                               
 ------ ----------------------------------------------------------------------------------- 
  :101   Unsafe usage of new static().                                                      
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
  :118   Unsafe usage of new static().                                                      
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ----------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------- 
  Line   Schema.php                                                                         
 ------ ----------------------------------------------------------------------------------- 
  :76    Unsafe usage of new static().                                                      
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ----------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------- 
  Line   SchemaValidator.php                                                                         
 ------ -------------------------------------------------------------------------------------------- 
  :28    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$descriptor.  
  :29    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$errors.      
  :37    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$errors.      
  :52    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$errors.      
  :59    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$descriptor.  
  :78    Access to an undefined property frictionlessdata\tableschema\SchemaValidator::$descriptor.  
 ------ -------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  Line   Table.php                                                                                                                                                   
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 
  :57    Unsafe usage of new static().                                                                                                                               
         πŸ’‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static                                                                           
  :163   Return type mixed of method frictionlessdata\tableschema\Table::current() is not covariant with tentative return type mixed of method Iterator::current().  
         πŸ’‘ Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.                                                      
  :216   Return type mixed of method frictionlessdata\tableschema\Table::rewind() is not covariant with tentative return type void of method Iterator::rewind().     
         πŸ’‘ Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.                                                      
  :226   Return type mixed of method frictionlessdata\tableschema\Table::key() is not covariant with tentative return type mixed of method Iterator::key().          
         πŸ’‘ Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.                                                      
  :231   Return type mixed of method frictionlessdata\tableschema\Table::next() is not covariant with tentative return type void of method Iterator::next().         
         πŸ’‘ Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.                                                      
  :238   Return type mixed of method frictionlessdata\tableschema\Table::valid() is not covariant with tentative return type bool of method Iterator::valid().       
         πŸ’‘ Make it covariant, or use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.                                                      
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------ 

EDIT: Adding deprecated warnings issued by PHP 8.1:

PHP Deprecated:  Return type of frictionlessdata\tableschema\Table::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/.../vendor/frictionlessdata/tableschema/src/Table.php on line 163

PHP Deprecated:  Return type of frictionlessdata\tableschema\Table::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/.../vendor/frictionlessdata/tableschema/src/Table.php on line 231

PHP Deprecated:  Return type of frictionlessdata\tableschema\Table::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/.../vendor/frictionlessdata/tableschema/src/Table.php on line 226

PHP Deprecated:  Return type of frictionlessdata\tableschema\Table::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/.../vendor/frictionlessdata/tableschema/src/Table.php on line 238

PHP Deprecated:  Return type of frictionlessdata\tableschema\Table::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/.../vendor/frictionlessdata/tableschema/src/Table.php on line 216


Please preserve this line to notify @courtney-miles (lead of this repository)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions