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

apigen error on generate #631

Closed
phil123456 opened this issue Jul 30, 2015 · 3 comments
Closed

apigen error on generate #631

phil123456 opened this issue Jul 30, 2015 · 3 comments
Labels

Comments

@phil123456
Copy link

Hello,

on generate, I get this error
strange it worked fine on another machine
I found this thread : #625
but should'nt it be fixed or something ? cos it is a phar file, I have no idea how to fix the app

$type = exception 'ErrorException' with message 'Argument 2 passed to ApiGen\Generator\Resolvers\ElementResolver::resolveContextForClassProperty() must be an instance of ApiGen\Reflection\ReflectionClass, instance of ApiGen\Reflection\ReflectionFunction given, called in phar:///usr/local/bin/apigen/src/Generator/Resolvers/ElementResolver.php on line 155 and defined' in phar:///usr/local/bin/apigen/src/Generator/Resolvers/ElementResolver.php:300
Stack trace:
#0 phar:///usr/local/bin/apigen/src/Generator/Resolvers/ElementResolver.php(300): Tracy\Debugger::errorHandler(4096, 'Argument 2 pass...', 'phar:///usr/loc...', 300, Array)
#1 phar:///usr/local/bin/apigen/src/Generator/Resolvers/ElementResolver.php(155): ApiGen\Generator\Resolvers\ElementResolver->resolveContextForClassProperty('Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction), 6)
#2 phar:///usr/local/bin/apigen/src/Templating/Filters/UrlFilters.php(98): ApiGen\Generator\Resolvers\ElementResolver->resolveElement('Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction), NULL)
#3 phar:///usr/local/bin/apigen/src/Templating/Filters/UrlFilters.php(292): ApiGen\Templating\Filters\UrlFilters->resolveLink('Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction))
#4 [internal function]: ApiGen\Templating\Filters\UrlFilters->highlightPhp('Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction))
#5 phar:///usr/local/bin/apigen/src/Templating/Filters/Filters.php(27): call_user_func_array(Array, Array)
#6 [internal function]: ApiGen\Templating\Filters\Filters->loader('highlightphp', 'Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction))
#7 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Engine.php(267): call_user_func_array(Array, Array)
#8 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Template.php(105): Latte\Engine->invokeFilter('highlightPHP', Array)
#9 /tmp/_apigen/cache/latte/vendor-apigen-theme-default-src-function-latte-Template5772a3961570eb56182757cf9d3c25bf.php(64): Latte\Template->__call('highlightPHP', Array)
#10 /tmp/_apigen/cache/latte/vendor-apigen-theme-default-src-function-latte-Template5772a3961570eb56182757cf9d3c25bf.php(64): Template17f1e18a5592358d586ee58da502433e->highlightPHP('Logger::INFO', Object(ApiGen\Reflection\ReflectionFunction))
#11 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Macros/BlockMacrosRuntime.php(32): _lb618f643149_content(Object(stdClass), Array)
#12 /tmp/_apigen/cache/latte/vendor-apigen-theme-default-src-layout-latte-Template17f1e18a5592358d586ee58da502433e.php(222): Latte\Macros\BlockMacrosRuntime::callBlock(Object(stdClass), 'content', Array)
#13 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Engine.php(96): Template17f1e18a5592358d586ee58da502433e->render()
#14 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Template.php(93): Latte\Engine->render('phar:///usr/loc...', Array)
#15 /tmp/_apigen/cache/latte/vendor-apigen-theme-default-src-function-latte-Template5772a3961570eb56182757cf9d3c25bf.php(138): Latte\Template->renderChildTemplate('@layout.latte', Array)
#16 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Engine.php(96): Template5772a3961570eb56182757cf9d3c25bf->render()
#17 phar:///usr/local/bin/apigen/vendor/latte/latte/src/Latte/Engine.php(108): Latte\Engine->render('phar:///usr/loc...', Array)
#18 phar:///usr/local/bin/apigen/vendor/nette/application/src/Bridges/ApplicationLatte/Template.php(64): Latte\Engine->renderToString('phar:///usr/loc...', Array)
#19 phar:///usr/local/bin/apigen/src/Templating/Template.php(38): Nette\Bridges\ApplicationLatte\Template->__toString()
#20 phar:///usr/local/bin/apigen/src/Generator/TemplateGenerators/FunctionElementGenerator.php(65): ApiGen\Templating\Template->save()
#21 phar:///usr/local/bin/apigen/src/Generator/GeneratorQueue.php(39): ApiGen\Generator\TemplateGenerators\FunctionElementGenerator->generate()
#22 phar:///usr/local/bin/apigen/src/Command/GenerateCommand.php(184): ApiGen\Generator\GeneratorQueue->run()
#23 phar:///usr/local/bin/apigen/src/Command/GenerateCommand.php(151): ApiGen\Command\GenerateCommand->generate(Array)
#24 phar:///usr/local/bin/apigen/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): ApiGen\Command\GenerateCommand->execute(Object(ApiGen\Console\Input\LiberalFormatArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 phar:///usr/local/bin/apigen/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(ApiGen\Console\Input\LiberalFormatArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 phar:///usr/local/bin/apigen/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(ApiGen\Command\GenerateCommand), Object(ApiGen\Console\Input\LiberalFormatArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 phar:///usr/local/bin/apigen/src/Console/Application.php(55): Symfony\Component\Console\Application->doRun(Object(ApiGen\Console\Input\LiberalFormatArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 phar:///usr/local/bin/apigen/vendor/symfony/console/Symfony/Component/Console/Application.php(126): ApiGen\Console\Application->doRun(Object(ApiGen\Console\Input\LiberalFormatArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 phar:///usr/local/bin/apigen/src/Console/Application.php(64): Symfony\Component\Console\Application->run(Object(ApiGen\Console\Input\LiberalFormatArgvInput), NULL)
#30 phar:///usr/local/bin/apigen/bin/apigen(35): ApiGen\Console\Application->run()
#31 /usr/local/bin/apigen(10): require('phar:///usr/loc...')
#32 {main}

Unable to log error: Directory is not specified.

@jadb
Copy link
Member

jadb commented Jul 30, 2015

Hmm, interesting. Could you please share which machine this worked on? (PHP and ApiGen versions would really help).

@jadb jadb added this to the 4.2 milestone Jul 30, 2015
@jadb jadb added the on-hold label Jul 30, 2015
@phil123456
Copy link
Author

actually I checked on the other machine and I got the same error
my repo changed since I made the first test
anyway ApiGen doesnt do javascript so I am screwed anyway

@nielssp
Copy link

nielssp commented Aug 13, 2015

I'm getting the same error on two machines (one Linux, the other one Windows). Both are running ApiGen 4.1.0 and PHP 5.6.11.

@jadb jadb added bug and removed on-hold labels Aug 13, 2015
deizel pushed a commit to deizel/ApiGen that referenced this issue Oct 8, 2015
jadb added a commit that referenced this issue Oct 8, 2015
Fix #631 - Add condition for expected type
@jadb jadb closed this as completed in e943361 Oct 11, 2015
jadb added a commit that referenced this issue Oct 11, 2015
Fix #631 - Add condition for expected type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants