peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.33k stars 202 forks source link

error PHP2016: Incorrect heredoc indentation #1054

Closed matbech closed 2 years ago

matbech commented 2 years ago

I'm getting this error: error PHP2016: Incorrect heredoc indentation

with this file: https://github.com/laminas/laminas-servicemanager/blob/3.12.x/src/Tool/FactoryCreator.php

 public const FACTORY_TEMPLATE = <<<'EOT'
        <?php
        declare(strict_types=1);
        namespace %s;
        %s
        class %sFactory implements FactoryInterface
        {
            /**
             * @param ContainerInterface $container
             * @param string $requestedName
             * @param null|array $options
             * @return %s
             */
            public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
            {
                return new %s(%s);
            }
        }
        EOT;

    private const IMPORT_ALWAYS = [
        FactoryInterface::class,
        ContainerInterface::class,
    ];
jakubmisek commented 2 years ago

Thank you, we have to update the PHP parser.

Working on it.