spatie / typescript-transformer

Transform PHP types to TypeScript
https://docs.spatie.be/typescript-transformer/v2/introduction/
MIT License
275 stars 35 forks source link

No default/clean install possible due to PHP-parser version conflict #75

Closed bmellink closed 8 months ago

bmellink commented 8 months ago

install command on a new Laravel project:

composer require spatie/laravel-typescript-transformer

Generates this issue:

Problem 1
- spatie/typescript-transformer[2.1.13, ..., 2.2.2] require nikic/php-parser ^4.13 -> found nikic/php-parser[v4.13.0, ..., v4.18.0] but the package is fixed to v5.0.0 (lock file version) by a partial update and that version does not match.
- spatie/laravel-typescript-transformer[2.3.0, ..., 2.3.2] require spatie/typescript-transformer ^2.1.13 -> satisfiable by spatie/typescript-transformer[2.1.13, ..., 2.2.2].

Temporary workaround is to first install an older php-parser version by adding this to your require section of composer.json: "nikic/php-parser": "^4.1"

rubenvanassche commented 8 months ago

Fixed