Skip to content
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

Code Style: Unify php file licence headers and their position #5138

Open
mhsdesign opened this issue Jun 11, 2024 · 0 comments
Open

Code Style: Unify php file licence headers and their position #5138

mhsdesign opened this issue Jun 11, 2024 · 0 comments
Labels

Comments

@mhsdesign
Copy link
Member

Subtask of #4478

@kitsunet brought up the question on our rules regarding copyright doc blocks in our classes.
We agreed to the positioning of such block: If we follow PSR-12 it would be the first thing in every class, even before any declare directives.

On slack we voted for option 2:

  1. we want to keep our "This file is part of the [...] package" version
  2. introduce a reduced version without any dynamic parts
  3. get rid of the per-file copyright doc blocks (legally they aren't required)

That means a php file would start with

<?php

/*
 * (c) Contributors of the Neos Project - www.neos.io
 * Please see the LICENSE file which was distributed with this source code.
 */

declare(strict_types=1);

namespace Neos\ContentRepository\Core;

use Neos\Utility\Arrays;

Not only do we want to use this pattern for new files, but the goal would be to adjust all current files as well lint against these rules in ci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant