protected function getConfigPackagePath(string $dir, PackageInterface $package): ?string
    {
        $dir = preg_replace(
            '#^(' . preg_quote(getcwd() . DIRECTORY_SEPARATOR, '#') . ')#',
            '.' . DIRECTORY_SEPARATOR,
            $dir
        );

        $path = $this->getConfigPath($dir);
        if (file_exists($path))
        {
            $this->getLogger()->write(
                sprintf(
                    '  - Found in <info>%s</info>',
                    $package->getPrettyName()
                )
            );

            return $path;
        }

        return null;
    }
protected function getConfigPackagePath(string $dir, PackageInterface $package): ?string
    {
        $dir = preg_replace(
            '#^(' . preg_quote(getcwd() . DIRECTORY_SEPARATOR, '#') . ')#',
            '.' . DIRECTORY_SEPARATOR,
            $dir
        );

        $path = $this->getConfigPath($dir);
        if (file_exists($path))
        {
            $this->getLogger()->write(
                sprintf(
                    '  - Found in <info>%s</info>',
                    $package->getPrettyName()
                )
            );

            return $path;
        }

        return null;
    }
protected function getConfigPackagePath ( string $ dir , PackageInterface $ package ) : ? string { $ dir = preg_replace ( '#^(' . preg_quote ( getcwd ( ) . DIRECTORY_SEPARATOR , '#' ) . ')#' , '.' . DIRECTORY_SEPARATOR , $ dir ) ; $ path = $ this -> getConfigPath ( $ dir ) ; if ( file_exists ( $ path ) ) { $ this -> getLogger ( ) -> write ( sprintf ( '  - Found in <info>%s</info>' , $ package -> getPrettyName ( ) ) ) ; return $ path ; } return null ; }
Get config package file path

@param string           $dir
@param PackageInterface $package

@return null|string
Get config package file path