PHPUnit can't detect PHP 7.3.2 - php

I’ve successfully installed PHPUnit, but I am running into some problems. When I try to run it on the command line, I get this message:

> “PHPUnit 8.0.4 by Sebastian Bergmann and contributors. This version of
PHPUnit is supported on PHP 7.2 and PHP 7.3. You are using PHP 7.1.23
(/usr/bin/php).”
When I type “php –v” in the command line, the system verifies that I’m using version 7.1.23 of the language.
When I tried to install PHP 7.3.2, Homebrew gives me the following message:
“Warning: php 7.3.2 is already installed, it's just not linked You can
use brew link php to link this version."
When I try to link, it tells me:
"Linking /usr/local/Cellar/php/7.3.2... Error: Could not symlink
sbin/php-fpm /usr/local/sbin is not writable.”
So PHP 7.3.2 does exist on my system, but PHPUnit is not detecting it. Would you happen to know of any fix for this? Is there a way to switch to 7.3.2, or to perhaps install an earlier release of PHPUnit that’s compatible with PHP 7.1.23?
Thanks in advance for any help you can give.

Maybe you should just try with sudo?
sudo brew link php
Edit: It's not a good idea. Please ignore.

Related

phpunit --version give me 3.7.21. Which is giving me problem on my laravel 5.6 dump.php file. Checked other related question on stackoverflow

I have installed fresh laravel project 5.6 version. On composer.json I have phpunit version 7. But when i run phpunit, it gives me an error of parse synax error. I have php version 7.2. I have also tried doing phpunit --version on /vendor/bin but it is stil giving me
phpunit --version
PHPUnit 3.7.21 by Sebastian Bergmann.
This happened because of you old version of php. This error was meant for php version 5. Even if you are testing, it shows php 7. Somewhere phpunit is executing with your php version 5.
In windows, search for environment variables on the bottom right. click on env variables then click on paths. Remove the path that ends with php only. Then try it again.

php-cs-fixer [Symfony\Component\Process\Exception\RuntimeException] The process has been signaled with signal "6"

I've installed php-cs-fixer via composer tonight.
But when testing again a php file I'm getting the following error:
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signalled with signal "6".
I've tried removing it and re-installing it to the same effect.
Your help here would be greatly appreciated.
New to laravel PHP programming but enjoying it!
Worked it out guys/girls.
Was a version issue with php. Not sure how it happened as I'd installed php71 via homebrew but when doing.
php -v it was pointing to the pre-installed version of php on my mac.
PLUS I had a version of mampstack installed on my machine. I removed that.
Reinstalled php71 and did a
php -v
and sure enough, the correct version of php is now running.
The php-cs-fixer is now working as expected.
This was question was my first post to stack overflow :-)
Looking forward to contributing more!
Take care.
You need updates or install some dependencies as follows:
$brew install svn
$brew link --overwrite subversion

phpbrew switch does not change PHP version

If I run "phpbrew switch 5.6.3" followed by "php -v", i get 5.9.3 (PHP System Version) as current PHP Version.
If I run phpbrew "use 5.6.3", i also get 5.6.3 with php -v.
Is there any solution for this problem? PHP version 5.6.3 is installed and built with phpbrew and working after using the use command.
I am using Elementary OS Freya (Ubuntu 14.04) with the latest phpbrew version.
If you are getting a red error line "You should not see this, if you see this, it means you didn't load the ~/.phpbrew/bashrc script, please check if bashrc is sourced in your shell.", then you need to run source ~/.phpbrew/bashrc. It's also a good idea to run echo "source $HOME/.phpbrew/bashrc" >> ~/.bashrc, so that in the future this will be automatic.

Laravel base64_decode error on fresh install

I'm trying to get started with laravel but it seems like hell to get it working.
First of all, here is the error (this happens when i try to access /myapp/public):
Some considerations:
I'm using MAMP Pro with php 5.4.4
Already installed MCrypt extension
Already gave app/storage write permission
Already optimized artisan by running php artisan optimize
Don't know where to go from here, can you help?
Thanks in advance.
EDIT:
I'm using OSX and php5 json is already enabled
The error message tells you that you gave an array, not a string.
Basically its saying $paylod = array('something'=>'somethingelse');
So it is expecting you provide it with $payload['something'] so that it knows what string to decode.
have you installed/enabled php5 JSON support?
When I set up laravel on a fresh ubuntu 13.10 server I had to run:
sudo apt-get install php5-json
among other needed modules (like mcrypt) for laravel 4 to work.

Error installing Laravel 4 with composer

When I try to install Laravel 4 via Composer, I get the following message in Terminal
Mcrypt PHP extension required. Script php artisan optimize handling
the post-install-cmd event returned with an error
The PHP version on my computer is 5.5.3 and when I run phpinfo it shows that mcrypt is enabled. When I run the which php command in Terminal it shows
/usr/bin/php
I therefore extended the $PATH with .bash_profile.
export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH
Unfortunately, the which php command still shows /usr/bin/php after extending $PATH. And as a result the error is still there.
So I am out of ideas on how to solve this issue. Does anyone have an idea? Thanks!
There is difference between the MAMP PHP version and you "Terminal" PHP version. Therefore are you probably setting up the export path.
When you are changing the export path you have to restart your terminal before it will take effect on your computer.
I am not sure of this but when your error is appearing and older version of Laravel will be installed.
What do you get when you execute: php -v in your terminal?

Categories