On Fri, Jul 21, 2017 at 9:50 PM, Jan Ehrhardt <php...@ehrhardt.nl> wrote: > > I tried running Drupal7 with 7.2.0 Beta 1 and ran into a fatal error, > that does not happen under PHP 7.1.x (Windows, NTS, x64). I do not know > if it is a bug, an omission in UPGRADING or me looking with my nose. > Therefore I did not file a bugreport yet. > > The case: class RulesActionContainerUI has a public function form: > > public function form(&$form, &$form_state, $options = array(), $iterator > = NULL) { > > class RulesRuleUI extends RulesActionContainerUI with a public function > > public function form(&$form, &$form_state, $options = array()) { > > Bad programming, but no PHP ever stumbled over it. PHP 7.2.0 Beta 1 > issues a fatal error that RulesRuleUI::form must be compatible with > RulesActionContainerUI::form. IMHO a valid remark, but still a BC break. > Is this documented anywhere? Or should the Fatal Error become less > fatal? >
This sounds strange. This hasn't changed in 7.2. It was the same in 7.1 and 7.0. Even in 5.6 and 5.5 it was an E_STRICT. Unless the Windows version has somehow drifted, but I don't see how that would be possible. Are you sure it isn't caused by something else? eg. 10:10pm thinkpad:~/php-src> cat -n g 1 <?php 2 class P { 3 public function form(&$form, &$form_state, $options = array(), $iterator = NULL) { } 4 } 5 6 class C extends P { 7 public function form(&$form, &$form_state, $options = array()) { } 8 } 10:10pm thinkpad:~/php-src> php g Warning: Declaration of C::form(&$form, &$form_state, $options = Array) should be compatible with P::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /home/rasmus/php-src/g on line 8 10:10pm thinkpad:~/php-src> php -v PHP 7.2.0-dev (cli) (built: Jul 21 2017 22:08:10) ( NTS ) 10:10pm thinkpad:~/php-src> sudo newphp 71 Activating PHP 7.1.3-dev (cli) (built: Feb 11 2017 09:40:56) ( NTS ) and restarting php-fpm 10:10pm thinkpad:~/php-src> php g Warning: Declaration of C::form(&$form, &$form_state, $options = Array) should be compatible with P::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /home/rasmus/php-src/g on line 8 10:10pm thinkpad:~/php-src> php -v PHP 7.1.3-dev (cli) (built: Feb 11 2017 09:40:56) ( NTS ) -Rasmus