- Issue created by @svendecabooter
- 🇦🇹Austria klausi 🇦🇹 Vienna
I suspect it could be this change: https://github.com/pfrenssen/coder/commit/19132e118fe9c3e4e163a784421fd2...
I thought the autoloading problem is obsolete since we have composer to do that.
Do you see the class FunctionCall mapped in your composer autoload mapping?
- 🇧🇪Belgium svendecabooter Gent
In which file should I be looking for this class mapping exactly?
Is that in `autoload_static.php`?That one has the following content:
<?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInit6e0f3ed45ec6f4deedb4fb92307bb607 { public static $files = array ( '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', ); public static $prefixLengthsPsr4 = array ( 'V' => array ( 'VariableAnalysis\\' => 17, ), 'S' => array ( 'Symfony\\Polyfill\\Ctype\\' => 23, 'Symfony\\Component\\Yaml\\' => 23, 'SlevomatCodingStandard\\' => 23, ), 'P' => array ( 'PHPStan\\PhpDocParser\\' => 21, 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 57, ), 'D' => array ( 'Drupal\\' => 7, 'DrupalPractice\\' => 15, ), ); public static $prefixDirsPsr4 = array ( 'VariableAnalysis\\' => array ( 0 => __DIR__ . '/..' . '/sirbrillig/phpcs-variable-analysis/VariableAnalysis', ), 'Symfony\\Polyfill\\Ctype\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', ), 'Symfony\\Component\\Yaml\\' => array ( 0 => __DIR__ . '/..' . '/symfony/yaml', ), 'SlevomatCodingStandard\\' => array ( 0 => __DIR__ . '/..' . '/slevomat/coding-standard/SlevomatCodingStandard', ), 'PHPStan\\PhpDocParser\\' => array ( 0 => __DIR__ . '/..' . '/phpstan/phpdoc-parser/src', ), 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array ( 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', ), 'Drupal\\' => array ( 0 => __DIR__ . '/..' . '/drupal/coder/coder_sniffer/Drupal', ), 'DrupalPractice\\' => array ( 0 => __DIR__ . '/..' . '/drupal/coder/coder_sniffer/DrupalPractice', ), ); public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit6e0f3ed45ec6f4deedb4fb92307bb607::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit6e0f3ed45ec6f4deedb4fb92307bb607::$prefixDirsPsr4; $loader->classMap = ComposerStaticInit6e0f3ed45ec6f4deedb4fb92307bb607::$classMap; }, null, ClassLoader::class); } }
FWIW - this is the .gitlab-ci.yml file I'm using, that started producing this error:
stages: - validation phpcs: stage: validation image: pipelinecomponents/php-codesniffer:latest tags: - docker before_script: - composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true - composer global require drupal/coder -W --ignore-platform-req=ext-zip script: - phpcs
- 🇦🇹Austria klausi 🇦🇹 Vienna
Aha, it might be the docker image you are using.
Which phpcs command is invoked there? Maybe the one in /app?
Best you also always execute the phpcs command that gets installed into your composer directory.
It looks like in this image phpcs is already installed, but you want to install it fresh with Coder. Then it is in vendor/bin/phpcs.
- 🇧🇪Belgium svendecabooter Gent
Thanks, that does the trick.
Hadn't occurred to me that my docker image might be the cause of the issue. Automatically closed - issue fixed for 2 weeks with no activity.