Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Main framework composer.json is incorrectly configured #4284

Closed
wants to merge 1 commit into from

1 participant

@ezzatron

The I18n component's composer.json specifies a requirement for the intl extension to be installed. The main framework composer.json only specifies the intl extension as a suggestion, but simultaneously claims to replace the I18n component.

The upshot of this is that anybody who tries to install any Zend component with a dependency on the I18n component through Composer will receive the entire Zend framework rather than just the dependency they requested, unless they have the PHP intl extension installed on their machine.

The reason for this is that the Composer solver sees the framework as a way to get zend-i18n without the requirement for the intl extension to be installed. A quick search reveals that many have been caught out by this behaviour:

This PR adds a requirement for the intl extension to the main framework composer.json, which will stop these type of issues from occurring.

Note, I am assuming that zend-i18n does in fact have a concrete requirement on the intl extension and cannot function without it. In which case, since the framework includes the zend-i18n code, this concrete requirement extends to the main framework also.

@weierophinney weierophinney referenced this pull request from a commit in weierophinney/zf2
@weierophinney weierophinney [#4284] Mark ext/intl as suggested only
- Marking as required in the framework makes it impossible to install
  the full ZF2 distribution when ext/intl is not available.
- Based on discussion in #4284, both zf2 and zend-i18n composer.json
  files should be in sync; otherwise, full zf2 will be installed if
  ext/intl is not available when attempting to install zend-i18n.
- Updated all code to raise a new "ExtensionNotLoadedException" when
  ext/intl is required but not detected.
32545eb
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney [#4284] Mark ext/intl as suggested only
- Marking as required in the framework makes it impossible to install
  the full ZF2 distribution when ext/intl is not available.
- Based on discussion in #4284, both zf2 and zend-i18n composer.json
  files should be in sync; otherwise, full zf2 will be installed if
  ext/intl is not available when attempting to install zend-i18n.
- Updated all code to raise a new "ExtensionNotLoadedException" when
  ext/intl is required but not detected.
751ce18
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4284'
Close #4293
Fixes #4284 properly
d6b5953
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4284'
Close #4284
7f6b3de
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4284' into develop
Forward port #4284
070a0ac
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney [#4284] Mark ext/intl as suggested only
- Marking as required in the framework makes it impossible to install
  the full ZF2 distribution when ext/intl is not available.
- Based on discussion in #4284, both zf2 and zend-i18n composer.json
  files should be in sync; otherwise, full zf2 will be installed if
  ext/intl is not available when attempting to install zend-i18n.
- Updated all code to raise a new "ExtensionNotLoadedException" when
  ext/intl is required but not detected.
fd27afa
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4284'
Close #4293
Fixes #4284 properly
7f46aa2
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-i18n
@weierophinney weierophinney [zendframework/zf2#4284] Mark ext/intl as suggested only
- Marking as required in the framework makes it impossible to install
  the full ZF2 distribution when ext/intl is not available.
- Based on discussion in zendframework/zf2#4284, both zf2 and zend-i18n composer.json
  files should be in sync; otherwise, full zf2 will be installed if
  ext/intl is not available when attempting to install zend-i18n.
- Updated all code to raise a new "ExtensionNotLoadedException" when
  ext/intl is required but not detected.
9a9118e
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-i18n
@weierophinney weierophinney Merge branch 'hotfix/4284' 906bbcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 21, 2013
  1. @ezzatron
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 composer.json
View
4 composer.json
@@ -9,7 +9,8 @@
"homepage": "http://framework.zend.com/",
"license": "BSD-3-Clause",
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.3",
+ "ext-intl": "*"
},
"require-dev": {
"doctrine/common": ">=2.1",
@@ -19,7 +20,6 @@
},
"suggest": {
"doctrine/common": "Doctrine\\Common >=2.1 for annotation features",
- "ext-intl": "ext/intl for i18n features",
"ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable",
"pecl-weakref": "Implementation of weak references for Zend\\Stdlib\\CallbackHandler",
"zendframework/zendpdf": "ZendPdf for creating PDF representations of barcodes",
Something went wrong with that request. Please try again.