Giter Club home page Giter Club logo

Comments (10)

nunomaduro avatar nunomaduro commented on June 18, 2024 1

@phh Great news! Thanks for your help! 💪

from larastan.

phh avatar phh commented on June 18, 2024

Seems like limiting the number of files works:

Works:

vagrant@homestead:~/code$ php artisan code:analyse --paths=app/Http/Requests/Brands
7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Breaks:

vagrant@homestead:~/code$ php artisan code:analyse --paths=app/Http/Requests/
  72/130 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░]  55%Segmentation fault (core dumped)

from larastan.

ondrejmirtes avatar ondrejmirtes commented on June 18, 2024

Run PHPStan with --debug to find out which file causes it.

from larastan.

phh avatar phh commented on June 18, 2024

extension.neon:
bootstrap: %rootDir%/../../nunomaduro/larastan/bootstrap.php

bootstrap.php (Makes it fail):
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();

from larastan.

nunomaduro avatar nunomaduro commented on June 18, 2024

@phh That's strange. Besides "Segmentation fault (core dumped)". You don't have any other feedback?

from larastan.

phh avatar phh commented on June 18, 2024

Sorry, not really getting that much:

vagrant@homestead:~/code$ art code:analyse --debug
PHPStan crashed in the previous run probably because of excessive memory consumption.
It consumed around 10 MB of memory.

To avoid this issue, allow to use more memory with the --memory-limit option.
/home/vagrant/code/app/Api/Auth/Token.php
/home/vagrant/code/app/Api/Transformers/Brands/BrandTransformer.php
...
Segmentation fault (core dumped)

Just really a scan on the files and then a Segmentation fault in the end.

from larastan.

nunomaduro avatar nunomaduro commented on June 18, 2024

It seems to me, that the problem it may be on BrandTransformer.php class. Just to make sure please execute:

This should pass: php artisan code:analyse --paths="app/Api/Auth/Token.php".

This should break: php artisan code:analyse --paths="app/Api/Transformers/Brands/BrandTransformer.php".

If my theory is correct, show me the code present on BrandTransformer.php

from larastan.

phh avatar phh commented on June 18, 2024

Sorry, I didnt list all the classes. But it just keeps going going through a few classes and then it breaks:

vagrant@homestead:~/code$ php artisan code:analyse --debug
PHPStan crashed in the previous run probably because of excessive memory consumption.
It consumed around 32 MB of memory.


To avoid this issue, allow to use more memory with the --memory-limit option.
/home/vagrant/code/app/Api/Auth/Token.php
/home/vagrant/code/app/Api/Transformers/Brands/BrandTransformer.php
/home/vagrant/code/app/Api/Transformers/Foods/AllergyTransformer.php
/home/vagrant/code/app/Api/Transformers/Foods/PreferenceTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/AllergyTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/CategoryTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/IngredientTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/NutritionTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/OriginTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/PreferenceTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/SeasonTransformer.php
/home/vagrant/code/app/Api/Transformers/Ingredients/StorageTypeTransformer.php
/home/vagrant/code/app/Api/Transformers/Media/MediaTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/GroupedEquipmentTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/GroupedIngredientsTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/GroupedInstructionsTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/Groups/EquipmentTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/Groups/IngredientTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/Groups/InstructionTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/MediaTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/RecipeTransformer.php
/home/vagrant/code/app/Api/Transformers/Recipes/ServingTypeTransformer.php
/home/vagrant/code/app/Api/Transformers/Units/UnitTransformer.php
/home/vagrant/code/app/Console/Commands/CommandExport.php
/home/vagrant/code/app/Console/Commands/ExportIngredientsToExcel.php
Segmentation fault (core dumped)

If I for instance remove the last file that failed ExportIngredientsToExcel it just goes to the next file and fails there.

from larastan.

phh avatar phh commented on June 18, 2024

Okay I've reset my dependencies and it seems to work. I will spend some time to see if I can find the cause of this.

from larastan.

phh avatar phh commented on June 18, 2024

Seems like version 0.1.1 fixes this.

Thanks!

from larastan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.