darsain / laravel-console

In-browser console for Laravel PHP framework.
170 stars 44 forks source link

Deprecate in favor of artisan tinker #39

Open darsain opened 9 years ago

darsain commented 9 years ago

When I created this, there was nothing better to use, but now (and apparently some time in L4 too), there is artisan tinker which is a core component of Laravel, and provides the same kind of functionality. You can run code from your app context with all files loaded, you have access to your models, you can run ORM queries...

With that in mind, I think I'd rather deprecate this project in favor of tinker.

But, I'm not using Laravel right now, and have no tinker experience, so if there is anyone in here that does, and has a valid reason why this shouldn't be deprecated, speak up :)

pauly4it commented 9 years ago

artisan tinker is alright, but with L5, I feel like tinker is a bit worse. In L4 I always used the console for trying various bits of code, whether it was trying to troubleshoot issues with a function or trying to come up with new code. Seeing the raw SQL queries also helped me debug quirks with relationships and streamline code. Also, I prefer the the nicer UI. :)

Laravel Console was an indispensable part of my dev process in L4.

GrahamCampbell commented 9 years ago

but with L5, I feel like tinker is a bit worse

What? We tried to make it better?

Seeing the raw SQL queries also helped me debug quirks with relationships and streamline code. Also, I prefer the the nicer UI. :)

That's still possible in tinker in L5.

pauly4it commented 9 years ago

Definitely not a dig at you @GrahamCampbell. L5 is a much better experience overall for me compared to L4. I definitely appreciate the work you all put into L5.

I think my initial impressions were based on tinker closing (crashing?) after running some code when I first started with L5 after its official release. It got me frustrated, I ditched it, and found another way to solve my issue.

More than anything, I like how Console had everything laid out in a nice UI. You could quickly see SQL queries, query speed, etc. This probably the intended use case, but I used Console for experimenting: playing around with functions I've never used, trying to get a certain output with a specific input, breaking down code that had many steps in it to debug, etc.

I'm fairly new to coding in an framework and with PHP (~1.5 years), and my background is not coding. I just did things in ways that were easiest for me. Console was super convenient, so I avoided tinker. If there are better (or recommended) ways to do these things, please let me know!

darsain commented 9 years ago

@GrahamCampbell yah. How do you work with queries in tinker? :)

I'd like to know how to:

in the most simple way.

uocnb commented 9 years ago

Hi there, I think a web based console is required for many purposes which tinker or any terminal based REPL can not replace. Let's me explain why:

It is a quick comparison to tell you why. I hope you keep development it and even add some more awesome features like autocomplete and basic syntax error check.

P/S: I have has make some modification for local package to keep console work with L5, still has some issues but at least it's working :8ball:

tortuetorche commented 9 years ago

@tiger2wander Well written :clap: @darsain If you don't have time to work on this package, maybe you can add some collaborators to your repository to maintain this project?

darsain commented 9 years ago

Ok. I'll be soon revisiting Laravel so I'll update this. I'd also love to add some contributors, but first I want to rewrite front-end, as currently it's a turd on a jQuery plate :)

pauly4it commented 9 years ago

@darsain I thought the UI worked just fine. Never had any issues at all. Really liked the color scheme as well.

darsain commented 9 years ago

@pauly4it yeah, but the code is horrible. It used to be a one-liner, and than evolved into a kinda more complexish app without any structural changes. Needs a rewrite.

The UI or how it works won't change.

RemiCollin commented 9 years ago

+1 would love to see a L5 version of console. I use it all the time to copy/paste & test snippets of code.

I'd be happy to help on the backend part/L5 integration of the code if you need.

tortuetorche commented 9 years ago

@darsain Any news? Because, since Laravel 5.0, php artisan tinker uses PsySH and it doesn't work very well on Windows.

GrahamCampbell commented 9 years ago

uses PsySH and it doesn't work very well with Windows.

It works fine on windows. I use windows evrey day.

tortuetorche commented 9 years ago

@GrahamCampbell Really? Sometimes PsySH crashes for no reason and shell history doesn't persist across sessions. E.G. when I run this command:

echo "é";

It returns Exit: Ctrl+D then the console crash. But I didn't press Ctrl+D shorcut...

ghost commented 9 years ago

+1 for L5 version of console. Sometimes shell is not available on remote host, sometimes web UI is more convenient.

tortuetorche commented 9 years ago

@plakhin :+1: for your comment :smirk_cat:

ghost commented 9 years ago

@tortuetorche https://github.com/teepluss/laravel-console

tortuetorche commented 9 years ago

@plakhin Thanks, I already starred this repo some times ago :smile: