Chris@14: Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: Chris@14: namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; Chris@14: Chris@14: use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; Chris@14: Chris@14: trait DeprecateTrait Chris@14: { Chris@14: /** Chris@14: * Whether this definition is deprecated, that means it should not be called anymore. Chris@14: * Chris@14: * @param string $template Template message to use if the definition is deprecated Chris@14: * Chris@14: * @return $this Chris@14: * Chris@14: * @throws InvalidArgumentException when the message template is invalid Chris@14: */ Chris@14: final public function deprecate($template = null) Chris@14: { Chris@14: $this->definition->setDeprecated(true, $template); Chris@14: Chris@14: return $this; Chris@14: } Chris@14: }