From c0299a56cc7f6087083771357d1911345738e9dc Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 26 Mar 2018 08:48:20 +0200 Subject: [PATCH] Make aliases public in compiler pass (#20) * Make aliases public as wll * Added changelog * Removed HHVM --- .travis.yml | 1 - Changelog.md | 8 +++++++- src/CompilerPass/PublicServicePass.php | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8c1e41..fc65b3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/Changelog.md b/Changelog.md index 1688653..a7c7bb4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/src/CompilerPass/PublicServicePass.php b/src/CompilerPass/PublicServicePass.php index 8862416..3fbd693 100644 --- a/src/CompilerPass/PublicServicePass.php +++ b/src/CompilerPass/PublicServicePass.php @@ -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); + } + } } }