nunomaduro / laravel-console-menu

🔘 Beautiful PHP CLI menus. Is a php-school/cli-menu wrapper for Laravel/Artisan Console Commands
MIT License
802 stars 40 forks source link

Support cli-menu 4.0? #23

Closed edgrosvenor closed 4 years ago

edgrosvenor commented 4 years ago

In order to make this package really useful for me, I need it to support php-school/cli-menu ^4.0. I've forked this package and am working with it locally and so far, it seems like it won't take anything more than a version bump in composer.json. I'll fix anything I encounter within the scope of what I'm working on, but I might not cover every single edge case. I'm happy to PR it when I'm done if you're interested. But will just keep it to myself if you'd rather not mess with the newer version.

nunomaduro commented 4 years ago

Please do a pull request, let me know if their requirements have changed.

nunomaduro commented 4 years ago

Let me know if you need any help. @edgrosvenor 👍

edgrosvenor commented 4 years ago

Will do, @nunomaduro. I'm close to having used as much of the API as I have a need for and I'll try the rest of the API with simple samples to make sure it all works.

I'm not sure whether the requirements have changed per se because I never used v3. I have, in using v4, ended up newing up instances of their classes directly several times for things like callable parameters. So while laravel-console-menu might once have kept cli-menu totally invisible, the biggest advantage it now gives is just the symmetry offered by $this->menu(). I suspect some users might be temped to skip the wrapper and just use cli-menu directly.

To clarify what I mean by all this, when I send up the PR I'll add an example to the README that includes something like a checkbox item that requires a callable parameter where I use an instance of their class to get to value of the box I'm toggling.

edgrosvenor commented 4 years ago

Oh, never mind the caveat. I see you have a password documented in the README that's accomplished in much the same way as the checkboxes and submenus. So nothing has changed. As soon as I've finished proving that everything works as they've documented I'll push this up, but it'll almost certainly just be a version bump in composer.json.

owenvoke commented 4 years ago

Just realised that this can now be closed as per v3.0.0 👍