The composer.json currently states this:
"autoload": {
"psr-4": {
"FacebookAds\\": "php/capi-param-builder/src/"
}
},
Similarly, the composer.json within php/capi-param-builder/php states this:
"autoload": {
"psr-4": {
"FacebookAds\\": "src/"
}
The issue is with the classes within the subfolders of the PHP package (model, piiUtil, util) which all use FacebookAds namespace. The PSR-4 autoloading won't match them. Any attempt to use one of these classes ends up with straight PHP error, for example:
Class "FacebookAds\PII_DATA_TYPE" not found
Because of this, our conversion tracking is failing. The Business SDK library is using it exactly this way and fails: https://github.com/facebook/facebook-php-business-sdk/blob/main/src/FacebookAds/Object/ServerSide/UserData.php#L936
Please verify the correctness of autoloading and either update composer.json files, or move files out of their subfolders so they match PSR-4 standard.
Thanks!
The
composer.jsoncurrently states this:Similarly, the
composer.jsonwithinphp/capi-param-builder/phpstates this:The issue is with the classes within the subfolders of the PHP package (
model,piiUtil,util) which all useFacebookAdsnamespace. The PSR-4 autoloading won't match them. Any attempt to use one of these classes ends up with straight PHP error, for example:Because of this, our conversion tracking is failing. The Business SDK library is using it exactly this way and fails: https://github.com/facebook/facebook-php-business-sdk/blob/main/src/FacebookAds/Object/ServerSide/UserData.php#L936
Please verify the correctness of autoloading and either update
composer.jsonfiles, or move files out of their subfolders so they match PSR-4 standard.Thanks!