spekulatius / PHPScraper

A universal web-util for PHP.
https://phpscraper.de
GNU General Public License v3.0
520 stars 73 forks source link

deprecate magic properties / methods #82

Closed tacman closed 2 years ago

tacman commented 2 years ago

In my branch I've removed the magic get and call methods, and moved what was core into the phpscraper, so now there is only one class.

After a while I got tired of find/replace, so I created a rector rule to change the properties to method.

Is there a demo repository that uses I can use to test my branch? Tests are passing, except for the ones related to internal/external links, which I'll address in another issue.

spekulatius commented 2 years ago

Hey @tacman,

I like the magic properties. The simplicity of PHPscraper is part of the reason I've written it.

Cheers, Peter

tacman commented 2 years ago

Hmm. I think one class is easier than 2, and magic methods can't be statically checked or linked with PhpStorm. And with a rector rule, it's easy to update, so in my mind it's no less simple without the magic methods. just my 2 cents.

spekulatius commented 2 years ago

Yeah, it's kind a personal opinion thing I guess.