Merged
Conversation
plus inserting a space
Member
|
Thanks! |
Contributor
Author
|
You're welcome. |
dada-amater
referenced
this pull request
in dada-amater/phpstan-src
Mar 10, 2020
ondrejmirtes
pushed a commit
that referenced
this pull request
Mar 10, 2020
DaveLiddament
added a commit
to DaveLiddament/phpstan-src
that referenced
this pull request
Feb 15, 2021
The `fields` parameter for `fputcsv` should be an array of strings. See [PHP manual](https://www.php.net/manual/en/function.fputcsv.php). This should fix [this snippet](https://phpstan.org/r/65420d60-d1fd-4eef-9ba3-e057672082ee) by correctly reporting an error on line `22`. Running the code in the snippet on PHP 8.0 (`PHP 8.0.0 (cli) (built: Dec 6 2020 06:56:11) ( NTS )`) results in this error: ``` PHP Fatal error: Uncaught Error: Object of class Person could not be converted to string in /home/vagrant/example/csv.php:24 Stack trace: #0 /home/vagrant/example/csv.php(24): fputcsv() phpstan#1 {main} thrown in /home/vagrant/example/csv.php on line 24 ``` NOTE: I've seen a similar error with PHP 7.3 too.
ondrejmirtes
pushed a commit
that referenced
this pull request
Feb 15, 2021
The `fields` parameter for `fputcsv` should be an array of strings. See [PHP manual](https://www.php.net/manual/en/function.fputcsv.php). This should fix [this snippet](https://phpstan.org/r/65420d60-d1fd-4eef-9ba3-e057672082ee) by correctly reporting an error on line `22`. Running the code in the snippet on PHP 8.0 (`PHP 8.0.0 (cli) (built: Dec 6 2020 06:56:11) ( NTS )`) results in this error: ``` PHP Fatal error: Uncaught Error: Object of class Person could not be converted to string in /home/vagrant/example/csv.php:24 Stack trace: #0 /home/vagrant/example/csv.php(24): fputcsv() #1 {main} thrown in /home/vagrant/example/csv.php on line 24 ``` NOTE: I've seen a similar error with PHP 7.3 too.
niconoe-
added a commit
to niconoe-/phpstan-src
that referenced
this pull request
Jul 8, 2021
Closed
This was referenced Apr 12, 2026
ondrejmirtes
pushed a commit
that referenced
this pull request
Apr 21, 2026
- When multiple arguments are passed to `dumpType()`, `dumpNativeType()`, or `dumpPhpDocType()`, messages now include `#N` (e.g. "Dumped type #1: int") to maintain stable argument ordering through the alphabetical error sort - Single-argument calls retain the original "Dumped type: ..." format - Fixed all three dump rules: DumpTypeRule, DumpNativeTypeRule, DumpPhpDocTypeRule - Updated existing multi-arg test expectations to match new format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plus inserting a space