Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1678

[bc fix] Simplify "kEvent" class constructor

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Scheduled
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.3.0-B1
    • Fix Version/s: 5.3.0
    • Component/s: Optimization
    • Labels:
      None
    • Change Log Group:
      Deprecated
    • Change Log Message:
      Deprecated "$params" and "$specific_params" of "kApplication::HandleEvent" method.
    • Story Points:
      1
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      1. in "kApplication::HandleEvent" method:
        • add "$params" and "$specific_params" parameters back, but add "array" type hint to them
        • when "$params" parameter is an array, then
          • use "kUtil::deprecateParameter" method to trigger notice about usage of $params/$specific_params parameters
          • use "kEvent::fromArray" method to create event, that will replace "$event" parameter value
      2. extract logic, that transforms "$params" array into string from public static "kEvent::fromArray" into protected static "kEvent::arrayToString" method
      3. in "kEvent::__construct" method, when "$event_string" argument turns out to be an array:
        • use "kUtil::deprecateParameter" method to trigger notice about usage of $params parameter
        • use "kEvent::arrayToString" to transform "$event_string" parameter value

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: