wp-hooks / generator

Generates a JSON representation of the WordPress actions and filters in your code
https://packagist.org/packages/wp-hooks/generator
78 stars 6 forks source link

Update dependences versions #4

Closed Mte90 closed 2 years ago

Mte90 commented 3 years ago

As now install this create conflicts with Psalm as example because of php-parser package.

Maybe they are old (2 years~) in the composer.json and just need a bump.

johnbillion commented 3 years ago

What's the Composer error message please?

Mte90 commented 3 years ago

The issue is the php-parser library that this project require the 1.0 release. The issue is on https://github.com/johnbillion/wp-parser-lib/blob/master/composer.json#L24 that is at 3 but latest is 5. That library in that version uses php-parser at 1 as it was released in 2016 https://github.com/phpDocumentor/Reflection/releases/tag/3.0.1

kkmuffme commented 2 years ago

@johnbillion can't install this due to old dependencies. Error:

phpdocumentor/reflection[3.0.0, ..., 3.0.1] require nikic/php-parser ^1.0 -> found nikic/php-parser[v1.0.0, ..., v1.4.1] but the package is fixed to v4.13.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

(which is installed bc I use php-stubs/generator too, which uses a newer version of nikic/php-parser)

It's bc https://github.com/johnbillion/wp-hooks-generator/blob/master/composer.json uses https://github.com/johnbillion/wp-parser-lib/blob/master/composer.json which is locked to:

"phpdocumentor/reflection" : "~3.0",

(as its underlying source https://github.com/WordPress/phpdoc-parser/blob/master/composer.json is)

but latest version is https://github.com/phpDocumentor/Reflection 5.1.0

See also: https://github.com/WordPress/phpdoc-parser/issues/228

johnbillion commented 2 years ago

I somehow messed this up. I shouldn't be messing with nested Composer dependencies at 11PM.

johnbillion commented 2 years ago

I mistakenly thought the phpDocumentor 5 API was compatible with 3, but it's actually only 4 and 5 that are compatible. I'm going to close this off because it requires refactoring the doc block processing in WP Parser Lib, and that code is just an extraction of the code in WP Parser and the issue has been reported there: https://github.com/WordPress/phpdoc-parser/issues/228.