Skip to content

Conversation

@edgrosvenor
Copy link
Contributor

In reference to #23

I'm feeling pretty good about this. Everything I've used from the API works exactly as expected. I'll let you know if I run into anything odd going forward, but this should do the trick.

Copy link
Owner

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems look to me, @owenvoke we may need to a major version on this. What do you think?

@owenvoke
Copy link
Collaborator

I think that a major version bump would probably be best. 👍

@nunomaduro nunomaduro merged commit eb069c4 into nunomaduro:master Feb 21, 2020
@nunomaduro
Copy link
Owner

Thanks @edgrosvenor!

@owenvoke can you test laravel zero 7 with this latest dev-master, and if is good give me the green flag?

@owenvoke
Copy link
Collaborator

I will test this when I'm back on Monday. 👍

@nunomaduro
Copy link
Owner

You are the best!

@owenvoke
Copy link
Collaborator

We'll need to update the docs here to remove the references to methods that were removed.

Currently in the README, we mention that setUnselectedMarker() and setSelectedMarker() can be used. However, they have been removed and now cause a Call to undefined method NunoMaduro\LaravelConsoleMenu\Menu::set*Marker() error.

Other than that, this seems to work fine in Laravel Zero v7. 👍

@nunomaduro
Copy link
Owner

@owenvoke Great! Fell free to update the readme, tag a new version, and tweet about it.

@owenvoke
Copy link
Collaborator

owenvoke commented Mar 5, 2020

@nunomaduro, looks like I don't actually have access to tag it, so I'll leave this one to you if that's ok. 👍

@owenvoke owenvoke mentioned this pull request Jan 31, 2022
@simonovich
Copy link

We'll need to update the docs here to remove the references to methods that were removed.

Currently in the README, we mention that setUnselectedMarker() and setSelectedMarker() can be used. However, they have been removed and now cause a Call to undefined method NunoMaduro\LaravelConsoleMenu\Menu::set*Marker() error.

Okay, so now how do I change the marker?

@owenvoke
Copy link
Collaborator

@simonovich, you'll need to use modifySelectableStyle() as per the underlying package's docs. 👍🏻

https://github.com/php-school/cli-menu/blob/master/README.md#item-markers

@simonovich
Copy link

simonovich commented Aug 16, 2022

@owenvoke, Unfortunately this doesn't work as expected.

 public function handle() { $option = (new NunoMaduro\LaravelConsoleMenu\Menu('Pizza menu')) ->modifySelectableStyle(function (SelectableStyle $style) { $style->setUnselectedMarker('') ->setSelectedMarker('') // disable unselected marker ->setUnselectedMarker(''); }) ->addOption('mozzarella', 'Mozzarella') ->addOption('chicken_parm', 'Chicken Parm') ->addOption('sausage', 'Sausage') ->addQuestion('Make your own', 'Describe your pizza...') ->addOption('burger', 'Prefer burgers') ->setWidth(80) ->open(); echo "You have chosen the option number #$option"; }

See screenshot:

Menu items added via addOption() remained unchanged.

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

Labels

None yet

4 participants