digitalwithyou / craft-facebook-conversion

Craft CMS plugin to send web events directly to Facebook
https://digitalwithyou.com/en/plugins/facebook-conversion/getting-started
Other
0 stars 3 forks source link

Syntax error with the Facebook PHP Business API #29

Closed samhibberd closed 2 years ago

samhibberd commented 2 years ago

Just upgraded from 1.1.0 to 1.1.1, it looks like there is a syntax error with v15 of the Facebook SDK:

Screenshot 2022-11-07 at 15 30 12
error: "syntax error, unexpected ';', expecting ')'"
exception: "ParseError"
file: "/var/www/html/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php"
line: 244

Shout if a stack trace is required.

Diewy commented 2 years ago

Hi @samhibberd,

Thanks for reporting this issue, it should be fixed in v1.1.2.

samhibberd commented 2 years ago

Thanks for such a quick response, not sure if it's local to me, but I get a dependency issue when upgrading to v1.1.2 in the cp:

Problem 1

  • dwy/facebook-conversion v1.1.2 requires facebook/php-business-sdk dev-main#b90ab902cd0a61462ab428c23b466e2aa247936d -> found facebook/php-business-sdk[dev-main] but it does not match your minimum-stability.
  • Root composer.json requires dwy/facebook-conversion v1.1.2 -> satisfiable by dwy/facebook-conversion[v1.1.2].
Diewy commented 2 years ago

Could you provide some extra context like Craft and PHP versions?

Diewy commented 2 years ago

I could reproduce the error on another test environment.

Since Facebook didn't release a package with the fix yet, I'm forced to use their development branch which requires some composer settings.

Please add the following to your composer.json:

"minimum-stability": "dev",
"prefer-stable": true

Sorry for the inconvience. I submitted a request to create an extra package release. And I'll reopen this issue so it's easier for other people to find the solution.

samhibberd commented 2 years ago

Thanks @Diewy

Diewy commented 2 years ago

Facebook created a new package, updated our dependency to it. This issue should be resolved.