Skip to content

Command "pail" is not defined. #50

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

Closed
zenire opened this issue Jan 28, 2025 · 3 comments
Closed

Command "pail" is not defined. #50

zenire opened this issue Jan 28, 2025 · 3 comments

Comments

@zenire
Copy link

zenire commented Jan 28, 2025

Laravel Package Version

1.2.1

Laravel Version

11.36.1

PHP Version

8.3.16

Database Driver & Version

MySQL 8.0 (Docker) on macOS 15.2

Description

php artisan pail gives me Command "pail" is not defined. while it works on a colleague's device with the same environment characteristics.

Steps To Reproduce

  1. Install "laravel/pail": "^1.2" using composer
  2. Verify PHP extension is installed with php -i | grep pcntl
  3. Run php artisan pail
  4. Get error ERROR Command "pail" is not defined.
@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

@footballencarta
Copy link

I've ran into exactly the same problem this morning.

I've found if you set PAIL_TESTS=true in your .env file - it seems to work as expected.

I believe there to be a logic error on this line in the PailServiceProvider

if (! $this->runningPailTests() && ($this->app->runningUnitTests() || ($_ENV['VAPOR_SSM_PATH'] ?? false))) {

Where the first condition shouldn't be checking false - as this will always exit running pail if the env isn't set

protected function runningPailTests(): bool { return $_ENV['PAIL_TESTS'] ?? false; }

@crynobone
Copy link
Member

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.

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

No branches or pull requests

3 participants