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

simple-phpunit requires the zip extension #21303

Merged
merged 1 commit into from Jan 16, 2017

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Jan 16, 2017

without the zip extension enabled, i get PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in .../vendor/bin/simple-phpunit:46

Q A
Branch? 3.2 (first version containing the script)
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21060
License MIT
Doc PR -

@nicolas-grekas
Copy link
Member

👍

@@ -43,6 +43,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
@unlink("$PHPUNIT_VERSION.zip");
passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip");
}
if (!class_exists('ZipArchive')) {
throw new \Exception('simple-phpunit requires the PHP extension for zip support to be installed and enabled in order to download the right version of phpunit');
Copy link
Member

Choose a reason for hiding this comment

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

Proposal for a slightly different error message:

simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, thats better. updated

@dbu dbu force-pushed the phpunit-bridge-zip-extension branch from e87f53e to d651051 Compare January 16, 2017 13:55
@@ -43,6 +43,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
@unlink("$PHPUNIT_VERSION.zip");
passthru("wget https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip");
}
if (!class_exists('ZipArchive')) {
throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages');
Copy link
Member

Choose a reason for hiding this comment

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

We usually terminate exception messages with a dot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, fixed.

@xabbuh
Copy link
Member

xabbuh commented Jan 16, 2017

👍

@dbu dbu force-pushed the phpunit-bridge-zip-extension branch from d651051 to 6628e76 Compare January 16, 2017 14:40
@xabbuh xabbuh added this to the 3.2 milestone Jan 16, 2017
@dunglas
Copy link
Member

dunglas commented Jan 16, 2017

👍

1 similar comment
@javiereguiluz
Copy link
Member

👍

@stof
Copy link
Member

stof commented Jan 16, 2017

Thank you @dbu.

@stof stof merged commit 6628e76 into symfony:3.2 Jan 16, 2017
stof added a commit that referenced this pull request Jan 16, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

simple-phpunit requires the zip extension

without the zip extension enabled, i get `PHP Fatal error:  Uncaught Error: Class 'ZipArchive' not found in .../vendor/bin/simple-phpunit:46`

| Q             | A
| ------------- | ---
| Branch?       | 3.2 (first version containing the script)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21060
| License       | MIT
| Doc PR        | -

Commits
-------

6628e76 simple-phpunit requires the zip extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants