timber/starter-theme

Can't install timber-starter-theme 2.0; 1.2 is installed instead

baglio opened this issue · 4 comments

Upon executing composer create-project upstatement/timber-starter-theme --no-dev I'm presented with the following errors:

Creating a "upstatement/timber-starter-theme" project at "./timber-starter-theme"
Installing upstatement/timber-starter-theme (1.2)
  - Installing upstatement/timber-starter-theme (1.2): Extracting archive
Created project in /Users/User/Local Sites/timber-v2/app/public/wp-content/themes/timber-starter-theme
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 5.7.16 requires php ^5.6 || ^7.0 -> your php version (8.3.0) does not satisfy that requirement.
    - phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.3.0) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit 5.7.16|6.* -> satisfiable by phpunit/phpunit[5.7.16, 6.0.0, ..., 6.5.14].

Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

I'm trying to install the v2.0 starter theme in a fresh Worpdress installation. It seems that composer still uses v.1.* of Timber instead of the newer 2.0.

I got stuck here for a while, I ended up removing phpunit from my package.json just to get the site to display

Yes, v2 is not released yet.
Try

composer create-project --no-dev upstatement/timber-starter-theme:2.x-dev

Yes, v2 is not released yet. Try

composer create-project --no-dev upstatement/timber-starter-theme:2.x-dev

I see, thanks.
I thought it was the default now since the Wordpress plugin does warn to switch to the Composer version and also the documentation for Twig defaults to V2. Furthermore I've done nothing but following the documentation for V2 which states that in order to install the Starter Theme I have to run: composer create-project upstatement/timber-starter-theme --no-dev .

Sorry, we missed that on our part. A new release is published in https://github.com/timber/starter-theme/releases/tag/2.0.0. The composer create-project command should work fine now.