Phpstan now reports:
------ -----------------------------------------------------------------------
Line drush/delete_all.drush.inc
------ -----------------------------------------------------------------------
119 Class Drupal\delete_all\Controller\UserDeleteController constructor
invoked with 0 parameters, 1 required.
122 Function drush_get_option not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
143 Function drush_choice not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
147 Function drush_user_abort not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
154 Function drush_confirm not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
168 Function drush_user_abort not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
181 Class Drupal\delete_all\Controller\ContentDeleteController
constructor invoked with 0 parameters, 1 required.
184 Function drush_get_option not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
207 Function drush_choice not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
211 Function drush_user_abort not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
218 Function drush_confirm not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
232 Function drush_user_abort not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
260 Class Drupal\delete_all\Controller\EntityDeleteController constructor
invoked with 0 parameters, 1 required.
266 Function drush_get_option not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
272 Function drush_set_error not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
280 Function drush_choice not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
297 Function drush_get_option not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
304 Function drush_set_error not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
313 Function drush_choice not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
325 Function drush_confirm not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
345 Function drush_user_abort not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Controller/EntityDeleteController.php
------ ----------------------------------------------------------------------
29 \Drupal calls should be avoided in classes, use dependency injection
instead
------ ----------------------------------------------------------------------
benstallings → made their first commit to this issue’s fork.
benstallings → created an issue.
benstallings → created an issue.
benstallings → created an issue.
benstallings → created an issue.
I'll take a look next week. Thanks for the prodding, @mandclu!
Unfortunately I rebased the branch on 2.2.x without being able to change the target in gitlab, so the MR is still pointed at 2.0.x. @urvashi_vora, are you able to change the target branch in the MR? Sorry about that.
updating to point at the latest dev
@dieterholvoet passing now!
benstallings → created an issue.
benstallings → created an issue.
After rebasing on 3.0.x, the patch #16 is no longer necessary.
So I capitalized null in the test as well, and now I don't understand what phpunit is saying about why it is failing.
OK, but I had already made that change in the MR before either of you commented about it. So the error message must be due to something else.
Now I'm getting,
1) Drupal\Tests\flysystem_s3\Unit\AwsCacheAdapterTest::testBasicGetSetDelete
Failed asserting that false is null.
When I run phpunit on my local, it complains about a bunch of missing composer dependencies. One at a time, of course. If I require each of them, I eventually get
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\Tests\flysystem_s3\Unit\Flysystem\S3Test::__construct(), 0 passed in /var/www/html/vendor/phpunit/phpunit/src/Framework/TestBuilder.php on line 138 and exactly 1 expected in /var/www/html/web/modules/composer/flysystem_s3/tests/src/Unit/Flysystem/S3Test.php:48
This doesn't address all of the complaints, but it's a start!
benstallings → created an issue.
benstallings → made their first commit to this issue’s fork.
whoops, wrong version
OK, but not all of the methods in that class are static! And the parent class already implements ContainerFactoryPluginInterface, so all we need to do is use the $instance = parent::create()
pattern.
- defineOptions(), optionsSummary(), and buildOptionsForm() need the module_handler service injected
- buildOptionsForm() also needs the stream_wrapper_manager and plugin.manager.facets.facet_source services injected
updating to point at latest version
Still getting phpunit errors, but we're a lot closer!
benstallings → created an issue.
Showing a merge error
benstallings → created an issue.
benstallings → created an issue.
It would be great to get this merged into dev so that other modules that depend on it, such as RJSF, can require this dependency without patching.
Note that the composer test is currently failing because this MR has not yet been merged: https://www.drupal.org/project/jsonrpc_autocomplete/issues/3431493 📌 Automated Drupal 11 compatibility fixes for jsonrpc_autocomplete RTBC
benstallings → created an issue.
benstallings → created an issue.
benstallings → created an issue.
benstallings → created an issue.
I evidently did something wrong with the Http plugin, as it is now failing unit tests, but I don't understand what happened.
benstallings → created an issue.
benstallings → created an issue.
Looks like it's failing unit tests, so I must have broken something - flagging as Needs Work
benstallings → created an issue.
I also went ahead and addressed the other phpstan error, which was due to JobScheduler::queue being a property and not a method.
benstallings → created an issue.
benstallings → made their first commit to this issue’s fork.
benstallings → created an issue.
benstallings → created an issue.
OK, I had to back off of QueryConnection, but now the tests are passing!
benstallings → created an issue.
benstallings → created an issue.
@nicholasgraph, I'm not able to replicate the 500 error that gitlab's phpunit is experiencing. When I run phpunit locally, I get a different error about the database connection being refused. However, when I view my local environment in a browser, the patched gin theme works just fine (as does the database). So this may be out of my wheelhouse, I'm afraid.
benstallings → created an issue.
I rebased the branch on 4.x, but I don't seem to be able to change the target branch in the MR; it is still pointing to 3.x. I apologize and hope someone will be able to fix it!
I'm going to update this to the 4.0 branch.
Never mind, it looks like these have been intentionally left un-injected in a variety of creative ways. It might be nice to silence phpstan, but I'll leave that to someone who knows the module's code better than I do.
benstallings → created an issue.
benstallings → created an issue.
benstallings → created an issue.
never mind, this has been fixed in dev already.
benstallings → created an issue.
The submodules also need their core_version_requirement updated.
I'm now seeing,
Call to deprecated method generateImageStyle() of class Drupal\flysystem_s3\Flysystem\S3. Deprecated in flysystem:2.2.0 and is removed from flysystem:3.0.0. Adapters should use generateImageUrl() to enable non-blocking image uploads.
on line 227 of S3.php. I'll see if I can fix it.
When I try to run eck_make_type_revisionable(), I get
The entity type report_template does not have an "revision_created" entity revision metadata key."
This occurs on the final line of the function, $definition_update_manager->updateFieldableEntityType($entity_type, $field_storage_definitions, $sandbox);
even though revision_created is defined in both of the variables.
benstallings → created an issue.
Thanks to both of you! I just incorporated your patches into a MR.
benstallings → made their first commit to this issue’s fork.
Thanks for all your work on this! It looks really promising.
After patching the current 2.x dev with this, I had a duplicate preSave() method in EckEntity.php.
After deleting the duplicate, I get
The entity type facility does not have an "revision_created" entity revision metadata key.
when running any drush command. (This is a site that has existing ECK entity types.)