Calling JSONPath::data() is deprecated, please use JSONPath::getData() instead

Created on 26 January 2022, over 2 years ago
Updated 25 January 2023, over 1 year ago

Problem/Motivation

Getting warning Calling JSONPath::data() is deprecated, please use JSONPath::getData() instead on import after switch to use https://github.com/SoftCreatR/JSONPath

Proposed resolution

Use getData() on following

/**
 * Wraps the Flow JSONPath implementation.
 */
class FeedsExJsonPathParserFlow implements FeedsExJsonPathParserInterface {

  /**
   * {@inheritdoc}
   */
  public function search(array $data, $expression) {
    // Use class string so that PHP 5.2 doesn't complain.
    $class = 'Flow\JSONPath\JSONPath';
    $json_path = new $class($data);

    return $json_path->find($expression)->data();
  }

}

API changes

Data model changes

πŸ› Bug report
Status

Postponed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States xlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡ͺEstonia tormi Tallinn

    This is not a deprecation warning anymore, it's broken with softcreatr/jsonpath: Error: Call to undefined method Flow\JSONPath\JSONPath::data() in FeedsExJsonPathParserFlow->search().

Production build 0.69.0 2024