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
Optional fixtures #8377
Optional fixtures #8377
Conversation
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 resolve merge conflict.
d3c96e5
to
19a569d
Compare
Rebased. Conflicts in compser.json resolved by running |
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.
- There is a merge conflict again. It has to be resolved.
- I've generated the package, installed it and got the following error in the console (
php bin/console
).
PHP Warning: include(vendor/composer/../../plugins/MauticCitrixBundle/Tests/DataFixtures/ORM/LoadCitrixData.php): failed to open stream: No such file or directory in vendor/composer/ClassLoader.php on line 444
PHP Stack trace:
PHP 1. {main}() bin/console:0
PHP 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() bin/console:41
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/console/Application.php:148
PHP 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/framework-bundle/Console/Application.php:74
PHP 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/console/Application.php:255
PHP 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/framework-bundle/Console/Application.php:86
PHP 7. Symfony\Component\Console\Command\ListCommand->run() vendor/symfony/console/Application.php:1001
PHP 8. Symfony\Component\Console\Command\ListCommand->execute() vendor/symfony/console/Command/Command.php:255
PHP 9. Symfony\Component\Console\Helper\DescriptorHelper->describe() vendor/symfony/console/Command/ListCommand.php:75
PHP 10. Symfony\Component\Console\Descriptor\TextDescriptor->describe() vendor/symfony/console/Helper/DescriptorHelper.php:67
PHP 11. Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() vendor/symfony/console/Descriptor/Descriptor.php:55
PHP 12. Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() vendor/symfony/console/Descriptor/TextDescriptor.php:194
PHP 13. Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() vendor/symfony/console/Descriptor/ApplicationDescription.php:75
PHP 14. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/console/Descriptor/ApplicationDescription.php:102
PHP 15. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/framework-bundle/Console/Application.php:122
PHP 16. Symfony\Bundle\FrameworkBundle\Console\Application->has() vendor/symfony/console/Application.php:706
PHP 17. Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() vendor/symfony/console/Application.php:518
PHP 18. Symfony\Component\DependencyInjection\ServiceLocator->get() vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46
PHP 19. ContainerDxavvtd\appProdProjectContainer->{closure:var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:64-66}() vendor/symfony/dependency-injection/ServiceLocator.php:64
PHP 20. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:65
PHP 21. require() var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
PHP 22. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php:9
PHP 23. require() var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
PHP 24. spl_autoload_call() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
PHP 25. Composer\Autoload\ClassLoader->loadClass() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
PHP 26. Composer\Autoload\includeFile() vendor/composer/ClassLoader.php:322
Warning: include(vendor/composer/../../plugins/MauticCitrixBundle/Tests/DataFixtures/ORM/LoadCitrixData.php): failed to open stream: No such file or directory in vendor/composer/ClassLoader.php on line 444
Call Stack:
0.0017 400720 1. {main}() bin/console:0
0.0512 7245064 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() bin/console:41
0.0646 7631176 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/console/Application.php:148
0.3054 37891688 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/framework-bundle/Console/Application.php:74
0.3058 37891608 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/console/Application.php:255
0.3058 37891608 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/framework-bundle/Console/Application.php:86
0.3067 37905272 7. Symfony\Component\Console\Command\ListCommand->run() vendor/symfony/console/Application.php:1001
0.3070 37906288 8. Symfony\Component\Console\Command\ListCommand->execute() vendor/symfony/console/Command/Command.php:255
0.3101 38126400 9. Symfony\Component\Console\Helper\DescriptorHelper->describe() vendor/symfony/console/Command/ListCommand.php:75
0.3101 38126400 10. Symfony\Component\Console\Descriptor\TextDescriptor->describe() vendor/symfony/console/Helper/DescriptorHelper.php:67
0.3101 38126400 11. Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() vendor/symfony/console/Descriptor/Descriptor.php:55
0.3139 38141728 12. Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() vendor/symfony/console/Descriptor/TextDescriptor.php:194
0.3139 38141728 13. Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() vendor/symfony/console/Descriptor/ApplicationDescription.php:75
0.3139 38141728 14. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/console/Descriptor/ApplicationDescription.php:102
0.3139 38141728 15. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/framework-bundle/Console/Application.php:122
0.3640 42766264 16. Symfony\Bundle\FrameworkBundle\Console\Application->has() vendor/symfony/console/Application.php:706
0.3640 42766264 17. Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() vendor/symfony/console/Application.php:518
0.3641 42766264 18. Symfony\Component\DependencyInjection\ServiceLocator->get() vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46
0.3641 42766264 19. ContainerDxavvtd\appProdProjectContainer->{closure:var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:64-66}() vendor/symfony/dependency-injection/ServiceLocator.php:64
0.3641 42766584 20. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:65
0.3642 42792840 21. require('var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php') var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
0.3906 45968728 22. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php:9
0.3907 45970664 23. require('var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php') var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
0.3907 45970664 24. spl_autoload_call() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
0.3907 45970760 25. Composer\Autoload\ClassLoader->loadClass() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
0.3907 45970760 26. Composer\Autoload\includeFile() vendor/composer/ClassLoader.php:322
PHP Warning: include(): Failed opening 'vendor/composer/../../plugins/MauticCitrixBundle/Tests/DataFixtures/ORM/LoadCitrixData.php' for inclusion (include_path='.:/usr/local/Cellar/php@7.2/7.2.25/share/php@7.2/pear') in vendor/composer/ClassLoader.php on line 444
PHP Stack trace:
PHP 1. {main}() bin/console:0
PHP 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() bin/console:41
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/console/Application.php:148
PHP 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/framework-bundle/Console/Application.php:74
PHP 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/console/Application.php:255
PHP 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/framework-bundle/Console/Application.php:86
PHP 7. Symfony\Component\Console\Command\ListCommand->run() vendor/symfony/console/Application.php:1001
PHP 8. Symfony\Component\Console\Command\ListCommand->execute() vendor/symfony/console/Command/Command.php:255
PHP 9. Symfony\Component\Console\Helper\DescriptorHelper->describe() vendor/symfony/console/Command/ListCommand.php:75
PHP 10. Symfony\Component\Console\Descriptor\TextDescriptor->describe() vendor/symfony/console/Helper/DescriptorHelper.php:67
PHP 11. Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() vendor/symfony/console/Descriptor/Descriptor.php:55
PHP 12. Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() vendor/symfony/console/Descriptor/TextDescriptor.php:194
PHP 13. Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() vendor/symfony/console/Descriptor/ApplicationDescription.php:75
PHP 14. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/console/Descriptor/ApplicationDescription.php:102
PHP 15. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/framework-bundle/Console/Application.php:122
PHP 16. Symfony\Bundle\FrameworkBundle\Console\Application->has() vendor/symfony/console/Application.php:706
PHP 17. Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() vendor/symfony/console/Application.php:518
PHP 18. Symfony\Component\DependencyInjection\ServiceLocator->get() vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46
PHP 19. ContainerDxavvtd\appProdProjectContainer->{closure:var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:64-66}() vendor/symfony/dependency-injection/ServiceLocator.php:64
PHP 20. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:65
PHP 21. require() var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
PHP 22. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php:9
PHP 23. require() var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
PHP 24. spl_autoload_call() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
PHP 25. Composer\Autoload\ClassLoader->loadClass() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
PHP 26. Composer\Autoload\includeFile() vendor/composer/ClassLoader.php:322
Warning: include(): Failed opening 'vendor/composer/../../plugins/MauticCitrixBundle/Tests/DataFixtures/ORM/LoadCitrixData.php' for inclusion (include_path='.:/usr/local/Cellar/php@7.2/7.2.25/share/php@7.2/pear') in vendor/composer/ClassLoader.php on line 444
Call Stack:
0.0017 400720 1. {main}() bin/console:0
0.0512 7245064 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() bin/console:41
0.0646 7631176 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/console/Application.php:148
0.3054 37891688 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() vendor/symfony/framework-bundle/Console/Application.php:74
0.3058 37891608 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/console/Application.php:255
0.3058 37891608 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() vendor/symfony/framework-bundle/Console/Application.php:86
0.3067 37905272 7. Symfony\Component\Console\Command\ListCommand->run() vendor/symfony/console/Application.php:1001
0.3070 37906288 8. Symfony\Component\Console\Command\ListCommand->execute() vendor/symfony/console/Command/Command.php:255
0.3101 38126400 9. Symfony\Component\Console\Helper\DescriptorHelper->describe() vendor/symfony/console/Command/ListCommand.php:75
0.3101 38126400 10. Symfony\Component\Console\Descriptor\TextDescriptor->describe() vendor/symfony/console/Helper/DescriptorHelper.php:67
0.3101 38126400 11. Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() vendor/symfony/console/Descriptor/Descriptor.php:55
0.3139 38141728 12. Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() vendor/symfony/console/Descriptor/TextDescriptor.php:194
0.3139 38141728 13. Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() vendor/symfony/console/Descriptor/ApplicationDescription.php:75
0.3139 38141728 14. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/console/Descriptor/ApplicationDescription.php:102
0.3139 38141728 15. Symfony\Bundle\FrameworkBundle\Console\Application->all() vendor/symfony/framework-bundle/Console/Application.php:122
0.3640 42766264 16. Symfony\Bundle\FrameworkBundle\Console\Application->has() vendor/symfony/console/Application.php:706
0.3640 42766264 17. Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() vendor/symfony/console/Application.php:518
0.3641 42766264 18. Symfony\Component\DependencyInjection\ServiceLocator->get() vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:46
0.3641 42766264 19. ContainerDxavvtd\appProdProjectContainer->{closure:var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:64-66}() vendor/symfony/dependency-injection/ServiceLocator.php:64
0.3641 42766584 20. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getConsole_CommandLoaderService.php:65
0.3642 42792840 21. require('var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php') var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
0.3906 45968728 22. ContainerDxavvtd\appProdProjectContainer->load() var/cache/prod/ContainerDxavvtd/getDoctrine_FixturesLoadCommandService.php:9
0.3907 45970664 23. require('var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php') var/cache/prod/ContainerDxavvtd/appProdProjectContainer.php:5489
0.3907 45970664 24. spl_autoload_call() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
0.3907 45970760 25. Composer\Autoload\ClassLoader->loadClass() var/cache/prod/ContainerDxavvtd/getMautic_Citrix_Fixture_LoadCitrixDataService.php:8
0.3907 45970760 26. Composer\Autoload\includeFile() vendor/composer/ClassLoader.php:322
In getMautic_Citrix_Fixture_LoadCitrixDataService.php line 8:
Attempted to load class "LoadCitrixData" from namespace "MauticPlugin\MauticCitrixBundle\Tests\DataFixtures\ORM".
Did you forget a "use" statement for another namespace?
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.
Nitpick: I've also noticed that the package generation takes considerably more time now (like 50%-100% more). I haven't performed any tests though, so this is just my rough estimate.
It could be related to that collection class we borrowed from Laravel. It may be too slow in comparison with php arrays.
The cache compilation happens once though so it's not an issue. It's better than creating an untested pass-by-reference array function to mimick the same functionality. |
Good to know. Thanks for explaining, @dongilbert. |
I see - I didn't realize that's what you were talking about |
19a569d
to
2843ba8
Compare
There are changes in composer.json so maybe the longer time for generation relates to it. |
@lukassykora there are conflicts in composer.lock. I fixed it once today by rebasing, then running |
80a8cb8
to
ccc3aba
Compare
The conflicts have been resolved following @escopecz's suggestion. |
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.
@escopecz Could you please merge?
Please be sure you are submitting this against the staging branch.
Description:
The services that are not sometimes available need an argument optional=true. The config.php was modified to remove the services where the argument is optional = true and class does not exist.
Steps to reproduce the bug:
Steps to test this PR: