Problem/Motivation
I am not a lawyer (IANAL), all opinions given are my own. Please contact a licensed attorney that is qualified to opine on the subject matters contained herein should you have any questions.
I stumbled upon this code while looking at implementing in contrib a resolution on specific callables to see if there was any preexisting work under GPLv2+ in core that could be called instead of duplicated in contrib.
ExpectDeprecationTrait::getCallableName() has an @see record in its doclblock pointing to https://stackoverflow.com/questions/34324576/print-name-or-definition-of....
Unless otherwise stated answers published on StackOverflow appear to be licensed under licenses determined by publication date.
From history we can see the code sample started out as CC BY-SA 3.0, was edited by its original author converting it to CC BY-SA 4.0 and it was later extended upon in a new answer under CC BY-SA 4.0. I was unable to find a comment co-releasing the code under a diffrent license.
Googling for a solution to a problem I found some code 99% matching what I needed on stackoverflow, c/p'ed it, adjusted and made a reference to the source for posterity.
- @mondrake (Source: Slack Thread in #core-development)
CC BY-SA 3.0 is 100% incompatible with all revisions of GPL, CC BY-SA 4.0 can be merged with GPLv3(only) (Source: Creative Commons - Compatible Licenses).
The code in question is small, and could possibly be developed independently in the same manner, however as we have an annotation directly refereeing the StackOverflow answer, and a comment in Slack implying a copy/paste with modification (deriviative) as such we have reason to belive that this was directly taken rather which raises questions on the validity of inclusions on GPLv2+ application.
A cursory review getCallableName() appears to only be called inside tearDownErrorHandler() howeve the Trait is included as low as \Drupal\Tests\UnitTestCase. I am unsure where tearDownErrorHandler() is called
Setting to Criticial as this involves Legal Compliance(Licensing) and the scope should be identified before any further code is impacted.
Tagging for Framework manager and Release Manager as I believe this involves their scope.
This issue may need to become a Meta at some point.
Steps to reproduce
Review source.
Proposed resolution
Resolve concern (if any exists)
Implement measures to prevent re-occurrence.
Remaining tasks
- Determine if this is actually CC BY-SA 4.0 only or if some other clause allows it to be classified as GPLv2+
- Confirm this means that the code could only be GPLv3 in cotext of Drupal.
- Determine spread of 'taint':
- Is the entiere commit GPLv3 (even if so @mondrake could resolve much of this by re-granting/affirming a GPLv2+ license for all other code once this is replaced)
- Does this taint apply to any other code extending the UntiTestCase class or higher (are all Core tests now tainted to GPLv3?)
- Does this impact Contrib licensing.
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3517614
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3517614-possible-non-gplv2
changes, plain diff MR !11850
Comments
Comment #2
cmlaraEdit: Correction on the provenance, it started as CC BY-SA 3.0 not 2.5 (no change in statements above regarding compatibility concerns)
Comment #3
alexpottYep we need to re-write this code.
Comment #4
alexpottI;ve looked for other links to stackoverflow in our code base. There are a few the others seem to involve much less code but I guess need to be reviewed as well.
Comment #5
cmlaraSaw blog post that the next Alpha will be released in the near future.
Should this be classified as an Alpha blocker and release blocker?
The monthly security window I believe is tomorrow, doss this have any impact on that window?
Comment #6
mstrelan commentedDo we even need this function? It's only used when throwing this exception:
Wouldn't it be enough without
self::getCallableName($handler)?Comment #7
quietone commentedShould we not seek an opinion from a the licensing working group?
Comment #8
alexpottI don't think so. This is an existing issue that has already been released. If it would be the first release with it in maybe but that's not the case.
I agree with #6 let's just remove the code. We can open an issue to reimplement if we like.
Comment #11
longwaveAgree, let's just remove the offending code for now, we don't strictly need it here. If we want to reintroduce it again by rewriting it in the future we can do that in another issue.
Comment #12
catchMakes sense to just remove it, the error message is decent without it.
Comment #13
cmlaraPlease take that into account that while the comments below are not intended to be an 'alarmist' reaction, I am well aware that this particular incident is minor at the moment (and overall is one of the least significant I've encountered in my history with software), the goal is to ensure it does not become more significant and to ensure any future incidents also have a well grounded base in place to avoid them possibly becoming significant.
I would suggest no matter what the Core Team/The Project Lead (Dries) will want to run this past legal to ensure they properly unwind this to ensure no future legal entanglement.
The phrase "Knowingly, willfully, and repeatedly" could be used to describe publishing additional releases or commits after the core team is made aware of the issue. It is one thing for something like this to happen without knowledge there is some room for compassion and more lenient mitigation.
The Linksys GPLv2 case is one of the most notable example of case law on this subject. The platform went from being Closed Source to Open Source GPLv2. An equivalent scenario for the Drupal Project in this case could be that the code no longer qualify as GPLv2 and would be GPLv3 only, not the worst situation that could happen, however I also suspect this is not desired by the Core Team.
Seems reasonable.
Comment #14
benjifisherIn the
migrate_plusmodule, I credited StackOverflow: https://git.drupalcode.org/project/migrate_plus/-/blob/6.0.x/src/Plugin/...Does that seem problematic? Once you know to look for it, that usage of
array_map()is also documented in the PHP docs: https://www.php.net/array_map#example-5199. Unlike the code in this issue, it is a one-liner.Comment #15
catchFor me personally, Creative Commons licenses are not software licenses at all. That means we should treat StackOverflow as documentation (or a discussion forum etc.), and if code follows that documentation and references the documentation it comes from, that is compatible with with a Creative Commons license and does not imply that using the code itself adopts that license.
Code on stack overflow is not released as code, it's embedded in a text document as an example, it's not even like a gist which might be a small standalone program.
Obviously I am not a lawyer, and also I have zero interest in whether this argument would stand up in court, and doubt it would ever need to.
Comment #16
alexpottDiscussed with @longwave and we agreed to put this back to 11.0.x in case we do a security release on 11.0.x.
Committed and pushed 405ac9dad3c to 11.x and 7769a956fbe to 11.1.x and 902e7a8c57a to 11.0.x. Thanks!