Adding third party packages

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
btrade
User
Posts: 357

Adding third party packages

Post by btrade »

I need to put video to youtube.

For this task I need to Install the libraries

  • google/apiclient 2.15

This library don't install without library

  • firebase/php-jwt

After install this package, my functionals don't work whith select, checkboks, or radio

How can I fix it?


arbei
User
Posts: 9356

Post by arbei »

Those are PHP packages, they should not affect client side. You probably have PHP errors (possibly PHP version issues) so the outputted HTML is malformed and therefore the client side JavaScripts are affected. You should:

  1. Install PHP packages by Tools -> Composer packages, (no need to install "firebase/php-jwt" yourself as it is used by PHPMaker already)
  2. Press F12 in your browser and go to the Console panel check for client side JavaScript error.
  3. Enable debug and check the log files for server side erors, also see check HTTP response.

btrade
User
Posts: 357

Post by btrade »

I mean I need to upload a video to youtube. To do this, I need to install the package google/apiclient. I add packages via Tools -> Composer. When I start to generate the project, I get an error. The firebase/php- jwt package that is being used is incompatible with the google api. I have to install a later version. After installing these 2 packages, the functionality about which I started this topic stops working for me. If I remove those 2 packages everything works fine again.


arbei
User
Posts: 9356

Post by arbei »

v2023 uses firebase/php-jwt: ^6.3.0, but "google/apiclient" uses firebase/php-jwt: ~6.0, so you simply add firebase/php-jwt: ~6.0 or firebase/php-jwt: 6.0.0 under Tools -> Composer Packages.


btrade
User
Posts: 357

Post by btrade »

I use v2022


arbei
User
Posts: 9356

Post by arbei »

v2022 used firebase/php-jwt: ^5.2.0, you simply specify the version of google/apiclient to a compatible (older) one (e.g. v2.14.0).


btrade
User
Posts: 357

Post by btrade »

I did as you say. But I have same problem.

Running composer update -n --ignore-platform-req php...
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Root composer.json requires google/apiclient ^2.15.0 -> satisfiable by google/apiclient[v2.15.0].
    - google/apiclient v2.15.0 requires firebase/php-jwt ~6.0 -> found firebase/php-jwt[v6.0.0, ..., v6.8.0] but it conflicts with your root composer.json require (^5.2.0).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

arbei
User
Posts: 9356

Post by arbei »

Don't use google/apiclient ^2.15.0.

arbei wrote:

v2022 used firebase/php-jwt: ^5.2.0, you simply specify the version of google/apiclient to a compatible (older) one (e.g. v2.14.0).


btrade
User
Posts: 357

Post by btrade »

I did it in tool>composer

But I have errors, when I generate my project.


mobhar
User
Posts: 11703

Post by mobhar »

What did you see from Tools -> Composer Packages? Which Packages are already listed in there, and what version for each Package?


arbei
User
Posts: 9356

Post by arbei »

Note that in your case you should specify exactly "2.14.0" (without "^", not "^2.14.0"). The caret version, ^1.2.3 permits versions from 1.2.3 all the way up to, but not including, the next major version, 2.0.0. If you want to learn more, read Semantic Versioning.


btrade
User
Posts: 357

Post by btrade »

mobhar wrote:

What did you see from Tools -> Composer Packages? Which Packages are already listed in there, and what version for each Package?

Here I see only those packages that I myself add. I am changing the version. Packages that were already initially installed on the system, I do not see here.


mobhar
User
Posts: 11703

Post by mobhar »

btrade wrote:

I am changing the version.

mobhar wrote:

and what version for each Package?


Post Reply