-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.1 #70
Comments
Hi, sounds good, I think a PR would be very welcome, let me know if you need any help |
Hi Maximo, happy to work on more PHP version compatibility, but this would need to be a new release since some in-the-wild uses are still probably on older PHPs. We do use the Library on PHP 8.1 without errors so not sure if PHPStan is complaining or just giving warnings there. Will check
Will review my next week schedule (bit crazy these days) and see if I find some time. Pull requests are also welcome. Will update here
Best
Diego Pino Navarro
Director of Digital Strategy
Archipelago architect
Metropolitan New York Library Council
PO Box 2084
New York, NY 10108
… On Feb 21, 2023, at 4:34 PM, Maximo Mena ***@***.***> wrote:
Overview
Given that PHP 8.0 EOL <https://www.php.net/supported-versions.php> 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 <https://phpstan.org/> 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.
------ ------------------------------------------------------------------------------------------------------------------------------------------------------------
Please preserve this line to notify @courtney-miles <https://github.com/courtney-miles> (lead of this repository)
—
Reply to this email directly, view it on GitHub <#70>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU7ZZ2VBVJSYHEXBZDCDGTWYUKEHANCNFSM6AAAAAAVDOC5TE>.
You are receiving this because you are subscribed to this thread.
|
Admittedly, the known compatibility with PHP gets a little hairy because its version constraint is We run the tests for all versions up to 8.0, but after that compatibility is an unknown. As a part of ensuring compatibility with PHP 8.1, would we be happy to peg the upper version of PHP in |
@DiegoPino: I agree with you that the library works on PHP 8.1 without errors; however, I'm seeing
|
@courtney-miles: I created PR #71 to address the deprecated messages. As a side note, it looks like we can ignore most of the PHPStan messages as PHP8.1 (and 8.2) are only yelling at us when the return types of overriding methods are omitted or incompatible with those of the parent methods. |
I'm sorry for coming back to this sooo late. I have raised #72 because there was a number of changes to address deprecation notices. The hairiest part with PHP 8.1 is that |
Changes have been released in version 1.2.0. |
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.EDIT: Adding deprecated warnings issued by PHP 8.1:
Please preserve this line to notify @courtney-miles (lead of this repository)
The text was updated successfully, but these errors were encountered: