Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preFileDownload event on packages.json fetch #2434

Merged
merged 1 commit into from Nov 22, 2013

Conversation

@JJK801
Copy link
Contributor

JJK801 commented Nov 19, 2013

Hi,

In order to extend @naderman's work on pluggin system, this add a PreFileDownloadEvent dispatch when composer fetch packages.json (For ComposerRepository class).

It's usefull for us, because we need to fetch it using s3:// scheme.

Thanks,

Jérémy

private $rawData;
private $minimalPackages;
private $degradedMode = false;
private $rootData;

public function __construct(array $repoConfig, IOInterface $io, Config $config)
public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null)

This comment has been minimized.

Copy link
@stof

stof Nov 19, 2013

Contributor

is there a use case for making it nullable ?

This comment has been minimized.

Copy link
@JJK801

JJK801 Nov 19, 2013

Author Contributor

not really, just following the existing ;)

@stof
Copy link
Contributor

stof commented Nov 19, 2013

I see a drawback in this PR: it introduces some cyclic dependency graph: Composer depends on RepositoryManager which depends on EventDispatcher, which depends on Composer. This is not really clean

@JJK801
Copy link
Contributor Author

JJK801 commented Nov 19, 2013

I just reorganized this code, in order to make possible to inject EventManager into RepositoryManager, but i saw it and your right, it's not really clean.

@omansour
Copy link

omansour commented Nov 19, 2013

👍 will allow us to secure our packages.json file on our instance of satis

@Seldaek
Copy link
Member

Seldaek commented Nov 20, 2013

@stof it's not great but I'm not sure there is a way around this.

Seldaek added a commit that referenced this pull request Nov 22, 2013
Add preFileDownload event on packages.json fetch
@Seldaek Seldaek merged commit 1ee30ea into composer:master Nov 22, 2013
1 check passed
1 check passed
default The Travis CI build passed
Details
@NETZkultur

This comment has been minimized.

Hi,

after a composer self-update i get the following error

[ErrorException]
Argument 4 passed to Composer\Repository\VcsRepository::__construct() must be of the type array, object given, called in phar:///usr/local/bin/composer.phar/src/Composer/Repository/RepositoryManager.php on line 104 and defined

it seems that the constructor arguments aren't compatible anymore...

@Stelian
Copy link

Stelian commented Nov 22, 2013

Breaks entirely: #2444

@fadoe
Copy link

fadoe commented Nov 22, 2013

(👎) Same problem here.

@robertfausk
Copy link

robertfausk commented Nov 22, 2013

👎 :-(

@JJK801
Copy link
Contributor Author

JJK801 commented Nov 22, 2013

Why does VcsRepository break standard repository composition? is this argument ($driver) really used?

@JJK801
Copy link
Contributor Author

JJK801 commented Nov 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.