-
Notifications
You must be signed in to change notification settings - Fork 915
Composer roadmap #1890
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
Comments
@Rarst While from a developer's point of view, your intentions are understandable and good practice, let's not forget the reality. The reality is that this is a WP plugin. My estimate is that 99% of WP users have never even heard of composer and that 99.9% have never used it. The most common way to install WP plugins is via the standard WP plugin install mechanism. The way the plugin is now set up with submodules, autoload working the way it does etc works in 100% of the cases for the normal WP plugin installs. Do we really want to spend effort on something which might be used by 0.1% of the users - if at all ? I'd suggest your time and effort is better placed in trying to get WP to up the mimimum requirement to PHP5.4 (or even better: 5.5) and to open up the discussion there of replacing the plugin install mechanism with a composer based system. Anyways, that's my two pennies... |
@jrfnl I think you misunderstand the purpose of Composer autoloading and how this gets deployed to the wordpress.org plugin repository. Composer autoloading generates files that can be included to add autoloading to your project. Developers of this project just need to include the Composer generated autoloading files to the package that can be downloaded (or updated) via the plugin repository. The end user doesn't even need to know Composer is there, let alone be able to use it. |
This will not in any way compromise the regular distribution and install channel. It wasn't even remotely considered. :) This is development experience improvement, nothing changes or get sacrificed for the users. I wouldn't push for any change that would come with regression. The point is to improve.
My time and effort are perfectly placed here, since this is paid work for Yoast. :) |
@Rarst Point taken. @coenjacobs I probably do. So far my experiences with Composer have been limited as I quit trying after abysmal experiences with it on Windows. I have taken note of the notion that Windows support has improved over the last six months, but am very wary and sceptical after having been bitten before. That taken together with the x times duplicate code being littered all over the place, which still doesn't make any sense to me and the amount of config it takes to avoid that, gives me very little motivation to spend any time on giving it another try. |
Interesting point, since I am pretty much exclusively Windows user locally and hadn't had major issues in about two years of using it. I will do my best on smooth and well documented experience here. :) You are welcome to contact me if you need any pointers in this context or about Composer in general. |
@Rarst I appreciate the offer and might take you up on it when I have some time to have another look at it. Thanks. |
Looked into how |
Stalled on decision about retaining submodules to start on an implementing branch. In my opinion they should go, but that's from where I stand. cc @jdevalk |
Let's ditch 'em, but the team will need a proper explanation on how to do a new checkout :-) |
Of course. :) Once I have working branch, I'll write up the documentation and work with everyone who needs it on the new process. |
👍 |
First draft of documentation is up: Using Composer |
@Rarst I had a quick look a the documentation. Just checking if I understand correctly: does this mean that each time you do a git checkout or switch branch, you need to run a command line command as well to verify the dependencies are still correct ? |
@jrfnl That's correct. |
Good thing there are post-checkout hooks in Git ;-) — If this email contains typo’s and is short, it might be sent from my mobile device. If it’s long that might still be true in which case I truly like you. On Thu, Jan 22, 2015 at 7:43 AM, Coen Jacobs notifications@github.com
|
Yes, the state is now managed via Composer and captured in
|
@jrfnl what is your editor of choice? Modern PHP editors/IDEs (I use PhpStorm) tend to have Composer support by now (so you can do Composer things without leaving editor / going to command line). |
@jrfnl here is how you can set it up in ConText, as a suggestion:
Then opening any |
@Rarst Wow! I appreciate you looking into this. All the same, a git hook makes more sense to me as having it coupled to Git would mean I don't have to think about it at all (except for copying the git hook in when first cloning a repo, but then again, I could just set it up as a default hook and don't even have to worry about that anymore). @Rarst @jdevalk glad to hear there are more devs who don't abhor Windows ;-) |
I will look into Git hook approach too, but from quick search it seems that hooks aren't really “shared” via repository, so everyone could as well set it up in a way convenient to their tools of choice for starters. |
@Rarst What do you mean by |
@Rarst There's quite some interesting examples floating around actually if you search Git/gists for Edit: this script is what I based my pre-commit php lint hook on: https://gist.github.com/manchuck/6538826 |
I was getting at that it's more of a local setup step, than something we can bolt into the project itself (as I understand). Keep coming up on Bash specific examples of hooks, so not yet sure about Windows–friendliness of getting this working (I prefer vanilla cmd historically, your link is PowerShell, which I hadn't used much). |
I have tested the hook from this gist's comments (not the gist itself) and it works nicely for automated @jrfnl if you could please try this one out on my fork with |
@Rarst Will try but might be a little while as I haven't got composer set up at all yet |
They got super easy peasy installer for Win by now: https://getcomposer.org/Composer-Setup.exe |
Aaand all merged! I'll run it some through PHP 5.2 and stuff locally. What's the current release process and who do I need to work with to get that updated? Anyone has outstanding issues with moving to Composer process in general? |
I currently get this:
When I merge trunk into my pull #1923 |
Version thing fixed with |
Upstream issue, Composer change broke PHP 5.2 autoload generator with worst possible timing :( See Issue #6 |
Workaround: composer selfupdate 1.0.0-alpha9 and change to |
That works. As for build, I'll share our current release script with you and discuss. |
Short of deploy, for which there is working update to current process, we are good here. Composer all the things! :) |
Hi! I am your resident Composer menace.
I am working to make WP SEO have awesome Composer support. Because Composer is what keeps developers happy and managing dependencies reliable (audience cheers).
As well as hopefully simplifying development and build processes away from Git Submodules (audience moans).
The current state
composer.json
in main plugin, but broken due to submodule useDecision points
Is it time for submodules to go?
Should the submodules be retained in parallel? Or should Composer become main and preferable mechanism with submodule structure deprecated?
How will we handle autoload?
The tricky part is to enable end result to work seamlessly with PHP 5.2 (audience moans).
While you can use Composer to build for PHP 5.2 target without issue, its autoload is inherently 5.3.
From my research so far I see two approaches:
There might be more options to explore here as well.
Progress
Relevant pull requests
The text was updated successfully, but these errors were encountered: