spatie / ray

Debug with Ray to fix problems faster
https://myray.app
MIT License
554 stars 102 forks source link

[MANUAL] deprecated showIf ?? #902

Open abkrim opened 2 months ago

abkrim commented 2 months ago

Describe the bug Conditionally showing items show:

Conditionally showing items

You can conditionally show things using the showIf method. If you pass a truthy value, the item will be displayed.

ray('will be shown')->showIf(true);
ray('will not be shown')->showIf(false);

You can also pass a callable to showIf. If the callable returns a truthy value, it will be shown. Otherwise, it will not.

But showIf is marked deprectaed.

    /**
     * @deprecated Use `if` instead of this method
     */
    public function showIf($boolOrCallable): self
    {
        return $this->showWhen($boolOrCallable);
    }

Versions Ray version (you can see this in "About Ray"): Versión 2.7.5 (2.7.5)

You can use composer show to get the version numbers of:

PHP version: 8.2.17 (cli) Laravel version (if applicable): 10.48.4

Desktop (please complete the following information):

Castrissitelight – SingleTriggerActionTest php0409090154