Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
d1ea069
MINT-6010: Upgrade to php8 V1
Jun 17, 2022
549cfc9
MINT-5887: remove githubaction text
Jun 17, 2022
e413d5b
MINT-5887: Add dummy delay interceptor class
Jun 17, 2022
ec2359d
MINT-6010: Fix github actions
Jun 17, 2022
56c6841
MINT-6010: Fix github actions
Jun 17, 2022
62c0cc5
MINT-6010: Fix github actions
Jun 17, 2022
16d521d
MINT-6010: Fix github actions
Jun 17, 2022
d6d4d7f
MINT-6010: Fix github actions
Jun 17, 2022
2f394cd
MINT-6010: Fix github actions
Jun 17, 2022
1af9b1c
MINT-6010: Fix github actions
Jun 17, 2022
a5ddcf7
MINT-6010: Fix github actions
Jun 17, 2022
49541e9
MINT-6010: Fix github actions
Jun 17, 2022
a3f9f03
MINT-6010: Fix github actions
Jun 17, 2022
cca7695
MINT-6010: Fix github actions
Jun 17, 2022
fa8f6e2
MINT-6010: Fix github actions
Jun 17, 2022
8ef7e09
MINT-6010: Fix github actions
Jun 17, 2022
0a64174
MINT-6010: Fix github actions
Jun 17, 2022
cf0b031
MINT-6010: Fix github actions
Jun 17, 2022
33d2414
MINT-6010: Fix github actions
Jun 17, 2022
9d55dbf
MINT-6010: Make services public to fix tests in SF 3.4
Jun 27, 2022
04003f8
MINT-6010: Fix github actions
Jun 27, 2022
2316dc6
MINT-6010: Fix github actions
Jun 27, 2022
1cc4563
MINT-6010: Fix github actions
Jun 27, 2022
f600a25
MINT-6010: Fix github actions
Jun 27, 2022
57e714e
MINT-6010: Fix github actions
Jun 27, 2022
97db213
MINT-6010: Fix github actions
Jun 27, 2022
5bc2444
MINT-6010: Fix github actions
Jun 27, 2022
cca8987
MINT-6010: Add debugger, skip some tests with callbacks
Jun 30, 2022
0bd38b7
MINT-6010: Test github actions
Jun 30, 2022
8447800
MINT-6010: Fix github actions
Jun 30, 2022
476520d
MINT-6010: Fix github actions
Jun 30, 2022
7f5e177
MINT-6010: Fix github actions
Jun 30, 2022
0a36ba0
MINT-6010: Fix github actions
Jun 30, 2022
524ebb3
MINT-6010: Fix github actions
Jun 30, 2022
9a9504e
MINT-6010: Fix github actions
Jun 30, 2022
582d6f8
MINT-6010: Fix github actions
Jun 30, 2022
47d30a0
MINT-6010: Fix github actions
Jun 30, 2022
2d2d686
MINT-6010: Fix github actions
Jun 30, 2022
f03ddbc
MINT-6010: Fix github actions
Jun 30, 2022
01dd693
MINT-6010: Fix github actions
Jun 30, 2022
d2bad1f
MINT-6010: Fix github actions
Jun 30, 2022
f3771c2
MINT-6010: Fix github actions
Jul 1, 2022
7bd63cb
MINT-6010: Fix github actions
Jul 1, 2022
ab420a9
MINT-6010: Fix github actions
Jul 1, 2022
19d8085
MINT-6010: Fix github actions
Jul 1, 2022
a9caea5
MINT-6010: Fix github actions
Jul 1, 2022
1cd3eb6
MINT-6010: Fix github actions
Jul 1, 2022
6c3afd6
MINT-6010: Fix github actions
Jul 1, 2022
4900cc2
MINT-6010: Fix github actions
Jul 1, 2022
267082e
MINT-6010: Fix github actions
Jul 1, 2022
eeb405d
MINT-6010: Fix github actions
Jul 1, 2022
14053cc
MINT-6010: Fix github actions
Jul 1, 2022
8b15f4c
MINT-6010: Fix github actions
Jul 1, 2022
9966e20
MINT-6010: Fix github actions
Jul 1, 2022
1c8d3ff
MINT-6010: Fix github actions
Jul 1, 2022
e1753ec
MINT-6010: Fix github actions
Jul 1, 2022
7828222
MINT-6010: Fix github actions
Jul 1, 2022
5fc7074
MINT-6010: Fix github actions
Jul 1, 2022
61814d6
MINT-6010: Fix github actions
Jul 1, 2022
28f8116
MINT-6010: Fix github actions
Jul 1, 2022
3c54d9a
MINT-6010: Fix github actions
Jul 1, 2022
fb2ffb6
MINT-6010: Fix github actions
Jul 1, 2022
460e459
MINT-6010: Fix github actions
Jul 1, 2022
bf6b1cf
MINT-6010: Fix github actions
Jul 1, 2022
3075c84
MINT-6010: Fix github actions
Jul 1, 2022
b41540b
MINT-6010: Fix github actions
Jul 1, 2022
275f455
MINT-6010: Fix github actions
Jul 1, 2022
4fab2dd
MINT-6010: Fix github actions
Jul 1, 2022
dc45909
MINT-6010: Fix github actions
Jul 1, 2022
f4506cc
MINT-6010: Fix github actions
Jul 1, 2022
5d45f3d
MINT-6010: Fix github actions
Jul 1, 2022
4e80f91
MINT-6010: Fix github actions
Jul 1, 2022
d1dbf3a
MINT-6010: Fix github actions
Jul 1, 2022
9fd5eec
MINT-6010: Fix github actions
Jul 1, 2022
a9c216b
MINT-6010: Fix github actions
Jul 4, 2022
500fc0b
MINT-6010: Fix github actions
Jul 4, 2022
c28de33
MINT-6010: Fix github actions
Jul 4, 2022
add0ec2
MINT-6010: Fix github actions
Jul 4, 2022
0a9d048
MINT-6010: Fix github actions
Jul 4, 2022
ab5348e
MINT-6010: Fix github actions
Jul 4, 2022
ee0d705
MINT-6010: Fix github actions
Jul 4, 2022
5620b59
MINT-6010: Fix github actions
Jul 4, 2022
7c34d25
MINT-6010: Fix github actions
Jul 4, 2022
64dd70e
MINT-6010: Fix github actions
Jul 4, 2022
a43692c
MINT-6010: Fix github actions
Jul 4, 2022
ce8acf0
MINT-6010: Fix github actions
Jul 4, 2022
6bee542
MINT-6010: Fix github actions
Jul 4, 2022
be40086
MINT-6010: Fix github actions
Jul 4, 2022
faea2be
MINT-6010: Fix github actions
Jul 4, 2022
12929c3
MINT-6010: Fix github actions
Jul 4, 2022
a98a110
MINT-6010: Fix github actions
Jul 4, 2022
ae528ed
MINT-6010: Fix github actions
Jul 4, 2022
1d0c01c
MINT-6010: Fix github actions
Jul 4, 2022
4d3734f
MINT-6010: Fix github actions
Jul 4, 2022
4e43a03
MINT-6010: Fix github actions
Jul 4, 2022
9460620
MINT-6010: Fix github actions
Jul 4, 2022
8530ea3
MINT-6010: Fix github actions
Jul 4, 2022
a709bb7
MINT-6010: Fix github actions
Jul 4, 2022
22e0dbf
MINT-6010: Fix github actions
Jul 4, 2022
e069b2a
MINT-6010: Fix github actions
Jul 4, 2022
e0625a4
MINT-6010: Fix github actions
Jul 4, 2022
023f0a4
MINT-6010: Fix github actions
Jul 4, 2022
f228d3c
MINT-6010: Fix github actions
Jul 4, 2022
1427ec7
MINT-6010: Fix github actions
Jul 4, 2022
28c8017
MINT-6010: Fix github actions
Jul 4, 2022
9eb3a55
MINT-6010: Fix github actions
Jul 4, 2022
067199c
MINT-6010: Fix github actions
Jul 4, 2022
7d4adb3
MINT-6010: Fix github actions
Jul 4, 2022
758ce89
MINT-6010: Fix github actions
Jul 5, 2022
f019ebb
MINT-6010: Fix github actions
Jul 5, 2022
acab252
MINT-6010: Fix github actions
Jul 5, 2022
e532a12
MINT-6010: Fix github actions
Jul 5, 2022
5d09b21
MINT-6010: Fix github actions
Jul 5, 2022
e46b8ad
MINT-6010: Fix github actions
Jul 5, 2022
2a1a7cb
MINT-6010: Fix github actions
Jul 5, 2022
d21d7ca
MINT-6010: Clean up code
Jul 5, 2022
69358d4
Allow a duration of 0.
Aug 9, 2022
db728a8
MINT-6010: Clean up code
Aug 31, 2022
7480cf5
MINT-6010: Revert to older core bundle
Sep 1, 2022
51e01f6
MINT-6010: Test 1
Sep 1, 2022
9c81711
MINT-6010: Test 2
Sep 1, 2022
d9a59d7
MINT-6010: Test 3
Sep 1, 2022
5cecb04
MINT-6010: Test 4
Sep 1, 2022
1a1ea6e
MINT-6010: Test 5
Sep 1, 2022
b09f998
MINT-6010: Test 6
Sep 1, 2022
4a20159
MINT-6010: Remove unused code
Sep 1, 2022
55298a3
MINT-6010: Remove unused code
Sep 1, 2022
06c4788
MINT-6010: Revert code that breaks test
Sep 1, 2022
6caad12
MINT-6010: Remove commented code
Sep 2, 2022
24380fc
MINT-6010: Remove skipped test comment
Sep 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Workflow
on: [push]
jobs:
php_8_job:
runs-on: '${{ matrix.os }}'
container: ubuntu:latest
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.0']
include:
- os: ubuntu-18.04
SYMFONY_VERSION: 3.4.*
SYMFONY_PHPUNIT_VERSION: '9.5'

services:
rabbit:
image: pcloud/rabbitmq-stomp
options: --hostname rabbit
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest

steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl,soap,mongodb,apcu #optional
ini-values: "post_max_size=256M" #optional
- name: Check PHP Version
run: php -v
- run: sudo apt-get update
- run: sudo apt-get -y install iputils-ping
- name: Checking rabbitmq
run: ping rabbit -c 2
- run: sudo composer self-update
- run: sudo apt-get install -y libxml2-dev
- run: >-
composer require symfony/framework-bundle:${SYMFONY_VERSION}
--no-update
env:
SYMFONY_VERSION: '${{ matrix.SYMFONY_VERSION }}'
SYMFONY_PHPUNIT_VERSION: '${{ matrix.SYMFONY_PHPUNIT_VERSION }}'
- run: composer install --prefer-dist --no-interaction
- run: bin/simple-phpunit --coverage-text

php_7_job:
runs-on: '${{ matrix.os }}'
container: ubuntu:latest
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4']
include:
- os: ubuntu-18.04
SYMFONY_VERSION: 3.4.*
SYMFONY_PHPUNIT_VERSION: '9.5'

services:
rabbit:
image: pcloud/rabbitmq-stomp
options: --hostname rabbit
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest

steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl,soap,mongodb,apcu
ini-values: "post_max_size=256M"
- name: Check PHP Version
run: php -v
- run: sudo apt-get update
- run: sudo apt-get -y install iputils-ping
- name: Checking rabbitmq
run: ping rabbit -c 2
- run: sudo composer self-update
- run: sudo apt-get install -y libxml2-dev
- run: >-
composer require symfony/framework-bundle:${SYMFONY_VERSION}
--no-update
env:
SYMFONY_VERSION: '${{ matrix.SYMFONY_VERSION }}'
SYMFONY_PHPUNIT_VERSION: '${{ matrix.SYMFONY_PHPUNIT_VERSION }}'
- run: composer install --prefer-dist --no-interaction
- run: bin/simple-phpunit --coverage-text
8 changes: 8 additions & 0 deletions Core/Processors/Routing/ContentRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,12 @@ protected function onPostProcessEvent(ProcessEvent $event)
$condition = $event->getProcessingContext()->get(self::CONDITION_MATCHED);
$event->setEventDetails('Matched condition: '.$condition);
}

/**
* {@inheritdoc}
*/
public function getClauses(): array
{
return $this->clauses;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function process(ContainerBuilder $container)

foreach ($filters as $serviceName => $tags) {
$filtersRepoDef->addMethodCall('addDeferringFilter', [new Reference($serviceName)]);
$tags->setPublic(true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ public function process(ContainerBuilder $container)
}

$container->findDefinition('smartesb.util.expression_language')->addArgument(new Reference('cache.app'));
// $container->findDefinition('smartesb.util.expression_language')->setPublic(true);
}
}
8 changes: 8 additions & 0 deletions DependencyInjection/SmartboxIntegrationFrameworkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ private function loadQueueConsumers(ContainerBuilder $container)
$consumerDef->addMethodCall('setSmartesbHelper', [new Reference('smartesb.helper')]);
$consumerDef->addMethodCall('setEventDispatcher', [new Reference('event_dispatcher')]);
$consumerDef->addMethodCall('setSerializer', [new Reference('smartesb.serialization.queue.jms_serializer')]);
$consumerDef->setPublic(true);

$decodingExceptionHandlerId = $consumerConfig['decoding_exception_handler'];
if ($decodingExceptionHandlerId) {
Expand Down Expand Up @@ -268,6 +269,7 @@ protected function loadQueueDrivers(ContainerBuilder $container)
$driverDef->addMethodCall('setDescription', [$driverConfig['description']]);
$driverDef->addMethodCall('setUrlEncodeDestination', [$urlEncodeDestination]);
$driverDef->addMethodCall('setMessageFactory', [new Reference('smartesb.message_factory')]);
$driverDef->setPublic(true);

$queueDriverRegistry->addMethodCall('setDriver', [$driverName, new Reference($driverId)]);

Expand Down Expand Up @@ -297,6 +299,7 @@ protected function loadQueueDrivers(ContainerBuilder $container)
$driverDef->addMethodCall('setPrefetchCount', [$driverConfig['prefetch_count'] ?? AmqpQueueDriver::PREFETCH_COUNT]);
$driverDef->addMethodCall('setHeartbeat', [$driverConfig['heartbeat'] ?? AmqpQueueDriver::HEARTBEAT]);
$driverDef->addMethodCall('setMessageFactory', [new Reference('smartesb.message_factory')]);
$driverDef->setPublic(true);

$queueDriverRegistry->addMethodCall('setDriver', [$driverName, new Reference($driverId)]);

Expand Down Expand Up @@ -349,6 +352,7 @@ protected function loadNoSQLDrivers(ContainerBuilder $container)

$driverDef->addTag('kernel.event_listener', ['event' => KernelEvents::TERMINATE, 'method' => 'onKernelTerminate']);
$driverDef->addTag('kernel.event_listener', ['event' => ConsoleEvents::TERMINATE, 'method' => 'onConsoleTerminate']);
$driverDef->setPublic(true);

$container->setDefinition($driverId, $driverDef);

Expand Down Expand Up @@ -389,6 +393,7 @@ protected function loadHandlers(ContainerBuilder $container)
$handlerDef->addMethodCall('setRetryDelay', [$handlerConfig['retry_delay']]);
$handlerDef->addMethodCall('setRetryStrategy', [$handlerConfig['retry_strategy']]);
$handlerDef->addMethodCall('setRetryDelayFactor', [$handlerConfig['retry_delay_factor']]);
$handlerDef->setPublic(true);
if ('original' != $handlerConfig['retry_uri']) {
$handlerDef->addMethodCall('setRetryURI', [$handlerConfig['retry_uri']]);
} else {
Expand Down Expand Up @@ -487,6 +492,8 @@ public function enableLogging(ContainerBuilder $container)
'method' => 'onEvent',
]);

$def->setPublic(true);

$container->setDefinition(self::EVENTS_LOGGER_ID, $def);
}

Expand Down Expand Up @@ -532,6 +539,7 @@ public function load(array $configs, ContainerBuilder $container)

$queueProtocolDef = $container->getDefinition('smartesb.protocols.queue');
$queueProtocolDef->setArguments([$config['queues_default_persistence'], $config['queues_default_ttl']]);
$queueProtocolDef->setPublic(true);

$this->loadHandlers($container);
$this->loadConfigurableConsumers($container);
Expand Down
3 changes: 3 additions & 0 deletions Resources/config/events_deferring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ services:
- { name: container.hot_path }
arguments:
$container: '@service_container'
public: true

smartesb.handlers.events:
class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\DeferredEventsHandler
calls:
- [setId, ['smartesb.handlers.events']]
- [setEventDispatcher, ['@event_dispatcher']]
- [setFlowsVersion, ["%smartesb.flows_version%"]]
public: true

smartesb.registry.event_filters:
class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\EventFiltersRegistry
public: true
4 changes: 4 additions & 0 deletions Resources/config/producers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ services:
calls:
- [setId, ['smartesb.producer.direct']]
- [setItineraryResolver, ['@smartesb.itineray_resolver']]
public: true

smartesb.producers.json_file:
class: "%smartesb.producers.json_file.class%"
calls:
- [setId, ['smartesb.producers.json_file']]
- [setSerializer, ['@jms_serializer']]
public: true

# STOMP | AMQP
smartesb.producers.queue:
Expand All @@ -26,10 +28,12 @@ services:
- [setId, ['smartesb.producers.queue']]
- [setSerializer, ['@smartesb.serialization.queue.jms_serializer']]
- [setDriverRegistry, ['@smartesb.drivers.queue._registry']]
public: true

# NoSQL
smartesb.producers.service:
class: "%smartesb.producers.service.class%"
calls:
- [setId, ['smartesb.producers.service']]
- [setContainer, ['@service_container']]
public: true
11 changes: 11 additions & 0 deletions Resources/config/protocols.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,67 @@ services:
# Base
smartesb.protocols.base:
class: "%smartesb.protocols.base.class%"
public: true

# Direct
smartesb.protocols.direct:
class: "%smartesb.protocols.direct.class%"
calls:
- [setDefaultProducer, ['@smartesb.producer.direct']]
- [setDefaultHandler, ['@smartesb.handlers.sync']]
public: true

# JSON FILE
smartesb.protocols.json_file:
class: "%smartesb.protocols.json_file.class%"
calls:
- [setDefaultProducer, ['@smartesb.producers.json_file']]
public: true

# Queues
smartesb.protocols.service:
class: "%smartesb.protocols.service.class%"
calls:
- [setDefaultProducer, ['@smartesb.producers.service']]
- [setDefaultHandler, ['@smartesb.handlers.async']]
public: true

# Queues
smartesb.protocols.queue:
class: "%smartesb.protocols.queue.class%"
calls:
- [setDefaultProducer, ['@smartesb.producers.queue']]
- [setDefaultHandler, ['@smartesb.handlers.async']]
public: true

#NoSQL
smartesb.protocols.configurable.nosql:
class: "%smartesb.protocols.configurable.nosql.class%"
calls:
- [setDefaultHandler, ['@smartesb.handlers.async']]
public: true

smartesb.protocols.configurable.webservice:
class: "%smartesb.protocols.configurable.webservice.class%"
public: true

smartesb.protocols.configurable.rest:
class: "%smartesb.protocols.configurable.rest.class%"
public: true

smartesb.protocols.configurable.soap:
class: "%smartesb.protocols.configurable.soap.class%"
public: true

smartesb.protocols.configurable.dbal:
class: "%smartesb.protocols.configurable.dbal.class%"
calls:
- [setDefaultHandler, ['@smartesb.handlers.async']]
public: true

# Csv File
smartesb.protocols.configurable.csv_file:
class: "%smartesb.protocols.csv_file.class%"
calls:
- [setDefaultHandler, ['@smartesb.handlers.async']]
public: true
6 changes: 6 additions & 0 deletions Resources/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
- "%smartesb.router.itineraries.options%"
tags:
- { name: monolog.logger, channel: "router.itineraries" }
public: true

smartesb.router.endpoints:
class: "%smartesb.internal_router.class%"
Expand All @@ -50,27 +51,32 @@ services:
- "%smartesb.router.endpoints.options%"
tags:
- { name: monolog.logger, channel: "router.endpoints" }
public: true

smartesb.router.itineraries.cache_warmer:
class: Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer
arguments:
- '@smartesb.router.itineraries'
tags:
- { name: "kernel.cache_warmer" }
public: true

smartesb.router.endpoints.cache_warmer:
class: Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer
arguments:
- '@smartesb.router.endpoints'
tags:
- { name: "kernel.cache_warmer" }
public: true

smartesb.map.itineraries:
class: "%smartesb.map.itineraries.class%"
public: true

smartesb.routing.itineraries_routes_loader:
class: Smartbox\Integration\FrameworkBundle\Configurability\Routing\ItinerariesRoutesLoader
calls:
- [ setContainer, [ '@service_container' ] ]
tags:
- { name: routing.loader }
public: true
Loading