76 Commits (0ee0138bed31aa2c911041bf63f09857eff8da7a)

Author SHA1 Message Date
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Jordi Boggiano 352aefe48c Add command name to the PreCommandRun event 7 years ago
Jordi Boggiano b1bfb9bb65 Add PRE_COMMAND_RUN event, fixes #7002 7 years ago
Andreas Möller 5e68566ce6
Fix: Typo / wording 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Jordi Boggiano 677e75d168 Add phpdoc comment 8 years ago
Felix Becker 5f64cae860 Make PluginManager::addPlugin() public 8 years ago
Martin Hasoň 2b67a9044e Fix class in DocBlock 8 years ago
Fabien Potencier b502a35fc1 added missing var declaration 8 years ago
Michele Locati 0b08daff02
Simplify evaluation of PHP code 8 years ago
Michele Locati 759987da62
Strip out declare strict_types 8 years ago
Jordi Boggiano ba909d8795 Avoid duplicate commands, and pass plugin to ctor args for capabilities, refs #3377 8 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
Jordi Boggiano e85029da0c Merge branch '1.0' 8 years ago
Jordi Boggiano 5292f2b402 Replace only the targeted class, refs #5237 8 years ago
Jordi Boggiano 05fab170a7 Merge branch '1.0' 8 years ago
Jordi Boggiano ec933398c4 Fix classname replacement in plugin updates, fixes #5237 8 years ago
Jordi Boggiano aeafe2fe59 Add INIT event and bump plugin-api to 1.1.0, fixes #5232 8 years ago
Andrii Vasyliev 5b759da174 add getter for global composer 8 years ago
Jordi Boggiano 4207a33ccf Fix escaping 8 years ago
Jordi Boggiano 993942ba54 Escape quotes and backslashes for safety 8 years ago
Jordi Boggiano 49b0bd75b3 Add handling for dir, file and class magic constants when loading plugins, fixes #4975 8 years ago
Jordi Boggiano c9436438ff Add memoization to parseConstraints, saves some (6-7% here) RAM and marginal CPU time 8 years ago
Jordi Boggiano 49d7d65933 Add verbosity input support to IOInterface 9 years ago
Jordi Boggiano 1818b95149 CS fixes 9 years ago
Jordi Boggiano 837fa805ec Code tweaks, refs #4124 9 years ago
Jordi Boggiano ddd140fd1c Rollback plugin api version to 1.0.0 for now, add warning about requiring 1.0.0 exactly 9 years ago
nevvermind 5ec6988218 Fixed docs and removed implementation detail 9 years ago
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
9 years ago
nevvermind ec8229ffa3 Remove @since 9 years ago
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.
9 years ago
Jordi Boggiano 41d8fdfda8 Restore "Avoid loading plugins that do not match the current plugin api even during installation" but fixed
This reverts commit 0118d69603.
9 years ago
Jose Diaz-Gonzalez 0118d69603 Revert "Avoid loading plugins that do not match the current plugin api even during installation"
This reverts commit 21f5933e01.

Commit 21f5933e breaks fresh installations of cakephp applications, or
any project where a dependency uses a different composer plugin
installer than the upstream project.

Closes auraphp/Aura.Intl#20
9 years ago
Jordi Boggiano 21f5933e01 Avoid loading plugins that do not match the current plugin api even during installation 9 years ago
Jordi Boggiano 977b8c8f41 Fix loading error when plugin is a final class, fixes #4482 9 years ago
Jordi Boggiano bd76506dd8 Disable plugin registration during the whole run when running with --no-plugins, fixes #3910 9 years ago
Jordi Boggiano ce08582671 Fix CS 9 years ago
Rob Bast a1427d7fd6 replace all occurences in code and comments 9 years ago
nevvermind 994b1324bc fix alignment 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
nevvermind 8e79a3766d Added phpdocs + change to yoda comparison 9 years ago
Jordi Boggiano 45b1f356c2 Add debug output when a plugin is loaded 9 years ago
Jérémy Derussé 86e0b847be Allow plugins to register commands 9 years ago
Rob Bast cb336a5416 Implement writeError throughout Composer 9 years ago
Jordi Boggiano 2b16a73659 Load plugins before purging packages, fixes #3557 10 years ago
Jordi Boggiano 0627d846a5 PluginManager refactoring, fixes #3550 10 years ago
Jordi Boggiano 4ce9252255 Avoid passing args to CLI handlers when none are needed, fixes #3332 10 years ago
Jordi Boggiano 663cda8827 Merge pull request #3142 from francoispluchino/plugin-load-only-one-time
Register plugin only one time when it's present in global and project mode
10 years ago