Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF3.4 compatibility #113

Merged
merged 15 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ before_script:
- composer install --no-interaction

script:
- SYMFONY_PHPUNIT_VERSION=6.5 SYMFONY_DEPRECATIONS_HELPER=312 bin/simple-phpunit --coverage-text # TODO: Fix deprecations
- SYMFONY_PHPUNIT_VERSION=6.5 SYMFONY_DEPRECATIONS_HELPER=417 bin/simple-phpunit --coverage-text # TODO: Fix deprecations

notifications:
email:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class ExpressionLanguageCachePass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container)
{
// Last line (the reference to cache.app) triggers a "Constructing service "monolog.logger.cache" from a parent definition is not supported at build time."
// By bypassing this pass the container builds, but expression language throws a deprecation notice about not passing a cache interface in the constructor
return;
campru marked this conversation as resolved.
Show resolved Hide resolved

foreach (static::NEEDED_SERVICES as $id) {
if (!$container->has($id)) {
return;
Expand Down
14 changes: 9 additions & 5 deletions Resources/config/events_deferring.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
parameters:
smartesb.handlers.events_deferring.class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\DeferredEventsHandler
event_dispatcher.class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\EventDispatcher

services:
# This effectively overrides Symfony's dispatcher. Tag is there to emulate what Symfony 3.4 does with its own disptacher.
event_dispatcher:
campru marked this conversation as resolved.
Show resolved Hide resolved
class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\EventDispatcher
tags:
- { name: container.hot_path }
arguments:
$container: '@service_container'

smartesb.handlers.events:
class: "%smartesb.handlers.events_deferring.class%"
class: Smartbox\Integration\FrameworkBundle\Tools\EventsDeferring\DeferredEventsHandler
calls:
- [setId, ['smartesb.handlers.events']]
- [setEventDispatcher, ['@event_dispatcher']]
campru marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion Tools/EventsDeferring/EventMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EventMessage extends Message
const HEADER_EVENT_NAME = 'event_name';

/**
* @Assert\Valid(traverse=true, deep=true)
* @Assert\Valid()
* @JMS\Type("Smartbox\Integration\FrameworkBundle\Events\Event")
* @JMS\Groups({"logs"})
* @JMS\Expose
Expand Down