-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup phpcs #43
Comments
…nt return points.
…nt return points.
Now all we need is to remove the loosened rules as we go. |
The indentation change from 4 chars to 2 chars will be quite disruptive, it will touch every line of code. Another thing is the "Copyright" comment at the top of files. I am actually not sure about the implication of doing or not doing it. I was curious about the history of this in Drupal, but all I found was this discussion: I have not heard of any cases where the lack of a copyright notice in a source file caused problems. |
There is no open PR right now. So this could be the time.
This is just consistency with what we do at Collabora. Including git "signoff", etc. |
The copyright comment is not included in Drupal projects because when hosting code on Drupal.org and distributing it through Drupal's packagist it must be relicensed using GPL2 or later. See https://www.drupal.org/about/licensing#gpl-compatible and the rest of the documentation on that page. This also means that in its current form the Collabora module is not adhering to the Drupal licenses and terms. As per point 9 (https://www.drupal.org/about/licensing#project-licensing) I'm not sure whether the way of distributing even matters or just the fact "it's a Drupal module" (although I think in how composer and PHP work these days that might be an interesting claim to contest). That may be something Collabora wants to discuss internally to see whether relicensing their Drupal module through GPL2 or later is an option. |
Hello @Kingdutch ! Still, I don't see that GPL2 would universally imply that you don't put a copyright header per file. Personally I am fine to just follow the convention and drop the copyright notice per file. |
Issue CollaboraOnline#43: Introduce phpcs, add meaningful doc comments.
IANAL But MPL-2.0 states:
So as a Drupal + this module, it's covered by GPL-2.0
|
I am still not sure about the conclusion here. I think we don't really have an issue with the license, only whether a copyright notice needs to be repeated per file or not. Even if we would change that notice to say GPL2. Btw we did miss to add that notice in recent PRs, so here is a PR that would re-add it: |
IANAL either..
For now we will just continue with the file headers as is. |
Setup phpcs and enforce the Drupal code style.
References https://www.drupal.org/docs/extending-drupal/contributed-modules/contributed-module-documentation/coder/installing-coder
The text was updated successfully, but these errors were encountered: