What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I have setup a fresh b2c shop in my local, and getting following error when I run phpstan ```

U011K6DASBW
U011K6DASBW Posts: 37 🧑🏻‍🚀 - Cadet

Hello, I have setup a fresh b2c shop in my local, and getting following error when I run phpstan

 ------ --------------------------------------------------------------------------------------
  Line   LocaleRepository.php
 ------ --------------------------------------------------------------------------------------
  44     Cannot access offset 'spy_locale.id_locale' on Orm\Zed\Locale\Persistence\SpyLocale.
  44     Cannot access offset 'spy_locale.locale…' on Orm\Zed\Locale\Persistence\SpyLocale.
 ------ --------------------------------------------------------------------------------------

I’m wondering why its not failing in travis of your b2c shop repository

Comments

  • U011K6DASBW
    U011K6DASBW Posts: 37 🧑🏻‍🚀 - Cadet

    there are two additional errors from same module Pyz/Zed/DataImport/Business/Model
    here is the complete log

    ------ -------------------------------------------------------------------------- 
      Line   Pyz/Zed/DataImport/Business/Model/Locale/Repository/LocaleRepository.php  
     ------ -------------------------------------------------------------------------- 
      44     Cannot access offset 'spy_locale.id_locale' on                            
           Orm\Zed\Locale\Persistence\SpyLocale.                                     
      44     Cannot access offset 'spy_locale.locale…' on                              
             Orm\Zed\Locale\Persistence\SpyLocale.                                     
     ------ -------------------------------------------------------------------------- 
     ------ --------------------------------------------------------------------------------------- 
      Line   Pyz/Zed/DataImport/Business/Model/ProductAttributeKey/AddProductAttributeKeysStep.php  
     ------ --------------------------------------------------------------------------------------- 
      41     Cannot access offset 'spy_product…' on                                                 
             Orm\Zed\Product\Persistence\SpyProductAttributeKey.                                    
      42     Cannot access offset 'spy_product…' on                                                 
             Orm\Zed\Product\Persistence\SpyProductAttributeKey.                                    
     ------ --------------------------------------------------------------------------------------- 
     ------ --------------------------------------------------------------------------- 
      Line   Pyz/Zed/DataImport/Business/Model/ProductLabel/ProductLabelWriterStep.php  
     ------ --------------------------------------------------------------------------- 
      93     Binary operation "+" between                                               
             Orm\Zed\ProductLabel\Persistence\SpyProductLabel|null and 1 results in     
             an error.                                                                  
     ------ ---------------------------------------------------------------------------  
    
  • Propel requires in some cases inline annotations to be used, in this case that the return result is an array.
    Thats the problem of the find call being able to return everything.

  • U011K6DASBW
    U011K6DASBW Posts: 37 🧑🏻‍🚀 - Cadet

    right, so this needs to be fixed in demoshop by adding those annotations? (as all of them are demoshop files)