Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

[v2.0] [BC Break] Rewrite library with ConsoleHelper + tests #8

Merged
merged 27 commits into from Feb 22, 2017
Merged

[v2.0] [BC Break] Rewrite library with ConsoleHelper + tests #8

merged 27 commits into from Feb 22, 2017

Conversation

michalbundyra
Copy link
Member

@michalbundyra michalbundyra commented Feb 20, 2017

Rewrite library with ConsoleHelper + tests.
Rebase needed after releasing v1.1.1 with fixes #5, #6, #7.

These changes provide new script:

$ vendor/bin/zf-composer-autoloading <command> [options] modulename

Commands:

  • help - display help/usage message
  • enable - enable composer autoloading for the module
  • disable - disbale composer autoloading for the module

Options are the same as previously:

  • --help|-h - display help/usage message
  • --composer|-c - composer binary path; defaults composer
  • --type|-t - module autoloading type to use
  • --modules-path|-p - path to directory with modules

Also added full test coverage. Please enable coveralls for the repository.

Note

This version will be used in zendframework/zend-expressive-tooling#12 as it provides functionality also to disable module's composer autoloading.

@michalbundyra
Copy link
Member Author

Green! :) Ready for review @weierophinney

Script is changed to:
$ vendor/bin/composer autoloading <command> [options] modulename
Commands:
  - help    - display help/usage message
  - enable  - enable composer autoloading for the module
  - disable - disbale composer autoloading for the module

Options are the same as previously:
  - --help|-h         - display help/usage message
  - --composer|-c     - composer binary path; defaults composer
  - --type|-t         - module autoloading type to use
  - --modules-path|-p - path to directory with modules

Added tests for the whole library and added coveralls configuration.
- svg travis build badge pointing master branch
- added coverage status badge
Variable $publicDir is now private
Redirect stderr to stdout 2>&1
Works also on Windows.
AbstractCommand now has public method process instead of __invoke.
Command have to implement method execute, which is called in process.
This tests mock "system" method so it should be run in separate process.
Run test on PHP 5.6/7.0/7.1 with lowest/locked/latest dependencies.
Tests vere failing on PHP7.0/7.1 with lowest dependencies
Without this annotation these tests on travis are failing.
On local I can't observe this issue.
@michalbundyra
Copy link
Member Author

@weierophinney rebased

@weierophinney weierophinney added this to the 2.0.0 milestone Feb 22, 2017
@weierophinney weierophinney self-assigned this Feb 22, 2017
Copy link
Member

@weierophinney weierophinney left a comment

Choose a reason for hiding this comment

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

Two minor nitpicks; overall, love this. I'll take care of the requested changes on merge.

@@ -8,7 +8,7 @@
"console",
"framework",
"zendframework",
"zf2"
"zf3"
Copy link
Member

Choose a reason for hiding this comment

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

I'd argue we should drop the version-specific tags, and just stick with zendframework.

{
$this->path = $path;
$this->composerJsonFile = sprintf('%s/composer.json', $path);
$this->command = (string)$command;
Copy link
Member

Choose a reason for hiding this comment

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

Should be a space following the ); I thought that was setup in the zend-coding-standard?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeh, there should be space. It is not in version 1.0.0 of zend-coding-standard unfortunately but it is coming with big upgrade ;-)

@weierophinney weierophinney merged commit bf4eb22 into zfcampus:master Feb 22, 2017
weierophinney added a commit that referenced this pull request Feb 22, 2017
[v2.0] [BC Break] Rewrite library with ConsoleHelper + tests
weierophinney added a commit that referenced this pull request Feb 22, 2017
weierophinney added a commit that referenced this pull request Feb 22, 2017
@weierophinney
Copy link
Member

Thanks a ton for this, @webimpress!

@michalbundyra michalbundyra deleted the feature/console-helper branch February 22, 2017 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants