forked from composer/composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add COMPOSER_FUND=0 env var to disable calls for funding (composer#11779
- Loading branch information
1 parent
3949831
commit e4d3762
Showing
5 changed files
with
150 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
tests/Composer/Test/Fixtures/installer/install-funding-notice-env.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--TEST-- | ||
Installs a simple package with exact match requirement | ||
--CONDITION-- | ||
putenv('COMPOSER_FUND=1') | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ | ||
"name": "a/a", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }], | ||
"require": { | ||
"d/d": "^1.0" | ||
} | ||
}, | ||
{ | ||
"name": "b/b", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }] | ||
}, | ||
{ | ||
"name": "c/c", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }] | ||
}, | ||
{ | ||
"name": "d/d", | ||
"version": "1.0.0", | ||
"require": { | ||
"b/b": "^1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"require": { | ||
"a/a": "1.0.0" | ||
} | ||
} | ||
--RUN-- | ||
install | ||
--EXPECT-OUTPUT-- | ||
<warning>No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.</warning> | ||
Loading composer repositories with package information | ||
Updating dependencies | ||
Lock file operations: 3 installs, 0 updates, 0 removals | ||
- Locking a/a (1.0.0) | ||
- Locking b/b (1.0.0) | ||
- Locking d/d (1.0.0) | ||
Writing lock file | ||
Installing dependencies from lock file (including require-dev) | ||
Package operations: 3 installs, 0 updates, 0 removals | ||
Generating autoload files | ||
2 packages you are using are looking for funding. | ||
Use the `composer fund` command to find out more! | ||
--EXPECT-- | ||
Installing b/b (1.0.0) | ||
Installing d/d (1.0.0) | ||
Installing a/a (1.0.0) |
60 changes: 60 additions & 0 deletions
60
tests/Composer/Test/Fixtures/installer/install-funding-notice-not-displayed-env.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--TEST-- | ||
Installs a simple package with exact match requirement | ||
--CONDITION-- | ||
putenv('COMPOSER_FUND=0') | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ | ||
"name": "a/a", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }], | ||
"require": { | ||
"d/d": "^1.0" | ||
} | ||
}, | ||
{ | ||
"name": "b/b", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }] | ||
}, | ||
{ | ||
"name": "c/c", | ||
"version": "1.0.0", | ||
"funding": [{ "type": "example", "url": "http://example.org/fund" }] | ||
}, | ||
{ | ||
"name": "d/d", | ||
"version": "1.0.0", | ||
"require": { | ||
"b/b": "^1.0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"require": { | ||
"a/a": "1.0.0" | ||
} | ||
} | ||
--RUN-- | ||
install | ||
--EXPECT-OUTPUT-- | ||
<warning>No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.</warning> | ||
Loading composer repositories with package information | ||
Updating dependencies | ||
Lock file operations: 3 installs, 0 updates, 0 removals | ||
- Locking a/a (1.0.0) | ||
- Locking b/b (1.0.0) | ||
- Locking d/d (1.0.0) | ||
Writing lock file | ||
Installing dependencies from lock file (including require-dev) | ||
Package operations: 3 installs, 0 updates, 0 removals | ||
Generating autoload files | ||
--EXPECT-- | ||
Installing b/b (1.0.0) | ||
Installing d/d (1.0.0) | ||
Installing a/a (1.0.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters