Skip to content

Commit

Permalink
Merge pull request #28 from stefandoorn/rename-namespace
Browse files Browse the repository at this point in the history
Rename namespace
  • Loading branch information
stefandoorn authored Nov 8, 2018
2 parents 5030935 + cbae397 commit f648398
Show file tree
Hide file tree
Showing 40 changed files with 95 additions and 88 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ https://github.com/stefandoorn/google-tag-manager-plugin
Add to the bundle list in `app/AppKernel.php`:

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

### 4. Adjust configurations
Expand Down
7 changes: 7 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Upgrade

Upgrade v0.7.0 -> v0.8.0
------------------------

Adjusted PSR namespacing to follow Sylius plugin naming conventions.

* Rename namespace from `GtmEnhancedEcommercePlugin` to `StefanDoorn\GtmEnhancedEcommercePlugin`

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

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
},
"autoload": {
"psr-4": {
"SyliusGtmEnhancedEcommercePlugin\\": "src/"
"StefanDoorn\\SyliusGtmEnhancedEcommercePlugin\\": "src/"
}
},
"autoload-dev": {
"classmap": ["tests/Application/app/AppKernel.php"],
"psr-4": {
"Tests\\SyliusGtmEnhancedEcommercePlugin\\": "tests/"
"Tests\\StefanDoorn\\SyliusGtmEnhancedEcommercePlugin\\": "tests/"
}
}
}
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace SyliusGtmEnhancedEcommercePlugin\DependencyInjection;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace SyliusGtmEnhancedEcommercePlugin\DependencyInjection;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
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 SyliusGtmEnhancedEcommercePlugin\EventListener;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener;

use SyliusGtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolverInterface;
use SyliusGtmEnhancedEcommercePlugin\TagManager\CheckoutStepInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolverInterface;
use StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\EventListener;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener;

use SyliusGtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolverInterface;
use StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\EventListener;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener;

use SyliusGtmEnhancedEcommercePlugin\TagManager\AddTransactionInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\TagManager\AddTransactionInterface;
use Sylius\Bundle\CoreBundle\Controller\OrderController;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
Expand Down
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 SyliusGtmEnhancedEcommercePlugin\Object\Factory;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetail;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetail;
use StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object\Factory;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;

/**
* Interface ProductDetailFactoryInterface
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object\Factory;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpression;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpression;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;

/**
* Class ProductDetailImpressionFactory
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object\Factory;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory;

use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;

/**
* Interface ProductDetailImpressionFactoryInterface
* @package SyliusGtmEnhancedEcommercePlugin\Object\Factory
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Class ProductDetail
* @package SyliusGtmEnhancedEcommercePlugin\Object
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Class ProductDetailImpressionData
* @package SyliusGtmEnhancedEcommercePlugin\Object
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Interface ProductDetailImpressionDataInterface
* @package SyliusGtmEnhancedEcommercePlugin\Object
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Object;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object;

/**
* Interface ProductDetailInterface
* @package SyliusGtmEnhancedEcommercePlugin\Object
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver\Cache;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver\Cache;

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

/**
* Class ProductDetailImpressionCachedDataResolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver\Cache
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver;

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

/**
* Class CheckoutStepResolver
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver;

use Symfony\Component\HttpFoundation\Request;

/**
* Interface CheckoutStepResolverInterface
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver;

use SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactoryInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactoryInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactoryInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactoryInterface;
use StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetailImpressionInterface;
use StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver
* @package StefanDoorn\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 SyliusGtmEnhancedEcommercePlugin\Resolver;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver;

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

/**
* Interface ProductDetailImpressionDataResolverInterface
* @package SyliusGtmEnhancedEcommercePlugin\Resolver
* @package StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver
*/
interface ProductDetailImpressionDataResolverInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/cache_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:

sylius.google_tag_manager.enhanced_ecommerce.tracking.resolver.product_detail_impression_data_cache:
decorates: sylius.google_tag_manager.enhanced_ecommerce.tracking.resolver.product_detail_impression_data
class: SyliusGtmEnhancedEcommercePlugin\Resolver\Cache\ProductDetailImpressionCachedDataResolver
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver\Cache\ProductDetailImpressionCachedDataResolver
arguments:
- "@sylius.google_tag_manager.enhanced_ecommerce.tracking.resolver.product_detail_impression_data_cache.inner"
- "@cache.app"
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/features/checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
public: false

sylius.google_tag_manager.enhanced_ecommerce_tracking.checkout.listener.cart_summary:
class: SyliusGtmEnhancedEcommercePlugin\EventListener\CheckoutStepListener
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener\CheckoutStepListener
arguments:
- "@sylius.google_tag_manager.enhanced_ecommerce_tracking.tag_manager.checkout_step"
- "@sylius.context.cart"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- { name: kernel.event_listener, event: sonata.block.event.sylius.shop.layout.after_body, method: onBlockEvent }

sylius.google_tag_manager.enhanced_ecommerce_tracking.product_detail.listener.product.show.after_product_header:
class: SyliusGtmEnhancedEcommercePlugin\EventListener\ProductShowBlockAfterProductHeaderListener
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener\ProductShowBlockAfterProductHeaderListener
arguments:
- '@@SyliusGtmEnhancedEcommercePlugin/ProductDetail/variants.html.twig'
- '@sylius.google_tag_manager.enhanced_ecommerce.tracking.resolver.product_detail_impression_data'
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/features/purchases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
public: false

sylius.google_tag_manager.enhanced_ecommerce_tracking.purchases.listener.thank_you:
class: SyliusGtmEnhancedEcommercePlugin\EventListener\ThankYouListener
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\EventListener\ThankYouListener
arguments:
- "@sylius.google_tag_manager.enhanced_ecommerce_tracking.tag_manager.add_transaction"
- "@sylius.repository.order"
Expand Down
14 changes: 7 additions & 7 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ services:
public: false

sylius.google_tag_manager.enhanced_ecommerce_tracking.tag_manager.add_transaction:
class: SyliusGtmEnhancedEcommercePlugin\TagManager\AddTransaction
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\TagManager\AddTransaction
arguments:
- "@google_tag_manager"
- "@sylius.context.channel"
- "@sylius.context.currency"

sylius.google_tag_manager.enhanced_ecommerce_tracking.tag_manager.checkout_step:
class: SyliusGtmEnhancedEcommercePlugin\TagManager\CheckoutStep
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\TagManager\CheckoutStep
arguments:
- "@google_tag_manager"

sylius.google_tag_manager.enhanced_ecommerce.tracking.resolver.product_detail_impression_data:
class: SyliusGtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolver
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver\ProductDetailImpressionDataResolver
arguments:
- "@sylius.calculator.product_variant_price"
- "@sylius.context.channel"
- "@sylius.google_tag_manager.enhanced_ecommerce_tracking.object.factory.product_detail_impression"
- "@sylius.google_tag_manager.enhanced_ecommerce_tracking.object.factory.product_detail"

sylius.google_tag_manager.enhanced_ecommerce_tracking.resolver.checkout_step:
class: SyliusGtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolver
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Resolver\CheckoutStepResolver

sylius.google_tag_manager.enhanced_ecommerce_tracking.tag_manager.currency_code:
class: SyliusGtmEnhancedEcommercePlugin\TagManager\CurrencyCode
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\TagManager\CurrencyCode
arguments:
- "@google_tag_manager"
- "@sylius.context.currency"
Expand All @@ -41,7 +41,7 @@ services:
- { name: kernel.event_listener, event: sonata.block.event.sylius.shop.layout.head, method: onBlockEvent }

sylius.google_tag_manager.enhanced_ecommerce_tracking.object.factory.product_detail:
class: SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactory
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailFactory

sylius.google_tag_manager.enhanced_ecommerce_tracking.object.factory.product_detail_impression:
class: SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactory
class: StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\Factory\ProductDetailImpressionFactory
2 changes: 1 addition & 1 deletion src/Resources/views/ProductDetail/_variant.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{# @var product \SyliusGtmEnhancedEcommercePlugin\Object\ProductDetail #}
{# @var product \StefanDoorn\SyliusGtmEnhancedEcommercePlugin\Object\ProductDetail #}
productDetails.push({
'name': '{{ product.name }}',
'id': '{{ product.id }}',
Expand Down
2 changes: 1 addition & 1 deletion src/SyliusGtmEnhancedEcommercePlugin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace SyliusGtmEnhancedEcommercePlugin;
namespace StefanDoorn\SyliusGtmEnhancedEcommercePlugin;

use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand Down
Loading

0 comments on commit f648398

Please sign in to comment.