Skip to content

'Creating Data Sources' has some deprecated code. #72

Open
@housni

Description

@housni

I was creating a plugin so that I can communicate with a legacy API so I was reading up on Creating Data Sources.
It talks about using item() but it seems like the use of item() is deprecated.

This was brought to my attention by Mehdi (mehlah?) in this post at StackOverflow: Overriding data\Source::read() and using item() gives me incorrect results

Also, I ran into an error using the code from doc. For dependency injection, it defines service, entity and set for $_classes. However, I believe we also need to add 'schema' => 'lithium\data\DocumentSchema' because without that, I get the following error:

Fatal error: Uncaught exception 'lithium\core\ClassNotFoundException' with message 'Class `schema` of type `` not found.' in /var/www/lithium/clean/libraries/lithium/core/Libraries.php on line 693

lithium\core\ClassNotFoundException: Class `schema` of type `` not found. in /var/www/lithium/clean/libraries/lithium/core/Libraries.php on line 693

Thanks guys, I love this framework so much that I voluntarily break rest just so that I can mess around with it :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions