-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Update to laminas/laminas-coding-standard:2.3.x
, improved types and internal API
#103
Update to laminas/laminas-coding-standard:2.3.x
, improved types and internal API
#103
Conversation
…minor version Signed-off-by: George Steel <george@net-glue.co.uk>
These errors are primarily missing class, and missing file for legacy Zend purposes Signed-off-by: George Steel <george@net-glue.co.uk>
…che file Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
…4 others 💪 Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
537a567
to
defeaf5
Compare
@Ocramius … laminas-diactoros/src/Stream.php Line 339 in c1a6111
I think this is because an empty path is throwing a ValueError in |
OK, I take that last comment back - for some reason, the error handler is being ignored on 8.0 and 8.1 - this is all stuff that hasn't been touched by this PR so I'm a little bit confused as to why CI would be failing here… |
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.
Awesome, thanks @gsteel!
Ah, I did not notice the failures. I have another branch where I did this, and will propose a patch 🤔 |
Opened #104 - unsure if failures are comparable |
The test is checking for exceptional situations for non-stream resources and given the other cases are more likely to run (i.e. GMP is probably not installed), it's not worth the psalm errors Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
src/Stream.php
Outdated
try { | ||
$resource = fopen($stream, $mode); | ||
} catch (Throwable $e) { | ||
throw new Exception\RuntimeException('Invalid stream reference provided'); |
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.
We should really rethrow the previous exception
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.
s/rethrow/include
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.
Do you think it's a reasonable change - tests are now passing locally for me on 8.x
… The previous behaviour was to throw what's there - I'll amend to add previous perhaps? The integration tests would fail with anything other than a RuntimeException afaict
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 think this is really only in case of a stream error - an exception should be rare, but is a healthy approach to a failure.
Signed-off-by: George Steel <george@net-glue.co.uk>
122bc9b
to
98f1d99
Compare
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.
LGTM 🚢
laminas/laminas-coding-standard:2.3.x
, improved types and internal API
In laminas#104 (duplicate), we improved the types of internal and public API. These were mixed with coding style improvements. The coding style improvements have been merged separately via laminas#103, so this patch only includes the type/docblock improvements, which should ease the potential evolution of the API of this package.
In laminas#104 (duplicate), we improved the types of internal and public API. These were mixed with coding style improvements. The coding style improvements have been merged separately via laminas#103, so this patch only includes the type/docblock improvements, which should ease the potential evolution of the API of this package.
Description
Does the donkey work upgrading to LCS 2.3
Changes to tests and src are in separate commits