Fix the cspell and phpstan issues

Created on 22 March 2024, 8 months ago
Updated 5 April 2024, 8 months ago

There are few typos that need to be fixed reported by cspell:

./README.md:32:26     - Unknown word (alia)       -- Enable the 'Views URL alia' module in 'Modules
	 Suggestions: [alai, Alai, alba, alfa, alga]
	 Suggestions: []
./views_url_alias.install:57:10     - Unknown word (entiy)      -- 'entiy_id_entity_type_langcode
	 Suggestions: [entry, entity, netty, enmity, unity]
./views_url_alias.module:22:35     - Unknown word (enitiy)     -- views_url_alias_get_path_enitiy_type($path) {
	 Suggestions: [enmity, entity, entry, enatic, unity]
./views_url_alias.module:46:38     - Unknown word (enitiy)     -- views_url_alias_get_path_enitiy_type($path_alias->getPath
	 Suggestions: [enmity, entity, entry, enatic, unity]
./views_url_alias.module:62:38     - Unknown word (enitiy)     -- views_url_alias_get_path_enitiy_type($path_alias->getPath
	 Suggestions: [enmity, entity, entry, enatic, unity]
./views_url_alias.module:74:38     - Unknown word (enitiy)     -- views_url_alias_get_path_enitiy_type($path->getPath
	 Suggestions: [enmity, entity, entry, enatic, unity]
./views_url_alias.module:85:26     - Unknown word (bulkupdate) -- ($context['op'] == 'bulkupdate') {
	 Suggestions: []
./views_url_alias.module:86:40     - Unknown word (enitiy)     -- views_url_alias_get_path_enitiy_type($context['source
	 Suggestions: [enmity, entity, entry, enatic, unity]
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dstorozhuk
  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦
  • πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

    In case some people's names were marked as an issue, create a .cspell-project-words.txt file and add it to this file as an exception.
    Example here.

    Also, it would be great to fix coding standard issues:

     ------ ----------------------------------------------------------------------- 
      Line   views_url_alias.module                                                 
     ------ ----------------------------------------------------------------------- 
      44     Parameter $path_alias of function views_url_alias_path_alias_insert()  
             has invalid type PathAliasInterface.                                   
      56     Parameter $path_alias of function views_url_alias_path_alias_update()  
             has invalid type PathAliasInterface.                                   
      72     Parameter $path of function views_url_alias_path_alias_delete() has    
             invalid type PathAliasInterface.                                       
     ------ ----------------------------------------------------------------------- 
     [ERROR] Found 3 errors 
    
  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

    Thanks for suggestions, about .cspell-project-words.txt _shY. We will fix that.

  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

    BTW, _shY, I don't see the mentioned coding standard issues in a pipeline, and it should not be there. How are you running the phpcs ? Does it have access to Drupal Core 8.8 above?

  • πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

    I just got the list of phpstan notices from the last pipeline run.
    Here is an example - https://git.drupalcode.org/issue/views_url_alias-3417436/-/jobs/1127931

    I think there are missing use statement for the PathAliasInterface in views_url_alias.module file

  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

    Nice catch , _shK.
    You and Andrii Kondratenko introduced the error in dev branch.
    https://git.drupalcode.org/project/views_url_alias/-/commit/da56446c1f02...
    Please fix the error since dev release throwing the php error now.

  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦
    The website encountered an unexpected error. Try again later.
    
    TypeError: views_url_alias_path_alias_update(): Argument #1 ($path_alias) must be of type PathAliasInterface, Drupal\path_alias\Entity\PathAlias given in views_url_alias_path_alias_update() (line 56 of modules/contrib/views_url_alias/views_url_alias.module).
    call_user_func_array(Object, Array) (Line: 409)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'views_url_alias') (Line: 388)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('path_alias_update', Object) (Line: 408)
    Drupal\Core\Extension\ModuleHandler->invokeAll('path_alias_update', Array) (Line: 215)
    Drupal\Core\Entity\EntityStorageBase->invokeHook('update', Object) (Line: 900)
    Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('update', Object) (Line: 564)
    Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1) (Line: 781)
    Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, 1) (Line: 489)
    Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 806)
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 354)
    Drupal\Core\Entity\EntityBase->save() (Line: 126)
    Drupal\pathauto\AliasStorageHelper->save(Array, Object, 'update') (Line: 273)
    Drupal\pathauto\PathautoGenerator->createEntityAlias(Object, 'update') (Line: 381)
    Drupal\pathauto\PathautoGenerator->updateEntityAlias(Object, 'update') (Line: 93)
    pathauto_entity_update(Object)
    call_user_func_array(Object, Array) (Line: 409)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'pathauto') (Line: 388)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_update', Object) (Line: 408)
    Drupal\Core\Extension\ModuleHandler->invokeAll('entity_update', Array) (Line: 217)
    Drupal\Core\Entity\EntityStorageBase->invokeHook('update', Object) (Line: 900)
    Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('update', Object) (Line: 564)
    Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1) (Line: 781)
    Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, 1) (Line: 489)
    Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 806)
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 354)
    Drupal\Core\Entity\EntityBase->save() (Line: 270)
    Drupal\node\NodeForm->save(Array, Object)
    call_user_func_array(Array, Array) (Line: 129)
    Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
    Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
    Drupal\Core\Form\FormBuilder->processForm('node_blog_post_edit_form', Array, Object) (Line: 325)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 270)
    Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 178)
    Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
  • Merge request !25#3432869 "Fix coding standards" β†’ (Merged) created by _shy
  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

    dstorozhuk, I fixed coding standards and the issue with WSOD after the latest changes for the dev branch and pushed everything to the 8.x-2.x.

    As you mentioned in the previous task, we can continue to work with 1.x branch. You can merge all changes from the 8.x-2.x to the 1.x branch and delete the ol 8.x-2.x branch

  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

    Amazing!
    Thanks.

  • Status changed to Fixed 8 months ago
  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦
  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡¦Ukraine _shy Ukraine, Lutsk πŸ‡ΊπŸ‡¦

    dstorozhuk, please, don't change the issue status to the Closed (fixed) manually. This status will be changed automatically after 2 weeks.

    You can read more here -
    https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-... β†’

  • πŸ‡¨πŸ‡¦Canada dstorozhuk Chicago πŸ‡ΊπŸ‡Έ, Toronto πŸ‡¨πŸ‡¦, Kyiv πŸ‡ΊπŸ‡¦

    Ok.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024