Giter Club home page Giter Club logo

rector's Introduction

Rector Rules for Craft CMS

This package provides Rector rules for updating Craft CMS plugins and modules for:

Craft CMS 3 → 4

First, ensure Craft 3.7.35 or later is Composer-installed. (Prior versions of Craft weren’t compatible with Rector.)

composer update craftcms/cms 

Then run the following commands:

composer require php:^8.0.2 --ignore-platform-reqs
composer config minimum-stability dev
composer config prefer-stable true
composer require craftcms/rector:dev-main --dev --ignore-platform-reqs
vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-cms-40.php

If you have code that extends Craft Commerce classes, you can run the following command as well:

vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-commerce-40.php

Once Rector is complete, you’re ready to update craftcms/cms.

composer require craftcms/cms:^4.0.0-alpha -W --ignore-platform-reqs

Craft CMS 4 → 5

Run the following commands:

composer require php:^8.2 --ignore-platform-reqs
composer config minimum-stability dev
composer config prefer-stable true
composer require craftcms/rector:dev-main --dev --ignore-platform-reqs
vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-cms-50.php

Once Rector is complete, you’re ready to update craftcms/cms:

composer require craftcms/cms:^5.0.0-beta.1 -W --ignore-platform-reqs

Notes

Advanced Configuration

If you’d like to include additional Rector rules, or customize which files/directories should be processed, you’ll need to give your project a rector.php file.

Here’s an example which runs the Craft 4 rule set, but skips over a src/integrations/ folder:

<?php
declare(strict_types = 1);

use craft\rector\SetList as CraftSetList;
use Rector\Core\Configuration\Option;
use Rector\Config\RectorConfig;

return static function(RectorConfig $rectorConfig): void {
    // Skip the integrations folder
    $rectorConfig->skip([
        __DIR__ . '/src/integrations',
    ]);

    // Import the Craft 4 upgrade rule set
    $rectorConfig->sets([
        CraftSetList::CRAFT_CMS_40
    ]);
};

rector's People

Contributors

angrybrad avatar anyt avatar brandonkelly avatar i-just avatar johnnynotsolucky avatar khalwat avatar tomasvotruba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rector's Issues

Rector for Craft 5?

A question not a bug report... do we have any idea on when the Rector sets for Craft 4 -> Craft 5 conversion will be finished and ready for public consumption?

fatal error with rector/rector:0.17.1

Description

not compatible with rector/rector:0.17.1
https://github.com/craftcms/rector/actions/runs/5268744494/jobs/9525881470

can be run if you downgrade ddev composer require rector/rector:0.17.0 --dev

[ERROR] Class "Rector\Arguments\ValueObject\RemoveMethodCallParam" not found

Steps to reproduce

  1. install using composer require craftcms/rector:dev-main --dev
    2.Run vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-cms-40.php

Additional info

  • Craft version: 4
  • PHP version: 8.1

Call to undefined method PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getParamImmediatelyInvokedCallableTagValues() is back

Description

I'm upgrading a Craft 4 site to Craft 5 and following their instructions for upgrading a custom plugin.

When running vendor/bin/rector process [directory] --config vendor/craftcms/rector/sets/craft-cms-50.php the process seems to run okay (the progress bar appears). Then I get this error multiple times (different file names) and no changes are made.

[ERROR] Could not process "plugins/[x]/src/variables/[x].php" file, due to:  
         "Call to undefined method                                                                        
         PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getParamImmediatelyInvokedCallableTagValues()". On   
         line: 307  

Steps to reproduce

  1. Install as per Craft instructions
  2. Run the command above.

Additional info

  • Craft version: 4.9.3
  • PHP version: 8.2.3

The version of the this I'm using is dev-main

[ERROR] syntax error, unexpected '=>' (T_DOUBLE_ARROW)

Description

Fresh install of Rector following commands in the Readme.

Steps to reproduce

  1. composer require php:^8.0.2
  2. composer config minimum-stability dev
  3. composer config prefer-stable true
  4. composer require craftcms/rector:dev-main --dev
  5. vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-cms-40.php

Return is "[ERROR] syntax error, unexpected '=>' (T_DOUBLE_ARROW)"

Additional info

  • Craft version: 3.9.1
  • PHP version: 8.1.22
  • Database driver & version: MySQL 8.0
  • Plugins & versions:

Problem with main plugin class after running plugin

Description

This is what I see when I run the script:

vendor/bin/rector process src --config vendor/craftcms/rector/sets/craft-cms-40.php

PHP Deprecated:  Return type of yii\db\QueryInterface::count($q = '*', $db = null) should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/clark/Documents/Websites/clarknelson.com/craft-recaptcha-3/vendor/yiisoft/yii2/db/QueryInterface.php on line 49
Deprecated: Return type of yii\db\QueryInterface::count($q = '*', $db = null) should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/clark/Documents/Websites/clarknelson.com/craft-recaptcha-3/vendor/yiisoft/yii2/db/QueryInterface.php on line 49
PHP Fatal error:  Type of clarknelson\craftrecaptcha3\CraftRecaptcha3::$schemaVersion must not be defined (as in class craft\base\Plugin) in /Users/clark/Documents/Websites/clarknelson.com/craft-recaptcha-3/src/CraftRecaptcha3.php on line 45
Fatal error: Type of clarknelson\craftrecaptcha3\CraftRecaptcha3::$schemaVersion must not be defined (as in class craft\base\Plugin) in /Users/clark/Documents/Websites/clarknelson.com/craft-recaptcha-3/src/CraftRecaptcha3.php on line 45

and my main plugin class:

<?php
/**
 * Craft reCAPTCHA 3 plugin for Craft CMS 3.x
 *
 * Verifies via Google the site and secret codes required to verify humanity through reCAPTCHA v3.
 *
 * @link      http://clarknelson.com
 * @copyright Copyright (c) 2019 Clark Nelson
 */

namespace clarknelson\craftrecaptcha3;

use clarknelson\craftrecaptcha3\models\Settings;
use clarknelson\craftrecaptcha3\twigextensions\DefaultTwigExtension;
use clarknelson\craftrecaptcha3\services\DefaultService;

use Craft;
use craft\base\Plugin;
use craft\services\Plugins;
use craft\events\PluginEvent;
use craft\web\UrlManager;
use craft\web\View;
use craft\events\RegisterUrlRulesEvent;
use craft\events\RegisterTemplateRootsEvent;

use yii\base\Event;

/**
 * Craft plugins are very much like little applications in and of themselves. We’ve made
 * it as simple as we can, but the training wheels are off. A little prior knowledge is
 * going to be required to write a plugin.
 *
 * For the purposes of the plugin docs, we’re going to assume that you know PHP and SQL,
 * as well as some semi-advanced concepts like object-oriented programming and PHP namespaces.
 *
 * https://craftcms.com/docs/plugins/introduction
 *
 * @author    Clark Nelson
 * @package   CraftRecaptcha3
 * @since     1.0.0
 *
 * @property  Settings $settings
 * @method    Settings getSettings()
 */
class CraftRecaptcha3 extends Plugin
{
    // Static Properties
    // =========================================================================

    /**
     * Static property that is an instance of this plugin class so that it can be accessed via
     * CraftRecaptcha3::$plugin
     *
     * @var CraftRecaptcha3
     */
    public static $plugin;

    // Public Properties
    // =========================================================================

    /**
     * To execute your plugin’s migrations, you’ll need to increase its schema version.
     *
     * @var string
     */
    public string $schemaVersion = '1.0.0';

    // Public Methods
    // =========================================================================

    /**
     * Set our $plugin static property to this class so that it can be accessed via
     * CraftRecaptcha3::$plugin
     *
     * Called after the plugin class is instantiated; do any one-time initialization
     * here such as hooks and events.
     *
     * If you have a '/vendor/autoload.php' file, it will be loaded for you automatically;
     * you do not need to load it in your init() method.
     *
     */
    public function init()
    {
        parent::init();
        self::$plugin = $this;

        $this->setComponents([
			'captcha' => DefaultService::class
		]);

        // Do something after we're installed
        // Default boilerplate code, we may need in the future though
        Event::on(
            Plugins::class,
            Plugins::EVENT_AFTER_INSTALL_PLUGIN,
            function (PluginEvent $event) {
                if ($event->plugin === $this) {
                    // We were just installed
                }
            }
        );

        // Register template directory for users to call
        Event::on(
            View::class,
            View::EVENT_REGISTER_SITE_TEMPLATE_ROOTS,
            function (RegisterTemplateRootsEvent $event) {
                $event->roots['_recaptcha'] = __DIR__ . '/templates';
            }
        );

        if ($this->request->getIsSiteRequest()) {
            // Add in our Twig extension
            $this->view->registerTwigExtension(new DefaultTwigExtension());
        }
    }

    // Protected Methods
    // =========================================================================

    /**
     * Creates and returns the model used to store the plugin’s settings.
     *
     * @return \craft\base\Model|null
     */
    protected function createSettingsModel(): ?\craft\base\Model
    {
        return new Settings();
    }

    /**
     * Returns the rendered settings HTML, which will be inserted into the content
     * block on the settings page.
     *
     * @return string The rendered settings HTML
     */
    protected function settingsHtml(): ?string
    {
        return Craft::$app->view->renderTemplate(
            'craft-recaptcha-3/settings',
            [
                'settings' => $this->getSettings()
            ]
        );
    }
}

Any advice would be appreciated, I ran the scripts just how they are described in the documentation.

Error with recent PR merge: Your requirements could not be resolved to an installable set of packages.

Description

Using these require-dev dependencies for Craft 4: https://github.com/craftcms/cms/blob/develop/composer.json#L67

  "require-dev": {
    "codeception/codeception": "^4.1.29",
    "codeception/module-asserts": "^1.3.1",
    "codeception/module-datafactory": "^1.1.0",
    "codeception/module-phpbrowser": "^1.0.2",
    "codeception/module-rest": "^1.4.2",
    "codeception/module-yii2": "^1.1.5"
}

or using these require-dev dependencies for Craft 3: https://github.com/craftcms/cms/blob/v3/composer.json#L61

  "require-dev": {
    "codeception/codeception": "^4.0.0",
    "codeception/module-asserts": "^1.0.0",
    "codeception/module-datafactory": "^1.0.0",
    "codeception/module-phpbrowser": "^1.0.0",
    "codeception/module-rest": "^1.0.0",
    "codeception/module-yii2": "^1.0.0",
}

...and then adding craftcms/rector:

    "craftcms/rector": "dev-main",

...results in:

Your requirements could not be resolved to an installable set of packages.

I believe it's a result of this PR: #4

...which bumps up the dependencies, resulting in a cascade:

plugindev-php_v3-1         | Your requirements could not be resolved to an installable set of packages.
plugindev-php_v3-1         | 
plugindev-php_v3-1         |   Problem 1
plugindev-php_v3-1         |     - codeception/module-datafactory 1.0.0 requires php >=5.6.0 <8.0 -> your php version (8.0.13) does not satisfy that requirement.
plugindev-php_v3-1         |     - codeception/codeception[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.x-dev, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8] require php >=5.6.0 <8.0 -> your php version (8.0.13) does not satisfy that requirement.
plugindev-php_v3-1         |     - symfony/console[v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, 4.0.x-dev, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.1.10, v4.1.11, v4.1.12, 4.1.x-dev, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.2.10, v4.2.11, v4.2.12, 4.2.x-dev, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.3.10, v4.3.11, 4.3.x-dev, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.0, v4.4.1, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8] require php ^7.1.3 -> your php version (8.0.13) does not satisfy that requirement.
plugindev-php_v3-1         |     - symfony/console[v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1] require php ^7.2.9 -> your php version (8.0.13) does not satisfy that requirement.
plugindev-php_v3-1         |     - symfony/console[v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.1.0-BETA1, v5.1.0-RC1] require php ^7.2.5 -> your php version (8.0.13) does not satisfy that requirement.
plugindev-php_v3-1         |     - Root composer.json requires craftcms/rector dev-main -> satisfiable by craftcms/rector[dev-main].
plugindev-php_v3-1         |     - Root composer.json requires codeception/module-datafactory ^1.0.0 -> satisfiable by codeception/module-datafactory[1.0.0, 1.0.1, 1.1.0].
plugindev-php_v3-1         |     - codeception/module-datafactory[1.0.1, 1.1.0] require codeception/codeception ^4.0 -> satisfiable by codeception/codeception[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.x-dev, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.1.9, 4.1.11, 4.1.12, 4.1.13, 4.1.14, 4.1.15, 4.1.16, 4.1.17, 4.1.18, 4.1.19, 4.1.20, 4.1.21, 4.1.22, 4.1.23, 4.1.24, 4.1.25, 4.1.26, 4.1.27, 4.1.28, 4.1.29, 4.1.30, 4.1.31, 4.1.x-dev, 4.2.x-dev].
plugindev-php_v3-1         |     - codeception/codeception[4.1.9, 4.1.11, 4.1.12, 4.1.13, 4.1.14, 4.1.15, 4.1.16, 4.1.17, 4.1.18, 4.1.19, 4.1.20, 4.1.21, 4.1.22, 4.1.23, 4.1.24, 4.1.25, 4.1.26, 4.1.27, 4.1.28, 4.1.29, 4.1.30, 4.1.31, 4.1.x-dev, 4.2.x-dev] require symfony/console >=2.7 <6.0 -> satisfiable by symfony/console[v2.7.0-BETA1, v2.7.0-BETA2, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.40, v2.7.41, v2.7.42, v2.7.43, v2.7.44, v2.7.45, v2.7.46, v2.7.47, v2.7.48, v2.7.49, v2.7.50, v2.7.51, 2.7.x-dev, v2.8.0-BETA1, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.50, v2.8.52, 2.8.x-dev, v3.0.0-BETA1, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, 3.0.x-dev, v3.1.0-BETA1, v3.1.0-RC1, v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.1.10, 3.1.x-dev, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, 3.2.x-dev, v3.3.0-BETA1, v3.3.0-RC1, v3.3.0, v3.3.1, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, 3.3.x-dev, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.40, v3.4.41, v3.4.42, v3.4.43, v3.4.44, v3.4.45, v3.4.46, v3.4.47, 3.4.x-dev, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, 4.0.x-dev, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.1.10, v4.1.11, v4.1.12, 4.1.x-dev, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.2.10, v4.2.11, v4.2.12, 4.2.x-dev, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.3.10, v4.3.11, 4.3.x-dev, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.0, v4.4.1, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16, v4.4.17, v4.4.18, v4.4.19, v4.4.20, v4.4.21, v4.4.22, v4.4.23, v4.4.24, v4.4.25, v4.4.26, v4.4.27, v4.4.29, v4.4.30, v4.4.33, v4.4.34, v4.4.36, v4.4.37, v4.4.38, v4.4.40, v4.4.41, 4.4.x-dev, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.0.10, v5.0.11, 5.0.x-dev, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9, v5.1.10, v5.1.11, 5.1.x-dev, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3, v5.2.0-RC1, v5.2.0-RC2, v5.2.0, v5.2.1, v5.2.2, v5.2.3, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.10, v5.2.11, v5.2.12, v5.2.14, 5.2.x-dev, v5.3.0-BETA1, v5.3.0-BETA2, v5.3.0-BETA3, v5.3.0-BETA4, v5.3.0-RC1, v5.3.0, v5.3.2, v5.3.4, v5.3.6, v5.3.7, v5.3.10, v5.3.11, v5.3.13, v5.3.14, v5.3.16, 5.3.x-dev, v5.4.0-BETA1, v5.4.0-RC1, v5.4.0, v5.4.1, v5.4.2, v5.4.3, v5.4.5, v5.4.7, v5.4.8, 5.4.x-dev].
plugindev-php_v3-1         |     - You can only install one version of a package, so only one of these can be installed: symfony/console[v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.36, v2.3.37, v2.3.38, v2.3.39, v2.3.40, v2.3.41, v2.3.42, 2.3.x-dev, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.4.10, 2.4.x-dev, v2.5.0-BETA1, v2.5.0-BETA2, v2.5.0-RC1, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.5.10, v2.5.11, v2.5.12, 2.5.x-dev, v2.6.0-BETA1, v2.6.0-BETA2, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.6.10, v2.6.11, v2.6.12, v2.6.13, 2.6.x-dev, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28, v2.7.29, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35, v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.40, v2.7.41, v2.7.42, v2.7.43, v2.7.44, v2.7.45, v2.7.46, v2.7.47, v2.7.48, v2.7.49, v2.7.50, v2.7.51, 2.7.x-dev, v2.8.0-BETA1, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.50, v2.8.52, 2.8.x-dev, v3.0.0-BETA1, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, 3.0.x-dev, v3.1.0-BETA1, v3.1.0-RC1, v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.1.10, 3.1.x-dev, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, 3.2.x-dev, v3.3.0-BETA1, v3.3.0-RC1, v3.3.0, v3.3.1, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, 3.3.x-dev, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.0, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.40, v3.4.41, v3.4.42, v3.4.43, v3.4.44, v3.4.45, v3.4.46, v3.4.47, 3.4.x-dev, v4.0.0-BETA1, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.0-RC1, v4.0.0-RC2, v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.15, 4.0.x-dev, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.0, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.1.10, v4.1.11, v4.1.12, 4.1.x-dev, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.2.10, v4.2.11, v4.2.12, 4.2.x-dev, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.0, v4.3.1, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.3.10, v4.3.11, 4.3.x-dev, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.0, v4.4.1, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16, v4.4.17, v4.4.18, v4.4.19, v4.4.20, v4.4.21, v4.4.22, v4.4.23, v4.4.24, v4.4.25, v4.4.26, v4.4.27, v4.4.29, v4.4.30, v4.4.33, v4.4.34, v4.4.36, v4.4.37, v4.4.38, v4.4.40, v4.4.41, 4.4.x-dev, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.0.10, v5.0.11, 5.0.x-dev, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9, v5.1.10, v5.1.11, 5.1.x-dev, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3, v5.2.0-RC1, v5.2.0-RC2, v5.2.0, v5.2.1, v5.2.2, v5.2.3, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.10, v5.2.11, v5.2.12, v5.2.14, 5.2.x-dev, v5.3.0-BETA1, v5.3.0-BETA2, v5.3.0-BETA3, v5.3.0-BETA4, v5.3.0-RC1, v5.3.0, v5.3.2, v5.3.4, v5.3.6, v5.3.7, v5.3.10, v5.3.11, v5.3.13, v5.3.14, v5.3.16, 5.3.x-dev, v5.4.0-BETA1, v5.4.0-RC1, v5.4.0, v5.4.1, v5.4.2, v5.4.3, v5.4.5, v5.4.7, v5.4.8, 5.4.x-dev, v6.0.0-BETA1, v6.0.0-RC1, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.5, v6.0.7, v6.0.8, 6.0.x-dev, v6.1.0-BETA1, v6.1.0-BETA2, 6.1.x-dev].
plugindev-php_v3-1         |     - Conclusion: install symfony/console v6.0.8 (conflict analysis result)

Removing the dependency of:

    "craftcms/rector": "dev-main",

...fixes the issue, and allows Composer to install everything (but then we don't have Rector installed)

Steps to reproduce

  1. See above

Additional info

  • Craft version: Craft CMS ^3.7.26 & Craft CMS ^4.0.0
  • PHP version: PHP 7.2.5 & 8.0.13
  • Database driver & version: n/a
  • Plugins & versions: n/a

Call to undefined method PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getRequireExtendsTagValues()

Description

As a dependency of Rector, PHPStan 1.10.55 created a recent issue with rector 0.18.x, which was resolved in rector 0.19.0. However craftcms/rector requires rector ^0.18.4, so it seems there isn't an upgrade pathway to mitigate this error until craftcms/rector supports rector 0.19.x.

 [ERROR] Could not process "config/app.php" file, due to:                                                               
         "Call to undefined method PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getRequireExtendsTagValues()". On line:  
         330

Steps to reproduce

  1. composer require --dev rector/rector:^0.18
  2. Follow the instructions in the readme for including craftcms/rector
  3. Add a rector.php file using the given example
  4. vendor/bin/rector --dry-run

Additional info

  • Craft version: 4.6
  • PHP version: 8.2

Roadmap

Hi there,

I know this is not the (preferred) way of contacting you when having questions. I do not expect an answer and you will probably close the ticket.
Anyways...with pain in my heart I do try my luck, cause I want to know if you have a product roadmap? I expect to be using this package soon and was wondering if there are any things still being planned or worked on.

Apologies and best regards,

Xander

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.