Skip to content
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

Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] #7331

Closed
itay-moav opened this issue May 27, 2022 · 10 comments

Comments

@itay-moav
Copy link

itay-moav commented May 27, 2022

I created a repository showing the bug
https://github.com/itay-moav/temp-phpstan-error

Notice I created it with the vendor folder , so do not run the composer
update on this.
Run the vendor/bin/phpstan analyse command to see the error.

This bug happens both on php 7.4.x and php 8.x
This bug was introduced in v1.7.0 (v1.6.9 works fine)

 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/CONSTANTS.php                      
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/aMayhemFilter.php              
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/MayhemSortPager.php            
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/MayhemSchema.php               
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/aMayhemData.php                
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file                                                                                            
 /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/FilterElementSql/Learner/Identifier.php                                                                                                    
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file                                                                                            
 /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/FilterElementSql/Learner/CostCenter.php                                                                                                    
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file                                                                                            
 /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/FilterElementSql/Learner/LmsSource.php                                                                                                     
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file                                                                                            
 /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/FilterElementSql/Learner/HireDate.php                                                                                                      
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/aMayhemFilterElementArray.php  
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/aMayhemFilterElement.php       
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] in file                                                                                            
 /Users/itay/dev-repositories/lms/lms-core/model/Reports/Lib/FilterElementSchema/schema_filter_functions_learner.php                                                                                    
 Run PHPStan with -v option and post the stack trace to:                                                                                                                                                
 https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md                                                                                                                                   
 Child process error (exit code 1):                 
@mergeable mergeable bot closed this as completed May 27, 2022
@mergeable
Copy link

mergeable bot commented May 27, 2022

Hi there! 👋

Looks like you opened an issue without following one of the issue templates:

Bug report 🐛 (open an issue)

If something isn't working as expected 🤔.

Feature request 🚀 (open an issue)

I have a suggestion (and may want to implement it 🙂)!

Support question ❓ (open a discussion)

I need some help with my code because PHPStan doesn't like it.


The current issue will be closed. This is a precaution to save maintainer's time, I hope you'll understand.

Sincerely, the bot 🤖

@ondrejmirtes ondrejmirtes reopened this May 27, 2022
@ondrejmirtes
Copy link
Member

Would be great if you could provide a reproducing repository, thanks.

@ondrejmirtes
Copy link
Member

You can always remove the sensitive proprietary parts.

@itay-moav
Copy link
Author

itay-moav commented May 28, 2022 via email

@itay-moav itay-moav changed the title Internal error: Internal error: failed to include [Talis/Chain/aFilteredValidatedChainLink.php Talis\Chain\aFilteredValidatedChainLink] Internal error: Internal error: failed to include [JsonIncrementalParser.php JsonIncrementalParser] May 29, 2022
@ondrejmirtes
Copy link
Member

I see this error:

$ vendor/bin/phpstan
Note: Using configuration file /Users/ondrej/Downloads/temp-phpstan-error/phpstan.neon.dist.
PHP Warning:  require_once(/etc/lms/environment.php): Failed to open stream: No such file or directory in /Users/ondrej/Downloads/temp-phpstan-error/main_bootstrap.php on line 36
Warning: require_once(/etc/lms/environment.php): Failed to open stream: No such file or directory in /Users/ondrej/Downloads/temp-phpstan-error/main_bootstrap.php on line 36
Error thrown in /Users/ondrej/Downloads/temp-phpstan-error/main_bootstrap.php on line 36 while loading bootstrap file /Users/ondrej/Downloads/temp-phpstan-error/phpstan.bootstrap.php: Failed opening required '/etc/lms/environment.php' (include_path='.:/Users/ondrej/Downloads/temp-phpstan-error/subdomains/api/plugins:/Users/ondrej/Downloads/temp-phpstan-error/lib:/Users/ondrej/Downloads/temp-phpstan-error/subdomains/api/controllers:/Users/ondrej/Downloads/temp-phpstan-error/model')

Can you please fix the repo so that every machine can see the same error as you do? Thanks.

@itay-moav
Copy link
Author

itay-moav commented May 30, 2022 via email

@itay-moav
Copy link
Author

itay-moav commented May 30, 2022 via email

@ondrejmirtes
Copy link
Member

I've sent you a suggestion on how to fix your autoloader: https://github.com/itay-moav/temp-phpstan-error/pull/1

@itay-moav
Copy link
Author

thanks, just be aware this was not an issue prior to 1.7.0

@github-actions
Copy link

github-actions bot commented Jul 1, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants