diff --git a/.gitignore b/.gitignore index 375fd851264..633d0a67326 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,9 @@ /.php_cs.cache -/app/*.cache -/app/cache -/app/logs - -/app/check.php -/app/SymfonyRequirements.php - /app/config/parameters.yml /app/config/*.local.yml +/var/* +!/var/.gitkeep /web/assets /web/bundles @@ -16,7 +11,6 @@ /web/js /web/media -/bin /vendor /node_modules diff --git a/app/.htaccess b/app/.htaccess deleted file mode 100644 index 8d2f25636dd..00000000000 --- a/app/.htaccess +++ /dev/null @@ -1 +0,0 @@ -deny from all diff --git a/app/TestAppKernel.php b/app/TestAppKernel.php index cef71f073f1..144b77779f4 100644 --- a/app/TestAppKernel.php +++ b/app/TestAppKernel.php @@ -28,13 +28,13 @@ public function shutdown() return; } - if (!in_array($this->environment, ['test', 'test_cached'], true)) { + if (!in_array($this->getEnvironment(), ['test', 'test_cached'], true)) { parent::shutdown(); return; } - $container = $this->container; + $container = $this->getContainer(); parent::shutdown(); $this->cleanupContainer($container); } diff --git a/app/autoload.php b/app/autoload.php index cec2f61ab2c..31321faa58f 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -1,23 +1,11 @@ getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; - -$application = new Application(new AppKernel($env, $debug)); -$application->run($input); diff --git a/bin/console b/bin/console new file mode 100755 index 00000000000..a908aaa939c --- /dev/null +++ b/bin/console @@ -0,0 +1,28 @@ +#!/usr/bin/env php +getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; + +if ($debug) { + Debug::enable(); +} + +$kernel = new AppKernel($env, $debug); +$application = new Application($kernel); +$application->run($input); diff --git a/bin/symfony_requirements b/bin/symfony_requirements new file mode 100755 index 00000000000..65c5192c865 --- /dev/null +++ b/bin/symfony_requirements @@ -0,0 +1,143 @@ +#!/usr/bin/env php +getPhpIniConfigPath(); + +echo_title('Symfony Requirements Checker'); + +echo '> PHP is using the following php.ini file:'.PHP_EOL; +if ($iniPath) { + echo_style('green', ' '.$iniPath); +} else { + echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!'); +} + +echo PHP_EOL.PHP_EOL; + +echo '> Checking Symfony requirements:'.PHP_EOL.' '; + +$messages = array(); +foreach ($symfonyRequirements->getRequirements() as $req) { + /** @var $req Requirement */ + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('red', 'E'); + $messages['error'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +$checkPassed = empty($messages['error']); + +foreach ($symfonyRequirements->getRecommendations() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('yellow', 'W'); + $messages['warning'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +if ($checkPassed) { + echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); +} else { + echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); + + echo_title('Fix the following mandatory requirements', 'red'); + + foreach ($messages['error'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +if (!empty($messages['warning'])) { + echo_title('Optional recommendations to improve your setup', 'yellow'); + + foreach ($messages['warning'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +echo PHP_EOL; +echo_style('title', 'Note'); +echo ' The command console could use a different php.ini file'.PHP_EOL; +echo_style('title', '~~~~'); +echo ' than the one used with your web server. To be on the'.PHP_EOL; +echo ' safe side, please check the requirements from your web'.PHP_EOL; +echo ' server using the '; +echo_style('yellow', 'web/config.php'); +echo ' script.'.PHP_EOL; +echo PHP_EOL; + +exit($checkPassed ? 0 : 1); + +function get_error_message(Requirement $requirement, $lineSize) +{ + if ($requirement->isFulfilled()) { + return; + } + + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; + + return $errorMessage; +} + +function echo_title($title, $style = null) +{ + $style = $style ?: 'title'; + + echo PHP_EOL; + echo_style($style, $title.PHP_EOL); + echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); + echo PHP_EOL; +} + +function echo_style($style, $message) +{ + // ANSI color codes + $styles = array( + 'reset' => "\033[0m", + 'red' => "\033[31m", + 'green' => "\033[32m", + 'yellow' => "\033[33m", + 'error' => "\033[37;41m", + 'success' => "\033[37;42m", + 'title' => "\033[34m", + ); + $supports = has_color_support(); + + echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); +} + +function echo_block($style, $title, $message) +{ + $message = ' '.trim($message).' '; + $width = strlen($message); + + echo PHP_EOL.PHP_EOL; + + echo_style($style, str_repeat(' ', $width).PHP_EOL); + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_repeat(' ', $width).PHP_EOL); +} + +function has_color_support() +{ + static $support; + + if (null === $support) { + if (DIRECTORY_SEPARATOR == '\\') { + $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + } else { + $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + } + + return $support; +} diff --git a/composer.json b/composer.json index 01ec8cc479b..410da961737 100644 --- a/composer.json +++ b/composer.json @@ -151,14 +151,16 @@ "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], "post-update-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ] }, "autoload": { @@ -166,24 +168,26 @@ "Sylius\\Behat\\": "src/Sylius/Behat/", "Sylius\\Bundle\\": "src/Sylius/Bundle/", "Sylius\\Component\\": "src/Sylius/Component/" - } + }, + "classmap": ["app/AppKernel.php", "app/AppCache.php"] }, "autoload-dev": { "psr-4": { "Sylius\\Tests\\": "tests/" } }, - "config": { - "bin-dir": "bin" - }, "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, + "symfony-app-dir": "app", + "symfony-bin-dir": "bin", + "symfony-var-dir": "var", + "symfony-web-dir": "web", + "symfony-tests-dir": "tests", + "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" }, - "symfony-app-dir": "app", - "symfony-web-dir": "web" + "branch-alias": { + "dev-master": "1.0-dev" + } } } diff --git a/composer.lock b/composer.lock index cf93470a24b..02452ca9f50 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "42e8020a0711d3ee7a06f07e6cd2f0d3", - "content-hash": "a4f029c6ab692fed4b71f6693bfbbc15", + "hash": "bbdd77740308132c5daefdc92f713124", + "content-hash": "615c38d1a2a7b742dc97a6ca4595b41d", "packages": [ { "name": "behat/transliterator", diff --git a/etc/travis/suites/application/before_script.sh b/etc/travis/suites/application/before_script.sh index 97ae11015d7..fc723c1bf8f 100755 --- a/etc/travis/suites/application/before_script.sh +++ b/etc/travis/suites/application/before_script.sh @@ -3,10 +3,10 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" print_header "Setting the application up" "Sylius" -run_command "app/console doctrine:database:create --env=test_cached -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database -run_command "app/console cache:warmup --env=test_cached --no-debug -vvv" || exit $? -run_command "app/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv" || exit $? +run_command "bin/console doctrine:database:create --env=test_cached -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database +run_command "bin/console cache:warmup --env=test_cached --no-debug -vvv" || exit $? +run_command "bin/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv" || exit $? print_header "Setting the web assets up" "sylius" -run_command "app/console assets:install --env=test_cached --no-debug -vvv" || exit $? +run_command "bin/console assets:install --env=test_cached --no-debug -vvv" || exit $? run_command "npm run gulp" || exit $? diff --git a/etc/travis/suites/application/script/test-behat-with-cli b/etc/travis/suites/application/script/test-behat-with-cli index da4c0cbe410..9849a6f7bfd 100755 --- a/etc/travis/suites/application/script/test-behat-with-cli +++ b/etc/travis/suites/application/script/test-behat-with-cli @@ -6,9 +6,9 @@ run_behat() { local code=0 print_header "Testing (Behat - CLI commands, regular scenarios; @cli && ~@todo)" "Sylius" - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@cli && ~@todo\"" || code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@cli && ~@todo\"" || code=$? if [[ ${code} = 1 ]]; then - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@cli && ~@todo\" --rerun" ; code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@cli && ~@todo\" --rerun" ; code=$? fi return ${code} diff --git a/etc/travis/suites/application/script/test-behat-with-javascript b/etc/travis/suites/application/script/test-behat-with-javascript index fdbc675d4bd..577fac307fa 100755 --- a/etc/travis/suites/application/script/test-behat-with-javascript +++ b/etc/travis/suites/application/script/test-behat-with-javascript @@ -19,19 +19,19 @@ prepare_for_behat_with_js() { fi # Run Selenium with ChromeDriver - run_command "bin/selenium-server-standalone -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver > $SYLIUS_BUILD_DIR/selenium.log 2>&1 &" + run_command "vendor/bin/selenium-server-standalone -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver > $SYLIUS_BUILD_DIR/selenium.log 2>&1 &" # Run webserver - run_command "app/console server:run 127.0.0.1:8080 --env=test_cached --router=app/config/router_test_cached.php --no-debug > $SYLIUS_BUILD_DIR/webserver.log 2>&1 &" + run_command "bin/console server:run 127.0.0.1:8080 --env=test_cached --router=app/config/router_test_cached.php --no-debug > $SYLIUS_BUILD_DIR/webserver.log 2>&1 &" } run_behat() { local code=0 print_header "Testing (Behat - brand new, javascript scenarios; @javascript && ~@todo && ~@cli)" "Sylius" - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@javascript && ~@todo && ~@cli\"" || code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@javascript && ~@todo && ~@cli\"" || code=$? if [[ ${code} = 1 ]]; then - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@javascript && ~@todo && ~@cli\" --rerun" ; code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"@javascript && ~@todo && ~@cli\" --rerun" ; code=$? fi return ${code} diff --git a/etc/travis/suites/application/script/test-behat-without-javascript b/etc/travis/suites/application/script/test-behat-without-javascript index 917aaf5bbde..d3ea4a2a012 100755 --- a/etc/travis/suites/application/script/test-behat-without-javascript +++ b/etc/travis/suites/application/script/test-behat-without-javascript @@ -6,9 +6,9 @@ run_behat() { local code=0 print_header "Testing (Behat - brand new, regular scenarios; ~@javascript && ~@todo && ~@cli)" "Sylius" - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"~@javascript && ~@todo && ~@cli\"" || code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"~@javascript && ~@todo && ~@cli\"" || code=$? if [[ ${code} = 1 ]]; then - run_command "bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"~@javascript && ~@todo && ~@cli\" --rerun" ; code=$? + run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress -p cached --tags=\"~@javascript && ~@todo && ~@cli\" --rerun" ; code=$? fi return ${code} diff --git a/etc/travis/suites/application/script/test-fixtures b/etc/travis/suites/application/script/test-fixtures index 5fea25f98f0..4127ecf6b67 100755 --- a/etc/travis/suites/application/script/test-fixtures +++ b/etc/travis/suites/application/script/test-fixtures @@ -3,4 +3,4 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" print_header "Testing (Fixtures)" "Sylius" -retry_run_command "app/console sylius:fixtures:load default --env=test_cached --no-debug" +retry_run_command "bin/console sylius:fixtures:load default --env=test_cached --no-debug" diff --git a/etc/travis/suites/application/script/test-phpspec b/etc/travis/suites/application/script/test-phpspec index 2f75ab7fa48..e7833e01df6 100755 --- a/etc/travis/suites/application/script/test-phpspec +++ b/etc/travis/suites/application/script/test-phpspec @@ -3,4 +3,4 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" print_header "Testing (Phpspec)" "Sylius" -run_command "bin/phpspec run --no-interaction -f dot" +run_command "vendor/bin/phpspec run --no-interaction -f dot" diff --git a/etc/travis/suites/application/script/test-phpunit b/etc/travis/suites/application/script/test-phpunit index ebf035e3a97..2f55bf2fb8f 100755 --- a/etc/travis/suites/application/script/test-phpunit +++ b/etc/travis/suites/application/script/test-phpunit @@ -3,4 +3,4 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" print_header "Testing (Phpunit)" "Sylius" -run_command "bin/phpunit" +run_command "vendor/bin/phpunit" diff --git a/etc/travis/suites/application/script/validate-behat-features b/etc/travis/suites/application/script/validate-behat-features index dbd4c97d480..12164ad1a31 100755 --- a/etc/travis/suites/application/script/validate-behat-features +++ b/etc/travis/suites/application/script/validate-behat-features @@ -3,4 +3,4 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" print_header "Validating (Behat features)" "Sylius" -run_command "bin/kawaii gherkin:check --align=left features/" +run_command "vendor/bin/kawaii gherkin:check --align=left features/" diff --git a/etc/travis/suites/application/script/validate-doctrine-schema b/etc/travis/suites/application/script/validate-doctrine-schema index c78c09b4d85..1a60917e871 100755 --- a/etc/travis/suites/application/script/validate-doctrine-schema +++ b/etc/travis/suites/application/script/validate-doctrine-schema @@ -3,4 +3,4 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" print_header "Validating (Doctrine schema)" "Sylius" -run_command "app/console doctrine:schema:validate --env=test_cached --no-debug -vvv" +run_command "bin/console doctrine:schema:validate --env=test_cached --no-debug -vvv" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f5f4284bceb..ce40c92909b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,12 +1,10 @@ - + bootstrap="var/bootstrap.php.cache"> tests diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/routing/taxon.yml b/src/Sylius/Bundle/AdminBundle/Resources/config/routing/taxon.yml index 266e137aec8..e6c18e3afef 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/routing/taxon.yml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/routing/taxon.yml @@ -42,4 +42,4 @@ sylius_admin_taxon_create_for_parent: vars: subheader: sylius.ui.manage_categorization_of_your_product templates: - form: @SyliusAdmin/Taxon/_form.html.twig + form: "@SyliusAdmin/Taxon/_form.html.twig" diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/services/menu.xml b/src/Sylius/Bundle/AdminBundle/Resources/config/services/menu.xml index 365cbdd533f..73836412c7e 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/services/menu.xml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/services/menu.xml @@ -13,11 +13,12 @@ - + - - + + diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php index cba24eabfd0..a1211c7f230 100644 --- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php @@ -38,7 +38,7 @@ public function getConfigTreeBuilder() $rootNode ->children() ->scalarNode('driver')->defaultValue(SyliusResourceBundle::DRIVER_DOCTRINE_ORM)->end() - ->booleanNode('debug')->defaultValue('%kernel.debug%')->cannotBeEmpty()->end() + ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() ->end() ; diff --git a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php index 3f2955bb2ba..dc5cff7f592 100644 --- a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php +++ b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php @@ -86,9 +86,10 @@ public function registerBundles() new \Sylius\Bundle\ThemeBundle\SyliusThemeBundle(), // must be added after FrameworkBundle ]; - if (in_array($this->environment, ['dev', 'test', 'test_cached'], true)) { + if (in_array($this->getEnvironment(), ['dev', 'test', 'test_cached'], true)) { $bundles[] = new \Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new \Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); } return $bundles; @@ -99,7 +100,7 @@ public function registerBundles() */ protected function getContainerBaseClass() { - if ('test' === $this->environment || 'test_cached' === $this->environment) { + if (in_array($this->getEnvironment(), ['test', 'test_cached'], true)) { return MockerContainer::class; } @@ -111,11 +112,10 @@ protected function getContainerBaseClass() */ public function registerContainerConfiguration(LoaderInterface $loader) { - $rootDir = $this->getRootDir(); + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); - $loader->load($rootDir.'/config/config_'.$this->environment.'.yml'); - - if (is_file($file = $rootDir.'/config/config_'.$this->environment.'.local.yml')) { + $file = $this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.local.yml'; + if (is_file($file)) { $loader->load($file); } } @@ -126,10 +126,10 @@ public function registerContainerConfiguration(LoaderInterface $loader) public function getCacheDir() { if ($this->isVagrantEnvironment()) { - return '/dev/shm/sylius/cache/'.$this->environment; + return '/dev/shm/sylius/cache/' . $this->getEnvironment(); } - return parent::getCacheDir(); + return dirname($this->getRootDir()) . '/var/cache/' . $this->getEnvironment(); } /** @@ -141,7 +141,7 @@ public function getLogDir() return '/dev/shm/sylius/logs'; } - return parent::getLogDir(); + return dirname($this->getRootDir()) . '/var/logs'; } /** diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/TaxRateFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/TaxRateFixture.php index c2126974696..9a572c84bf1 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/TaxRateFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/TaxRateFixture.php @@ -37,7 +37,7 @@ protected function configureResourceNode(ArrayNodeDefinition $resourceNode) ->scalarNode('name')->cannotBeEmpty()->end() ->scalarNode('zone')->cannotBeEmpty()->end() ->scalarNode('category')->cannotBeEmpty()->end() - ->floatNode('amount')->cannotBeEmpty()->end() + ->floatNode('amount')->end() ->booleanNode('included_in_price')->end() ->scalarNode('calculator')->cannotBeEmpty()->end() ; diff --git a/src/Sylius/Bundle/PricingBundle/DependencyInjection/SyliusPricingExtension.php b/src/Sylius/Bundle/PricingBundle/DependencyInjection/SyliusPricingExtension.php index 84f731194ed..e072beabd3d 100644 --- a/src/Sylius/Bundle/PricingBundle/DependencyInjection/SyliusPricingExtension.php +++ b/src/Sylius/Bundle/PricingBundle/DependencyInjection/SyliusPricingExtension.php @@ -42,7 +42,7 @@ public function load(array $config, ContainerBuilder $container) new Reference('sylius.registry.price_calculator'), new Reference('sylius.form.subscriber.priceable'), ]) - ->addTag('form.type_extension', ['alias' => $formType]) + ->addTag('form.type_extension', ['alias' => $formType, 'extended_type' => $formType]) ; $container->setDefinition(sprintf('sylius.form.extension.priceable.%s', $formType), $definition); diff --git a/src/Sylius/Bundle/ResourceBundle/Resources/config/services.xml b/src/Sylius/Bundle/ResourceBundle/Resources/config/services.xml index 1174e708858..008a3ac26ab 100644 --- a/src/Sylius/Bundle/ResourceBundle/Resources/config/services.xml +++ b/src/Sylius/Bundle/ResourceBundle/Resources/config/services.xml @@ -36,7 +36,7 @@ - + diff --git a/src/Sylius/Bundle/ResourceBundle/spec/Controller/ResourceControllerSpec.php b/src/Sylius/Bundle/ResourceBundle/spec/Controller/ResourceControllerSpec.php index 221f0a8c2ce..effb41e1e27 100644 --- a/src/Sylius/Bundle/ResourceBundle/spec/Controller/ResourceControllerSpec.php +++ b/src/Sylius/Bundle/ResourceBundle/spec/Controller/ResourceControllerSpec.php @@ -92,11 +92,6 @@ function it_is_initializable() $this->shouldHaveType(ResourceController::class); } - function it_is_container_aware() - { - $this->shouldHaveType(ContainerAware::class); - } - function it_extends_base_Symfony_controller() { $this->shouldHaveType(Controller::class); diff --git a/src/Sylius/Bundle/ShopBundle/Resources/config/services/menu.xml b/src/Sylius/Bundle/ShopBundle/Resources/config/services/menu.xml index 77e6ea0a269..16c99f7df8a 100644 --- a/src/Sylius/Bundle/ShopBundle/Resources/config/services/menu.xml +++ b/src/Sylius/Bundle/ShopBundle/Resources/config/services/menu.xml @@ -13,9 +13,10 @@ - - - + + + diff --git a/src/Sylius/Bundle/ThemeBundle/Resources/config/services/integrations/templating.xml b/src/Sylius/Bundle/ThemeBundle/Resources/config/services/integrations/templating.xml index 5e5fcbce0ac..4c1d7b27979 100644 --- a/src/Sylius/Bundle/ThemeBundle/Resources/config/services/integrations/templating.xml +++ b/src/Sylius/Bundle/ThemeBundle/Resources/config/services/integrations/templating.xml @@ -65,7 +65,7 @@ - + diff --git a/var/.gitkeep b/var/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web/app.php b/web/app.php index eafbba6ec76..22485809984 100644 --- a/web/app.php +++ b/web/app.php @@ -16,8 +16,9 @@ * Live (production) environment. */ -require_once __DIR__.'/../app/bootstrap.php.cache'; -require_once __DIR__.'/../app/AppKernel.php'; +/** @var \Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; +include_once __DIR__.'/../var/bootstrap.php.cache'; $kernel = new AppKernel('prod', false); $kernel->loadClassCache(); diff --git a/web/app_dev.php b/web/app_dev.php index 51f05265e61..c2c15b50e45 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -30,8 +30,9 @@ exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } -require_once __DIR__.'/../app/bootstrap.php.cache'; -require_once __DIR__.'/../app/AppKernel.php'; +/** @var \Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; +include_once __DIR__.'/../var/bootstrap.php.cache'; Debug::enable(); diff --git a/web/app_test.php b/web/app_test.php index dfe065a9701..26ba4f02646 100644 --- a/web/app_test.php +++ b/web/app_test.php @@ -25,8 +25,9 @@ exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } -require_once __DIR__.'/../app/bootstrap.php.cache'; -require_once __DIR__.'/../app/AppKernel.php'; +/** @var \Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; +include_once __DIR__.'/../var/bootstrap.php.cache'; Debug::enable(); diff --git a/web/app_test_cached.php b/web/app_test_cached.php index 0915f076edf..75e4ea29cb5 100644 --- a/web/app_test_cached.php +++ b/web/app_test_cached.php @@ -24,8 +24,9 @@ exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } -require_once __DIR__.'/../app/bootstrap.php.cache'; -require_once __DIR__.'/../app/AppKernel.php'; +/** @var \Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; +include_once __DIR__.'/../var/bootstrap.php.cache'; $kernel = new AppKernel('test_cached', false); $kernel->loadClassCache();