Skip to content

Commit

Permalink
Remove Symfony workarounds and add conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Jun 25, 2019
1 parent e58c2b0 commit 133a851
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 809 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@
"symfony/browser-kit": "4.1.8",
"symfony/dependency-injection": "4.1.8 || 4.2.2",
"symfony/dom-crawler": "4.1.8",
"symfony/routing": "4.1.8",
"symfony/symfony": "3.4.7 || 4.0.7 || 4.1.8 || 4.2.2",
"symfony/routing": "4.1.8 || 4.1.9",
"symfony/symfony": "3.4.7 || 4.0.7 || 4.1.8 || 4.1.9 || 4.2.2",
"twig/twig": "2.6.1"
},
"suggest": {
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ parameters:
- '**MongoDB**'
- '**ODM**'

# Temporary PhpMatcherDumper class
- 'src/Sylius/Bundle/CoreBundle/Routing/Matcher/Dumper/PhpMatcherDumper.php'

ignoreErrors:
# Magic calls
- '/Call to an undefined static method Webmozart\\Assert\\Assert::all/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@

namespace Sylius\Bundle\CoreBundle\DependencyInjection;

use Sylius\Bundle\CoreBundle\Routing\Matcher\Dumper\PhpMatcherDumper;
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\Kernel;

final class SyliusCoreExtension extends AbstractResourceExtension implements PrependExtensionInterface, CompilerPassInterface
final class SyliusCoreExtension extends AbstractResourceExtension implements PrependExtensionInterface
{
/** @var array */
private static $bundles = [
Expand Down Expand Up @@ -93,18 +90,4 @@ private function prependHwiOauth(ContainerBuilder $container, LoaderInterface $l

$loader->load('services/integrations/hwi_oauth.xml');
}

public function process(ContainerBuilder $container): void
{
// Should be removed after PhpMatcherDumper is fixed in an another Symfony patch release
if (!in_array(Kernel::VERSION, ['4.1.8', '4.1.9'], true)) {
return;
}

$routerDefinition = $container->findDefinition('router.default');
$routerDefinition->replaceArgument(2, array_merge(
$routerDefinition->getArgument(2),
['matcher_dumper_class' => PhpMatcherDumper::class]
));
}
}
Loading

0 comments on commit 133a851

Please sign in to comment.