Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\DependencyInjection\Compiler; Chris@0: Chris@14: @trigger_error('The '.__NAMESPACE__.'\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', E_USER_DEPRECATED); Chris@14: Chris@0: /** Chris@0: * Used to format logging messages during the compilation. Chris@0: * Chris@0: * @author Johannes M. Schmitt Chris@14: * Chris@14: * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead. Chris@0: */ Chris@0: class LoggingFormatter Chris@0: { Chris@0: public function formatRemoveService(CompilerPassInterface $pass, $id, $reason) Chris@0: { Chris@0: return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason)); Chris@0: } Chris@0: Chris@0: public function formatInlineService(CompilerPassInterface $pass, $id, $target) Chris@0: { Chris@0: return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target)); Chris@0: } Chris@0: Chris@0: public function formatUpdateReference(CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId) Chris@0: { Chris@0: return $this->format($pass, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId)); Chris@0: } Chris@0: Chris@0: public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId) Chris@0: { Chris@0: return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId)); Chris@0: } Chris@0: Chris@14: public function formatUnusedAutowiringPatterns(CompilerPassInterface $pass, $id, array $patterns) Chris@14: { Chris@14: return $this->format($pass, sprintf('Autowiring\'s patterns "%s" for service "%s" don\'t match any method.', implode('", "', $patterns), $id)); Chris@14: } Chris@14: Chris@0: public function format(CompilerPassInterface $pass, $message) Chris@0: { Chris@17: return sprintf('%s: %s', \get_class($pass), $message); Chris@0: } Chris@0: }