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

Add line break between opening tag and namespace in generated files #6072

Merged
merged 1 commit into from Feb 23, 2021

Conversation

Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Jan 2, 2021

Test and Cest generators generate namespace on the same line as opening tag.
e.g.

<?php namespace foo;

This change changes it to

<?php
namespace foo;

in generated Test and Cest files
@TavoNiievez
Copy link
Member

TavoNiievez commented Jan 2, 2021

after I generate a Test, I always change:

<?php namespace App\Tests;

class MyTest extends \Codeception\Test\Unit

by:

<?php

namespace App\Tests;

use Codeception\Test\Unit;

final class MyTest extends Unit

could this be the default behavior?

@Naktibalda
Copy link
Member Author

Naktibalda commented Jan 2, 2021

I think that will be a part of #6071.

@Naktibalda
Copy link
Member Author

Naktibalda commented Jan 3, 2021

I misread the question last night, so it probably won't be a part of that pull request.

@DavertMik
Copy link
Member

DavertMik commented Jan 11, 2021

@Naktibalda yes, let's make it part of #6071

@DavertMik
Copy link
Member

DavertMik commented Jan 11, 2021

The original idea of this was to not introduce empty line if no namespace is used

@DavertMik DavertMik closed this Jan 11, 2021
@Naktibalda
Copy link
Member Author

Naktibalda commented Feb 10, 2021

@DavertMik this is a non-breaking change, so it can be merged to 4.1.
4.1 isn't dead yet.

@Naktibalda Naktibalda reopened this Feb 10, 2021
@Naktibalda Naktibalda merged commit 3ec3d35 into 4.1 Feb 23, 2021
39 checks passed
@Naktibalda Naktibalda deleted the 4.1-namespace-in-templates branch Feb 23, 2021
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.

None yet

3 participants