6 Commits (main)

Author SHA1 Message Date
Jordi Boggiano 3fc9ede24b
Add plugin callbacks for deactivation and uninstall, fixes #3000 5 years ago
Jordi Boggiano 090295dbcb Adjust the CommandProvider to use plugin capabilities and test actual command creation, refs #3377 8 years ago
Jordi Boggiano a9df4acd7d Merge remote-tracking branch 'jderusse/plugin-with-commands' 8 years ago
nevvermind 3032f0a538 Refactor based on code review
- Move the version api getter to the PluginManager And make it such that it can be mocked, but not pollute the public interface. That means "protected" visibility.
- The plugin api version constant should still be used throughout the code.
- Use different fixtures class names
- Use regex possessive quantifiers for performance
- Use full words for readability
9 years ago
nevvermind eb2aa14830 Make plugins have actual constraints instead of fixed versions
Instead of developing plugins against a single, fixed Plugin API version - `"composer-plugin-api": "1.0.0"`, this change will allow plugin developers to use versions like `"composer-plugin-api": "~1.1"` or `"composer-plugin-api": ">=2.1 <3.0"`, aka actual Composer-compatible constraints.

Only the "1.0", "1.0.0" and "1.0.0" Plugin API versions will be regarded as BC versions, and internally converted to "^1.0"; every other declared version string will be kept as it is.

Because of this new constraint flexibility, plugin version mismatches will be skipped, which means those plugin will NOT be registered to the system. Previously, a mismatch triggered a warning, but plugins were still registered.
9 years ago
Jérémy Derussé 86e0b847be Allow plugins to register commands 9 years ago