mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
Revamping bundle structure to not mix source code with config files
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4" : {
|
||||
"Twig\\Extra\\TwigExtraBundle\\" : ""
|
||||
"Twig\\Extra\\TwigExtraBundle\\" : "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.2/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
@@ -20,11 +20,7 @@
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>./</directory>
|
||||
<exclude>
|
||||
<directory>./tests</directory>
|
||||
<directory>./vendor</directory>
|
||||
</exclude>
|
||||
<directory>./src/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class TwigExtraExtension extends Extension
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__, 2).'/config'));
|
||||
$configuration = $this->getConfiguration($configs, $container);
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
+4
@@ -15,4 +15,8 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class TwigExtraBundle extends Bundle
|
||||
{
|
||||
public function getPath()
|
||||
{
|
||||
return \dirname(__DIR__);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user