CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • 5.0 Saloon »
  • Traits in PHP
Pages: [1]

Author Topic: Traits in PHP  (Read 686 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Traits in PHP
March 23, 2015, 08:48:38 am
Drupal 8 is using Traits, a new language feature in PHP 5.4+: http://php.net/manual/en/language.oop5.traits.php

Is this something we want to consider?
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Traits in PHP
March 23, 2015, 09:01:36 am
According to our usage stats over 50% of sites are still on php 5.3.
But that would change if we dropped support for it ;)
Try asking your question on the new CiviCRM help site.

mallezie

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal
  • PHP version: 5.4
Re: Traits in PHP
April 27, 2015, 07:42:18 am
Could we update the minimum php version on a release to be at least the supported version. http://php.net/supported-versions.php

For example for 4.7 (release october - november 2015?) This would be php 5.5, since php 5.4 won't be supported by then anymore (5.3 isn't supported already)
For a version released after 20 jun 2016 the minimum version would be php 5.6
For a version released after  28 aug 2017 the minimum version would be php 5.7 (or 7)

We don't update the version for released versions, but only for future versions, and this gives us the possibility to use the new features. For example for 4.7 we could already start using traits.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • 5.0 Saloon »
  • Traits in PHP

This forum was archived on 2017-11-26.