Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Fixed CustomShipping when disabled
Browse files Browse the repository at this point in the history
* Added test for CustomShipping fix
* Fixed Bundles with dependencies for new Elcodi implementation
* Added specific methods for all Bundle classes
    * commands - return null
    * extension - return null
  • Loading branch information
mmoreram committed Jun 10, 2015
1 parent 1922c19 commit 90f1688
Show file tree
Hide file tree
Showing 56 changed files with 802 additions and 80 deletions.
6 changes: 5 additions & 1 deletion app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ public function registerBundles()
$bundles[] = new Elcodi\Bridge\VisithorBridgeBundle\ElcodiVisithorBridgeBundle();
}

return $this->getBundleInstances($bundles);
return $this
->getBundleInstances(
$this,
$bundles
);
}

/**
Expand Down
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/AttributeBundle/AdminAttributeBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\AttributeBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminAttributeExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/BannerBundle/AdminBannerBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\BannerBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminBannerExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/CartBundle/AdminCartBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\CartBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminCartExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/CoreBundle/AdminCoreBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\CoreBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\HttpKernel\Bundle\Bundle;

use Elcodi\Admin\CoreBundle\DependencyInjection\AdminCoreExtension;
Expand All @@ -35,4 +36,18 @@ public function getContainerExtension()
{
return new AdminCoreExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/CouponBundle/AdminCouponBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\CouponBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminCouponExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/CurrencyBundle/AdminCurrencyBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\CurrencyBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminCurrencyExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/GeoBundle/AdminGeoBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\GeoBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminGeoExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/LanguageBundle/AdminLanguageBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\LanguageBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminLanguageExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/MediaBundle/AdminMediaBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\MediaBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminMediaExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/MetricBundle/AdminMetricBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\MetricBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\CssSelector\XPath\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminMetricExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/NewsletterBundle/AdminNewsletterBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\NewsletterBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminNewsletterExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
15 changes: 15 additions & 0 deletions src/Elcodi/Admin/PageBundle/AdminPageBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace Elcodi\Admin\PageBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -36,4 +37,18 @@ public function getContainerExtension()
{
return new AdminPageExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}
}
18 changes: 17 additions & 1 deletion src/Elcodi/Admin/PaymentBundle/AdminPaymentBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@

namespace Elcodi\Admin\PaymentBundle;

use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;

use Elcodi\Admin\PaymentBundle\DependencyInjection\AdminPaymentExtension;
use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface;
use Symfony\Component\HttpKernel\KernelInterface;

/**
* Class AdminPaymentBundle
Expand All @@ -38,14 +40,28 @@ public function getContainerExtension()
return new AdminPaymentExtension();
}

/**
* Register Commands.
*
* Disabled as commands are registered as services.
*
* @param Application $application An Application instance
*
* @return null
*/
public function registerCommands(Application $application)
{
return null;
}

/**
* Return all bundle dependencies.
*
* Values can be a simple bundle namespace or its instance
*
* @return array Bundle instances
*/
public static function getBundleDependencies()
public static function getBundleDependencies(KernelInterface $kernel)
{
return [
'Elcodi\Admin\CoreBundle\AdminCoreBundle',
Expand Down
Loading

0 comments on commit 90f1688

Please sign in to comment.