Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

symfony/templating v6.4.3

Provides all the tools needed to build any kind of template system
Package summary
Share
0
issues
1
license
3
MIT
Package created
16 Oct 2011
Version published
23 Jan 2024
Maintainers
1
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
symfony/deprecation-contracts@v3.5.0
symfony/polyfill-ctype@v1.29.0
symfony/templating@v6.4.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of symfony/templating 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/deprecation-contractsv3.5.0-MIT
prod
symfony/polyfill-ctypev1.29.0-MIT
prod

Visualizations

Frequently Asked Questions

What does symfony/templating do?

The Symfony Templating component, symfony/templating, provides a robust suite of tools necesary to create any kind of template system. This package provides the infrastructure needed to load and optionally monitor template files for changes. It offers a concrete PHP template engine implementation, with additional tools aimed at escaping and segmenting templates into blocks and layouts.

How do you use symfony/templating?

Installation and usage of the symfony/templating package is simple. Begin by integrating it into your project using Composer:

$ composer require symfony/templating

After installation, you can utilize it within your project as follows:

use Symfony\Component\Templating\Loader\FilesystemLoader;
use Symfony\Component\Templating\PhpEngine;
use Symfony\Component\Templating\Helper\SlotsHelper;
use Symfony\Component\Templating\TemplateNameParser;

$filesystemLoader = new FilesystemLoader(__DIR__.'/views/%name%');

$templating = new PhpEngine(new TemplateNameParser(), $filesystemLoader);
$templating->set(new SlotsHelper());

echo $templating->render('hello.php', ['firstname' => 'Fabien']);

// hello.php
Hello, <?= $view->escape($firstname) ?>!

In this example, FilesystemLoader, PhpEngine, SlotsHelper, and TemplateNameParser are used from Symfony's Templating package. The template file hello.php renders a simple greeting, with a firstname variable that is escaped for safe output.

Where are the symfony/templating docs?

Detailed documentation and resources for symfony/templating can be found within the main Symfony repository. Additional resources for contributing to the project, reporting issues, and submitting pull requests are also available. For particular concerns or specific use cases, the Symfony community can be a valuable resource.