8000 cut: Remove the public compiler pass (#48) · jderusse/symfony-bundle-test@974f11b · GitHub
[go: up one dir, main page]

Skip to content

Commit 974f11b

Browse files
authored
cut: Remove the public compiler pass (SymfonyTest#48)
* cut: Deprecate the public compiler pass * fix cs * cut: Remove compiler pass * docs: Remove section about symfony below 4.1
1 parent 7994f15 commit 974f11b

File tree

2 files changed

+0
-69
lines changed

2 files changed

+0
-69
lines changed

Readme.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,33 +70,6 @@ class BundleInitializationTest extends BaseBundleTestCase
7070

7171
```
7272

73-
## Private services in Symfony 4
74-
75-
In Symfony 4 services are private by default. This is a good thing, but in order to test them properly we need to make
76-
them public when we are running the tests. This can easily be done with a compiler pass.
77-
78-
```php
79-
class BundleInitializationTest extends BaseBundleTestCase
80-
{
81-
protected function setUp()
82-
{
83-
parent::setUp();
84-
85-
// Make all services public
86-
$this->addCompilerPass(new PublicServicePass());
87-
88-
// Make services public that have an idea that matches a regex
89-
$this->addCompilerPass(new PublicServicePass('|my_bundle.*|'));
90-
}
91-
92-
// ...
93-
}
94-
```
95-
96-
### Known Issue
97-
98-
Be aware that if you make all services public then you will not get any errors if your bundles access this services even if they are private by nature.
99-
10073
## Configure Github Actions
10174

10275
You want ["Github actions"](https://docs.github.com/en/actions) to run against each currently supported LTS version of Symfony (since there would be only one per major version), plus the current if it's not an LTS too. There is no need for testing against version in between because Symfony follows [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

src/CompilerPass/PublicServicePass.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0