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

Approach for posts relationships implementation #112

Closed
Rarst opened this issue Jun 1, 2014 · 1 comment · Fixed by #116
Closed

Approach for posts relationships implementation #112

Rarst opened this issue Jun 1, 2014 · 1 comment · Fixed by #116

Comments

@Rarst
Copy link
Contributor

Rarst commented Jun 1, 2014

So we got ok from dot org about using Posts2Posts there, and there are quite a few open parser issues on data side that simply don't come together without relationships.

Immediate implementation questions is which do we do:

  1. Treat Posts2Posts as Composer library and require it in Parser. I had recently looked up the state of Composer integration there and helped with finishing it up. There are, however, no projects using it as Composer library and many (any?) using it as library at all (although in principle it should work).
  2. Assume (enforce?) Posts2Posts around and enabled as a plugin. Probably less implementation headache but need to decide do we make this hard codified requirement or want some "compat" mode in which Parser will skip related data creation without it available.

Discuss.

@scribu
Copy link

scribu commented Jun 1, 2014

There are several themes that use P2P as a library. They used manual loading (example) because they needed to be compatible with PHP 5.2.

pdclark added a commit to pdclark/WP-Parser that referenced this issue Jun 30, 2014
minimum-stability set to "dev" because posts-to-posts requires scribu/scb-framework as dev-master. Dependency fails to load if parent project is not set to allow development branches.

Repository for posts-to-posts added manually because composer doesn't find it on its own.

Path for posts-to-posts manually set because type "wordpress-plugin" causes it to be installed in a wp-content directory created within this plugin directory.

Fixes WordPress#112
pdclark added a commit to pdclark/WP-Parser that referenced this issue Jun 30, 2014
* Requires posts-to-posts vendor library if not loaded as a plugin.
* Registers post relationships
* Extends import to create relationships between plugins.

To-do:

* Connect functions to methods and hooks: "uses" arrays don't appear to be populating for either of these
* Connect Methods to methods and hooks
* Clear wp_p2p and wp_p2p_meta tables of previously imported relationships before running import. For now, the tables should be manually cleared.

Fixes WordPress#112
@smckeown smckeown added the DevHub label Sep 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants