0

I'm using Laravel 5.2 and PHP 7.1, but I get an error when I'm trying to use Tinker.

When I run:

php artisan tinker

I get the following error:

[Symfony\Component\Debug\Exception\FatalThrowableError] Call to undefined function Laravel\Tinker\tap()

I upgraded my Laravel from 5.2 to 5.5, but most of my previous functionality doesn't work. I reverted to 5.2, but I am still getting this error.

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
Nilay Singh
  • 2,201
  • 6
  • 31
  • 61
  • 2
    Laravel 5.2 require PHP 5 or higher but lower than 7. Infact PHP 7 introduces some breaking changes that conflicts with Laravel 5.2. Try to use a lower version of PHP – Matteo Meil Jan 27 '19 at 15:42

1 Answers1

-1

I just ran into the same error with Lumen 5.2, while trying to use the laravel/tinker package. The tap function is a helper function from the illuminate/support package but it looks like it was introduced in version 5.4. See: https://github.com/illuminate/support/blob/v5.4.0/helpers.php#L855

Fossil
  • 1
  • 3