-
Notifications
You must be signed in to change notification settings - Fork 66
Add kernel root directory to fixtures location paths #284
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
Add kernel root directory to fixtures location paths #284
Conversation
Tests are failing because travis switched the default box to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, agree with the change. about php 5.3 lets just drop it and bump up to php 5.6
Command/LoadFixtureCommand.php
Outdated
$paths = array(); | ||
/** @var $kernel \Symfony\Component\HttpKernel\KernelInterface */ | ||
$kernel = $this->getApplication()->getKernel(); | ||
$paths = array($kernel->getRootDir().'/DataFixtures/PHPCR'); | ||
foreach ($this->getApplication()->getKernel()->getBundles() as $bundle) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change this to $kernel->getBundles(), no need to get application and kernel twice
Command/LoadFixtureCommand.php
Outdated
@@ -135,7 +135,9 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
if ($dirOrFile) { | |||
$paths = is_array($dirOrFile) ? $dirOrFile : array($dirOrFile); | |||
} else { | |||
$paths = array(); | |||
/** @var $kernel \Symfony\Component\HttpKernel\KernelInterface */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i prefer to use a short class name here and use
it at the top if its not already used.
It looks like it's the purpose of #282. |
yes but that got stuck because dependencies not working correctly on 7.2. in the end its super bizarre: phpcr/phpcr-utils#174 i did not get around to dig into it and figure out what exactly is wrong. we could simply drop 5.3 separately. anyways, i can merge this pull request without the 5.3 build being green, its not related. can you please update to the comments i made? |
I addressed all your comments. |
thank you very much! if you see a place in the documentation where this should be mentioned, please do a pull request. this is the bundle, so docs should be in symfony-cmf-docs and not in the doctrine documentation. |
This allows to load fixtures from a bundless application like the one created with symfony/flex. This is a port of doctrine/DoctrineFixturesBundle#192.