M
M
Muhammad2015-12-07 23:06:40
PHP
Muhammad, 2015-12-07 23:06:40

Why is NOT throwing a "Declaration of * should be compatible with * ..." error?

There is a Composer package that "extends" the functionality of another package . Most of the code is honestly "borrowed" from the DomCrawler library , I just changed the structure and added a couple of methods. The Tweezers\Crawler class inherits from DiDom\Document . The problem arose with the find method, or rather with the number of arguments in it: they Documenthave 3, and in Crawler- 2. Accordingly, the Declaration of * should be ... exception should be thrown , but this does not happen: the tests pass successfully. I connected the package in a new folder, played a little - everything is ok. But when connecting to my project, it throws this exception. Why is this happening?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2015-12-07
@muhammad_97

error_reporting E_STRICT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question