# deprecated()

Triggers a deprecation warning if debug mode is active

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/helpers.php#L108>

****

```php
deprecated(string $message): bool
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$message` (required) | `string` | – | – |

## Return type

`bool`

Whether the warning was triggered

This function is used internally by Kirby, but you can also use it in your plugins to trigger deprecation warnings.

## Examples

```php
function someFunction()
{
    deprecated('`somefunction()` is deprecated, use `anotherFunction()` instead. `someFunction()` will be removed in version x.x.x');

    return 'something';
}
```

When a user uses the `someFunction()` function and debugging is enabled, the message passed as parameter will be shown.