mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
bug #3116 Fix HTML extension (fabpot)
This PR was merged into the 2.x branch.
Discussion
----------
Fix HTML extension
Commits
-------
5cc40a06 fixed HTML extension
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/extra/** export-ignore
|
||||
@@ -33,7 +33,7 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
|
||||
|
||||
Then, add it on the Twig environment::
|
||||
|
||||
use Twig\Html\HtmlExtension;
|
||||
use Twig\Extra\Html\HtmlExtension;
|
||||
|
||||
$twig = new \Twig\Environment(...);
|
||||
$twig->addExtension(new HtmlExtension());
|
||||
|
||||
@@ -26,7 +26,7 @@ names together:
|
||||
|
||||
Then, add it on the Twig environment::
|
||||
|
||||
use Twig\Html\HtmlExtension;
|
||||
use Twig\Extra\Html\HtmlExtension;
|
||||
|
||||
$twig = new \Twig\Environment(...);
|
||||
$twig->addExtension(new HtmlExtension());
|
||||
|
||||
@@ -9,5 +9,5 @@ This package is a Twig extension that provides the following:
|
||||
* [`html_classes`][2] function: returns a string by conditionally joining class
|
||||
names together.
|
||||
|
||||
[1]: https://twig.symfony.com/doc/2.x/functions/html_classes.html
|
||||
[2]: https://twig.symfony.com/doc/2.x/filters/data_uri.html
|
||||
[1]: https://twig.symfony.com/data_uri
|
||||
[2]: https://twig.symfony.com/html_classes
|
||||
@@ -23,12 +23,12 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4" : {
|
||||
"Twig\\Html\\" : "src/"
|
||||
"Twig\\Extra\\Html\\" : "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4" : {
|
||||
"Twig\\Html\\Tests\\" : "tests/"
|
||||
"Twig\\Extra\\Html\\Tests\\" : "tests/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
@@ -9,7 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Twig\Html {
|
||||
namespace Twig\Extra\Html {
|
||||
use Symfony\Component\Mime\MimeTypes;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
+2
-2
@@ -9,9 +9,9 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Twig\Intl\Tests;
|
||||
namespace Twig\Extra\Html\Tests;
|
||||
|
||||
use Twig\Html\HtmlExtension;
|
||||
use Twig\Extra\Html\HtmlExtension;
|
||||
use Twig\Test\IntegrationTestCase;
|
||||
|
||||
class IntegrationTest extends IntegrationTestCase
|
||||
Reference in New Issue
Block a user