10000 [FrameworkBundle] Register all private services on the test service container by jakzal · Pull Request #27048 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Register all private services on the test service container #27048

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

Conversation

jakzal
Copy link
Contributor
@jakzal jakzal commented Apr 25, 2018
Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Before this fix, only services explicitly configured with public=false were exposed via the test service container:

$container->register(PrivateService::class, PrivateService::class)->setPublic(false);

but not those explicitly configured as private:

$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);

nor those implicitly configured as private:

$container->register(PrivateService::class, PrivateService::class);

@jakzal jakzal force-pushed the framework-bundle/private-services-in-tests branch 2 times, most recently from fb8f93c to 28f1337 Compare April 25, 2018 15:17
@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Apr 25, 2018
…ontainer

Before this fix, only services explicitly configured with public=false were exposed via the test service container:

```
$container->register(PrivateService::class, PrivateService::class)->setPublic(false);
```

but not those explicitly configured as private:

```
$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);
```

nor those implicitly configured as private:

```
$container->register(PrivateService::class, PrivateService::class);
```
@jakzal jakzal force-pushed the framework-bundle/private-services-in-tests branch from 28f1337 to 6677393 Compare April 25, 2018 15:27
@nicolas-grekas
Copy link
Member

Thank you @jakzal.

@nicolas-grekas nicolas-grekas merged commit 6677393 into symfony:master Apr 25, 2018
nicolas-grekas added a commit that referenced this pull request Apr 25, 2018
…t service container (jakzal)

This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Register all private services on the test service container

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Before this fix, only services explicitly configured with public=false were exposed via the test service container:

```php
$container->register(PrivateService::class, PrivateService::class)->setPublic(false);
```

but not those explicitly configured as private:

```php
$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);
```

nor those implicitly configured as private:

```php
$container->register(PrivateService::class, PrivateService::class);
```

Commits
-------

6677393 [FrameworkBundle] Register all private services on the test service container
@jakzal jakzal deleted the framework-bundle/private-services-in-tests branch April 25, 2018 15:59
@sroze
Copy link
Contributor
sroze commented Apr 25, 2018

Very good, thanks @jakzal 👍

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

Successfully merging this pull request may close these issues.

4 participants
0