Skip to content
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

Not working on WIndows 10 - Uncaught TypeError: trim() #5

Closed
BrandonSurowiec opened this issue Sep 23, 2023 · 3 comments
Closed

Not working on WIndows 10 - Uncaught TypeError: trim() #5

BrandonSurowiec opened this issue Sep 23, 2023 · 3 comments

Comments

@BrandonSurowiec
Copy link

BrandonSurowiec commented Sep 23, 2023

PHP 8.1.18
Windows 10

Running this or any command throws an exception:

shift-cli run class-strings

Stack Trace:

PHP Fatal error:  Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, bool given in phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Terminal.php:60
Stack trace:
#0 phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Terminal.php(60): trim(false)
#1 phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Terminal.php(31): HumbugBox436\KevinGH\RequirementChecker\Terminal::initDimensions()
#2 phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Printer.php(28): HumbugBox436\KevinGH\RequirementChecker\Terminal->getWidth()
#3 phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Checker.php(17): HumbugBox436\KevinGH\RequirementChecker\Printer->__construct(32, true)
#4 phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/bin/check-requirements.php(22): HumbugBox436\KevinGH\RequirementChecker\Checker::checkRequirements()
#5 C:\Users\13136\AppData\Roaming\Composer\vendor\laravel-shift\cli\builds\shift-cli(12): require('phar://C:/Users...')
#6 C:\Users\13136\AppData\Roaming\Composer\vendor\bin\shift-cli(124): include('C:\\Users\\13136\\...')
#7 {main}
  thrown in phar://C:/Users/13136/AppData/Roaming/Composer/vendor/laravel-shift/cli/builds/shift-cli/.box/src/Terminal.php on line 60
@BrandonSurowiec BrandonSurowiec changed the title Not working on WIndows 10 - Uncaught TypeError: trim(): Argument #1 Not working on WIndows 10 - Uncaught TypeError: trim() Sep 23, 2023
@jasonmccreary
Copy link
Collaborator

This seems to be related to Box, which is the bundler for the app PHAR.

I have tried the solution Pint did, and rebuilt v0.2.7. Run composer update and let me know if it resolves this issue.

@BrandonSurowiec
Copy link
Author

Can confirm it is fixed. Thanks!

@relaypilot
Copy link

relaypilot commented Sep 27, 2023

Same issue is happening with CLI premium:

"laravel-shift/cli-premium": "^0.2.5",

Edit: should be resolved now: #6 (comment)

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

No branches or pull requests

3 participants