Skip to content

Commit

Permalink
Skip test package in laravel and symfony by default (#191)
Browse files Browse the repository at this point in the history
* Skip test package in laravel and symfony by default

* add tasks for ecotone 2.0
  • Loading branch information
dgafka authored Aug 30, 2023
1 parent cfd9805 commit 00f0c7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/Laravel/src/EcotoneProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Ecotone\Laravel;

use Ecotone\Messaging\Config\ModulePackageList;
use const DIRECTORY_SEPARATOR;

use Ecotone\Lite\PsrContainerReferenceSearchService;
Expand Down Expand Up @@ -52,12 +53,13 @@ public function register()

$errorChannel = Config::get('ecotone.defaultErrorChannel');

/** @TODO Ecotone 2.0 use ServiceContext to configure Laravel */
$applicationConfiguration = ServiceConfiguration::createWithDefaults()
->withEnvironment($environment)
->withLoadCatalog(Config::get('ecotone.loadAppNamespaces') ? 'app' : '')
->withFailFast(false)
->withNamespaces(Config::get('ecotone.namespaces'))
->withSkippedModulePackageNames(Config::get('ecotone.skippedModulePackageNames'));
->withSkippedModulePackageNames(array_merge(Config::get('ecotone.skippedModulePackageNames'), [ModulePackageList::TEST_PACKAGE]));

if ($isCachingConfiguration) {
$applicationConfiguration = $applicationConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Ecotone\Messaging\Config\Configuration;
use Ecotone\Messaging\Config\ConfiguredMessagingSystem;
use Ecotone\Messaging\Config\MessagingSystemConfiguration;
use Ecotone\Messaging\Config\ModulePackageList;
use Ecotone\Messaging\Config\ProxyGenerator;
use Ecotone\Messaging\Config\ServiceConfiguration;
use Ecotone\Messaging\ConfigurationVariableService;
Expand Down Expand Up @@ -51,12 +52,13 @@ public static function getRootProjectPath(ContainerInterface $container)
public static function getMessagingConfiguration(ContainerInterface $container, bool $useCachedVersion = false): Configuration
{
$ecotoneCacheDirectory = $container->getParameter('kernel.cache_dir') . self::CACHE_DIRECTORY_SUFFIX;
/** @TODO Ecotone 2.0 use ServiceContext to configure Symfony */
$serviceConfiguration = ServiceConfiguration::createWithDefaults()
->withEnvironment($container->getParameter('kernel.environment'))
->withFailFast($container->getParameter('kernel.environment') === 'prod' ? false : $container->getParameter(self::FAIL_FAST_CONFIG))
->withLoadCatalog($container->getParameter(self::LOAD_SRC) ? 'src' : '')
->withNamespaces($container->getParameter(self::WORKING_NAMESPACES_CONFIG))
->withSkippedModulePackageNames($container->getParameter(self::SKIPPED_MODULE_PACKAGES))
->withSkippedModulePackageNames(array_merge($container->getParameter(self::SKIPPED_MODULE_PACKAGES), [ModulePackageList::TEST_PACKAGE]))
->withCacheDirectoryPath($ecotoneCacheDirectory);

if ($container->getParameter(self::SERVICE_NAME)) {
Expand Down

0 comments on commit 00f0c7d

Please sign in to comment.