Skip to content

Commit 03a70a3

Browse files
committed
bug #581 Alias the slugger to fix fixtures loading (ogizanagi)
This PR was merged into the master branch. Discussion ---------- Alias the slugger to fix fixtures loading Fixes current exception: ```php [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent service "slugger". Did you mean this: "logger"? ``` `ContainerAwareInterface` still is the way to access services inside fixture loaders. Maybe something could be done on the doctrine-fixtures-bundle side, but for now we need to have a public alias for this service. We could also exclude the `DataFixtures\ORM` folder from PSR-4 loading, but it's probably not worth it and may "overwhelm" a little newcomers: ```diff - exclude: '../../src/AppBundle/{Controller,Entity,Repository}' + exclude: '../../src/AppBundle/{Controller,Entity,Repository,DataFixtures/ORM}' ``` Commits ------- 334f770 Alias the slugger to fix fixtures loading
2 parents 60eedfb + 334f770 commit 03a70a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/config/services.yml

+6
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ services:
4444

4545
# needed for the localizeddate Twig filter
4646
Twig\Extensions\IntlExtension: ~
47+
48+
# the slugger service needs a public alias for getting it from
49+
# the container when loading doctrine fixtures
50+
slugger:
51+
alias: AppBundle\Utils\Slugger
52+
public: true

0 commit comments

Comments
 (0)