Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Deprecation fixes #80

Closed
wants to merge 3 commits into from

Conversation

RickJelier
Copy link
Contributor

@RickJelier RickJelier commented Jun 24, 2019

Description

This PR fixes a couple of deprecation notices that I experienced with Symfony 4.3.*
I have tested the changes with the demo project, I guess unittests are not needed because there were no functional changes.

  1. Changed the argument for twig function controller to suit the new format in following twig template:
  • layout/default-layout.html.twig
  1. Changed the "filter" tag to "apply" tag in following twig templates:
  • Breadcrumb/knp-breadcrumb.html.twig
  • layout/default-layout.html.twig
  • layout/form-theme-base.html.twig
  • layout/form-theme-horizontal.html.twig
  1. Changed the use statements of the following classes:
  • Symfony\Component\EventDispatcher\Event to Symfony\Contracts\EventDispatcher\Event
  • Symfony\Component\EventDispatcher\EventDispatcherInterface to Symfony\Contracts\EventDispatcher\EventDispatcherInterface
  1. Changed the triggerMethod in class EmitterController so that the parameters are in the same order as EventDispatcherInterface::dispatch

  2. Changed the call to triggerMethod to have the right arguments in the following file :

  • Controller/NavbarController.php
  1. Change the call to EventDispatcherInterface::dispatch to have the right arguments in the following files:
  • Controller/BreadcrumbController.php
  • Controller/EmitterController.php
  • Controller/NavbarController.php
  • Controller/SidebarController.php

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I updated the documentation (see here)
  • I agree that this code is used in AdminLTEBundle and will be published under the MIT license

@kevinpapst
Copy link
Owner

Thanks! 👍

Fun fact: I was the one causing the new apply filter to appear in Twig (see #56).

But: many of your changes are hard BC breaks. I would have fixed them already if easily possible, but I am not sure if we should fix them before 5.0. At least not without bumping to a new major version...

@RickJelier
Copy link
Contributor Author

I see. So maybe only apply the changes that don't have a major impact and hold off with the rest until 5.0 hits

@kevinpapst
Copy link
Owner

I am fine with releasing a new major version of this bundle, which fixes all the deprecations.

BUT: you need to bump the packages in composer.json to the appropriate version.

@kevinpapst
Copy link
Owner

Are you still interested in working on the PR?

@kevinpapst
Copy link
Owner

Hi @RickJelier !
I incorporated your changes into a new PR #89
If you want, you could try it with your application and see if it produces errors.
The demo app doesn't need any changes, but I'd like to get some feedback from real world users as well.

@kevinpapst
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants