fabpot/Silex — Issue #222: Symfony Class Loader and swiftmailer broken dependencies
Author: danapplegate
Created: 2011-12-20 00:29:30+00:00
State: open

I required the silex package using composer and wound up with a few dependency errors. First, I was missing the Symfony Universal Class Loader, so I manually included that in my composer.json require list. I noticed that it's not in Silex's require list - should it be? Or is this an indication of a larger issue?

The second issue is a broken path to the swiftmailer package:

```
Fatal error: require_once() [function.require]: Failed opening required '/home/dan/workspace/silex/vendor/swiftmailer/lib/classes/Swift.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/dan/workspace/silex/vendor/silex/silex/src/Silex/Provider/SwiftmailerServiceProvider.php on line 76
```

I have swiftmailer required as well in my composer.json, but I took a look at its install path and it's a little different than what Silex seems to expect:

```
...
vendor
`- silex/
- swiftmailer
`- swiftmailer
`- doc/
- lib
`- classes
`- Swift/
`- Swift.php
...
...
...
```

So it looks like swiftmailer is installing to /vendor/swiftmailer/swiftmailer, rather than just /vendor/swiftmailer. Is this a bug on swifmailer's end? Also, it looks like swiftmailer is not in the require property of Silex's composer.json.

Heres my relevant require block in my composer.json:

```
"require": {
"silex/silex": "1.0.0-dev",
"symfony/class-loader": ">=2.0.7",
"predis/service-provider": "v0.2.3",
"swiftmailer/swiftmailer": ">=4.1.4"
}
```

I'm also using composer's automatically generated autoload functionality, could that be the issue?