xautoload not loading class I have a PHP class that I have developed to mediate the interactions with a client's SSO web service. The class needs to be used by both a Symfony site and a Drupal 7 site. On the Drupal side, I've dropped a copy of the class inside the SSO module I'm developing, and I'm attempting to use xautoload to load it, but I was getting a class not found error when attempting to instantiate an object from it. 

Now I'm just dumping the output of get_declared_classes() to the message area with dpm(), and I don't see that it has loaded the class.

Here's the structure of my module

client_sso/
|
--client_sso.info
--client_sso.module
--includes
  |
  --ClientSSO.php


My client_sso.info looks like this

name = Client SSO
description = Integrate Drupal with Client SSO service
package = AARP
core = 7.x
dependencies[] = xautoload (&gt;= 7.x-5.0)
files[] = includes/*.php


I disabled and re-enabled the module to rebuild the module registry and cleared all caches, but it appears to be cheerfully ignoring the file with the class.

I have verified that I can directly load the class with 

module_load_include('php', 'client_sso', 'includes/ClientSSO'); 


What should I try next?
Several things to consider.

*.php only looks in the folder itself. **/*.php also looks in subdirectories recursively. This seems ok in this case, but I want to mention it for other visitors.



The files[] = .. always requires clearing the cache.
If you have problems with this, drush rr (Registry Rebuild) is useful.



The core class registry with files[] = .. does not work for classes in namespaces.
xautoload does not change this.

The Registry Autoload module makes namespaced classes work with the core registry. But I don't know how well it works with the *.php-style wildcards.

Or, you can use hook_xautoload() to register additional namespace directories.