8000 symfony/config does not have ext-xml requirements · Issue #24046 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

symfony/config does not have ext-xml requirements #24046

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

Closed
oleg-andreyev opened this issue Aug 31, 2017 · 2 comments
Closed

symfony/config does not have ext-xml requirements #24046

oleg-andreyev opened this issue Aug 31, 2017 · 2 comments

Comments

@oleg-andreyev
Copy link
Contributor
oleg-andreyev commented Aug 31, 2017
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 2.* and 3.*

It's possible to install symfony/config without ext-dom, and \Symfony\Component\Config\Util\XmlUtils will not work

# php -n -dextension=phar.so -dextension=json.so -dextension=iconv.so composer.phar install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
  - Installing symfony/filesystem (dev-master df8e441): Cloning df8e441d07 from cache
  - Installing symfony/finder (dev-master d04fb01): Cloning d04fb01c1a from cache
  - Installing symfony/yaml (dev-master 066b3d0): Cloning 066b3d0b5e from cache
  - Installing psr/container (dev-master 2cc4a01): Cloning 2cc4a01788 from cache
  - Installing symfony/dependency-injection (dev-master 792c762): Cloning 792c762582 from cache
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
Writing lock file
Generating autoload files

# php -n -dextension=phar.so -dextension=json.so -dextension=iconv.so test.php

Fatal error: Uncaught Error: Class 'DOMDocument' not found in /mnt/c/checkouts/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /mnt/c/checkouts/symfony/src/Symfony/Component/Config/test.php(7): Symfony\Component\Config\Util\XmlUtils::loadFile('test.xml')
#1 {main}
  thrown in /mnt/c/checkouts/symfony/src/Symfony/Component/Config/Util/XmlUtils.php on line 52

Similar issue #22676

oleg-andreyev added a commit to oleg-andreyev/symfony that referenced this issue Aug 31, 2017
oleg-andreyev added a commit to oleg-andreyev/symfony that referenced this issue Aug 31, 2017
oleg-andreyev added a commit to oleg-andreyev/symfony that referenced this issue Aug 31, 2017
@javiereguiluz
Copy link
Member

@oleg-andreyev thanks for reporting this issue! Just asking: if I use the Config component but never use an XML config file (imagine I only use YAML) ... is this PHP extension still required? Is used internally by the component no matter what? Thanks!

@oleg-andreyev
Copy link
Contributor Author

@javiereguiluz as @xabbuh pointed in PR it's a valid case to use component without XML, so I've removed ext-dom from composer in favor of validation in XmlUtils

oleg-andreyev added a commit to oleg-andreyev/symfony that referenced this issue Aug 31, 2017
ogizanagi pushed a commit to oleg-andreyev/symfony that referenced this issue Sep 3, 2017
ogizanagi added a commit that referenced this issue Sep 3, 2017
…yev)

This PR was merged into the 2.7 branch.

Discussion
----------

Added check for ext-dom to XmlUtil::loadFile

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no, minor enhancement to gracefully suggest to install `ext-dom` if missing when trying to use `XmlUtil::loadFile`
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ?
| Fixed tickets | #24046
| License       | MIT

Commits
-------

2f292c2 #24046 added check for ext-dom to XmlUtil::loadFile
@chalasr chalasr closed this as completed Sep 3, 2017
fabpot added a commit that referenced this issue Sep 4, 2017
* origin/2.7:
  #24046 added check for ext-dom to XmlUtil::loadFile
fabpot added a commit that referenced this issue Sep 4, 2017
* 2.8:
  #24046 added check for ext-dom to XmlUtil::loadFile
nicolas-grekas added a commit that referenced this issue Sep 4, 2017
* 3.3:
  [DI] Minor fix in dumped code
  #24046 added check for ext-dom to XmlUtil::loadFile
nicolas-grekas added a commit that referenced this issue Sep 4, 2017
* 3.4:
  [3.4][DI] Inline trivial services
  sync upgrade file for Symfony 4.0 between branches
  Fix ability to deprecate a config node
  [DI] Minor fix in dumped code
  [Console] Display file and line on Exception
  Fix deprecations regarding core commands registered as services
  #24046 added check for ext-dom to XmlUtil::loadFile
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

No branches or pull requests

3 participants
0