Skip to content

Commit

Permalink
Merge pull request #1 from j-mywheels/master
Browse files Browse the repository at this point in the history
fix extension
  • Loading branch information
Jamal committed Apr 25, 2019
2 parents bed9d80 + 0a5e87b commit a49d5f7
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# TwigSpreadsheetBundle

[![Teavis CI: Build Status](https://travis-ci.com/MyWheels/TwigSpreadsheetBundle.png?branch=master)](https://travis-ci.com/MyWheels/TwigSpreadsheetBundle)
[![Teavis CI: Build Status](https://travis-ci.org/MewesK/TwigSpreadsheetBundle.png?branch=master)](https://travis-ci.org/MewesK/TwigSpreadsheetBundle)
[![Scrutinizer: Code Quality](https://scrutinizer-ci.com/g/MewesK/TwigSpreadsheetBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/MewesK/TwigSpreadsheetBundle/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/MewesK/TwigSpreadsheetBundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/MewesK/TwigSpreadsheetBundle/?branch=master)
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
>
<php>
<env name="SYMFONY_PHPUNIT_VERSION" value="6.5"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>

<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('mywheels_twig_spreadsheet');
$rootNode = $treeBuilder->root('my_wheels_twig_spreadsheet');

$rootNode
->children()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');

$definition = $container->getDefinition('mywheels_twig_spreadsheet.twig_spreadsheet_extension');
$definition = $container->getDefinition('my_wheels_twig_spreadsheet.twig_spreadsheet_extension');
$definition->replaceArgument(0, $mergedConfig);
}
}
4 changes: 2 additions & 2 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
services:
mywheels_twig_spreadsheet.add_request_formats_listener:
my_wheels_twig_spreadsheet.add_request_formats_listener:
class: MyWheels\TwigSpreadsheetBundle\EventListener\AddRequestFormatsListener
tags:
- { name: kernel.event_subscriber }

mywheels_twig_spreadsheet.twig_spreadsheet_extension:
my_wheels_twig_spreadsheet.twig_spreadsheet_extension:
class: MyWheels\TwigSpreadsheetBundle\Twig\TwigSpreadsheetExtension
public: true
arguments: [ null ] # config placeholder
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Configuration
.. code-block:: yaml
# Default configuration for "MyWheelsTwigSpreadsheetBundle"
mywheels_twig_spreadsheet:
my_wheels_twig_spreadsheet:
# Disabling formula calculations can improve the performance but the resulting documents
# won't immediately show formula results in external programs.
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/ConfigFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testPreCalculateFormulas()
/**
* @var TwigSpreadsheetExtension $extension
*/
$extension = static::$kernel->getContainer()->get('mywheels_twig_spreadsheet.twig_spreadsheet_extension');
$extension = static::$kernel->getContainer()->get('my_wheels_twig_spreadsheet.twig_spreadsheet_extension');

static::assertFalse($extension->getAttributes()['pre_calculate_formulas'], 'Unexpected attribute');

Expand All @@ -45,7 +45,7 @@ public function testXmlCacheDirectory()
/**
* @var TwigSpreadsheetExtension $extension
*/
$extension = static::$kernel->getContainer()->get('mywheels_twig_spreadsheet.twig_spreadsheet_extension');
$extension = static::$kernel->getContainer()->get('my_wheels_twig_spreadsheet.twig_spreadsheet_extension');

static::assertDirectoryExists($extension->getAttributes()['cache']['xml'], 'Cache directory does not exist');
}
Expand All @@ -58,7 +58,7 @@ public function testCsvWriterAttributes()
/**
* @var TwigSpreadsheetExtension $extension
*/
$extension = static::$kernel->getContainer()->get('mywheels_twig_spreadsheet.twig_spreadsheet_extension');
$extension = static::$kernel->getContainer()->get('my_wheels_twig_spreadsheet.twig_spreadsheet_extension');

static::assertEquals(';', $extension->getAttributes()['csv_writer']['delimiter'], 'Unexpected attribute');
static::assertEquals('\'', $extension->getAttributes()['csv_writer']['enclosure'], 'Unexpected attribute');
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Fixtures/config/config_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
imports:
- { resource: config.yml }

mywheels_twig_spreadsheet:
my_wheels_twig_spreadsheet:
pre_calculate_formulas: false
cache:
xml: "%kernel.cache_dir%/spreadsheet/xml"
Expand Down

0 comments on commit a49d5f7

Please sign in to comment.