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

Class 'PhpParser\ErrorHandler\Throwing' not found #289

Closed
torbenbr opened this issue Oct 28, 2016 · 15 comments
Closed

Class 'PhpParser\ErrorHandler\Throwing' not found #289

torbenbr opened this issue Oct 28, 2016 · 15 comments

Comments

@torbenbr
Copy link

I install phpdox with composer

PHP Version: 7.0.12-1+deb.sury.org~xenial+1 (Linux)
PHPDox Version: 0.8.2-dev
Exception: Error (Code: 0)
Location: /var/www/website/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php (Line 28)

Class 'PhpParser\ErrorHandler\Throwing' not found

#0 /var/www/website/vendor/theseer/phpdox/src/collector/Collector.php(141): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
#1 /var/www/website/vendor/theseer/phpdox/src/collector/Collector.php(105): TheSeer\phpDox\Collector\Collector->processFile()
#2 /var/www/website/vendor/theseer/phpdox/src/Application.php(122): TheSeer\phpDox\Collector\Collector->run()
#3 /var/www/website/vendor/theseer/phpdox/src/CLI.php(161): TheSeer\phpDox\Application->runCollector()
#4 /var/www/website/vendor/theseer/phpdox/phpdox(67): TheSeer\phpDox\CLI->run()
$ composer info | grep phpdox
theseer/phpdox                       0.9.0              A fast Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT) with event based processing
composer info | grep php-parser
nikic/php-parser                     dev-master c0f0edf A PHP parser written in PHP
@theseer
Copy link
Owner

theseer commented Oct 30, 2016

Thank you for your bugreport.

It seems you changed the composer.json dependency to dev-master.
This is not a supported scenario.

@theseer
Copy link
Owner

theseer commented Oct 30, 2016

FYI: I just updated the dependency to 3.0.0-beta2.

@heisian
Copy link

heisian commented Nov 10, 2016

if this is fixed why is it still occurring?

@theseer
Copy link
Owner

theseer commented Nov 10, 2016

How did you install phpDox?

The fix is not in 0.9.0. I should probably make a 0.9.1 release.

@heisian
Copy link

heisian commented Nov 10, 2016

I just assumed the latest version was going to install & work from composer. So I put the latest version in my composer.json. It complained about minimum stability, so I set it to dev.

Finally, I was able to get the package to install, but when I ran it I got the error referenced.

Not knowing what to do, I figured earlier versions might be stable, so I changed the line in composer from the latest version to ^0.8, re-updated composer, and voila, everything worked.

@theseer
Copy link
Owner

theseer commented Nov 10, 2016

Makes sense.

The composer.json coming with 0.9.0 was to open for the dependency to PHPParser and allowed installation of a later version than I had tested with.

Since I never use composer to install tools but use the phar version, I didn't notice that problem in time.
The master branch already contains the fix, i'll try implementing a few other things next week and make a new release.

@heisian
Copy link

heisian commented Nov 11, 2016

gotcha, thanks!

@spagu
Copy link

spagu commented Jan 24, 2017

any fix ? or phpdox drop?

@stoatally
Copy link

This is still an issue, I ran composer global require theseer/phpdox and got a non functioning version.

@heisian
Copy link

heisian commented Feb 23, 2017 via email

@moffe42
Copy link

moffe42 commented May 2, 2017

Still an issue on latest version...

    [exec] phpDox 0.8.2-dev - Copyright (C) 2010 - 2017 by Arne Blankerts
     [exec]
     [exec] [02.05.2017 - 13:39:51] Using config file './phpdox.xml.dist'
     [exec] [02.05.2017 - 13:39:51] Registered collector backend 'parser'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'build'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'git'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'checkstyle'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'phpcs'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'pmd'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'phpunit'
     [exec] [02.05.2017 - 13:39:51] Registered enricher 'phploc'
     [exec] [02.05.2017 - 13:39:51] Registered output engine 'xml'
     [exec] [02.05.2017 - 13:39:51] Registered output engine 'html'
     [exec] [02.05.2017 - 13:39:51] Starting to process project 'Colourbox CAS server simpleSAMLphp module'
     [exec] [02.05.2017 - 13:39:51] Starting collector
     [exec] [02.05.2017 - 13:39:51] Scanning directory '/Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/lib' for files to process
     [exec]
     [exec]
     [exec]
     [exec] Oups... phpDox encountered a problem and has terminated!
     [exec]
     [exec] It most likely means you've found a bug, so please file a report for this
     [exec] and paste the following details and the stacktrace (if given) along:
     [exec]
     [exec] PHP Version: 7.0.17 (Darwin)
     [exec] PHPDox Version: 0.8.2-dev
     [exec] Exception: Error (Code: 0)
     [exec] Location: /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php (Line 28)
     [exec]
     [exec] Class 'PhpParser\ErrorHandler\Throwing' not found
     [exec]
     [exec] #0 /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/theseer/phpdox/src/collector/Collector.php(141): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
     [exec] #1 /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/theseer/phpdox/src/collector/Collector.php(105): TheSeer\phpDox\Collector\Collector->processFile()
     [exec] #2 /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/theseer/phpdox/src/Application.php(122): TheSeer\phpDox\Collector\Collector->run()
     [exec] #3 /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/theseer/phpdox/src/CLI.php(161): TheSeer\phpDox\Application->runCollector()
     [exec] #4 /Users/jach/Code/cbxsso/simplesamlphp-module-cbxcasserver/vendor/theseer/phpdox/phpdox(67): TheSeer\phpDox\CLI->run()
     [exec]
     [exec]
     [exec]
     [exec] Result: 5
composer info | grep phpdox
theseer/phpdox                          0.9.0
composer info | grep php-parser
nikic/php-parser                        v3.0.5

@guice
Copy link

guice commented May 3, 2017

+1 here. Just ran into this issue. Found this thread.

$ composer global require theseer/phpdox 
Changed current directory to /home/me/.composer
Using version ^0.9.0 for theseer/phpdox
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Installing nikic/php-parser (v3.0.5): Loading from cache
  - Installing theseer/fxsl (1.1.1): Downloading (100%)         
  - Installing theseer/directoryscanner (1.3.2): Downloading (100%)         
  - Installing theseer/phpdox (0.9.0): Downloading (100%)   

$ composer info | grep phpdox
theseer/phpdox                     0.9.0 

$ ~/.composer/vendor/bin/phpdox --version
phpDox 0.8.2-dev - Copyright (C) 2010 - 2017 by Arne Blankerts

Installed 0.9.0, but got 0.8.2-dev?

@habeebmaraikar
Copy link

still this use is occurring. Installed 0.9.0, but got 0.8.2-dev?

Below is the my composer,json
{
"require-dev": {
"phpunit/dbunit": "^2.0"
},
"require": {
"phpunit/phpunit": "4.5.",
"phploc/phploc": "
",
"phpmd/phpmd": "",
"pdepend/pdepend" : "^2.5",
"squizlabs/php_codesniffer": "
",
"sebastian/phpcpd": "*",
"phpunit/php-text-template": "^1.2",
"phpunit/php-timer": "^1.0",
"phpunit/php-token-stream": "^1.4",
"nikic/php-parser": "^3.0",
"theseer/phpdox": "^0.9.0"
},
"minimum-stability": "dev",
"prefer-stable": true
}

Only PHPDOX tool is not working. Because of this my build is getting failed.
Let me know any solutions for this?

Error:
phpdox:
[phpdox] phpDox 0.8.2-dev - Copyright (C) 2010 - 2017 by Arne Blankerts
[phpdox]
[phpdox] [19.05.2017 - 03:31:53] Using config file './phpdox.xml'
[phpdox] [19.05.2017 - 03:31:53] Registered collector backend 'parser'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'build'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'git'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'checkstyle'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'phpcs'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'pmd'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'phpunit'
[phpdox] [19.05.2017 - 03:31:53] Registered enricher 'phploc'
[phpdox] [19.05.2017 - 03:31:53] Registered output engine 'xml'
[phpdox] [19.05.2017 - 03:31:53] Registered output engine 'html'
[phpdox] [19.05.2017 - 03:31:53] Starting to process project 'Math'
[phpdox] [19.05.2017 - 03:31:53] Starting collector
[phpdox] [19.05.2017 - 03:31:53] Scanning directory '../src' for files to process
[phpdox]
[phpdox]
[phpdox]
[phpdox] Oups... phpDox encountered a problem and has terminated!
[phpdox]
[phpdox] It most likely means you've found a bug, so please file a report for this
[phpdox] and paste the following details and the stacktrace (if given) along:
[phpdox]
[phpdox] PHP Version: 7.0.15-0ubuntu0.16.04.4 (Linux)
[phpdox] PHPDox Version: 0.8.2-dev
[phpdox] Exception: Error (Code: 0)
[phpdox] Location: /home/jenkinsci/.config/composer/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php (Line 28)
[phpdox]
[phpdox] Class 'PhpParser\ErrorHandler\Throwing' not found
[phpdox]
[phpdox] #0 /home/jenkinsci/.config/composer/vendor/theseer/phpdox/src/collector/Collector.php(141): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
[phpdox] #1 /home/jenkinsci/.config/composer/vendor/theseer/phpdox/src/collector/Collector.php(105): TheSeer\phpDox\Collector\Collector->processFile()
[phpdox] #2 /home/jenkinsci/.config/composer/vendor/theseer/phpdox/src/Application.php(122): TheSeer\phpDox\Collector\Collector->run()
[phpdox] #3 /home/jenkinsci/.config/composer/vendor/theseer/phpdox/src/CLI.php(161): TheSeer\phpDox\Application->runCollector()
[phpdox] #4 /home/jenkinsci/.config/composer/vendor/theseer/phpdox/phpdox(67): TheSeer\phpDox\CLI->run()
[phpdox]
[phpdox]
[phpdox]
[phpdox] Result: 5

@blueleader07
Copy link

+1. Fresh install (0.9.0). Does not work with the same error the other users have reported.

Class 'PhpParser\ErrorHandler\Throwing' not found

Has anyone got this to actually work? Is there something I'm missing? Tried downgrading to ^0.8.0 but got a tokenizer error.

@theseer
Copy link
Owner

theseer commented Jun 8, 2017

Using the phar distribution or dev-master should work.

I'm wrapping up a few loose ends and hopefully manage to finally make a new release either later today or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants