fixed HTML extension

This commit is contained in:
Fabien Potencier
2019-08-10 11:07:09 +02:00
parent 40fa5ea8ab
commit 5cc40a06f1
14 changed files with 10 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
/extra/** export-ignore
+1 -1
View File
@@ -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:: Then, add it on the Twig environment::
use Twig\Html\HtmlExtension; use Twig\Extra\Html\HtmlExtension;
$twig = new \Twig\Environment(...); $twig = new \Twig\Environment(...);
$twig->addExtension(new HtmlExtension()); $twig->addExtension(new HtmlExtension());
+1 -1
View File
@@ -26,7 +26,7 @@ names together:
Then, add it on the Twig environment:: Then, add it on the Twig environment::
use Twig\Html\HtmlExtension; use Twig\Extra\Html\HtmlExtension;
$twig = new \Twig\Environment(...); $twig = new \Twig\Environment(...);
$twig->addExtension(new HtmlExtension()); $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 * [`html_classes`][2] function: returns a string by conditionally joining class
names together. names together.
[1]: https://twig.symfony.com/doc/2.x/functions/html_classes.html [1]: https://twig.symfony.com/data_uri
[2]: https://twig.symfony.com/doc/2.x/filters/data_uri.html [2]: https://twig.symfony.com/html_classes
@@ -23,12 +23,12 @@
}, },
"autoload": { "autoload": {
"psr-4" : { "psr-4" : {
"Twig\\Html\\" : "src/" "Twig\\Extra\\Html\\" : "src/"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4" : { "psr-4" : {
"Twig\\Html\\Tests\\" : "tests/" "Twig\\Extra\\Html\\Tests\\" : "tests/"
} }
}, },
"extra": { "extra": {
@@ -9,7 +9,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Twig\Html { namespace Twig\Extra\Html {
use Symfony\Component\Mime\MimeTypes; use Symfony\Component\Mime\MimeTypes;
use Twig\Extension\AbstractExtension; use Twig\Extension\AbstractExtension;
use Twig\TwigFilter; use Twig\TwigFilter;
@@ -9,9 +9,9 @@
* file that was distributed with this source code. * 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; use Twig\Test\IntegrationTestCase;
class IntegrationTest extends IntegrationTestCase class IntegrationTest extends IntegrationTestCase