9 Commits (0db8bbfda3481335b42523616407263bc1bf6ff6)

Author SHA1 Message Date
nevvermind 681043355f Update test fixtures + fix test 9 years ago
nevvermind 58ded13eb9 Fix tests breaking on a api version bump
Make generic plugins work with many API versions as opposed to just 1.0.0.
9 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
Nils Adermann f249fd804f Correctly require composer plugin api version in test plugins 11 years ago
Nils Adermann b9c5758670 Make composer/io part of the activate plugin API rather than constructor args 11 years ago
Nils Adermann 69a028f368 Fix plugin interface usage in tests 11 years ago
Nils Adermann 2f43e9aefb Load installed plugins at appropriate time and adapt tests accordingly 11 years ago
Nils Adermann 3e41977be7 Plugin tests are no longer strictly installer tests 11 years ago