inpsyde / modularity

A PSR-11 implementation for WordPress Plugins, Themes or Libraries.
https://inpsyde.github.io/modularity/
GNU General Public License v2.0
44 stars 4 forks source link

Make sure "name" is generated for LibraryProperties #18

Closed gmazzap closed 2 years ago

gmazzap commented 2 years ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature.

What is the current behavior? (You can also link to an open issue here)

A library that does not define a extra.modularity.name property has an empty LibraryProperties::name().

What is the new behavior (if this is a feature change)?

In the case a library does not define a extra.modularity.name property, a name is calculated based on the Composer package name.

As an example, a library with a Composer name inpsyde/foo-bar-baz woudl have an auto-generated name Inpsyde Foo Bar Baz.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No.

Other information:

QA is failing due to a deprecated Psalm configuration which I did not want to address in this PR being unrelated.