1
0
Fork 0
Commit Graph

37 Commits (49a6c56a7ccc1d3648dfeb8b3b6f3070509fea55)

Author SHA1 Message Date
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 2018-04-12 10:24:56 +02:00
Jordi Boggiano 122e422682 CS fixes 2017-03-08 15:16:44 +01:00
Michele Locati 097003b5bb
Add test case for strict types declaration 2016-06-01 10:00:37 +02:00
Jordi Boggiano b9bd021516 Fix test suite on <7 2016-04-28 21:19:26 +01:00
Jordi Boggiano ba909d8795 Avoid duplicate commands, and pass plugin to ctor args for capabilities, refs #3377 2016-04-28 21:12:26 +01:00
Jordi Boggiano 090295dbcb Adjust the CommandProvider to use plugin capabilities and test actual command creation, refs #3377 2016-04-28 20:37:54 +01:00
Jordi Boggiano a9df4acd7d Merge remote-tracking branch 'jderusse/plugin-with-commands' 2016-04-28 20:11:33 +01:00
Jordi Boggiano 1818b95149 CS fixes 2016-01-26 13:07:18 +00:00
Jordi Boggiano 783e0aec8a Merge remote-tracking branch 'alcohol/unique-test-directories' 2016-01-26 12:35:29 +00:00
Rob Bast adf3b956d0 try to use unique test directories
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
2016-01-26 09:41:21 +01:00
Jordi Boggiano 837fa805ec Code tweaks, refs #4124 2016-01-22 19:09:44 +00:00
nevvermind aa45a48283 Refactoring
- changed "SPI" into something more familiar, like "implementation"
- throw exceptions on invalid implementation types or invalid class names
- use null instead of false when querying
- refactored the tests accordingly
2016-01-22 13:51:32 +00:00
nevvermind 681043355f Update test fixtures + fix test 2016-01-22 13:51:32 +00:00
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.
2016-01-22 13:51:32 +00:00
nevvermind 2051d74774 Added Capable plugins for a more future-proof Plugin API
Plugins can now present their capabilities to the PluginManager, through which it can act accordingly, thus making Plugin API more flexible, BC-friendly and decoupled.
2016-01-22 13:51:32 +00:00
Jordi Boggiano ce08582671 Fix CS 2015-09-28 10:53:24 +01:00
Jordi Boggiano 6a64041055 CS fixes 2015-06-30 15:38:32 +01:00
nevvermind 12c833864c Revert converting `1.0.0` to `^1.0`. 2015-06-08 22:45:20 +01:00
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
2015-06-02 17:40:32 +01:00
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.
2015-06-02 14:10:09 +01:00
Jérémy Derussé 86e0b847be Allow plugins to register commands 2015-02-26 09:14:25 +01:00
Jordi Boggiano 0627d846a5 PluginManager refactoring, fixes #3550 2014-12-13 18:54:42 +00:00
Jordi Boggiano 94926218e8 CS fixes 2014-10-17 18:57:27 +01:00
François Pluchino 11b945046f Register plugin only one time when it's present in global and project mode 2014-07-21 15:11:38 +02:00
Jordi Boggiano 11a0d16ccc CS fixes 2013-10-11 20:12:45 -03:00
Karoly Negyesi 1a69d0a2a7 style fixes 2013-09-22 19:41:54 +02:00
Karoly Negyesi 6c393c1c69 use the more generic removeDirectory 2013-09-20 06:31:06 +02:00
Karoly Negyesi f82c820a32 do not try to test update inside fixtures 2013-09-20 05:39:35 +02:00
Martin Hasoň e949038c0f Removed duplication of logic of an installation manager in a plugin manager 2013-09-12 14:31:27 +02:00
Nils Adermann f249fd804f Correctly require composer plugin api version in test plugins 2013-09-06 13:36:02 +02:00
Nils Adermann 6c2e998e40 Add missing use statement 2013-09-05 14:32:09 +02:00
Nils Adermann bf08019292 Load plugins and installers prior to checking installed packages 2013-08-31 16:20:38 +02:00
Nils Adermann b9c5758670 Make composer/io part of the activate plugin API rather than constructor args 2013-08-30 12:51:41 +02:00
Nils Adermann 69a028f368 Fix plugin interface usage in tests 2013-08-30 12:51:41 +02:00
Nils Adermann 3960edd64e Turn EventDispatcher into generic solution handling plugins as well 2013-08-30 12:51:41 +02:00
Nils Adermann 2f43e9aefb Load installed plugins at appropriate time and adapt tests accordingly 2013-08-30 12:51:40 +02:00
Nils Adermann 3e41977be7 Plugin tests are no longer strictly installer tests 2013-08-30 12:51:40 +02:00