Composer does not work asks xmlwrite?

Today, a new hard put Ubuntu 18.04, installed php, composer, set the desired program. And finally cloned the repository was going to finish in which time the project. I write composer update I see error the requested PHP extension xmlwriter is missing from your system. Googled, found that it is necessary to do so:
sudo apt-get install php-xml sudo service apache2 restart

did.

Again composer update loading went!!! On about the fifth line, the computer crashed suddenly, and helped only a reboot.
Try again composer update doesn't work, still requires the requested PHP extension xmlwriter is missing from your system. Already that only did not try, do not want to ship and all the time the same writes. Write php -i | grep "xml" will take you back
/etc/php/7.2/cli/conf.d/15-xml.ini
/etc/php/7.2/cli/conf.d/20-simplexml.ini
/etc/php/7.2/cli/conf.d/20-xmlreader.ini
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
libxml
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)


Already tired to beat him, tell me who knows how to fix it?
April 4th 20 at 00:42
2 answers
April 4th 20 at 00:44
Solution
Everything was simpler. I first demolished all sudo apt-get purge php7.* Then reset again PHP + extensions and once everything was connected... mystic..

Noticed that before as not working in some files the type of 20-xmlwriter.ini at /etc/php/7.2/cli/conf.d there's no record of the species
; configuration for php xml module
; priority=20
extension=xmlwriter.so
after reinstalling PHP and packages entry appeared and it worked.
April 4th 20 at 00:46
After installing php-xml necessary to connect the extension to the php file.ini

extension=dom.so

https://www.php.net/manual/en/dom.setup.php
do not prompt, where in php.ini need to register it? - Josiah commented on April 4th 20 at 00:49
@Josiah, either, but this is usually done at the end of the file. After the edits will need to restart Apache - gabe commented on April 4th 20 at 00:52
damn it not yet helped... added, updated ... sudo service apache2 restart still - Josiah commented on April 4th 20 at 00:55
@gabe, @Josiah, have your own php cli.ini and restart Apache is not needed, it's a CLI!
php -i performs inherently phpinfo () says that the extension they already are. - leopold_Wolf commented on April 4th 20 at 00:58
@Josiah, check the list of modules:

php -m

[PHP Modules]
...
dom < and other relatives modules as xml, xmlreader, SimpleXML...
...


View the results of phpinfo(), check the php.ini You changed. There can be several, like PHP versions - gabe commented on April 4th 20 at 01:01
@leopold_Wolf, so php-xml is needed for a third-party package that wants to connect the author. If it's not a console application - Apache must be restarted for the app to work correctly. - gabe commented on April 4th 20 at 01:04
@gabe, the composer uses the php cli - leopold_Wolf commented on April 4th 20 at 01:07
@leopold_Wolf, so what? - gabe commented on April 4th 20 at 01:10
@gabe, @gabe, read the question of the vehicle and an entire thread of comments again. - leopold_Wolf commented on April 4th 20 at 01:13
@leopold_Wolf, I know composer uses php-cli but the php-xml package needs to install another package and I doubt it's a console application. The application will not work correctly if the author will make changes in php.ini and execute composer update (successfully), if you do not restart Apache

There in the file composer.json

"require": {
...
 "ext-xml": "*",
...
 },
- gabe commented on April 4th 20 at 01:16

Find more questions by tags PHPComposer