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

Main framework composer.json is incorrectly configured #4284

Closed
wants to merge 1 commit into from
Closed

Main framework composer.json is incorrectly configured #4284

wants to merge 1 commit into from

Conversation

ezzatron
Copy link
Contributor

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 added a commit that referenced this pull request Apr 22, 2013
Main framework composer.json is incorrectly configured
weierophinney added a commit that referenced this pull request Apr 22, 2013
weierophinney added a commit to weierophinney/zendframework that referenced this pull request Apr 22, 2013
- 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#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.
weierophinney added a commit that referenced this pull request Apr 25, 2013
- 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.
weierophinney added a commit that referenced this pull request Apr 25, 2013
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
- 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/zendframework#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.
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant