Skip to content

Commit

Permalink
Merge pull request #27 from stefandoorn/rename-plugin
Browse files Browse the repository at this point in the history
Rename plugin to have Sylius prefix (closes #13)
  • Loading branch information
stefandoorn authored Nov 8, 2018
2 parents 6c66da0 + 5745a3a commit 5030935
Show file tree
Hide file tree
Showing 47 changed files with 139 additions and 140 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Google Tag Manager Enhanced Ecommerce plugin for Sylius eCommerce platform

[![License](https://img.shields.io/packagist/l/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin.svg)](https://packagist.org/packages/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin)
[![Version](https://img.shields.io/packagist/v/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin.svg)](https://packagist.org/packages/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin)
[![Build status on Linux](https://img.shields.io/travis/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin/master.svg)](http://travis-ci.org/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin)
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin.svg)](https://scrutinizer-ci.com/g/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin/)
[![Coverage Status](https://coveralls.io/repos/github/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin/badge.svg?branch=master)](https://coveralls.io/github/stefandoorn/google-tag-manager-enhanced-ecommerce-plugin?branch=master)
[![License](https://img.shields.io/packagist/l/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin.svg)](https://packagist.org/packages/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin)
[![Version](https://img.shields.io/packagist/v/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin.svg)](https://packagist.org/packages/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin)
[![Build status on Linux](https://img.shields.io/travis/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin/master.svg)](http://travis-ci.org/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin)
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin.svg)](https://scrutinizer-ci.com/g/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin/)
[![Coverage Status](https://coveralls.io/repos/github/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin/badge.svg?branch=master)](https://coveralls.io/github/stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin?branch=master)

## Installation

### 1. Composer

`composer require stefandoorn/google-tag-manager-enhanced-ecommerce-plugin`
`composer require stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin`

### 2. Follow installation instructions of required sub bundle

Expand All @@ -21,15 +21,15 @@ https://github.com/stefandoorn/google-tag-manager-plugin
Add to the bundle list in `app/AppKernel.php`:

```php
new GtmEnhancedEcommercePlugin\GtmEnhancedEcommercePlugin(),
new SyliusGtmEnhancedEcommercePlugin\SyliusGtmEnhancedEcommercePlugin(),
```

### 4. Adjust configurations

Configure the features you would like to use/not. Find a base configuration reference by running:

```
bin/console config:dump-reference GtmEnhancedEcommercePlugin
bin/console config:dump-reference SyliusGtmEnhancedEcommercePlugin
```

### 5. Install assets
Expand Down
11 changes: 11 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Upgrade

Upgrade v0.6.1 -> v0.7.0
------------------------

The plugin has been renamed to follow Sylius plugin naming conventions.

* Rename namespace references from `GtmEnhancedEcommercePlugin` to `SyliusGtmEnhancedEcommercePlugin`
* Rename configuration reference from `gtm_enhanced_ecommerce` to `sylius_gtm_enhanced_ecommerce`
* Adjust name in `composer.json` from `stefandoorn/google-tag-manager-enhanced-ecommerce-plugin` to `stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin`
* Change parameter references starting with `gtm_enhanced_ecommerce` to start with `sylius_gtm_enhanced_ecommerce`
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "stefandoorn/google-tag-manager-enhanced-ecommerce-plugin",
"name": "stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin",
"type": "sylius-plugin",
"description": "Google Tag Manager Enhanced Ecommerce plugin for Sylius.",
"license": "MIT",
Expand Down Expand Up @@ -29,13 +29,13 @@
},
"autoload": {
"psr-4": {
"GtmEnhancedEcommercePlugin\\": "src/"
"SyliusGtmEnhancedEcommercePlugin\\": "src/"
}
},
"autoload-dev": {
"classmap": ["tests/Application/app/AppKernel.php"],
"psr-4": {
"Tests\\GtmEnhancedEcommercePlugin\\": "tests/"
"Tests\\SyliusGtmEnhancedEcommercePlugin\\": "tests/"
}
}
}
8 changes: 2 additions & 6 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\DependencyInjection;
namespace SyliusGtmEnhancedEcommercePlugin\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
* Class Configuration
* @package GtmEnhancedEcommercePlugin\DependencyInjection
*/
final class Configuration implements ConfigurationInterface
{
/**
Expand All @@ -18,7 +14,7 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();

$rootNode = $treeBuilder->root('gtm_enhanced_ecommerce');
$rootNode = $treeBuilder->root('sylius_gtm_enhanced_ecommerce');

$rootNode
->children()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\DependencyInjection;
namespace SyliusGtmEnhancedEcommercePlugin\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

/**
* Class GtmEnhancedEcommerceExtension
* @package GtmEnhancedEcommercePlugin\DependencyInjection
*/
final class GtmEnhancedEcommerceExtension extends Extension
final class SyliusGtmEnhancedEcommerceExtension extends Extension
{
/**
* {@inheritdoc}
Expand All @@ -25,7 +21,7 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('services.yml');

foreach ($config['features'] as $feature => $setting) {
$parameter = sprintf('gtm_enhanced_ecommerce.features.%s', $feature);
$parameter = sprintf('sylius_gtm_enhanced_ecommerce.features.%s', $feature);

$container->setParameter($parameter, $setting);

Expand All @@ -38,7 +34,7 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('cache_services.yml');

foreach ($config['cache_resolvers']['ttl'] as $feature => $ttl) {
$parameter = sprintf('gtm_enhanced_ecommerce.cache_resolver.%s', $feature);
$parameter = sprintf('sylius_gtm_enhanced_ecommerce.cache_resolver.%s', $feature);
$container->setParameter($parameter, $ttl);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/EventListener/CheckoutStepListener.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\EventListener;
namespace SyliusGtmEnhancedEcommercePlugin\EventListener;

use GtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolverInterface;
use GtmEnhancedEcommercePlugin\TagManager\CheckoutStepInterface;
use SyliusGtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolverInterface;
use SyliusGtmEnhancedEcommercePlugin\TagManager\CheckoutStepInterface;
use Sylius\Bundle\CoreBundle\Controller\OrderController;
use Sylius\Component\Order\Context\CartContextInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\EventListener;
namespace SyliusGtmEnhancedEcommercePlugin\EventListener;

use GtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolverInterface;
use SyliusGtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolverInterface;
use Sonata\BlockBundle\Event\BlockEvent;
use Sonata\BlockBundle\Model\Block;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
Expand Down
4 changes: 2 additions & 2 deletions src/EventListener/ThankYouListener.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\EventListener;
namespace SyliusGtmEnhancedEcommercePlugin\EventListener;

use GtmEnhancedEcommercePlugin\TagManager\AddTransactionInterface;
use SyliusGtmEnhancedEcommercePlugin\TagManager\AddTransactionInterface;
use Sylius\Bundle\CoreBundle\Controller\OrderController;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
Expand Down
15 changes: 0 additions & 15 deletions src/GtmEnhancedEcommercePlugin.php

This file was deleted.

6 changes: 3 additions & 3 deletions src/Object/Factory/ProductDetailFactory.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object\Factory;
namespace SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use GtmEnhancedEcommercePlugin\Object\ProductDetail;
use GtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetail;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;

final class ProductDetailFactory implements ProductDetailFactoryInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Object/Factory/ProductDetailFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object\Factory;
namespace SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use GtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;

/**
* Interface ProductDetailFactoryInterface
* @package GtmEnhancedEcommercePlugin\Object\Factory
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
*/
interface ProductDetailFactoryInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/Object/Factory/ProductDetailImpressionFactory.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object\Factory;
namespace SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use GtmEnhancedEcommercePlugin\Object\ProductDetailImpression;
use GtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpression;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;

/**
* Class ProductDetailImpressionFactory
* @package GtmEnhancedEcommercePlugin\Object\Factory
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
*/
final class ProductDetailImpressionFactory implements ProductDetailImpressionFactoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object\Factory;
namespace SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use GtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;

/**
* Interface ProductDetailImpressionFactoryInterface
* @package GtmEnhancedEcommercePlugin\Object\Factory
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
*/
interface ProductDetailImpressionFactoryInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Object/ProductDetail.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object;
namespace SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Class ProductDetail
* @package GtmEnhancedEcommercePlugin\Object
* @package SyliusGtmEnhancedEcommercePlugin\Object
*/
final class ProductDetail implements ProductDetailInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Object/ProductDetailImpression.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object;
namespace SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Class ProductDetailImpressionData
* @package GtmEnhancedEcommercePlugin\Object
* @package SyliusGtmEnhancedEcommercePlugin\Object
*/
final class ProductDetailImpression implements ProductDetailImpressionInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Object/ProductDetailImpressionInterface.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object;
namespace SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Interface ProductDetailImpressionDataInterface
* @package GtmEnhancedEcommercePlugin\Object
* @package SyliusGtmEnhancedEcommercePlugin\Object
*/
interface ProductDetailImpressionInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Object/ProductDetailInterface.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Object;
namespace SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Interface ProductDetailInterface
* @package GtmEnhancedEcommercePlugin\Object
* @package SyliusGtmEnhancedEcommercePlugin\Object
*/
interface ProductDetailInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Resolver\Cache;
namespace SyliusGtmEnhancedEcommercePlugin\Resolver\Cache;

use GtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use GtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolverInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolverInterface;
use Sylius\Component\Core\Model\ProductInterface;
use Symfony\Component\Cache\Adapter\AdapterInterface;

/**
* Class ProductDetailImpressionCachedDataResolver
* @package GtmEnhancedEcommercePlugin\Resolver\Cache
* @package SyliusGtmEnhancedEcommercePlugin\Resolver\Cache
*/
final class ProductDetailImpressionCachedDataResolver implements ProductDetailImpressionDataResolverInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Resolver/CheckoutStepResolver.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Resolver;
namespace SyliusGtmEnhancedEcommercePlugin\Resolver;

use GtmEnhancedEcommercePlugin\TagManager\CheckoutStep;
use SyliusGtmEnhancedEcommercePlugin\TagManager\CheckoutStep;
use Symfony\Component\HttpFoundation\Request;

/**
* Class CheckoutStepResolver
* @package GtmEnhancedEcommercePlugin\Resolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
*/
final class CheckoutStepResolver implements CheckoutStepResolverInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resolver/CheckoutStepResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Resolver;
namespace SyliusGtmEnhancedEcommercePlugin\Resolver;

use Symfony\Component\HttpFoundation\Request;

/**
* Interface CheckoutStepResolverInterface
* @package GtmEnhancedEcommercePlugin\Resolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
*/
interface CheckoutStepResolverInterface
{
Expand Down
12 changes: 6 additions & 6 deletions src/Resolver/ProductDetailImpressionDataResolver.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Resolver;
namespace SyliusGtmEnhancedEcommercePlugin\Resolver;

use GtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactoryInterface;
use GtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactoryInterface;
use GtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use GtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactoryInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactoryInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use Sylius\Component\Channel\Context\ChannelContextInterface;
use Sylius\Component\Core\Calculator\ProductVariantPriceCalculatorInterface;
use Sylius\Component\Core\Model\ProductInterface;
use Sylius\Component\Core\Model\ProductVariantInterface;

/**
* Class ProductDetailImpressionDataResolver
* @package GtmEnhancedEcommercePlugin\Resolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
*/
final class ProductDetailImpressionDataResolver implements ProductDetailImpressionDataResolverInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Resolver/ProductDetailImpressionDataResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php declare(strict_types=1);

namespace GtmEnhancedEcommercePlugin\Resolver;
namespace SyliusGtmEnhancedEcommercePlugin\Resolver;

use GtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use Sylius\Component\Core\Model\ProductInterface;

/**
* Interface ProductDetailImpressionDataResolverInterface
* @package GtmEnhancedEcommercePlugin\Resolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
*/
interface ProductDetailImpressionDataResolverInterface
{
Expand Down
Loading

0 comments on commit 5030935

Please sign in to comment.