> https://wiki.php.net/rfc/consistent_type_errors >> >> >> Would it make sense and be possible to trigger a deprecation notice in >> PHP 7.4? >> >> That might help the ecosystem move forward in a smooth way instead of >> experimenting the failure when actually moving to 8. >> > > We generally consider a warning a "harder" error than a deprecation >
Do all situations that will throw after the RFC trigger a warning right now? Eg var_dump(substr(null, 1)); doesn't trigger anything but returns false - does that mean it will not throw a TypeError in your proposal? > if you are deliberately suppressing warnings, in which case chances are > very good that you are also suppressing deprecations. > This assumption is wrong in the Symfony ecoystem! We built the deprecation framework around silenced (and unsilenced) deprecations, which are all caught and logged. So it would make a huge difference actually, at least for situations where no warning is triggered (see substr example above). Nicolas