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

VisualizerTask bug #1388

Closed
jawira opened this issue Aug 29, 2020 · 6 comments · Fixed by #1390
Closed

VisualizerTask bug #1388

jawira opened this issue Aug 29, 2020 · 6 comments · Fixed by #1390
Assignees
Milestone

Comments

@jawira
Copy link
Contributor

jawira commented Aug 29, 2020

Hi, I just updated to phing-3.0.0-alpha4 and I have a bug with VisualizerTask.

My buildfile:

<?xml version="1.0" encoding="UTF-8" ?>

<project name="testing" default="visualizer">

    <target name="visualizer">
      <visualizer/>
    </target>

</project>

The output:

$ phing -f demo.xml 
Buildfile: /home/jawira/PhpstormProjects/case-converter/demo.xml

testing > visualizer:


BUILD FAILED
Call to undefined method GuzzleHttp\Psr7\Response::send()
#0 phar:///usr/local/bin/phing/classes/phing/tasks/ext/visualizer/VisualizerTask.php(145): VisualizerTask->generateImage()
phingofficial/guide#1 phar:///usr/local/bin/phing/classes/phing/UnknownElement.php(112): VisualizerTask->main()
phingofficial/guide#2 [internal function]: UnknownElement->main()
phingofficial/guide#3 phar:///usr/local/bin/phing/classes/phing/dispatch/DispatchUtils.php(84): ReflectionMethod->invoke()
phingofficial/guide#4 phar:///usr/local/bin/phing/classes/phing/Task.php(186): DispatchUtils::main()
phingofficial/guide#5 phar:///usr/local/bin/phing/classes/phing/Target.php(379): Task->perform()
phingofficial/guide#6 phar:///usr/local/bin/phing/classes/phing/Target.php(409): Target->main()
phingofficial/guide#7 phar:///usr/local/bin/phing/classes/phing/Project.php(784): Target->performTasks()
phingofficial/guide#8 phar:///usr/local/bin/phing/classes/phing/Project.php(754): Project->executeTarget()
phingofficial/guide#9 phar:///usr/local/bin/phing/classes/phing/Phing.php(750): Project->executeTargets()
phingofficial/guide#10 phar:///usr/local/bin/phing/classes/phing/Phing.php(220): Phing->runBuild()
phingofficial/guide#11 phar:///usr/local/bin/phing/classes/phing/Phing.php(368): Phing::start()
phingofficial/guide#12 phar:///usr/local/bin/phing/bin/phing.php(60): Phing::fire()
phingofficial/guide#13 /usr/local/bin/phing(6): include('phar:///usr/loc...')
phingofficial/guide#14 {main}

Total time: 0.6604 seconds

Call to undefined method GuzzleHttp\Psr7\Response::send()

I'm more than willing to help with a PR, but I will need some pointers please.

@siad007
Copy link
Member

siad007 commented Aug 29, 2020 via email

@siad007 siad007 transferred this issue from phingofficial/guide Sep 3, 2020
@siad007
Copy link
Member

siad007 commented Sep 3, 2020

@jawira there is a problem in https://github.com/phingofficial/phing/blob/master/classes/phing/tasks/ext/visualizer/VisualizerTask.php#L359 , which calls an undefined method send. AFAIK the method moved directly to the http client.

@siad007
Copy link
Member

siad007 commented Sep 3, 2020

Some suggestions: move the http-client instantiation from HttpTask::request() to the constructor and use the http-client inside the visualizer task to send the request.

@siad007 siad007 added this to the 3.0.0-rc1 milestone Sep 3, 2020
@jawira
Copy link
Contributor Author

jawira commented Sep 4, 2020

Thanks for the advice. IMHO the problem is VisualizerTask was created to work with HTTP_Request2, while Guzzle is used now.
I will check this the week-end 👍

@jawira
Copy link
Contributor Author

jawira commented Sep 7, 2020

Hello, I fixed the bug #1390 :)

@siad007
Copy link
Member

siad007 commented Sep 10, 2020

@jawira just merged :)

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

Successfully merging a pull request may close this issue.

2 participants