johnpbloch / wordpress-core

Other
169 stars 40 forks source link

some themes missing from wp-content when installed with composer #5

Closed modelm closed 7 years ago

modelm commented 7 years ago

Hello, I noticed there are some themes which previously lived in wp-content and are no longer there in the latest version. I see all the twenty* theme directories on github but when I install with composer I only get twentyfifteen and up:

$ ls -l web/wp/wp-content/themes/
total 16
-rw-r--r-- 1 ubuntu adm   28 May 16 18:48 index.php
drwxr-xr-x 6 ubuntu adm 4096 May 16 18:48 twentyfifteen/
drwxr-xr-x 5 ubuntu adm 4096 May 16 18:48 twentyseventeen/
drwxr-xr-x 7 ubuntu adm 4096 May 16 18:48 twentysixteen/

Did I do something wrong, or what happened?

We had been using 4.7.3 and upgraded to 4.7.5. I normally do this by composer remove the old package and then composer require the new one. This time for the first time I got an error Two packages cannot share the same directory! which I solved after some googling by running composer install once after removing, then again after requiring. I'm not sure if that's related.

Here is the wordpress require line in our composer.json: https://github.com/mlaa/commons/blob/master/composer.json#L274

johnpbloch commented 7 years ago

The script that generates the releases changed to use the official release zips from wordpress.org. That change was made to ensure the package would pass checksum verifications. If there are any twenty* themes that you depend on (including fifteen+) I would advise adding those as dependencies in your composer manifest:

composer require wpackagist-theme/twentyfourteen

The primary reason to use composer to manage your WordPress application is to be explicit about your dependencies. If you rely on a package, that's a dependency that should be explicitly defined in your composer.json. Themes and plugins that ship with WordPress are undeclared dependencies.

modelm commented 7 years ago

Agreed. We now require all twenty* themes with composer in addition to the wordpress core package. Still the removal of bundled themes was a surprise, though I'm not sure by what means I want to be alerted when that type of thing happens. I guess this is a rare enough case and it's already handled by requiring explicitly instead of relying on the bundled themes. Thanks for the response.

modelm commented 7 years ago

I do have one more question - why is the code on github different than what I get when I run composer install? If the themes had also been removed on github I might have saved a little time troubleshooting.