Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
By baltusf on
Hi, I have installed drupal 11.x now via softaculous on stambomen.net. I added some modules by downloading the module and put it in the modules-folder. That works fine. I now want to use composer, but when i do that i got a lot of errors/ At this time the provider installed composer v1.8
[fredbaltus@www73 ~]$ composer -V
Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Composer version 1.8.0 2018-12-03 10:31:16When i e.g. install google analystics with composer require 'drupal/google_analytics:^4.0' i got a lot of warnings and error messages. Beneath a small part of it.
[fredbaltus@www73 public_html]$ composer require 'drupal/google_analytics:^4.0'
Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
Deprecation Notice: Optional parameter $schema declared before required parameter $path is implicitly treated as a required parameter in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:62
Deprecation Notice: Optional parameter $schema declared before required parameter $path is implicitly treated as a required parameter in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:108
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:196
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:196
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:196
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in phar:///usr/local/bin/composer/src/Composer/Repository/RepositoryManager.php:130
[UnexpectedValueException]
Unknown package has no name defined ([{"name":"asm89\/stack-cors","version":"v2.3.0","version_normalized":"2.3.0.0","source":{"type":"git",
"url":"https:\/\/github.com\/asm89\/stack-cors.git","reference":"acf3142e6c5eafa378dc8ef3c069ab4558993f70"},"dist":{"type":"zip","url":"htt
ps:\/\/api.github.com\/repos\/asm89\/stack-cors\/zipball\/acf3142e6c5eafa378dc8ef3c069ab4558993f70","reference":"acf3142e6c5eafa378dc8ef3c0
69ab4558993f70","shasum":""},"require":{"php":"^7.3|^8.0","symfony\/http-foundation":"^5.3|^6|^7","symfony\/http-kernel":"^5.3|^6|^7"},"req
uire-dev":{"phpunit\/phpunit":"^9","squizlabs\/php_codesniffer":"^3.5"},"time":"2025-03-13T08:50:04+00:00","type":"library","extra":{"branc
h-alias":{"dev-master":"2.2-dev"}},"installation-source":"dist","autoload":{"psr-4":{"Asm89\\Stack\\":"src\/"}},"notification-url":"https:\
/\/packagist.org\/downloads\/","license":["MIT"],"authors":[{"name":"Alexander","email":"iam.asm89@gmail.com"}],"description":"Cross-origin
resource sharing library and stack middleware","homepage":"https:\/\/github.com\/asm89\/stack-cors","keywords":["cors","stack"],"support":
{"issues":"https:\/\/github.com\/asm89\/stack-cors\/issues","source":"https:\/\/github.com\/asm89\/stack-cors\/tree\/v2.3.0"},"install-path
":"..\/asm89\/stack-cors"},{"name":"composer\/installers","version":"v2.3.0","version_normalized":"2.3.0.0","source":{"type":"git","url":"h
ttps:\/\/github.com\/composer\/installers.git","reference":"12fb2dfe5e16183de69e784a7b84046c43d97e8e"},"dist":{"type":"zip","url":"https:\/
\/api.github.com\/repos\/composer\/installers\/zipball\/12fb2dfe5e16183de69e784a7b84046c43d97e8e","reference":"12fb2dfe5e16183de69e784a7b84
046c43d97e8e","shasum":""},"require":{"composer-plugin-api":"^1.0 || ^2.0","php":"^7.2 || ^8.0"},"require-dev":{"composer\/composer":"^1.10
.27 || ^2.7","composer\/semver":"^1.7.2 || ^3.4.0","phpstan\/phpstan":"^1.11","phpstan\/phpstan-phpunit":"^1","symfony\/phpunit-bridge":"^7
.1.1","symfony\/process":"^5 || ^6 || ^7"},"time":"2024-06-24T20:46:46+00:00","type":"composer-plugin","extra":{"class":"Composer\\Installe
rs\\Plugin","branch-alias":{"dev-main":"2.x-dev"},"plugin-modifies-install-path":true},"installation-source":"dist","autoload":{"psr-4":{"C
omposer\\Installers\\":"src\/Composer\/Installers"}},"notification-url":"https:\/\/packagist.org\/downloads\/","license":["MIT"],"authors":
These files are in my public_html folder.
[fredbaltus@www73 public_html]$ ls
autoload.php composer.phar error_log INSTALL.txt oldincludes old-root profiles sites vendor
cgi-bin core example.gitignore LICENSE.txt old-misc old-scripts README.md themes wiewaswie
composer.json d8 home.html mailman-2.1.21 old-modules old-sites recipes tmp
composer.lock diverse index.php modules old-profiles old-themes robots.txt update.php
[fredbaltus@www73 public_html]$I run the command from the public_html folder which belongs to stambomen.net. What do i wrong or must i change? Or must my hosting provider change?
Thanks,
Fred
Comments
I'm not able to answer your
I'm not able to answer your query, but my only observation is that the composer version is old. My host currently uses 2.8 and I believe that D11 needs a certain 2.x version. Could this be a problem?
I'm curious about why you want to use Composer now. Have you found a need for it, e.g. a particular module or admin task which demands it? Until recently, I had a Softaculous managed installation and it was easy to use and (regarding Softaculous) completely reliable. I manually extracted modules, installing dependences first, etc., and it was always fine. But I never had any remotely complex or unusual requirements.
You could change hosting
You could change hosting providers, but generally its better to build your project locally, and push the built project to the remote server, rather than running Composer on the server.
Contact me to contract me for D7 -> D10/11 migrations.