Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change Knplabs to Knp. BC break before Symfony2 release.

  • Loading branch information...
commit 6414f6be0a3ca93c9e91ea26f7aa0e1a1a04f22d 1 parent fc9b2b0
@mbontemps mbontemps authored
View
4 DependencyInjection/Configuration.php
@@ -1,6 +1,6 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\DependencyInjection;
+namespace Knp\Bundle\MarkdownBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\NodeBuilder;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@@ -16,7 +16,7 @@ public function getConfigTree()
{
$treeBuilder = new TreeBuilder();
- $treeBuilder->root('knplabs_markdown', 'array')
+ $treeBuilder->root('knp_markdown', 'array')
->addDefaultsIfNotSet()
->children()
->arrayNode('parser')
View
6 ...ncyInjection/KnplabsMarkdownExtension.php → DependencyInjection/KnpMarkdownExtension.php
@@ -1,6 +1,6 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\DependencyInjection;
+namespace Knp\Bundle\MarkdownBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
@@ -8,10 +8,10 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-class KnplabsMarkdownExtension extends Extension
+class KnpMarkdownExtension extends Extension
{
/**
- * Handles the knplabs_markdown configuration.
+ * Handles the knp_markdown configuration.
*
* @param array $configs The configurations being loaded
* @param ContainerBuilder $container
View
4 Helper/MarkdownHelper.php
@@ -1,9 +1,9 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Helper;
+namespace Knp\Bundle\MarkdownBundle\Helper;
use Symfony\Component\Templating\Helper\HelperInterface;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
class MarkdownHelper implements HelperInterface
{
View
9 KnpMarkdownBundle.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace Knp\Bundle\MarkdownBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle as BaseBundle;
+
+class KnpMarkdownBundle extends BaseBundle
+{
+}
View
9 KnplabsMarkdownBundle.php
@@ -1,9 +0,0 @@
-<?php
-
-namespace Knplabs\Bundle\MarkdownBundle;
-
-use Symfony\Component\HttpKernel\Bundle\Bundle as BaseBundle;
-
-class KnplabsMarkdownBundle extends BaseBundle
-{
-}
View
2  MarkdownParserInterface.php
@@ -1,6 +1,6 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle;
+namespace Knp\Bundle\MarkdownBundle;
interface MarkdownParserInterface
{
View
4 Parser/MarkdownParser.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Parser;
+namespace Knp\Bundle\MarkdownBundle\Parser;
-use Knplabs\Bundle\MarkdownBundle\MarkdownParserInterface;
+use Knp\Bundle\MarkdownBundle\MarkdownParserInterface;
if(!class_exists('\MarkdownExtraParser')) {
require_once(realpath(__DIR__.'/..').'/vendor/parser/MarkdownExtraParser.php');
View
4 Parser/Preset/Light.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Parser\Preset;
+namespace Knp\Bundle\MarkdownBundle\Parser\Preset;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
/**
* Light featured Markdown Parser
View
4 Parser/Preset/Max.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Parser\Preset;
+namespace Knp\Bundle\MarkdownBundle\Parser\Preset;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
/**
* Full featured Markdown Parser
View
4 Parser/Preset/Medium.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Parser\Preset;
+namespace Knp\Bundle\MarkdownBundle\Parser\Preset;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
/**
* Medium featured Markdown Parser
View
4 Parser/Preset/Min.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Parser\Preset;
+namespace Knp\Bundle\MarkdownBundle\Parser\Preset;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser;
/**
* Minimally featured Markdown Parser
View
8 README.markdown
@@ -5,7 +5,7 @@ We added PHP5 sugar, feature selection, and unit tests.
## INSTALLATION
-Put MarkdownBundle in your `src/Bundle` dir.
+Put MarkdownBundle in a `vendor/bundles/Knp/Bundle/MarkdownBundle` dir.
## USAGE
@@ -21,10 +21,10 @@ If you have enabled the twig markdown filter, you can use the following in your
## Change the parser implementation
-Create a service implementing Knplabs\Bundle\MarkdownBundle\ParserInterface,
+Create a service implementing Knp\Bundle\MarkdownBundle\ParserInterface,
then configure the bundle to use it:
- knplabs_markdown:
+ knp_markdown:
parser:
service: my.markdown.parser
@@ -40,4 +40,4 @@ For more details, see the implementations in Parser/Preset.
## TEST
- phpunit -c myapp src/Bundle/MarkdownBundle
+ phpunit -c myapp vendor/bundles/Knp/Bundle/MarkdownBundle
View
2  Resources/config/helper.xml
@@ -6,7 +6,7 @@
<parameters>
- <parameter key="templating.helper.markdown.class">Knplabs\Bundle\MarkdownBundle\Helper\MarkdownHelper</parameter>
+ <parameter key="templating.helper.markdown.class">Knp\Bundle\MarkdownBundle\Helper\MarkdownHelper</parameter>
</parameters>
View
8 Resources/config/parser.xml
@@ -5,10 +5,10 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
- <service id="markdown.parser.min" class="Knplabs\Bundle\MarkdownBundle\Parser\Preset\Min" />
- <service id="markdown.parser.light" class="Knplabs\Bundle\MarkdownBundle\Parser\Preset\Light" />
- <service id="markdown.parser.medium" class="Knplabs\Bundle\MarkdownBundle\Parser\Preset\Medium" />
- <service id="markdown.parser.max" class="Knplabs\Bundle\MarkdownBundle\Parser\Preset\Max" />
+ <service id="markdown.parser.min" class="Knp\Bundle\MarkdownBundle\Parser\Preset\Min" />
+ <service id="markdown.parser.light" class="Knp\Bundle\MarkdownBundle\Parser\Preset\Light" />
+ <service id="markdown.parser.medium" class="Knp\Bundle\MarkdownBundle\Parser\Preset\Medium" />
+ <service id="markdown.parser.max" class="Knp\Bundle\MarkdownBundle\Parser\Preset\Max" />
</services>
</container>
View
2  Resources/config/twig.xml
@@ -5,7 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
- <service id="twig.extension.exercise.twig" class="Knplabs\Bundle\MarkdownBundle\Twig\Extension\MarkdownTwigExtension" public="false">
+ <service id="twig.extension.exercise.twig" class="Knp\Bundle\MarkdownBundle\Twig\Extension\MarkdownTwigExtension" public="false">
<argument type="service" id="templating.helper.markdown" />
<tag name="twig.extension" />
</service>
View
4 Tests/EscapingTest.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests;
+namespace Knp\Bundle\MarkdownBundle\Tests;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
class EscapingTest extends \PHPUnit_Framework_TestCase
{
View
4 Tests/FeatureTest.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests;
+namespace Knp\Bundle\MarkdownBundle\Tests;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
class FeatureTest extends \PHPUnit_Framework_TestCase
{
View
4 Tests/Performance/Base.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests\Performance;
+namespace Knp\Bundle\MarkdownBundle\Tests\Performance;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
abstract class Base
{
View
4 Tests/Performance/Light.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests\Performance;
+namespace Knp\Bundle\MarkdownBundle\Tests\Performance;
-use Knplabs\Bundle\MarkdownBundle\Parser\Preset\Light as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\Preset\Light as Parser;
/**
* Run tests with light-featured Markdown Parser
View
4 Tests/Performance/Max.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests\Performance;
+namespace Knp\Bundle\MarkdownBundle\Tests\Performance;
-use Knplabs\Bundle\MarkdownBundle\Parser\Preset\Max as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\Preset\Max as Parser;
/**
* Run tests with full-featured Markdown Parser
View
4 Tests/Performance/Medium.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests\Performance;
+namespace Knp\Bundle\MarkdownBundle\Tests\Performance;
-use Knplabs\Bundle\MarkdownBundle\Parser\Preset\Medium as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\Preset\Medium as Parser;
/**
* Run tests with minimal-featured Markdown Parser
View
4 Tests/Performance/Min.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests\Performance;
+namespace Knp\Bundle\MarkdownBundle\Tests\Performance;
-use Knplabs\Bundle\MarkdownBundle\Parser\Preset\Min as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\Preset\Min as Parser;
/**
* Run tests with minimal-featured Markdown Parser
View
2  Tests/Performance/index.php
@@ -3,6 +3,6 @@
$name = 'Min';
require_once __DIR__.'/'.$name.'.php';
-$class = 'Knplabs\\MarkdownBundle\\Tests\\Performance\\'.$name;
+$class = 'Knp\\MarkdownBundle\\Tests\\Performance\\'.$name;
$test = new $class();
print nl2br($test->run(10));
View
6 Tests/PresetTest.php
@@ -1,10 +1,10 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Tests;
+namespace Knp\Bundle\MarkdownBundle\Tests;
-use Knplabs\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
+use Knp\Bundle\MarkdownBundle\Parser\MarkdownParser as Parser;
-use Knplabs\Bundle\MarkdownBundle\Parser\Preset as Preset;
+use Knp\Bundle\MarkdownBundle\Parser\Preset as Preset;
class PresetTest extends \PHPUnit_Framework_TestCase
{
View
2  Tests/bootstrap.php
@@ -3,5 +3,5 @@
require_once $_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';
$loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
-$loader->registerNamespace('Knplabs\\Bundle\\MarkdownBundle', __DIR__.'/../../../..');
+$loader->registerNamespace('Knp\\Bundle\\MarkdownBundle', __DIR__.'/../../../..');
$loader->register();
View
4 Twig/Extension/MarkdownTwigExtension.php
@@ -1,8 +1,8 @@
<?php
-namespace Knplabs\Bundle\MarkdownBundle\Twig\Extension;
+namespace Knp\Bundle\MarkdownBundle\Twig\Extension;
-use Knplabs\Bundle\MarkdownBundle\Helper\MarkdownHelper;
+use Knp\Bundle\MarkdownBundle\Helper\MarkdownHelper;
class MarkdownTwigExtension extends \Twig_Extension
{
Please sign in to comment.
Something went wrong with that request. Please try again.