-
Notifications
You must be signed in to change notification settings - Fork 23
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
LCH-6253: Fix php-stan issues in content-hub-php #157
Conversation
6080a3c
to
bb88a98
Compare
paths: | ||
- ./src | ||
ignoreErrors: | ||
- '#Class [a-zA-Z0-9\\_:\(\).]* extends [a-zA-Z0-9\\_:@\(\).]*#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were these error ignored? @narendradesai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saxumVermes This added to suppress below error:
Class Acquia\ContentHubClient\ContentHubClient extends @final class GuzzleHttp\Client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really good example why this should not be done. Please next time include the reason in the solution! I've just read why they tagged the Client as final. the reason being, when version 8 comes out the will set the class (not just annotating) as final. They wanted to mark it as a deprecated that way, which will break backward compatibility with all our implementations essentially disabling - without refactor - updating to an upper version.
This needs to be taken care of soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left 2 minor comments, but the second requires some action, otherwise looks good!
6caef4c
to
bb88a98
Compare
Thanks to phpstan we identified that one of the failures pointed out a future, planned deprecation: GuzzelHttp/Client will be set to final. This will prevent any implementing side to extend the class. This needs two follow-up actions:
@narendradesai Please create the appropriate tickets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ticket PR in its form is good to be merged. We'll handle the guzzle issue in a separate task.
* LCH-6272: Remove type hint, allow integer values for scroll. (#156) * LCH-6253: Fix php-stan issues in content-hub-php (#157) * LCH-6238: Enable PHP8 job. * LCH-6238: Update phpunit version. * LCH-6238: Add directory at the end to generate deprecation message. * LCH-6238: Stop phpunit tests on failure. * LCH-6238: Adding phpstan. * LCH-6238: Adding level 1 php stan. * LCH-6253: Adding phpstan config file. * LCH-6253: Scanning directories. * LCH-6253: Autoload directories. * LCH-6253: Autoload directories. * LCH-6253: Autoload directories. * LCH-6253: Autoload directories. * LCH-6253: Ignoring class not found erros. * LCH-6253: Fixing phpstan errors. * LCH-6253: Ignore phpstan errors. * LCH-6253: Adding excludepaths. * LCH-6253: Updating the return type hint and fixing guzzle version less than 7.5. * LCH-6253: Use <8.0 as the pinned upper version. Co-authored-by: Amandeep Singh <arshgrover32@gmail.com> Co-authored-by: Peter Pajor <peter.pajor@acquia.com> * LCH-6300: Use composition instead of inheritance. * LCH-6300: Provide return types. * LCH-6300: Update neon config. * LCH-6300: Move implementation into common trait, use composition for logging client. * LCH-6300: Disable coverage report. * LCH-6300: Reenable coverage report. * LCH-6300: Setting a minimum version for coveralls. Co-authored-by: Narendra Shenvi Desai <shenvidesainarendra@gmail.com> Co-authored-by: Amandeep Singh <arshgrover32@gmail.com>
Issue: https://backlog.acquia.com/browse/LCH-6253