Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Support for Laravel 9 #179

Open
parthjani7 opened this issue Apr 28, 2022 · 12 comments
Open

Support for Laravel 9 #179

parthjani7 opened this issue Apr 28, 2022 · 12 comments

Comments

@parthjani7
Copy link

Describe the bug
Laravel 9 throws following error:

Reproducible example

Problem 1
    - symfony/process[v4.0.0-BETA1, ..., v4.4.10] require php ^7.1.3 -> your php version (8.1.5) does not satisfy that requirement.
    - symfony/process[v5.0.0-BETA1, ..., v5.0.0-RC1] require php ^7.2.9 -> your php version (8.1.5) does not satisfy that requirement.
    - symfony/process[v5.0.0, ..., v5.1.0-RC1] require php ^7.2.5 -> your php version (8.1.5) does not satisfy that requirement.
    - Root composer.json requires nesk/puphpeteer ^2.0 -> satisfiable by nesk/puphpeteer[2.0.0].
    - Conclusion: don't install symfony/process v5.4.8 (conflict analysis result)
    - Root composer.json requires laravel/framework 9.0 -> satisfiable by laravel/framework[v9.0.0].
    - nesk/puphpeteer 2.0.0 requires nesk/rialto ^1.2.0 -> satisfiable by nesk/rialto[1.2.0, 1.2.1, 1.3.0, 1.4.0].
    - nesk/rialto 1.4.0 requires symfony/process ^3.3|^4.0|^5.0 -> satisfiable by symfony/process[v3.3.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev].
    - nesk/rialto[1.2.0, ..., 1.3.0] require symfony/process ^3.3|^4.0 -> satisfiable by symfony/process[v3.3.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev].
    - You can only install one version of a package, so only one of these can be installed: symfony/process[v3.2.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev, v6.0.0-BETA1, ..., 6.1.x-dev].
    - laravel/framework v9.0.0 requires symfony/process ^6.0 -> satisfiable by symfony/process[v6.0.0-BETA1, ..., 6.1.x-dev].
    - Conclusion: don't install symfony/process v6.0.8 (conflict analysis result)

Environment (please complete the following information):

  • OS: [e.g. Ubuntu 20.04]
  • Node version: [e.g. 16.13.2]
  • PHP version [e.g. 8.1.5]
@CodeSuite
Copy link

Hey Team, I am seeing the same as @parthjani7.

PHP version: 8.0.8
Laravel version: 9.2

composer require nesk/puphpeteer

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires nesk/puphpeteer ^2.0 -> satisfiable by nesk/puphpeteer[2.0.0].
- nesk/puphpeteer 2.0.0 requires psr/log ^1.0 -> found psr/log[1.0.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Excited to try it out once we can get it to play nice with Laravel 9.2

Thanks!

@janihq
Copy link

janihq commented May 11, 2022

Those who are looking for a better alternative, much stable and widely used : https://github.com/spatie/browsershot

$puppeteer = new Puppeteer;
$browser = $puppeteer->launch(['args' => ['--no-sandbox', '--disable-setuid-sandbox']]);

$page = $browser->newPage();
$page->goto($url, ["waitUntil" => "networkidle2"]);
$page->emulateMediaType('screen');
$page->pdf(['path' => $path, 'printBackground' => true]);
$browser->close();

Becomes

Browsershot::url($url)
                    ->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox'])
                    ->waitUntilNetworkIdle(false)
                    ->emulateMedia('screen')
                    ->savePdf($pathToSave);

@dogeow
Copy link

dogeow commented May 12, 2022

@janihq Yes.Screenshot can use Browsershot. But crawl use puphpeteer best.

@janihq
Copy link

janihq commented May 12, 2022

@likunyan This can be the alternative for crawling: https://github.com/spatie/crawler

@dogeow
Copy link

dogeow commented May 12, 2022

@janihq Thanks, I'll try it out.

@PJTH3G0D
Copy link

not as usefull as puphpeteer but ok

@PJTH3G0D
Copy link

I just cant figure out how to click around properly if he makes that simpler this will be the best php bot framework

@seifti
Copy link

seifti commented Jul 7, 2022

Temporary : composer require likunyan/puphpeteer@dev-dev

Getting a 404 :(

@dogeow
Copy link

dogeow commented Jul 7, 2022

@seifti Sorry, i clear other reop in my reops, but i accidentally deleted this repository.

@SpurIT
Copy link

SpurIT commented Aug 26, 2022

+1

2 similar comments
@iammayron
Copy link

+1

@iammayron
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants