Skip to content

fix: add PHP license header under the PHP tag#34

Open
CommandMaker wants to merge 1 commit intoattilarepka:masterfrom
CommandMaker:master
Open

fix: add PHP license header under the PHP tag#34
CommandMaker wants to merge 1 commit intoattilarepka:masterfrom
CommandMaker:master

Conversation

@CommandMaker
Copy link
Copy Markdown

Hello, I discovered your plugin not long ago and loved it, I wanted to be able to put licence headers for a long time.
But I found a problem : if I use the AddLicenseGPL3 (it should do it with others too) the header would be placed before the <?php tag, causing a syntax problem. I did some kind of dirty fix so I don't know if you'll accept it but it's sufficient for me at least 😆.

Have a nice day !

The license was invalidating the PHP file because it would be put before
the <?php tag
@attilarepka
Copy link
Copy Markdown
Owner

Hi!
You’re right about PHP, placing the header before the <?php tag breaks things.

That said, this isn’t just a PHP-specific issue. It opens up a broader problem around how headers should be inserted depending on file context (PHP blocks, shebangs, template files, etc.). Because of that, I’d rather handle it with a more general solution instead of merging a language-specific workaround.

I’ll revisit this with a proper refactor when I have some time.

In the meantime, feel free to keep using your fork/workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants