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

Laravel 9 Tinker Plugin Bug. adds: <whisper>= </whisper> to output. #212

Closed
SanderCokart opened this issue Dec 5, 2022 · 24 comments
Closed
Labels
bug Something isn't working

Comments

@SanderCokart
Copy link

Bug description

At the start of a fresh install of laravel 9 the plugin prepends any output with <whisper>= </whisper>.

To Reproduce

  • In mysql / mariadb database shell
    create database test;

  • In console
    laravel new test
    migrate:fresh

  • In phpstorm
    open tinker plugin.
    enter:

<?php
User::factory()->create();
  • output
// Laravel Tinker started at 2022-12-05 02:38:27
                                                            
<whisper>= </whisper>App\Models\User {#3188
    name: "Dr. Carey Klocko",
    email: "rbednar@example.net",
    email_verified_at: "2022-12-05 01:38:27",
    #password: "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
    #remember_token: "YluhFBHZYU",
    updated_at: "2022-12-05 01:38:27",
    created_at: "2022-12-05 01:38:27",
    id: 3,
  }


*** Execution finished ***
                                
                            
                        

Expected behavior

  • expected output
// Laravel Tinker started at 2022-12-05 02:38:27
                                                            
App\Models\User {#3188
    name: "Dr. Carey Klocko",
    email: "rbednar@example.net",
    email_verified_at: "2022-12-05 01:38:27",
    #password: "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
    #remember_token: "YluhFBHZYU",
    updated_at: "2022-12-05 01:38:27",
    created_at: "2022-12-05 01:38:27",
    id: 3,
  }


*** Execution finished ***
                                
                            
                        

Screenshots

image

Environment

  • IDE & Version: 2022.2.4
  • PHP Version: 8.1.9
  • OS: Windows 10
  • Laravel Tinker plugin version : 2.4.0
  • Interpreter Type: Local
  • Laravel Version: 9.42.2
  • Tinker version: 2.7.3
@SanderCokart SanderCokart added the bug Something isn't working label Dec 5, 2022
@pajkho
Copy link

pajkho commented Dec 12, 2022

Have the same issue with Laravel 8.

@Roboroads
Copy link
Owner

Did tinker or physh have an update..? Let's see.

@Roboroads
Copy link
Owner

So there is this theme update from Psysh. Let's see if it helps by reverting to the old layout

@Roboroads
Copy link
Owner

Roboroads commented Dec 12, 2022

@pajkho @SanderCokart

Laravel Tinker-2.4.0+1.zip
Does this build fix your problem? It's based on this branches changes

Also, can you tell me your physh version? composer show psy/psysh | grep versions

@SanderCokart
Copy link
Author

No it does not, and psy/psych is not installed.

@Roboroads
Copy link
Owner

How is psysh not installed? laravel/tinker depends on it, this plugin likewise.

@SanderCokart
Copy link
Author

SanderCokart commented Dec 12, 2022

when manually adding psy/psych to the composer.json require-dev

$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Downgrading psy/psysh (v0.11.9 => v0.11.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downgrading psy/psysh (v0.11.9 => v0.11.8): Extracting archive
Generating optimized autoload files

When removing it and then:

composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading psy/psysh (v0.11.8 => v0.11.9)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading psy/psysh (v0.11.8 => v0.11.9): Extracting archive
Generating optimized autoload files

However with it not being in composer.json even composer show psy/psych --all says the package is not found.

And yes I installed 1 version older manually

Manually installing it, it does fix the issue.

@Roboroads
Copy link
Owner

Manually installing 0.11.8?

@SanderCokart
Copy link
Author

Yes, a manual install of 0.11.9 breaks it and shows again.

@Roboroads
Copy link
Owner

Alright, so it is the theme update op psysh.

Command is composer show -a psy/psysh btw, just figured it out xD

@SanderCokart
Copy link
Author

SanderCokart commented Dec 12, 2022

Also nevermind the console outputs of the removing and adding manually. False info, read my terminal wrong.

@SanderCokart
Copy link
Author

Right ok so with it NOT in composer.json

composer show -a psy/psysh | grep versions
versions : 0.11.x-dev, * v0.11.9, v0.11.8, v0.11.7, v0.11.6, v0.11.5, v0.11.4, v0.11.3, v0.11.2, v0.11.1, v0.11.0, 0.10.x-dev, v0.10.12, v0.10.11, v0.10.10, v0.10.9, v0.10.8, v0.10.7, v0.10.6, v0.10.5, v0.10.4, v0.10.3, v0.10.2, v
0.10.0, v0.9.12, v0.9.11, v0.9.9, v0.9.8, v0.9.7, v0.9.6, v0.9.5, v0.9.4, v0.9.3, v0.9.2, v0.9.1, v0.9.0, v0.8.18, v0.8.17, v0.8.16, v0.8.15, v0.8.14, v0.8.13, v0.8.12, v0.8.11, v0.8.10, v0.8.9, v0.8.8, v0.8.7, v0.8.6, v0.8.5, v0.
8.4, v0.8.3, v0.8.2, v0.8.1, v0.8.0, v0.7.2, v0.7.1, v0.7.0, v0.6.1, v0.6.0, v0.5.2, v0.5.1, v0.5.0, v0.4.4, v0.4.3, v0.4.2, v0.4.1, v0.4.0, v0.3.5, v0.3.4, v0.3.3, v0.3.2, v0.3.1, v0.3.0, v0.2.1, v0.2.0, v0.1.12, v0.1.11, v0.1.10, v0.1.9, v0.1.8, v0.1.7, v0.1.6, v0.1.5, v0.1.4, v0.1.3, v0.1.2, v0.1.1, v0.1.0, dev-main, dev-better-throwable-support, dev-static-analysis, dev-develop

@Roboroads
Copy link
Owner

The one with the star, 0.11.9

So, i'm fairly certain the new theme system breaks output, this is enought info for me to fix it <3

@SanderCokart
Copy link
Author

So fun how anytime psy/psych updates you have work to do <3

@SanderCokart
Copy link
Author

You need like a CI something that listens for updates on the package and then auto run tests. I don't know if such things exist but I am assuming it does.

@Roboroads
Copy link
Owner

This isn't the first time a psysh update breaks the plugin, but it's ultimately my fault for not yet having figured out how to get the ansi-colored output and just transforming that to HTML. Currently I'm doing all kinds of hocus-pocus to get colors in the output which is, well, not ideal :)

@SanderCokart
Copy link
Author

That looks like the most "fun" functions and fun regex expressions.
Who knows maybe copilot can figure something out xD

@SanderCokart
Copy link
Author

Still thanks for making this plugin in the first place, its awesome having code hinting for Tinker!

@Roboroads
Copy link
Owner

Actually, I might have just found ansi colors

@Roboroads
Copy link
Owner

Roboroads commented Dec 13, 2022

Aight. I build an ansi color parser. The hocuspocus of regex is gone. Huzza!

Also, this is fixed together with it, in 2.5.0 :)

@SanderCokart
Copy link
Author

So whens the release? :D

@Roboroads
Copy link
Owner

Have to fix something - looks like I'm using a deprecated function

@Roboroads
Copy link
Owner

#217

@Roboroads
Copy link
Owner

Version 2.5.0 is underway, pending JetBrains verification :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants