Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with php 7.3 #64

Open
vistart opened this issue Dec 13, 2018 · 14 comments
Open

Not compatible with php 7.3 #64

vistart opened this issue Dec 13, 2018 · 14 comments

Comments

@vistart
Copy link

@vistart vistart commented Dec 13, 2018

PHP Warning 'yii\base\ErrorException' with message 'preg_match(): Compilation failed: invalid range in character class at offset 4'

in .../sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php:1378

https://github.com/sunra/php-simple-html-dom-parser/blob/master/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php#L1378

@oza75
Copy link

@oza75 oza75 commented Dec 15, 2018

I got the same error

@wotupset
Copy link

@wotupset wotupset commented Dec 16, 2018

php 7.3 has some bugs in preg_* function

@ArniPL
Copy link

@ArniPL ArniPL commented Dec 17, 2018

@wotupset Not bugs. PHP 7.3 has updated its regular expression engine to PCRE2, which brings some breaking changes.

I think the dash in referenced expression needs to be escaped.

More: http://php.net/manual/en/migration73.other-changes.php#migration73.other-changes.pcre

@ArniPL
Copy link

@ArniPL ArniPL commented Dec 17, 2018

There's even a PR opened two months ago that fixes this: #63 but it's left unmerged. This package might be abandoned.

@Kub-AT
Copy link

@Kub-AT Kub-AT commented Jan 3, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser

Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

@luigitek
Copy link

@luigitek luigitek commented Apr 10, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser

This version doesn't work as expected for example:

$dom->find('div[class=name]', 0);

The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

@Kub-AT
Copy link

@Kub-AT Kub-AT commented Apr 11, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser

This version doesn't work as expected for example:

$dom->find('div[class=name]', 0);

The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

It would be nice if you reported a bug here https://sourceforge.net/p/simplehtmldom/bugs/

@luigitek
Copy link

@luigitek luigitek commented Apr 11, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser
This version doesn't work as expected for example:
$dom->find('div[class=name]', 0);
The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

It would be nice if you reported a bug here https://sourceforge.net/p/simplehtmldom/bugs/

Thanks m8, I've opened an bug issue:
https://sourceforge.net/p/simplehtmldom/bugs/169/

I'll include more details to it as soon as I get a chance 👍

@derryberni
Copy link

@derryberni derryberni commented Apr 13, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser

Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

hi use this
https://github.com/Kub-AT/php-simple-html-dom-parser

but i get error
Message: Call to undefined method KubAT\PhpSimple\HtmlDomParser::loadFromUrl()

@Kub-AT

@Kub-AT
Copy link

@Kub-AT Kub-AT commented Apr 15, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser
Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

hi use this
https://github.com/Kub-AT/php-simple-html-dom-parser

but i get error
Message: Call to undefined method KubAT\PhpSimple\HtmlDomParser::loadFromUrl()

@Kub-AT

it looks like you have mistaken the library, there is no loadFromUrl in simplehtmldom
but is in https://github.com/paquettg/php-html-parser

@ebuildy
Copy link

@ebuildy ebuildy commented Sep 11, 2019

this should be reported in the composer.yml file ! to avoid installation under >= php7.3 (php 7.4 is RC1 now)

@MirolimMajidov
Copy link

@MirolimMajidov MirolimMajidov commented Mar 1, 2020

@vistart, Get the last version of simplehtmldom from "https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/" site. It will work.

@sandykadam
Copy link

@sandykadam sandykadam commented Apr 13, 2020

@vistart, Get the last version of simplehtmldom from "https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/" site. It will work.

Thanks this works like charm +1

@fehmi
Copy link

@fehmi fehmi commented Feb 4, 2021

@vistart, Get the last version of simplehtmldom from "https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/" site. It will work.

Thank you, it worked for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet