PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, May 20, 2022

[FIXED] How to install phpUnit in Symfony4 / Symfony5?

 May 20, 2022     composer-php, symfony4     No comments   

Issue

When I install phpUnit directly with composer req phpunit/phpunit I get a warning message:

Adding phpunit/phpunit as a dependency is discouraged
in favor of Symfony's PHPUnit Bridge.

  * Instead:
    1. Remove it now: composer remove --dev phpunit/phpunit
    2. Use Symfony's bridge: composer require --dev phpunit

So I do as the message says, but after composer require --dev phpunit it installs the symfony/test-pack which only install the Panther and the phpUnit bridge, but the phpUnit itself is nowhere to be seen.

How to install phpUnit in Symfony4 properly?


Solution

I ran the vendor/bin/simple-phpunit script by accident, and turns out it downloads the phpUnit library locally when executed.



Answered By - emix
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing