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

Fixes #67: Adds ability to disable all or certain installers #376

Merged
merged 17 commits into from
Apr 5, 2018
Merged

Fixes #67: Adds ability to disable all or certain installers #376

merged 17 commits into from
Apr 5, 2018

Conversation

thomscode
Copy link
Contributor

@thomscode thomscode commented Nov 17, 2017

Adds ability to disable one, multiple, or all installers.

  • Adds tests for new functionality
  • Adds documentation for new functionality
  • All tests pass
  • Modified files were formatted for PSR-2 via PHPStorm
  • Fixes observed inconsistencies in documentation and tests

@thomscode
Copy link
Contributor Author

Fixes #67

@thomscode
Copy link
Contributor Author

thomscode commented Dec 12, 2017

@niksamokhvalov,

After I merged in master to resolve the conflict, the build now fails. The test created in master uses PHP5.4 specific code (short array syntax) which fails the PHP5.3 build.

https://github.com/composer/installers/pull/378/files#diff-6d9d0d14aa0035388175f3e27359ae67R68

What is the preferred method of fixing this?

  • Change someone else's already merged code to use the long array syntax?
  • Change the TravisCI settings to not include 5.3 tests?
  • Other?

@niksamokhvalov
Copy link
Member

Thanks for report. I fixed problem. Composer Installer is compatibility with PHP 5.3.

@thomscode
Copy link
Contributor Author

Thanks for the fix. This is now back to passing and ready for review 😄

@niksamokhvalov
Copy link
Member

@shama you could have a review?

@thomscode
Copy link
Contributor Author

Is there anything else I can or should do to help with this?

Thanks

@thomscode
Copy link
Contributor Author

@shama and @niksamokhvalov,

This is up-to-date again with the changes recently merged into master

Copy link
Member

@niksamokhvalov niksamokhvalov left a comment

Choose a reason for hiding this comment

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

👍

{
$extra = $this->composer->getPackage()->getExtra();

if (!isset($extra['installer-disable'])) {
Copy link
Member

Choose a reason for hiding this comment

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

It may be worth to consider options [] and false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that false is the equivalent of not adding this option, I hadn't considered it before. Now that you bring it up I can see where it would be useful in a situation where wikimedia/composer-merge-plugin is being used. I'll add it as an option.

Is your thought that this would be a global, "all installers are enabled"?

Regarding an options array, what did you have in mind? I'm not at all opposed to having available options, but I'm not sure what options to include or what they would do? Or are you suggesting to have it available for future ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@niksamokhvalov
Just wondering if you had a chance to review the latest commit updating this code. I've added false as an option, but am unsure what options[] you had in mind. I'm open to the idea, but am just unsure of what or how to implement.

* @param \Composer\Installer\BinaryInstaller|null $binaryInstaller
*/
public function __construct(
\Composer\IO\IOInterface $io,
Copy link
Member

Choose a reason for hiding this comment

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

Since these are already imported, can you just use their short classname? Same for docblocks please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@alcohol
Copy link
Member

alcohol commented Apr 5, 2018

Aside from some minor nitpicks that I can sort out after merging as well, is there anything blocking this from being merged at the moment?

@thomscode
Copy link
Contributor Author

Fully qualified namespace issue resolved, and I just pulled in the latest changes from upstream. Should not be any blockers preventing this from being merged.

I'm happy to resolve any "nitpicks" you have prior to merge, or you can do it afterwards. It's your choice.

@alcohol alcohol merged commit 5d15e4e into composer:master Apr 5, 2018
@thomscode thomscode deleted the disable-installers branch April 5, 2018 19:53
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.

3 participants