CodeIgniter Forums
PHPUnit on Production - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: PHPUnit on Production (/showthread.php?tid=90789)



PHPUnit on Production - paulkd - 05-04-2024

Hi,

CodeIgniter 4.5.1

I'm getting the following message on my production server after deploying with GIT

Code:
Warning: require(/home/project/vendor/composer/../phpunit/phpunit/src/Framework/Assert/Functions.php): Failed to open stream: No such file or directory in /home/project/vendor/composer/autoload_real.php on line 55

Note: I've edited the actual project folder names above.

I've removed "phpunit/phpunit": "^9.5"  from composer.json "require-dev" and run composer update, but it seems that something is still adding it to the composer.lock file

I also have this entry in .gitignore
Code:
# Don't save phpunit under version control.
phpunit

Any help/pointers would be appreciated


RE: PHPUnit on Production - kenjis - 05-04-2024

See https://www.codeigniter.com/user_guide/installation/deployment.html#removing-dev-packages