Skip to content

Parse output from composer and list missing extensions #19

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

Merged
merged 8 commits into from
Oct 26, 2016

Conversation

AydinHassan
Copy link
Member

@AydinHassan AydinHassan commented Oct 24, 2016

TODO:

  • Tests

Fixes #18

Features:

  1. Adds required extensions to composer.json so this can only be global installed if required ext's are there.
  2. validate command now checks if required extensions are installed.
  3. Parses output from composer install and if there are missing extensions (while installing a workshop) we output a better message saying you need to install some extensions.

@AydinHassan AydinHassan changed the title WIP - Parse output from composer and list missing extensions Parse output from composer and list missing extensions Oct 25, 2016
@codecov-io
Copy link

codecov-io commented Oct 25, 2016

Current coverage is 99.04% (diff: 96.52%)

Merging #19 into master will decrease coverage by 0.49%

@@             master        #19   diff @@
==========================================
  Files            25         26     +1   
  Lines           649        735    +86   
  Methods          81        102    +21   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            646        728    +82   
- Misses            3          7     +4   
  Partials          0          0          

Powered by Codecov. Last update b889f40...e12c95a

@AydinHassan
Copy link
Member Author

Yo @mikeymike can you review please?

@@ -14,17 +14,23 @@
*/
class ComposerInstallerFactoryTest extends PHPUnit_Framework_TestCase
{
public function testCreate()
public function testTrue()
Copy link
Member

Choose a reason for hiding this comment

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

mistake or coming back to it later?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah should be removed :D

$this->assertFileExists(sprintf('%s/vendor', $this->tempDir));
$this->assertFileExists(sprintf('%s/composer.lock', $this->tempDir));

$expectedOutput = "/Loading composer repositories with package information\n";
Copy link
Member

Choose a reason for hiding this comment

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

Just a thought... are we not making this a fragile test by testing the output of another package? I see why it's done I'm just wondering if it's the best thing to do.

Unfortunately I don't really have alternative other than checking that there was output which I guess in it self is a pretty weak/fragile test

Copy link
Member Author

Choose a reason for hiding this comment

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

it has no requires and it's not a real package - so it should be fine imo

@@ -14,40 +14,45 @@
*/
class IOFactoryTest extends PHPUnit_Framework_TestCase
Copy link
Member

Choose a reason for hiding this comment

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

safe to remove this test right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep!

@mikeymike
Copy link
Member

@AydinHassan nice stuff dude... I like the approach with the IO much cleaner 👍

*/
public function __construct($exitCode, $output)
{
$this->exitCode = $exitCode;
Copy link
Member Author

Choose a reason for hiding this comment

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

@AydinHassan AydinHassan force-pushed the improve-error-messages branch from a947866 to 1ddddf2 Compare October 26, 2016 16:51
@AydinHassan AydinHassan merged commit c96e472 into master Oct 26, 2016
@AydinHassan AydinHassan deleted the improve-error-messages branch October 26, 2016 17:06
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