Coder Social home page Coder Social logo

Comments (2)

kylekatarnls avatar kylekatarnls commented on June 12, 2024 1

Hello, I'm working on a fix, you can try it with composer require pdepend/pdepend:dev-fix/issue-621-enum-serialization

from pdepend.

chelsEg avatar chelsEg commented on June 12, 2024

I have the same error:

PHP Fatal error:  Uncaught TypeError: PDepend\Metrics\Analyzer\HierarchyAnalyzer::visitClass(): Argument #1 ($class) must be of type PDepend\Source\AST\ASTClass, PDepend\Source\AST\ASTEnum given, called in /application/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/ASTEnum.php on line 274 and defined in /application/vendor/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/HierarchyAnalyzer.php:215
Stack trace:
#0 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/ASTEnum.php(274): PDepend\Metrics\Analyzer\HierarchyAnalyzer->visitClass(Object(PDepend\Source\AST\ASTEnum))
#1 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/HierarchyAnalyzer.php(302): PDepend\Source\AST\ASTEnum->accept(Object(PDepend\Metrics\Analyzer\HierarchyAnalyzer))
#2 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/ASTNamespace.php(328): PDepend\Metrics\Analyzer\HierarchyAnalyzer->visitNamespace(Object(PDepend\Source\AST\ASTNamespace))
#3 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/HierarchyAnalyzer.php(170): PDepend\Source\AST\ASTNamespace->accept(Object(PDepend\Metrics\Analyzer\HierarchyAnalyzer))
#4 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Engine.php(639): PDepend\Metrics\Analyzer\HierarchyAnalyzer->analyze(Object(PDepend\Source\AST\ASTArtifactList))
#5 /application/vendor/pdepend/pdepend/src/main/php/PDepend/Engine.php(359): PDepend\Engine->performAnalyzeProcess()
#6 /application/vendor/phpmd/phpmd/src/main/php/PHPMD/Parser.php(95): PDepend\Engine->analyze()
#7 /application/vendor/phpmd/phpmd/src/main/php/PHPMD/PHPMD.php(240): PHPMD\Parser->parse(Object(PHPMD\Report))
#8 /application/vendor/phpmd/phpmd/src/main/php/PHPMD/TextUI/Command.php(136): PHPMD\PHPMD->processFiles('./app', './phpmd.xml', Array, Object(PHPMD\RuleSetFactory), Object(PHPMD\Report))
#9 /application/vendor/phpmd/phpmd/src/main/php/PHPMD/TextUI/Command.php(184): PHPMD\TextUI\Command->run(Object(PHPMD\TextUI\CommandLineOptions), Object(PHPMD\RuleSetFactory))
#10 /application/vendor/phpmd/phpmd/src/bin/phpmd(61): PHPMD\TextUI\Command::main(Array)
#11 /application/vendor/bin/phpmd(117): include('/application/ve...')
#12 {main}
  thrown in /application/vendor/pdepend/pdepend/src/main/php/PDepend/Metrics/Analyzer/HierarchyAnalyzer.php on line 215
  • PHP Depend version: 2.11.0
  • PHP Version: 8.1.9
  • Installation type: composer
  • Operating System / Distribution & Version: macOS Monterey Version 12.5.1

from pdepend.

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.