serendipity_hq / ansi-converter-shq-theme
A theme to use with AnsiConverter.
Installs: 102 463
Dependents: 1
Suggesters: 1
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- sensiolabs/ansi-to-html: ^1.2
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.4
- phpstan/phpstan: 1.4.2
- phpstan/phpstan-phpunit: 1.0.0
- rector/rector: 0.12.13
- roave/security-advisories: dev-master
- serendipity_hq/rector-config: ^1.0
- thecodingmachine/phpstan-safe-rule: 1.2.0
- twig/twig: ^3.3
Suggests
- twig/twig: To use the Twig extension AnsiToHtmlExtension in Twig templates.
This package is auto-updated.
Last update: 2024-09-20 09:27:45 UTC
README
Serendipity HQ Ansi Converter Theme
A theme to use with AnsiConverter.
Current Status
Do you like this library?
LEAVE A ★
or run
composer global require symfony/thanks && composer thanks
to say thank you to all libraries you use in your current project, this included!
Install monolog-html-line-formatter via Composer
$ composer require serendipity_hq/ansi-converter-shq-theme
This library follows the http://semver.org/ versioning conventions.
How to use Serendipity HQ Rector Config
<?php declare(strict_types = 1); use SerendipityHQ\Integration\Rector\SerendipityHQ; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Rector\Core\Configuration\Option; use Rector\Core\ValueObject\PhpVersion; return static function (ContainerConfigurator $containerConfigurator) : void { $parameters = $containerConfigurator->parameters(); $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81); $parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/tests']); $parameters->set(Option::BOOTSTRAP_FILES, [__DIR__ . '/vendor-bin/phpunit/vendor/autoload.php']); // Import directly the configuration from Serendipity HQ Rector Config $containerConfigurator->import(SerendipityHQ::SHQ_SYMFONY_APP); // Import the excluded rectors $toSkip = SerendipityHQ::buildToSkip(SerendipityHQ::SHQ_SYMFONY_APP_SKIP); // Set the rectors to exclude $parameters->set(Option::SKIP, $toSkip); };
The method SerendipityHQ::buildToSkip()
is variadic: it accepts as many arrays as you need.
Use it to exclude the rectors you don't want to be applied in your project.
If you want to exclude other rectors other than the ones excluded by the predefined config, simply create an array in your rector.php
configuration file and pass it to SerendipityHQ::buildToSkip()
:
<?php declare(strict_types = 1); use SerendipityHQ\Integration\Rector\SerendipityHQ; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Rector\Core\Configuration\Option; use Rector\Core\ValueObject\PhpVersion; return static function (ContainerConfigurator $containerConfigurator) : void { ... $othersToSkip = [ \Rector\To\Exclude\Rector::class ]; // Import the excluded rectors $toSkip = SerendipityHQ::buildToSkip(SerendipityHQ::SHQ_SYMFONY_APP_SKIP, $othersToSkip); // Set the rectors to exclude $parameters->set(Option::SKIP, $toSkip); };
Do you like this library?
LEAVE A ★
or run
composer global require symfony/thanks && composer thanks
to say thank you to all libraries you use in your current project, this included!