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

@JJK801 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)
Copy link
Contributor

@stof stof Nov 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a use case for making it nullable ?

Copy link
Author

@JJK801 JJK801 Nov 19, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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

@omansour
Copy link

omansour commented Nov 19, 2013

@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 issue Nov 22, 2013
Add preFileDownload event on packages.json fetch
@Seldaek Seldaek merged commit 1ee30ea into composer:master Nov 22, 2013
1 check passed
@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
Author

JJK801 commented Nov 22, 2013

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

@JJK801
Copy link
Author

JJK801 commented Nov 22, 2013

#2446

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

Successfully merging this pull request may close these issues.

None yet

8 participants