@@ -14,6 +14,7 @@ Buddy works with multiple package managers and dependency file formats:
14
14
- ** npm** - Full compatibility with npm ecosystem
15
15
- ** yarn** - Classic and Berry versions
16
16
- ** pnpm** - Efficient disk usage and fast installs
17
+ - ** Composer** - PHP dependency manager with Packagist registry
17
18
- ** pkgx** - Cross-platform package manager with YAML dependency files
18
19
- ** Launchpad** - Fast package manager using pkgx registry format
19
20
- ** GitHub Actions** - Workflow dependency automation
@@ -23,6 +24,40 @@ Buddy works with multiple package managers and dependency file formats:
23
24
Buddy automatically detects and updates various dependency file formats:
24
25
25
26
#### Package Dependencies
27
+
28
+ ##### npm Ecosystem
29
+ ``` json
30
+ # package.json - Traditional npm, Bun, yarn, pnpm dependencies
31
+ {
32
+ "dependencies" : {
33
+ "react" : " ^18.0.0" ,
34
+ "typescript" : " ^5.0.0"
35
+ },
36
+ "devDependencies" : {
37
+ "eslint" : " ^8.0.0" ,
38
+ "@types/node" : " ^20.0.0"
39
+ }
40
+ }
41
+ ```
42
+
43
+ ##### PHP/Composer Ecosystem
44
+ ``` json
45
+ # composer.json - PHP dependencies from Packagist
46
+ {
47
+ "name" : " vendor/project" ,
48
+ "require" : {
49
+ "php" : " ^8.1" ,
50
+ "laravel/framework" : " ^10.0" ,
51
+ "guzzlehttp/guzzle" : " ^7.0"
52
+ },
53
+ "require-dev" : {
54
+ "phpunit/phpunit" : " ^10.0" ,
55
+ "mockery/mockery" : " ^1.5"
56
+ }
57
+ }
58
+ ```
59
+
60
+ ##### pkgx/Launchpad Ecosystem
26
61
``` yaml
27
62
# deps.yaml / deps.yml - pkgx and Launchpad
28
63
dependencies :
@@ -162,6 +197,97 @@ const registryIntegration = {
162
197
}
163
198
` ` `
164
199
200
+ # # PHP/Composer Support
201
+
202
+ Buddy provides comprehensive support for PHP projects using Composer, integrating with Packagist to manage PHP dependencies.
203
+
204
+ # ## Automatic Detection
205
+
206
+ Buddy automatically detects Composer projects by scanning for :
207
+
208
+ - **composer.json** - Main dependency configuration
209
+ - **composer.lock** - Lock file with exact versions
210
+
211
+ ` ` ` bash
212
+ # Buddy automatically scans for PHP dependencies
213
+ my-project/
214
+ ├── composer.json # ✅ PHP dependencies
215
+ ├── composer.lock # ✅ Lock file versions
216
+ ├── vendor/ # Generated by Composer
217
+ ├── app/
218
+ │ └── composer.json # ✅ Sub-project dependencies
219
+ └── packages/
220
+ ├── core/
221
+ │ └── composer.json # ✅ Package dependencies
222
+ └── api/
223
+ └── composer.json # ✅ API dependencies
224
+ ` ` `
225
+
226
+ # ## Packagist Integration
227
+
228
+ All Composer packages are resolved through Packagist, providing access to :
229
+
230
+ - **PHP packages** - Framework, libraries, and tools
231
+ - **Version management** - Semantic versioning with constraint resolution
232
+ - **Package metadata** - Descriptions, licenses, and repository links
233
+ - **Release information** - Changelogs and release notes from GitHub
234
+
235
+ # ## Composer Commands
236
+
237
+ Buddy uses native Composer commands for maximum compatibility :
238
+
239
+ ` ` ` bash
240
+ # Check for outdated packages
241
+ composer outdated --format=json --direct
242
+
243
+ # Validate package existence
244
+ composer info laravel/framework
245
+
246
+ # Update constraints (handled by Buddy)
247
+ composer require laravel/framework:^10.16
248
+ ` ` `
249
+
250
+ # ## Version Constraints
251
+
252
+ Buddy preserves and respects Composer version constraints :
253
+
254
+ ` ` ` json
255
+ {
256
+ "require": {
257
+ "laravel/framework": "^10.0", // Caret constraint
258
+ "symfony/console": "~6.0", // Tilde constraint
259
+ "doctrine/orm": "2.*", // Wildcard constraint
260
+ "monolog/monolog": ">=2.0,<3.0" // Range constraint
261
+ }
262
+ }
263
+ ` ` `
264
+
265
+ When updating packages, Buddy maintains the original constraint format while updating to the latest compatible version.
266
+
267
+ # ## Dependency Types
268
+
269
+ Buddy handles all Composer dependency types :
270
+
271
+ - **require** - Production dependencies
272
+ - **require-dev** - Development dependencies
273
+ - **suggest** - Suggested packages (informational only)
274
+ - **conflict** - Conflicting packages (validation)
275
+ - **replace** - Replaced packages (validation)
276
+
277
+ # ## PHP Platform Requirements
278
+
279
+ Platform requirements are automatically excluded from updates :
280
+
281
+ ` ` ` json
282
+ {
283
+ "require": {
284
+ "php": "^8.1", // ❌ Skipped (platform)
285
+ "ext-json": "*", // ❌ Skipped (extension)
286
+ "laravel/framework": "^10.0" // ✅ Updated
287
+ }
288
+ }
289
+ ` ` `
290
+
165
291
# # Package Filtering
166
292
167
293
Control which packages are managed by buddy.
0 commit comments