Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
system.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Sep 2015 at 18:38 UTC
Updated:
28 Nov 2022 at 20:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedComment #3
john franklin commentedComment #4
cilefen commentedThis isn't related directly, but it is an issue where we are trying to bring in a library #2343043: valid_email_address() should use egulias/EmailValidator and become deprecated.
Comment #5
cilefen commentedI don't know of a issue a quite like this so I don't know how likely it is to be considered for D7 core.. A suggestion:
Or, distribute the library with the utility module if the license is compatible. That would be easier.
Comment #6
cilefen commented#2551849: FR: Add support for PHP versions prior to 5.5 or boost module requirements has switched to requiring PHP 5.5.
PHP 5.4 is on its last ever release. Why support it?
Comment #7
john franklin commentedLots of places are running very old versions of PHP. Even though PHP 5.4 reaches end of security support very soon, that doesn't mean every web hosting site will magically upgrade to 5.5.
Perhaps Drupal 7 should require PHP >=5.5?
Comment #8
cilefen commentedRegarding what I wrote in #5:
What I really mean by that is that I, as in I myself, don't know of other instances of shipping whole libraries with Drupal 7. 8, yes, but not 7. But I could be wrong about this.
Comment #9
cilefen commentedTagging "Needs release manager review" so we could maybe get some feedback before proceeding.
Comment #10
john franklin commentedWhile it bills itself as a library, that's a pretty strong term for it. It's one function, maybe 100 lines long, wrapped in an "if (!function_exists())" check.
Comment #11
cilefen commentedIt is technically possible we can copy it and credit it but I don't know how that works in terms of licensing.
Comment #12
cilefen commentedI guess make a patch. I think it would go in common.inc or something.
Comment #13
David_Rothstein commentedI'm not really sure how the licensing policy works. I thought it had to be GPL (not just GPL-compatible) for the code to live on drupal.org, but on the other hand we already have modules/system/system.tar.inc in core, which appears to be non-GPL...
I wonder if it has to be in its own file (to make the licensing more clear?), but again not sure.
Possibly a more standard way to do it would be to define drupal_array_column() in common.inc, which calls the standard PHP array_column() function if it's available, and otherwise loads this extra library and uses that? That way the code only gets loaded when necessary. This is sort of what drupal_json_encode() does, for example.
Comment #14
cilefen commentedWe can ask the licensing working group for an opinion.
Comment #15
john franklin commentedA candidate patch. I've followed the lead of the system.tar.inc file. This array_column.inc file is the array_column.php file with additional php-doc @tags to cite the source, the Git commit, author, etc. The LICENSE file from the original repository is wrapped in a comment block and pasted to the top of the file. The indentation is then reduced to two spaces to better follow Drupal coding standards.
The file is then included in common.inc along with a number of other inc files.
Comment #16
poker10 commentedThanks for opening this and discussion. Considering that the PHP 5.6 EOL date was 31.12.2018, I think this is no longer relevant, as we are not going to introduce new code to support outdated PHP versions in this D7 phase. Therefore I am closing this issue.