Skip to content

Commit

Permalink
Make aliases public in compiler pass (#20)
Browse files Browse the repository at this point in the history
* Make aliases public as wll

* Added changelog

* Removed HHVM
  • Loading branch information
Nyholm authored Mar 26, 2018
1 parent 35fb99a commit c0299a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ matrix:
- php: 5.6
- php: 7.0
- php: 7.2
- php: hhvm
dist: trusty
- php: 7.1
env: DEPENDENCIES="dunglas/symfony-lock:^2"
Expand Down
8 changes: 7 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.

## 1.4.0

### Added

- Aliases can be made public with the `PublicServicePass`.

## 1.3.1

### Fixed

- Show our dependencies directly in require secion of composer.json.
- Show our dependencies directly in require section of composer.json.

## 1.3.0

Expand Down
6 changes: 6 additions & 0 deletions src/CompilerPass/PublicServicePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@ public function process(ContainerBuilder $container)
$definition->setPublic(true);
}
}

foreach ($container->getAliases() as $id => $alias) {
if (preg_match($this->regex, $id)) {
$alias->setPublic(true);
}
}
}
}

0 comments on commit c0299a5

Please sign in to comment.