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
Composer implementation for dependencies and autoload #1912
Conversation
Interesting aspect about testing — can you build using PHP 5.3+ on Travis, but test using PHP 5.2? |
Tests working, except coding style, see https://travis-ci.org/Yoast/wordpress-seo/jobs/47506113 Outstanding issues with that:
Exclude vendor from checks altogether? Everything except vendor/yoast ? |
I'd exclude vendor indeed. |
Oookay, Composer all working and tests all green, including coding style and PHP 5.2 Next — writing up docs (where is good place for it?), getting team up to speed, and updating build process (which is what?). It would be helpful if team started to try out intermediary install instructions above and enumerated what doesn't work smoothly and/or needs explaining. |
The wiki seems like a logical place for instructions and such and possibly for the documentation as well ? |
@@ -2791,192 +2791,195 @@ protected function clean_option( $option_value, $current_version = null, $all_ol | |||
/******************************************************************* | |||
* Option: wpseo_ms | |||
*******************************************************************/ | |||
if ( is_multisite() ) { |
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 this conditional is removed, the WPSEO_Options
constructor will need to be adjusted as it now checks for whether the class exists before creating/loading that option which would no longer be a valid test once you remove this.
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.
I've moved the check to the _MS class' constructor (after checking in w/ @jdevalk if that makes sense in architecture). It will be instanced, but won't run logic unless in multisite context.
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.
@Rarst I'd have to look in detail, but I suspect that will still make some things go wrong as in the WPSEO_Options
class, the available instances are used for certain actions and that logic relies on the _ms option not being instantiated (when not on multisite).
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.
Hmm ok, @Rarst can you look at that specific bit? :)
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.
I stared at it and need a little more specific pointer towards part that might be going wrong. :)
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.
I don't have the time at the moment to look at it and argue it in detail. The short of it is that your are changing the expected behaviour of the object without cause.
I suggest you either change the conditional in the WPSEO_Options
class as I suggested before or add the conditional to the get_instance()
method of the _ms class instead of the constructor. That way the behaviour doesn't change (instance will be null rather than a nearly empty object).
The constructor of the WPSEO_Options
class needs to change either way as the whole class_exists()
doesn't make sense anymore with all option classes always being available.
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.
Added skip for MS only instances in Options constructor in 0decfde
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.
@Rarst Thanks. Oh... the class_exists()
can go now and the else
should also apply to the code you've now added.
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.
I misunderstood else (thought it's cleaning up instances, not pruning input list). Adjusted in https://github.com/Rarst/wordpress-seo/commit/797d6039205b062cfd30efeb7b422be7b45333a2
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.
No worries, looks all good now ;-) Thanks for bearing with me on this.
I agree with @jrfnl on the wiki being the spot. @omarreiss could you see whether you can get it to work already based on the input by @Rarst in this pull? |
I think this is now in good shape to merge into trunk and start testing out in that context (so that going through my fork step isn't required). Although I would hold on that if anyone has unresolved implementation and/or workflow questions? |
"license": "GPL-2.0+", | ||
"authors": [ | ||
{ | ||
"name": "Joost de Valk", |
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.
This needs to be Team Yoast :)
One last minor comment and then I'm all for it. @omarreiss any feedback? |
Nothing much, maybe drop a line in the Readme about local (development) setup? What steps do I need to take to get the plugin running from source? |
I'll update readme in a bit (need to eat :) ). The draft of instructions for common procedures (I could think of right away) is already up in in the wiki, ask if anything. |
@Rarst Nice Wiki article! I had somehow missed that. I guess it would be more than enough to drop a reference to that article in the readme. |
Readme updated, workflow possibilities ironed out some in the issue. |
Anything lingering that needs to happen for merge? :) |
I don't think I'll have time to play with this (test it) before I'll be travelling again, so go for it. I just won't be able to run any more tests or send in PRs between when this is merged and when I'll have the time to get things working in two months time. |
Composer implementation for dependencies and autoload
Merged :D |
See #1890
Intermediary instructions to install for testing (this will be down to single
create-project
in the end):git clone https://github.com/Rarst/wordpress-seo --branch composer cd wordpress-seo composer install --no-dev