Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move enlightn/security-checker to "suggest" #5078

Merged
merged 18 commits into from Feb 21, 2022

Conversation

greg-1-anderson
Copy link
Member

We can see how this works vis-a-vis tests. Not a great solution, but might be better than some of the alternatives.

@greg-1-anderson
Copy link
Member Author

Looks like the one failing test is caused by updating dependencies. The test passes locally with the composer.lock from the 11.x branch, but fails after running composer update on the 11.x branch.

@greg-1-anderson
Copy link
Member Author

Failing test is caused by:

  - Upgrading dflydev/dot-access-data (v1.1.0 => v3.0.1): Extracting archive
  - Upgrading grasmash/expander (1.0.0 => 2.0.0): Extracting archive

This combination breaks expansion of ${env.FIXTURES_DIR} in configuration paths.

@greg-1-anderson
Copy link
Member Author

Failing test fixed by grasmash/expander#13

@greg-1-anderson
Copy link
Member Author

Most tests green with the update to grasmash/expander 2.0.1.

Now, it looks like the latest Drush 10.0.x dev requires symfony/process ^6, and consolidation/site-process supports ^5 at the most. Will need some more releases on consolidation/*, it looks like.

@greg-1-anderson
Copy link
Member Author

I made a 5.x-dev branch of consolidation/site-process to bring in symfony/process ^6. I think this should work, but now we need to upgrade league/container to ^4, because that version series is necessary to be compatible with psr/container ^2, which Drupal 10 now requires.

@greg-1-anderson
Copy link
Member Author

Now we need a new Robo release that allows symfony/process ^6.

@greg-1-anderson greg-1-anderson marked this pull request as draft February 19, 2022 05:06
@greg-1-anderson
Copy link
Member Author

The Composer dependencies resolve with Drupal 10 now; however, it seems that there have been some changes in the Drupal bootstrap to adjust to Symfony 6; similar changes will be needed in Drush. The error we are getting now is:

PHP Fatal error:  Uncaught Error: Call to undefined method Symfony\Component\HttpFoundation\Response::create() in /home/wodby/drush/src/Boot/DrupalBoot8.php:293

@greg-1-anderson
Copy link
Member Author

greg-1-anderson commented Feb 19, 2022

Related drupal.org Symfony 6 issue: https://www.drupal.org/project/drupal/issues/3252757

@greg-1-anderson
Copy link
Member Author

Now it looks like we're just down to the module_load_install() stuff, which is being tracked in another issue. I think we need to combine efforts in order to move forward.

@greg-1-anderson
Copy link
Member Author

greg-1-anderson commented Feb 20, 2022

Getting really close. The integration tests have several errors. CircleCI does not report anything; running locally, I get:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 40960 bytes) in /Users/ga/Code/open-source/drupal/drush11/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php on line 91

Not sure why it's running out of memory; infinite recursion or something? Needs further investigation. Functional and unit tests are all passing.

@@ -70,7 +77,7 @@ public function testFailedUpdate($last_successful_update, $expected_status_repor
$this->drush('php-script', ['updatedb_script'], ['script-path' => __DIR__ . '/resources']);

// Force re-run of woot_update_8101().
$this->drush('php:eval', array('drupal_set_installed_schema_version("woot", ' . $last_successful_update . ')'), $options);
$this->drush('php:eval', array('\Drupal::service("update.update_hook_registry")->setInstalledVersion("woot", ' . $last_successful_update . ')'), $options);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anyone know what's up with backslashes and Windows PHP? This line works in Circle, but fails in Appveyor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greg-1-anderson just remove the leading \ from '\Drupal::service(...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might help. I think that the issue might be that backslashes are getting doubled up in a place where that's not necessary. But I'm in favor of avoidance at this stage. 😄

@greg-1-anderson
Copy link
Member Author

Hey, much better -- Appvayor is green, and we're down to a dozen integration test failures.

I didn't realize there was going to be so much to fix here.

@greg-1-anderson
Copy link
Member Author

Down to just some MigrateRunnerTest failures in the integration tests.

@weitzman
Copy link
Member

Migrate tests have been failing for a while in d10. Feel free to merge without them.

See consolidation/site-process#56 for windows bug.

@greg-1-anderson
Copy link
Member Author

Great, thanks.

This will be better for Drupal 10 users, but Drupal 9 users lose enlightn/security-checker. Maybe that package will become compatible & we can add it back in before the next release. Or maybe temporarily add it in just for the release tag, and then take it out again so that Drupal 10 users can continue using the dev release of Drush.

@greg-1-anderson greg-1-anderson marked this pull request as ready for review February 21, 2022 02:40
@greg-1-anderson greg-1-anderson merged commit d3deb23 into 11.x Feb 21, 2022
@greg-1-anderson greg-1-anderson deleted the suggest-security-checker branch February 21, 2022 02:40
@paras-malhotra
Copy link

@greg-1-anderson @weitzman Symfony 6 is now supported via enlightn/security-checker#27, so can we revert this PR?

@greg-1-anderson
Copy link
Member Author

We'll need a new PR to re-add enlightn/security-checker; this PR fixed quite a few other issues at the same time, so we shouldn't do a literal revert.

Re-enabling the security checks will be easy, though.

@weitzman
Copy link
Member

Partial revert at #5081

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants