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

PluginProperties: Add support for Requires Plugins header #41

Closed tfrommen closed 5 months ago

tfrommen commented 6 months ago

Please check if the PR fulfills these requirements

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

This PR adds support for the new Requires Plugins header.

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

Plugin dependencies declared in a plugin's headers are not available.

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

The PluginProperties class exposes any plugin dependencies declared in a plugin's headers via the new requiresPlugins method.

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

In terms of Modularity itself, no. However, if someone extended the PluginProperties class and declared a custom method requiresPlugins, PHP will complain if the signature is not the same.

Other information:

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.87%. Comparing base (df169cb) to head (4de0417).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #41 +/- ## ========================================= Coverage 98.86% 98.87% - Complexity 189 192 +3 ========================================= Files 9 9 Lines 528 531 +3 ========================================= + Hits 522 525 +3 Misses 6 6 ``` | [Flag](https://app.codecov.io/gh/inpsyde/modularity/pull/41/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/inpsyde/modularity/pull/41/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde) | `98.87% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=inpsyde#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.