Closed raoptimus closed 5 years ago
Temporary solutions: It needs to add in composer.json
"autoload": {
"files": [
"vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php",
"vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php",
"vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php",
"vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php",
"vendor/swiftmailer/swiftmailer/lib/preferences.php"
]
},
Would you mind opening a pull request with this change? This will make the approval/discussion/fix happen faster :)
Too few arguments to function Swift_Mime_SimpleMessage::__construct(), 0 passed
What makes you think that this is autoloader issue?
What makes you think that this is autoloader issue?
You can try execute composer install --no-dev --prefer-dist -o
and check
I'm already using this package with optimized autoloader without any trouble.
Would you post the versions?
I just ran your command on one of my projects without problems. Relevant bits:
$ php -v
PHP 7.3.0 (cli) (built: Dec 7 2018 11:00:11) ( NTS )
$ composer install --no-dev --prefer-dist -o
...
- Installing yiisoft/yii2 (2.0.16)
- Installing swiftmailer/swiftmailer (v6.1.3)
- Installing yiisoft/yii2-swiftmailer (2.1.2)
...
Writing lock file
Generating optimized autoload files
Merging Composer dependencies in the asset package
Updating npm dependencies
$
I resolved same problem with latest version of composer
Temporary solutions: It needs to add in composer.json
"autoload": { "files": [ "vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php", "vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php", "vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php", "vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php", "vendor/swiftmailer/swiftmailer/lib/preferences.php" ] },
This helped me also
@raoptimus It's a bit weird: I have the same issue with Symfony, and adding files to autoloading doesn't help... Besides, I got that error only in a production environment.
@raoptimus It's a bit weird: I have the same issue with Symfony, and adding files to autoloading doesn't help... Besides, I got that error only in a production environment.
did you update the composer?
@raoptimus It's a bit weird: I have the same issue with Symfony, and adding files to autoloading doesn't help... Besides, I got that error only in a production environment.
did you update the composer?
root@657efc3c5917:/var/www/html# composer self-update You are already using composer version 1.10.5 (stable channel).
Yes, nothing helps. Also did: $ composer install --no-dev --prefer-dist -o
If execute composer install with autoload optimize
then extension does not work I have exception:
Maybe it could not load dependencies
Additional info