View Issue Details

IDProjectCategoryView StatusLast Update
0020501mantisbtcode cleanuppublic2016-08-15 09:02
Reporteratrol Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.19 
Target Version1.2.20Fixed in Version1.2.20 
Summary0020501: Installer throws warning in PHP 7 environment
Description

Environment: Windows 10, XAMPP, PHP 7.0.1, FF 43

Running admin/install.php throws warning:

Deprecated: Methods with the same name as their class will not be constructors
in a future version of PHP; UserPreferences has a deprecated constructor in
C:\xamppphp7\htdocs\mantisbt\core\user_pref_api.php on line 48

See http://php.net/manual/en/migration70.deprecated.php#migration70.deprecated.php4-constructors

TagsPHP 7

Relationships

related to 0020500 closedatrol Installation fails in PHP 7 environment 
related to 0020864 closeddregad "user_pref_get_language()" not defined 
child of 0020499 closeddregad Compatibility with PHP 7 

Activities

dregad

dregad

2016-01-11 07:00

developer   ~0052289

Last edited: 2016-01-11 07:00

I replaced PHP4-style constructors by __construct() in

  • user_pref_api (UserPreferences class),
  • graphviz_api.php (Graph class) and
  • MantisGraph plugin (Period class)

Also, backported to 1.2.x since we require PHP5 it doesn't hurt.

atrol

atrol

2016-01-11 07:15

developer   ~0052291

Also, backported to 1.2.x since we require PHP5 it doesn't hurt.

Not sure if it makes sense to touch 1.2.x in terms of PHP7.
Seems there is more work needed, e.g. 0020484

Maybe time to activate travis PHP7 in master?

dregad

dregad

2016-01-11 07:56

developer   ~0052292

Not sure if it makes sense to touch 1.2.x in terms of PHP7.

Maybe not, but as I said, it's a simple and straightforward change so it doesn't hurt.

Maybe time to activate travis PHP7 in master?

Will do.

Related Changesets

MantisBT: master baae433f

2016-01-11 01:49

dregad


Details Diff
PHP7: Remove old-style constructors

PHP4-style constructors are deprecated in PHP7.

Fixes 0020501
Affected Issues
0020501
mod - core/graphviz_api.php Diff File
mod - core/user_pref_api.php Diff File
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master-1.2.x a9731e94

2016-01-11 01:49

dregad


Details Diff
PHP7: Remove old-style constructors

PHP4-style constructors are deprecated in PHP7.

Fixes 0020501
Affected Issues
0020501
mod - core/graphviz_api.php Diff File
mod - core/user_pref_api.php Diff File
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master db98d830

2016-05-01 00:59

dregad


Details Diff
PHP7: Remove old-style constructors

One function was omitted from baae433f220fe8b0bed41e0ffb4c46942729a142.

Fixes 0020501
Affected Issues
0020501
mod - core/graphviz_api.php Diff File

MantisBT: master-1.2.x 6b9bf08b

2016-05-01 00:59

dregad


Details Diff
PHP7: Remove old-style constructors

One function was omitted from a9731e9468f3112bde652326310bd3fcf5086a29.

Fixes 0020501
Affected Issues
0020501
mod - core/graphviz_api.php Diff File