-
Notifications
You must be signed in to change notification settings - Fork 78
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
P2p relationships #137
P2p relationships #137
Conversation
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
* 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
… on and caches are cleared.
Instead of requiring only dev for all packages only specify it for p2p. Instead of including posts to posts with the UI we only include the core.
- Add a method call reflector to reflect a method call. - Put the used methods in the exported phpdoc. - Put the used methods in functions as a functions_to_methods relationship.
- Add methods_to_functions because it should be unique from functions_to_methods. - Chang references to self and $this to the correct classname - Put the things a method uses into the database as a p2p relationship
GitHub says merge conflict FYI. Might be conflicting with that bit of wp-cli decoupling. Just FYI, I'll look at it and hammer it in, just not right now. :) Thank you! |
The conflict is probably due to atimmer@46310ff |
Ok, I made a fair attempt to merge manually and got scary unholy conflict across four files. :( Could you please resolve this on your side? |
@@ -595,7 +595,7 @@ public function import_item( array $data, $parent_post_id = 0, $import_internal | |||
* @param int $ID Optional; post ID of the inserted or updated item. | |||
* @param array $data Data | |||
*/ | |||
do_action( 'wp_parser_import_item', $ID, $data ); | |||
do_action( 'wp_parser_import_item', $ID, $data, $post_data ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're going to add a parameter to the hook, you should also update the hook docs.
Conflicts: lib/class-command.php lib/class-file-reflector.php lib/class-method-call-reflector.php lib/runner.php
Getting DB errors on import:
Is there any setup procedure to follow for tables? |
You probably need to deactivate and activate wp-parser. It will create the missing tables. I think we should try to create the tables when starting to parse as well, do you agree? |
Cycling plugin on off got it. Yeah, the quick check before import won't hurt. |
Check added in 4168422 |
Adds relationships to the parser, I want to improve the quality of the code because now there is a stack of 4
foreach
calls. But the code is ready to be tested.Reference #79, #112