pug-php/pug-symfony

View on GitHub
Fix debugging via Twig (#66) #364
Kyle authored dc07fd16
complete00:00:25
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-sonar-php:b23
b23: Pulling from codeclimate/codeclimate-sonar-php
97518928ae5f: Pulling fs layer
043df9f67e9a: Pulling fs layer
a42e650909d2: Pulling fs layer
0dff3d7a1a0e: Pulling fs layer
e109c25d106c: Pulling fs layer
b2fb00c172a9: Pulling fs layer
1519b1438731: Pulling fs layer
cfbd8af1af7a: Pulling fs layer
ea3b98fb78f4: Pulling fs layer
1c654bf89a09: Pulling fs layer
e109c25d106c: Waiting
b2fb00c172a9: Waiting
1519b1438731: Waiting
cfbd8af1af7a: Waiting
ea3b98fb78f4: Waiting
1c654bf89a09: Waiting
0dff3d7a1a0e: Waiting
a42e650909d2: Download complete
97518928ae5f: Verifying Checksum
97518928ae5f: Download complete
97518928ae5f: Pull complete
e109c25d106c: Verifying Checksum
e109c25d106c: Download complete
b2fb00c172a9: Verifying Checksum
b2fb00c172a9: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
cfbd8af1af7a: Download complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull complete
b2fb00c172a9: Pull complete
1519b1438731: Pull complete
cfbd8af1af7a: Pull complete
ea3b98fb78f4: Pull complete
1c654bf89a09: Pull complete
Digest: sha256:600639355d67f629857951762cd4d8d2bc9eb16a0496c67a3d6049830edcc87b
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-php:b23
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
W, [2024-11-03T12:35:29.406981 #1]  WARN -- : Skipping src/Pug/PugSymfonyEngine.php due to CC::Parser::Client::HTTPError
W, [2024-11-03T12:35:29.407016 #1]  WARN -- : Response status: 422
W, [2024-11-03T12:35:29.431257 #1]  WARN -- : Skipping src/Pug/PugSymfonyBundle/Command/AssetsPublishCommand.php due to CC::Parser::Client::HTTPError
W, [2024-11-03T12:35:29.431287 #1]  WARN -- : Response status: 422
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
W, [2024-11-03T12:35:33.078950 #1]  WARN -- : Skipping ./src/Pug/PugSymfonyEngine.php due to CC::Parser::Client::HTTPError
W, [2024-11-03T12:35:33.078979 #1]  WARN -- : Response status: 422
W, [2024-11-03T12:35:33.088931 #1]  WARN -- : Skipping ./src/Pug/PugSymfonyBundle/Command/AssetsPublishCommand.php due to CC::Parser::Client::HTTPError
W, [2024-11-03T12:35:33.107586 #1]  WARN -- : Response status: 422
7
fixme
fixme engine documentation
8
phpmd
phpmd engine documentation
9
phpcodesniffer
phpcodesniffer engine documentation
10
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 25 files indexed
INFO: 18 source files to be analyzed
ERROR: Unable to parse file: /code/src/Pug/Symfony/Traits/PugRenderer.php
ERROR: Parse error at line 14 column 15:

 4: 
 5: namespace Pug\Symfony\Traits;
 6: 
 7: use Pug\PugSymfonyEngine;
 8: use Symfony\Component\HttpFoundation\Response;
 9: use Symfony\Component\Templating\TemplateReferenceInterface;
10: use Symfony\Contracts\Service\Attribute\Required;
11: 
12: trait PugRenderer
13: {
14:     protected PugSymfonyEngine $pug;
                  ^
15: 
16:     #[Required]
17:     public function setPug(PugSymfonyEngine $pug): void
18:     {
19:         $this->pug = $pug;
20:     }
21: 
22:     public function render(
23:         string|TemplateReferenceInterface $view,
24:         array $parameters = [],

ERROR: Unable to parse file: /code/src/Pug/Symfony/Traits/HelpersHandler.php
ERROR: Parse error at line 37 column 15:

27: use Twig\Loader\FilesystemLoader;
28: use Twig\TwigFunction;
29: 
30: /**
31:  * Trait HelpersHandler.
32:  */
33: trait HelpersHandler
34: {
35:     use PrivatePropertyAccessor;
36: 
37:     protected ContainerInterface $container;
                  ^
38: 
39:     protected Environment $twig;
40: 
41:     protected ?Pug $pug = null;
42: 
43:     protected array $userOptions = [];
44: 
45:     protected array $twigHelpers;
46: 
47:     /**

ERROR: Unable to parse file: /code/src/Pug/Symfony/Traits/Installer.php
ERROR: Parse error at line 31 column 5:

21:     /**
22:      * @SuppressWarnings(PHPMD.ErrorControlOperator)
23:      */
24:     protected static function installSymfonyBundle(
25:         IOInterface $io,
26:         string $dir,
27:         string $bundle,
28:         string $bundleClass,
29:         callable $proceedTask,
30:         int &$flags,
31:     ): void {
        ^
32:         $appFile = $dir.'/config/bundles.php';
33:         $contents = @file_get_contents($appFile) ?: '';
34: 
35:         if (!preg_match('/\[\s*\n/', $contents)) {
36:             $io->write('Sorry, config/bundles.php has a format we can\'t handle automatically.');
37: 
38:             return;
39:         }
40: 
41:         if (str_contains($contents, $bundleClass)) {

ERROR: Unable to parse file: /code/src/Pug/Symfony/Traits/PrivatePropertyAccessor.php
ERROR: Parse error at line 29 column 37:

19:      * @throws ReflectionException
20:      *
21:      * @return mixed
22:      */
23:     public static function getPrivateProperty(object $object, string $property, &$propertyAccessor = null)
24:     {
25:         try {
26:             $propertyAccessor = new ReflectionProperty($object, $property);
27: 
28:             return $propertyAccessor->getValue($object);
29:         } catch (ReflectionException) {
                                        ^
30:             return null;
31:         }
32:     }
33: }
34: 

ERROR: Unable to parse file: /code/src/Pug/PugSymfonyEngine.php
ERROR: Parse error at line 55 column 9:

45:      * @var ComponentExtension
46:      */
47:     protected $componentExtension;
48: 
49:     /**
50:      * @var string
51:      */
52:     protected $defaultTemplateDirectory;
53: 
54:     public function __construct(
55:         protected readonly KernelInterface $kernel,
            ^
56:         TwigEnvironment $twig,
57:         private readonly ?RequestStack $stack = null,
58:         private readonly ?RequestContext $context = null,
59:     ) {
60:         $container = $kernel->getContainer();
61:         $this->container = $container;
62:         $this->userOptions = ($this->container->hasParameter('pug') ? $this->container->getParameter('pug') : null) ?: [];
63:         $this->enhanceTwig($twig);
64:         $this->onNode([$this, 'handleTwigInclude']);
65:     }

ERROR: Unable to parse file: /code/src/Pug/Twig/Environment.php
ERROR: Parse error at line 25 column 15:

15: use Twig\Loader\LoaderInterface;
16: use Twig\Parser;
17: use Twig\Source;
18: use Twig\Template;
19: use Twig\TwigFunction;
20: 
21: class Environment extends TwigEnvironment
22: {
23:     use PrivatePropertyAccessor;
24: 
25:     protected PugSymfonyEngine $pugSymfonyEngine;
                  ^
26: 
27:     protected ContainerInterface $container;
28: 
29:     /**
30:      * @var string[]
31:      */
32:     protected array $classNames = [];
33: 
34:     public array $extensions = [];
35: 

ERROR: Unable to parse file: /code/src/Pug/PugSymfonyBundle/Command/AssetsPublishCommand.php
ERROR: Parse error at line 18 column 1:

 8: use Pug\PugSymfonyEngine;
 9: use Symfony\Component\Console\Attribute\AsCommand;
10: use Symfony\Component\Console\Command\Command;
11: use Symfony\Component\Console\Input\InputInterface;
12: use Symfony\Component\Console\Output\OutputInterface;
13: use Throwable;
14: 
15: #[AsCommand(
16:     'assets:publish',
17:     'Export your assets in the web directory.',
18: )]
    ^
19: class AssetsPublishCommand extends Command
20: {
21:     public function __construct(protected readonly PugSymfonyEngine $pugSymfonyEngine)
22:     {
23:         parent::__construct();
24:     }
25: 
26:     protected function cacheTemplates(Renderer $pug): array
27:     {
28:         $success = 0;

INFO: 18/18 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.408s
INFO: Final Memory: 8M/95M
INFO: ------------------------------------------------------------------------
11
phan
phan engine documentation
View output
RecursiveDirectoryIterator::__construct(vendor): failed to open dir: No such file or directory