Account created on 14 December 2006, about 18 years ago
#

Merge Requests

More

Recent comments

🇯🇵Japan ptmkenny

Ok, tests are all passing and I believe I have addressed all feedback thus far, so I am setting back to "Needs review."

🇯🇵Japan ptmkenny

I think your issue is a duplicate of 🐛 Changing admin path makes content --> files disappear Active . This module cannot change the link paths in Views automatically.

So, for the files view, you need to change the path in the Views UI (rename /admin as you do with this module). You may need to do the same with the Media view; no one else has reported about that yet.

🇯🇵Japan ptmkenny

Now that this module uses GitLab CI, this patch needs to be converted to an MR before it is committed.

🇯🇵Japan ptmkenny

Ok, I went to add them to the baseline, but I couldn't figure out how to do that.

First, I tried using the baseline generated by GitLab CI, but the paths are different.

Then, based on this change record , I ran

vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --memory-limit=-1 --generate-baseline=core/.phpstan-baseline.php

which is the same code listed in the docs .

However, when I did this, the generated baseline has removed the comment for the identifier from all entries:

 $ignoreErrors = [];
 $ignoreErrors[] = [
-       // identifier: missingType.return
        'message' => '#^Method Drupal\\\\Composer\\\\Generator\\\\PackageGenerator\\:\\:generate\\(\\) has no return type specified\\.$#',
+       'identifier' => 'missingType.return',
        'count' => 1,
        'path' => __DIR__ . '/../composer/Generator/PackageGenerator.php',
 ];
 $ignoreErrors[] = [
-       // identifier: missingType.return
        'message' => '#^Method Drupal\\\\Composer\\\\Plugin\\\\ProjectMessage\\\\Message\\:\\:getText\\(\\) has no return type specified\\.$#',
+       'identifier' => 'missingType.return',
        'count' => 1,
        'path' => __DIR__ . '/../composer/Plugin/ProjectMessage/Message.php',
 ];

I don't understand why it is doing this and how I can generate a new baseline in the same format as has already been committed.

🇯🇵Japan ptmkenny

@mondrake: The list of missingType.generics violations is below.

The question is whether these should be added to the baseline or ignored as a group.

The PHPStan docs on missingType.generics list over a dozen rules that could report this error. So it may be worthwhile to find a more specific rule, or to ignore a string like "return type with generic class... does not specify its types".

@spokje mentioned that it might be better to ignore them as a group in the phpstan.neon.dist.

I am happy to do it either way; what does everyone think?

 ------ ---------------------------------------------------------------------------------- 
  Line   composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php                    
 ------ ---------------------------------------------------------------------------------- 
  118    Method                                                                            
         Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::getIterator()  
         return type with generic class ArrayIterator does not specify its                 
         types: TKey, TValue                                                               
         🪪  missingType.generics                                                          
 ------ ---------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------ 
  Line   core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionClass.php       
 ------ ------------------------------------------------------------------------------ 
  182    Method                                                                        
         Drupal\Component\Annotation\Doctrine\StaticReflectionClass::getInterfaces()   
         return type with generic class ReflectionClass does not specify its           
         types: T                                                                      
         🪪  missingType.generics                                                      
  206    Method                                                                        
         Drupal\Component\Annotation\Doctrine\StaticReflectionClass::getParentClass()  
         return type with generic class ReflectionClass does not specify its           
         types: T                                                                      
         🪪  missingType.generics                                                      
  270    Method                                                                        
         Drupal\Component\Annotation\Doctrine\StaticReflectionClass::getTraits()       
         return type with generic class ReflectionClass does not specify its           
         types: T                                                                      
         🪪  missingType.generics                                                      
 ------ ------------------------------------------------------------------------------ 
 ------ -------------------------------------------------------------------- 
  Line   core/lib/Drupal/Component/Plugin/LazyPluginCollection.php           
 ------ -------------------------------------------------------------------- 
  145    Method Drupal\Component\Plugin\LazyPluginCollection::getIterator()  
         return type with generic class ArrayIterator does not specify its   
         types: TKey, TValue                                                 
         🪪  missingType.generics                                            
 ------ -------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Config/Schema/ArrayElement.php                  
 ------ --------------------------------------------------------------------- 
  136    Method Drupal\Core\Config\Schema\ArrayElement::getIterator() return  
         type with generic class ArrayIterator does not specify its types:    
         TKey, TValue                                                         
         🪪  missingType.generics                                             
 ------ --------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Config/TypedConfigManager.php                     
 ------ ----------------------------------------------------------------------- 
  81     Method Drupal\Core\Config\TypedConfigManager::get() return type with   
         generic interface Drupal\Core\TypedData\TraversableTypedDataInterface  
         does not specify its types: I, T                                       
         🪪  missingType.generics                                               
  201    Method Drupal\Core\Config\TypedConfigManager::getStaticTypeRoot()      
         return type with generic interface                                     
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify   
         its types: I, T                                                        
         🪪  missingType.generics                                               
  427    Method Drupal\Core\Config\TypedConfigManager::createFromNameAndData()  
         return type with generic interface                                     
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify   
         its types: I, T                                                        
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Config/TypedConfigManagerInterface.php              
 ------ ------------------------------------------------------------------------- 
  26     Method Drupal\Core\Config\TypedConfigManagerInterface::get() return      
         type with generic interface                                              
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify     
         its types: I, T                                                          
         🪪  missingType.generics                                                 
  88     Method                                                                   
         Drupal\Core\Config\TypedConfigManagerInterface::createFromNameAndData()  
         return type with generic interface                                       
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify     
         its types: I, T                                                          
         🪪  missingType.generics                                                 
 ------ ------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/ContentEntityBase.php                     
 ------ ---------------------------------------------------------------------- 
  607    Method Drupal\Core\Entity\ContentEntityBase::getTranslatedField()     
         return type with generic interface                                    
         Drupal\Core\Field\FieldItemListInterface does not specify its types:  
         T                                                                     
         🪪  missingType.generics                                              
  690    Method Drupal\Core\Entity\ContentEntityBase::getIterator() return     
         type with generic class ArrayIterator does not specify its types:     
         TKey, TValue                                                          
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php              
 ------ ---------------------------------------------------------------------- 
  114    Method                                                                
         Drupal\Core\Entity\ContentEntityNullStorage::readFieldItemsToPurge()  
         return type with generic interface                                    
         Drupal\Core\Field\FieldItemListInterface does not specify its types:  
         T                                                                     
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php              
 ------ ---------------------------------------------------------------------- 
  580    Method                                                                
         Drupal\Core\Entity\ContentEntityStorageBase::readFieldItemsToPurge()  
         return type with generic interface                                    
         Drupal\Core\Field\FieldItemListInterface does not specify its types:  
         T                                                                     
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php    
 ------ ----------------------------------------------------------------------- 
  72     Method                                                                 
         Drupal\Core\Entity\Plugin\DataType\ConfigEntityAdapter::getIterator()  
         return type with generic class ArrayIterator does not specify its      
         types: TKey, TValue                                                    
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php      
 ------ ------------------------------------------------------------------- 
  165    Method                                                             
         Drupal\Core\Entity\Plugin\DataType\EntityAdapter::getIterator()    
         return type with generic class ArrayIterator does not specify its  
         types: TKey, TValue                                                
         🪪  missingType.generics                                           
 ------ ------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php              
 ------ ------------------------------------------------------------------------- 
  1640   Method                                                                   
         Drupal\Core\Entity\Sql\SqlContentEntityStorage::readFieldItemsToPurge()  
         return type with generic interface                                       
         Drupal\Core\Field\FieldItemListInterface does not specify its types:     
         T                                                                        
         🪪  missingType.generics                                                 
 ------ ------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Field/FieldTypePluginManager.php                 
 ------ ---------------------------------------------------------------------- 
  83     Method                                                                
         Drupal\Core\Field\FieldTypePluginManager::createFieldItemList()       
         return type with generic interface                                    
         Drupal\Core\Field\FieldItemListInterface does not specify its types:  
         T                                                                     
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Field/FieldTypePluginManagerInterface.php            
 ------ -------------------------------------------------------------------------- 
  34     Method                                                                    
         Drupal\Core\Field\FieldTypePluginManagerInterface::createFieldItemList()  
         return type with generic interface                                        
         Drupal\Core\Field\FieldItemListInterface does not specify its types:      
         T                                                                         
         🪪  missingType.generics                                                  
 ------ -------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Plugin/Discovery/DirectoryWithMetadataDiscovery.php             
 ------ ------------------------------------------------------------------------------------- 
  44     Method                                                                               
         Drupal\Core\Plugin\Discovery\DirectoryWithMetadataDiscovery::getDirectoryIterator()  
         return type with generic class RecursiveIteratorIterator does not                    
         specify its types: T                                                                 
         🪪  missingType.generics                                                             
 ------ ------------------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Template/Attribute.php                            
 ------ ----------------------------------------------------------------------- 
  362    Method Drupal\Core\Template\Attribute::getIterator() return type with  
         generic class ArrayIterator does not specify its types: TKey, TValue   
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Template/AttributeArray.php                       
 ------ ----------------------------------------------------------------------- 
  80     Method Drupal\Core\Template\AttributeArray::getIterator() return type  
         with generic class ArrayIterator does not specify its types: TKey,     
         TValue                                                                 
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------ 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context                
         of class                                                                            
         Drupal\content_moderation\Plugin\Field\ModerationStateFieldItemList)                
 ------ ------------------------------------------------------------------------------------ 
  129    Method                                                                              
         Drupal\content_moderation\Plugin\Field\ModerationStateFieldItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its                   
         types: TKey, TValue                                                                 
         🪪  missingType.generics                                                            
 ------ ------------------------------------------------------------------------------------ 
 ------ ----------------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context               
         of class                                                                           
         Drupal\entity_test\Plugin\Field\ComputedReferenceTestFieldItemList)                
 ------ ----------------------------------------------------------------------------------- 
  129    Method                                                                             
         Drupal\entity_test\Plugin\Field\ComputedReferenceTestFieldItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its                  
         types: TKey, TValue                                                                
         🪪  missingType.generics                                                           
 ------ ----------------------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context            
         of class                                                                        
         Drupal\entity_test\Plugin\Field\ComputedTestBundleFieldItemList)                
 ------ -------------------------------------------------------------------------------- 
  129    Method                                                                          
         Drupal\entity_test\Plugin\Field\ComputedTestBundleFieldItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its               
         types: TKey, TValue                                                             
         🪪  missingType.generics                                                        
 ------ -------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context                 
         of class                                                                             
         Drupal\entity_test\Plugin\Field\ComputedTestCacheableIntegerItemList)                
 ------ ------------------------------------------------------------------------------------- 
  129    Method                                                                               
         Drupal\entity_test\Plugin\Field\ComputedTestCacheableIntegerItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its                    
         types: TKey, TValue                                                                  
         🪪  missingType.generics                                                             
 ------ ------------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------ 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context                
         of class                                                                            
         Drupal\entity_test\Plugin\Field\ComputedTestCacheableStringItemList)                
 ------ ------------------------------------------------------------------------------------ 
  129    Method                                                                              
         Drupal\entity_test\Plugin\Field\ComputedTestCacheableStringItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its                   
         types: TKey, TValue                                                                 
         🪪  missingType.generics                                                            
 ------ ------------------------------------------------------------------------------------ 
 ------ -------------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context      
         of class Drupal\entity_test\Plugin\Field\ComputedTestFieldItemList)       
 ------ -------------------------------------------------------------------------- 
  129    Method                                                                    
         Drupal\entity_test\Plugin\Field\ComputedTestFieldItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its         
         types: TKey, TValue                                                       
         🪪  missingType.generics                                                  
 ------ -------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php (in context  
         of class Drupal\path\Plugin\Field\FieldType\PathFieldItemList)        
 ------ ---------------------------------------------------------------------- 
  129    Method                                                                
         Drupal\path\Plugin\Field\FieldType\PathFieldItemList::getIterator()   
         return type with generic class ArrayIterator does not specify its     
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php           
 ------ ---------------------------------------------------------------------- 
  235    Method Drupal\Core\TypedData\Plugin\DataType\ItemList::getIterator()  
         return type with generic class ArrayIterator does not specify its     
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php             
 ------ ------------------------------------------------------------------- 
  187    Method Drupal\Core\TypedData\Plugin\DataType\Map::getIterator()    
         return type with generic class ArrayIterator does not specify its  
         types: TKey, TValue                                                
         🪪  missingType.generics                                           
 ------ ------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/TypedData.php                           
 ------ ----------------------------------------------------------------------- 
  162    Method Drupal\Core\TypedData\TypedData::getRoot() return type with     
         generic interface Drupal\Core\TypedData\TraversableTypedDataInterface  
         does not specify its types: I, T                                       
         🪪  missingType.generics                                               
  195    Method Drupal\Core\TypedData\TypedData::getParent() return type with   
         generic interface Drupal\Core\TypedData\TraversableTypedDataInterface  
         does not specify its types: I, T                                       
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/TypedData/TypedDataInterface.php                 
 ------ ---------------------------------------------------------------------- 
  124    Method Drupal\Core\TypedData\TypedDataInterface::getParent() return   
         type with generic interface                                           
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify  
         its types: I, T                                                       
         🪪  missingType.generics                                              
  135    Method Drupal\Core\TypedData\TypedDataInterface::getRoot() return     
         type with generic interface                                           
         Drupal\Core\TypedData\TraversableTypedDataInterface does not specify  
         its types: I, T                                                       
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/JsonApiResource/Data.php                      
 ------ ----------------------------------------------------------------------- 
  72     Method Drupal\jsonapi\JsonApiResource\Data::getIterator() return type  
         with generic class ArrayIterator does not specify its types: TKey,     
         TValue                                                                 
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/JsonApiResource/ErrorCollection.php          
 ------ ---------------------------------------------------------------------- 
  50     Method Drupal\jsonapi\JsonApiResource\ErrorCollection::getIterator()  
         return type with generic class ArrayIterator does not specify its     
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/JsonApiResource/LinkCollection.php          
 ------ --------------------------------------------------------------------- 
  65     Method Drupal\jsonapi\JsonApiResource\LinkCollection::getIterator()  
         return type with generic class ArrayIterator does not specify its    
         types: TKey, TValue                                                  
         🪪  missingType.generics                                             
 ------ --------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/JsonApiResource/ResourceObject.php                  
 ------ ----------------------------------------------------------------------------- 
  302    Method                                                                       
         Drupal\jsonapi\JsonApiResource\ResourceObject::extractContentEntityFields()  
         return type with generic interface                                           
         Drupal\Core\Field\FieldItemListInterface does not specify its types:         
         T                                                                            
         🪪  missingType.generics                                                     
 ------ ----------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/DataNormalizer.php                 
 ------ ----------------------------------------------------------------------- 
  18     Method Drupal\jsonapi\Normalizer\DataNormalizer::normalize() return    
         type with generic class ArrayObject does not specify its types: TKey,  
         TValue                                                                 
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php        
 ------ ---------------------------------------------------------------------- 
  77     Method Drupal\jsonapi\Normalizer\EntityDenormalizerBase::normalize()  
         return type with generic class ArrayObject does not specify its       
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------ 
  Line   core/modules/jsonapi/src/Normalizer/EntityReferenceFieldNormalizer.php  
 ------ ------------------------------------------------------------------------ 
  30     Method                                                                  
         Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its         
         types: TKey, TValue                                                     
         🪪  missingType.generics                                                
 ------ ------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php        
 ------ ------------------------------------------------------------------- 
  57     Method Drupal\jsonapi\Normalizer\FieldItemNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its    
         types: TKey, TValue                                                
         🪪  missingType.generics                                           
 ------ ------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/FieldNormalizer.php                
 ------ ----------------------------------------------------------------------- 
  26     Method Drupal\jsonapi\Normalizer\FieldNormalizer::normalize() return   
         type with generic class ArrayObject does not specify its types: TKey,  
         TValue                                                                 
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/HttpExceptionNormalizer.php        
 ------ ----------------------------------------------------------------------- 
  44     Method Drupal\jsonapi\Normalizer\HttpExceptionNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its        
         types: TKey, TValue                                                    
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php  
 ------ --------------------------------------------------------------------------- 
  170    Method                                                                     
         Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its            
         types: TKey, TValue                                                        
         🪪  missingType.generics                                                   
 ------ --------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------ 
  Line   core/modules/jsonapi/src/Normalizer/LinkCollectionNormalizer.php  
 ------ ------------------------------------------------------------------ 
  84     Method                                                            
         Drupal\jsonapi\Normalizer\LinkCollectionNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its   
         types: TKey, TValue                                               
         🪪  missingType.generics                                          
 ------ ------------------------------------------------------------------ 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/RelationshipNormalizer.php        
 ------ ---------------------------------------------------------------------- 
  18     Method Drupal\jsonapi\Normalizer\RelationshipNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its       
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/ResourceIdentifierNormalizer.php  
 ------ ---------------------------------------------------------------------- 
  46     Method                                                                
         Drupal\jsonapi\Normalizer\ResourceIdentifierNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its       
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------ 
  Line   core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php  
 ------ ------------------------------------------------------------------ 
  52     Method                                                            
         Drupal\jsonapi\Normalizer\ResourceObjectNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its   
         types: TKey, TValue                                               
         🪪  missingType.generics                                          
 ------ ------------------------------------------------------------------ 
 ------ -------------------------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php        
 ------ -------------------------------------------------------------------------------------------- 
  106    Method                                                                                      
         Drupal\jsonapi\Normalizer\Value\TemporaryArrayObjectThrowingExceptions::getIteratorClass()  
         return type with generic class ArrayIterator does not specify its                           
         types: TKey, TValue                                                                         
         🪪  missingType.generics                                                                    
 ------ -------------------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/jsonapi/src/Serializer/Serializer.php                    
 ------ ---------------------------------------------------------------------- 
  60     Method Drupal\jsonapi\Serializer\Serializer::normalize() return type  
         with generic class ArrayObject does not specify its types: TKey,      
         TValue                                                                
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/Normalizer/StringNormalizer.php  
 ------ ----------------------------------------------------------------------------------------------- 
  19     Method                                                                                         
         Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::normalize()                         
         return type with generic class ArrayObject does not specify its                                
         types: TKey, TValue                                                                            
         🪪  missingType.generics                                                                       
 ------ ----------------------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/Normalizer/TraversableObjectNormalizer.php  
 ------ ---------------------------------------------------------------------------------------------------------- 
  18     Method                                                                                                    
         Drupal\jsonapi_test_data_type\Normalizer\TraversableObjectNormalizer::normalize()                         
         return type with generic class ArrayObject does not specify its                                           
         types: TKey, TValue                                                                                       
         🪪  missingType.generics                                                                                  
 ------ ---------------------------------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------- 
  Line   core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/TraversableObject.php  
 ------ ------------------------------------------------------------------------------------- 
  17     Method Drupal\jsonapi_test_data_type\TraversableObject::getIterator()                
         return type with generic class ArrayIterator does not specify its                    
         types: TKey, TValue                                                                  
         🪪  missingType.generics                                                             
 ------ ------------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------------------ 
  Line   core/modules/jsonapi/tests/modules/jsonapi_test_field_type/src/Normalizer/StringNormalizer.php  
 ------ ------------------------------------------------------------------------------------------------ 
  19     Method                                                                                          
         Drupal\jsonapi_test_field_type\Normalizer\StringNormalizer::normalize()                         
         return type with generic class ArrayObject does not specify its                                 
         types: TKey, TValue                                                                             
         🪪  missingType.generics                                                                        
 ------ ------------------------------------------------------------------------------------------------ 
 ------ ------------------------------------------------------------------------- 
  Line   core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php            
 ------ ------------------------------------------------------------------------- 
  563    Method                                                                   
         Drupal\Tests\migrate\Unit\MigrateExecutableTest::getTestRollbackIdMap()  
         return type with generic class Prophecy\Prophecy\ObjectProphecy does     
         not specify its types: T                                                 
         🪪  missingType.generics                                                 
 ------ ------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------------- 
  Line   core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php          
 ------ --------------------------------------------------------------------------------- 
  534    Method                                                                           
         Drupal\Tests\package_manager\Kernel\ComposerInspectorTest::mockComposerRunner()  
         return type with generic class Prophecy\Prophecy\ObjectProphecy does             
         not specify its types: T                                                         
         🪪  missingType.generics                                                         
 ------ --------------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/ComplexDataNormalizer.php  
 ------ --------------------------------------------------------------------- 
  23     Method                                                               
         Drupal\serialization\Normalizer\ComplexDataNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its      
         types: TKey, TValue                                                  
         🪪  missingType.generics                                             
 ------ --------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php  
 ------ ---------------------------------------------------------------------- 
  15     Method                                                                
         Drupal\serialization\Normalizer\ConfigEntityNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its       
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/ContentEntityNormalizer.php  
 ------ ----------------------------------------------------------------------- 
  16     Method                                                                 
         Drupal\serialization\Normalizer\ContentEntityNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its        
         types: TKey, TValue                                                    
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/DateTimeIso8601Normalizer.php  
 ------ ------------------------------------------------------------------------- 
  35     Method                                                                   
         Drupal\serialization\Normalizer\DateTimeIso8601Normalizer::normalize()   
         return type with generic class ArrayObject does not specify its          
         types: TKey, TValue                                                      
         🪪  missingType.generics                                                 
 ------ ------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------ 
  Line   core/modules/serialization/src/Normalizer/DateTimeNormalizer.php  
 ------ ------------------------------------------------------------------ 
  52     Method                                                            
         Drupal\serialization\Normalizer\DateTimeNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its   
         types: TKey, TValue                                               
         🪪  missingType.generics                                          
 ------ ------------------------------------------------------------------ 
 ------ ---------------------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizer.php  
 ------ ---------------------------------------------------------------------------------- 
  38     Method                                                                            
         Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its                   
         types: TKey, TValue                                                               
         🪪  missingType.generics                                                          
 ------ ---------------------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/ListNormalizer.php        
 ------ -------------------------------------------------------------------- 
  21     Method Drupal\serialization\Normalizer\ListNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its     
         types: TKey, TValue                                                 
         🪪  missingType.generics                                            
 ------ -------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/MarkupNormalizer.php        
 ------ ---------------------------------------------------------------------- 
  15     Method Drupal\serialization\Normalizer\MarkupNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its       
         types: TKey, TValue                                                   
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/NullNormalizer.php        
 ------ -------------------------------------------------------------------- 
  30     Method Drupal\serialization\Normalizer\NullNormalizer::normalize()  
         return type with generic class ArrayObject does not specify its     
         types: TKey, TValue                                                 
         🪪  missingType.generics                                            
 ------ -------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/PrimitiveDataNormalizer.php  
 ------ ----------------------------------------------------------------------- 
  18     Method                                                                 
         Drupal\serialization\Normalizer\PrimitiveDataNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its        
         types: TKey, TValue                                                    
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/TimestampItemNormalizer.php  
 ------ ----------------------------------------------------------------------- 
  22     Method                                                                 
         Drupal\serialization\Normalizer\TimestampItemNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its        
         types: TKey, TValue                                                    
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   core/modules/serialization/src/Normalizer/TypedDataNormalizer.php  
 ------ ------------------------------------------------------------------- 
  15     Method                                                             
         Drupal\serialization\Normalizer\TypedDataNormalizer::normalize()   
         return type with generic class ArrayObject does not specify its    
         types: TKey, TValue                                                
         🪪  missingType.generics                                           
 ------ ------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php  
 ------ ----------------------------------------------------------------------------------------------------------------- 
  18     Method                                                                                                           
         Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::normalize()                               
         return type with generic class ArrayObject does not specify its                                                  
         types: TKey, TValue                                                                                              
         🪪  missingType.generics                                                                                         
 ------ ----------------------------------------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/modules/test_datatype_boolean_emoji_normalizer/src/Normalizer/BooleanNormalizer.php  
 ------ ---------------------------------------------------------------------------------------------------------------------- 
  19     Method                                                                                                                
         Drupal\test_datatype_boolean_emoji_normalizer\Normalizer\BooleanNormalizer::normalize()                               
         return type with generic class ArrayObject does not specify its                                                       
         types: TKey, TValue                                                                                                   
         🪪  missingType.generics                                                                                              
 ------ ---------------------------------------------------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/modules/test_fieldtype_boolean_emoji_normalizer/src/Normalizer/BooleanItemNormalizer.php  
 ------ --------------------------------------------------------------------------------------------------------------------------- 
  19     Method                                                                                                                     
         Drupal\test_fieldtype_boolean_emoji_normalizer\Normalizer\BooleanItemNormalizer::normalize()                               
         return type with generic class ArrayObject does not specify its                                                            
         types: TKey, TValue                                                                                                        
         🪪  missingType.generics                                                                                                   
 ------ --------------------------------------------------------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php  
 ------ ----------------------------------------------------------------------------------------- 
  21     Method                                                                                   
         Drupal\serialization_test\SerializationTestNormalizer::normalize()                       
         return type with generic class ArrayObject does not specify its                          
         types: TKey, TValue                                                                      
         🪪  missingType.generics                                                                 
 ------ ----------------------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php               
 ------ --------------------------------------------------------------------------------------------------- 
  158    Method                                                                                             
         Drupal\Tests\serialization\Unit\Normalizer\ContentEntityNormalizerTest::createMockFieldListItem()  
         return type with generic interface                                                                 
         Drupal\Core\Field\FieldItemListInterface does not specify its types:                               
         T                                                                                                  
         🪪  missingType.generics                                                                           
 ------ --------------------------------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php  
 ------ ----------------------------------------------------------------------------- 
  95     Method                                                                       
         Drupal\Tests\serialization\Unit\Normalizer\TestNormalizerBase::normalize()   
         return type with generic class ArrayObject does not specify its              
         types: TKey, TValue                                                          
         🪪  missingType.generics                                                     
 ------ ----------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------------------------------------- 
  Line   core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php                   
 ------ ------------------------------------------------------------------------------------------------------- 
  176    Method                                                                                                 
         Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::createTimestampItemProphecy()  
         return type with generic class Prophecy\Prophecy\ObjectProphecy does                                   
         not specify its types: T                                                                               
         🪪  missingType.generics                                                                               
 ------ ------------------------------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php            
 ------ ---------------------------------------------------------------------- 
  154    Method                                                                
         Drupal\Tests\views\Unit\Plugin\query\SqlTest::setupEntityTypes()      
         return type with generic class Prophecy\Prophecy\ObjectProphecy does  
         not specify its types: T                                              
         🪪  missingType.generics                                              
 ------ ---------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php        
 ------ ---------------------------------------------------------------------------------- 
  41     Method                                                                            
         Drupal\Tests\Core\Cache\Context\IsFrontPathCacheContextTest::createPathMatcher()  
         return type with generic class Prophecy\Prophecy\ObjectProphecy does              
         not specify its types: T                                                          
         🪪  missingType.generics                                                          
 ------ ---------------------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Entity/EntityConstraintViolationListTest.php  
 ------ --------------------------------------------------------------------------- 
  105    Method                                                                     
         Drupal\Tests\Core\Entity\EntityConstraintViolationListTest::setupEntity()  
         return type with generic interface                                         
         Drupal\Core\Field\FieldItemListInterface does not specify its types:       
         T                                                                          
         🪪  missingType.generics                                                   
 ------ --------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php                     
 ------ ----------------------------------------------------------------------------------- 
  592    Method                                                                             
         Drupal\Tests\Core\Entity\EntityFieldManagerTest::setUpEntityWithFieldDefinition()  
         return type with generic interface                                                 
         Prophecy\Prophecy\ProphecyInterface does not specify its types: T                  
         🪪  missingType.generics                                                           
 ------ ----------------------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php                 
 ------ ----------------------------------------------------------------------- 
  250    Method Drupal\Tests\Core\Entity\EntityFormTest::setUpStorage() return  
         type with generic class Prophecy\Prophecy\ObjectProphecy does not      
         specify its types: T                                                   
         🪪  missingType.generics                                               
 ------ ----------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php    
 ------ -------------------------------------------------------------------------------- 
  387    Method                                                                          
         Drupal\Tests\Core\Entity\Routing\DefaultHtmlRouteProviderTest::getEntityType()  
         return type with generic class Prophecy\Prophecy\ObjectProphecy does            
         not specify its types: T                                                        
         🪪  missingType.generics                                                        
 ------ -------------------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php                  
 ------ ---------------------------------------------------------------------------------- 
  1154   Method                                                                            
         Drupal\Tests\Core\Render\RendererPlaceholdersTest::setupThemeManagerForDetails()  
         return type with generic class                                                    
         PHPUnit\Framework\MockObject\Builder\InvocationMocker does not                    
         specify its types: TMockedClass                                                   
         🪪  missingType.generics                                                          
 ------ ---------------------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------------ 
  Line   core/tests/PHPStan/tests/ComponentTestDoesNotExtendCoreTestTest.php     
 ------ ------------------------------------------------------------------------ 
  20     Method                                                                  
         Drupal\PHPStan\Tests\ComponentTestDoesNotExtendCoreTestTest::getRule()  
         return type with generic interface PHPStan\Rules\Rule does not          
         specify its types: TNodeType                                            
         🪪  missingType.generics                                                
 ------ ------------------------------------------------------------------------ 
🇯🇵Japan ptmkenny

ptmkenny changed the visibility of the branch phpstan2 to hidden.

🇯🇵Japan ptmkenny

The admin theme should still be used on admin pages even when you overwrite the /admin path; what you report is not the expected behavior.

I just tested this locally on a Drupal 11 site I am working on and as soon as I renamed the admin path, the link was updated and the admin theme was still being used. I checked several other admin pages and the admin theme was used in all cases.

So there is probably something in your site that is interfering with the override. If you are using a custom admin theme, try using Gin or Claro to see whether the problem still occurs. Also check for any other contrib modules that affect redirects or routes.

🇯🇵Japan ptmkenny

Are the "admin" and "user" routes publicly linked on your site?

If the bots can trace the links from your site to the new paths, then they will be able to find them again; this module only renames the paths, but it doesn't do anything else to hide them.

🇯🇵Japan ptmkenny

Postponing this because I think it should be fixed in JSON:API Extras (see my comments in #6 and #8).

🇯🇵Japan ptmkenny

Please check the related issue: 🐛 Initial request shows complete response on an included field, consecutive request shows incomplete response (/jsonapi/user/user) Active .

As a workaround, do not use the default includes feature of JSON:API Extras; that seems to be the cause of this issue.

🇯🇵Japan ptmkenny

Fixed the spelling mistake identified by @jonathan_hunt in #116. Since this was just a single word, I don't think we need to change the RTBC status.

🇯🇵Japan ptmkenny

@spokje Ok, it looks like the version in core/tests/PHPStan/composer.json is hard-coded to the latest version, so I updated that.

@longwave I created a new branch, phpstan2_with1, which allows for both PHPStan 2 and 1.

All tests are passing now in both branches, so I updated the issue summary and am setting this to "Needs review".

🇯🇵Japan ptmkenny

The phpunit phpstan test is failing:

Component Test Does Not Extend Core Test (Drupal\PHPStan\Tests\ComponentTestDoesNotExtendCoreTest)
 ✔ Rule
Ensure PHPStan Versions Match (Drupal\PHPStan\Tests\EnsurePHPStanVersionsMatch)
 ✘ Versions
   │
   │ Failed asserting that two strings are identical.
   │ --- Expected
   │ +++ Actual
   │ @@ @@
   │ -'1.12.12'
   │ +'2.0.3'
   │
   │ /builds/issue/drupal-3486713/core/tests/PHPStan/tests/EnsurePHPStanVersionsMatchTest.php:17

That test is:

/**
 * Tests that PHPStan versions match.
 */
class EnsurePHPStanVersionsMatchTest extends TestCase {

  public function testVersions(): void {
    $test_composer = json_decode(file_get_contents(__DIR__ . '/../composer.json'), TRUE);
    $drupal_composer = json_decode(file_get_contents(__DIR__ . '/../../../../composer/Metapackage/PinnedDevDependencies/composer.json'), TRUE);
    $this->assertSame($test_composer['require-dev']['phpstan/phpstan'], $drupal_composer['require']['phpstan/phpstan']);
  }

}
 

I don't understand why this test is failing, though; on my local machine, both composer.json and the metapackage PinnedDevDependencies composer.json have phpstan 2.

🇯🇵Japan ptmkenny

@spokje Ok, thanks! I fixed the @covers and updated one ignore in the baseline that is now processed differently, and I set missingType.generics to ignore.

🇯🇵Japan ptmkenny

After updating to PHPStan 2, there are two coversMethod errors:

 ------ ----------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php  
 ------ ----------------------------------------------------------------- 
  365    @covers value                                                    
         \Drupal\Core\Layout\LayoutPluginManager::getLayoutOptions        
                                                                          
         Test that modules and themes can alter the list of layouts.      
         references an invalid method.                                    
         🪪  phpunit.coversMethod                                         
 ------ ----------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/State/StateTest.php                      
 ------ ---------------------------------------------------------------------- 
  328    @covers value \Drupal\Core\State\State::delete                        
                                                                               
         Ensure that deleting clears some static cache. references an invalid  
         method.                                                               
         🪪  phpunit.coversMethod                                              
 ------ ---------------------------------------------------------------------- 

and 90 missingType.generics errors:

 ------ ---------------------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php                  
 ------ ---------------------------------------------------------------------------------- 
  1154   Method                                                                            
         Drupal\Tests\Core\Render\RendererPlaceholdersTest::setupThemeManagerForDetails()  
         return type with generic class                                                    
         PHPUnit\Framework\MockObject\Builder\InvocationMocker does not                    
         specify its types: TMockedClass                                                   
         🪪  missingType.generics                                                          
 ------ ---------------------------------------------------------------------------------- 

I propose fixing the two coversMethod errors and then ignoring missingType.generics.

🇯🇵Japan ptmkenny

ptmkenny made their first commit to this issue’s fork.

🇯🇵Japan ptmkenny

As the issue summary only mentions PHPCS, I have resolved the PHPCS errors and changed the issue state to 'Needs Review.' However, since you mentioned that I need to resolve PHPUnit errors and pass the pipeline, I am now working on it.

Yes, this issue is to fix the PHPCS test. However, the phpunit tests are passing on dev, so if as a result of fixing the PHPCS test, the phpunit test breaks, it needs to be fixed here.

Thank you for fixing MR!154. However, as stated in the issue summary, we need to fix PHPCS issues in both the 2.0.x and the 2.1.x branches. It seems you hid the branch for 2.1.x--(3484975-phpcs-fixes-2.1.x)-- but this branch also needs to have an MR with the same fixes as 2.0.x. The reason is that both 2.0.x and 2.1.x are currently supported by the module. (Also, work generally must always be committed to the latest dev branch, which in this case is 2.1.x-dev, so there is no way we can commit 2.0.x without 2.1.x.)

Setting back to "Needs work" because we need an MR for 2.1.x-dev as well with green tests.

🇯🇵Japan ptmkenny

@kul.pratap Please make sure the test icon is green before setting to "Needs review." On the 2.0.x branch (3484975-phpcs-fixes), phpunit is failing, but it is not failing in dev (you can check the 2.0.x GitLab CI pipeline from the module page, which is currently here: https://git.drupalcode.org/project/metatag/-/pipelines/332334)

Since phpunit passes in dev but fails in 3484975-phpcs-fixes, then the 3484975-phpcs-fixes is broken and needs to be fixed before it can be reviewed.

🇯🇵Japan ptmkenny

The annotation class is still there, so annotations are still supported for people who have written their own plugins on top of JSON:API Extras and are using annotations.

As for the plugins in this module, it is fine to convert them to attributes now because the module's composer.json already has "php": ">=8.1", so attributes will definitely be supported (attribute support is from 8.1). So I don't think this should break anything for anyone.

🇯🇵Japan ptmkenny

As a module developer, I read over the change record and have a few questions:

1. If a module does not have any files where procedural hooks can be defined (for example, the only php code is classes in the /src directory), is there any benefit to specifying the parameter module_name.hooks_converted: true?
2. If a module has converted all hooks that can be converted to OOP but still has hooks that cannot be converted to OOP yet (for example, template_preprocess hooks), then module_name.hooks_converted: true cannot be specified and the attribute #[StopProceduralHookScan] needs to be used for such hooks, correct?

🇯🇵Japan ptmkenny

Ok, thanks for the additional information.

My initial assessment is that this should be fixed in jsonapi_extras, not jsonapi_include. But, I am willing to consider a solution here if there's a good argument for fixing it in jsonapi_include instead.

🇯🇵Japan ptmkenny

This module has some PHP 8.4 deprecations, which are already addressed in the MR, so I'm changing the title because PHP 8.4 has now been released.

🇯🇵Japan ptmkenny

Sorry, I just saw this issue now. I'm assuming this is fixed by 🐛 webauthn-lib v5 removes jsonSerialize() Active ; if not, please feel free to re-open.

🇯🇵Japan ptmkenny

Ok, I've updated the MR and I think this is ready to go again.

🇯🇵Japan ptmkenny

Unfortunately this no longer applies to the latest dev, so setting to "Needs work" to fix the merge conflicts.

🇯🇵Japan ptmkenny

Thanks for the review!

Yes, there are a lot of breaking changes; I need to do more testing before I make a new release with 5.x support.

🇯🇵Japan ptmkenny

@lawxen Thanks!

I'm setting this back to "Needs review" because the issue described in #17 and #20 is a separate bug that will be discussed here: 🐛 Didn't support jsonapi_default Active

🇯🇵Japan ptmkenny

MR157 needs the merge conflicts fixed.

Also added a note to the issue summary that this is an important issue because this fixes deprecation warnings in PHP 8.4.

🇯🇵Japan ptmkenny

Thanks for this issue; the two modules should definitely be made compatible.

"the $include_parameter can't get the "include" query parameter on the second request"-- Why is this? Is the jsonapi_default module removing the include query parameter?

🇯🇵Japan ptmkenny

@lawxen Please open a new issue if you found a bug in the dev branch; this is a feature request.

🇯🇵Japan ptmkenny

Thanks for this issue. For the serializer, I think it will be safe to accept PublicKeyCredentialOptions, so I created an MR to do that.

Please review and let me know if this solves your issue.

Passing that into simplewebauthn/browser startRegistration() resulted in "TypeError: base64URLString is undefined"

I'm guessing that's because webauthn-lib 5 no longer serializes to JSON objects, so that's not "supposed" to work anymore? I do not know why this change was made, but this module is attempting to follow the underlying library as closely as possible.

Here's the relevant page from the docs: https://webauthn-doc.spomky-labs.com/pure-php/authenticator-registration

🇯🇵Japan ptmkenny

ptmkenny changed the visibility of the branch 3490555-support-seralization-of to hidden.

🇯🇵Japan ptmkenny

Thanks for the MR; these should definitely be filled in. I will re-use the description from composer.json, and I'm setting the package to "User engagement" because I think we should be referencing the Drupal.org categories where possible.

🇯🇵Japan ptmkenny

On the configuration form, if you are specifying Key Type "Encryption", you need to set a "Key size" (the key length), but you also need to set a "Key provider" (under "Provider settings"). For the "Key Provider", you can set "Environment" (for an envvar) or "File" for a file located on disk.

The prefix to the token is not part of the encrypted value, is it? So it should be irrelevant to the key length.

Rereading your post: are you trying to encrypt the shopify token using the token itself as the key? That won't work. You need to use an encryption key (for example, using the Real AES module) and then encrypt the shopify token with that (which could be stored with, for example, the Field Encryption module).

The Encrypt + Key modules are an API for encrypting data, nothing more. If you want to do secrets management using encryption, you will need additional modules (such as the Field Encryption or Vault for Drupal modules).

🇯🇵Japan ptmkenny

@dahousecat Yes, that could be opened up. Please open a new issue as a feature request.

🇯🇵Japan ptmkenny

How are you specifying the key, as an environmental variable or as a file?

You can set the key size on the configuration form. What key size are you setting?

🇯🇵Japan ptmkenny

This was originally reported by pp.panatom in 🐛 Drupal 10.2 - field values on decimal fields getting lost Active , which I mistakenly closed-- sorry about that. I'm leaving that issue closed in favor of this one because it has tests.

🇯🇵Japan ptmkenny

3.2.0 has some trouble handling decimal values still; please try the MR in 🐛 Encrypted decimal field value not saved on drupal version 10.2.x+ Active and see if that fixes your issue.

🇯🇵Japan ptmkenny

I could not reproduce this based on your steps to reproduce. Please provide more specific steps about how to reproduce this issue from a clean install of Drupal 10/11.

Also, please file bug reports after testing against the dev branch of the module (3.x-dev), just in case the bug has already been fixed in dev but is not yet released.

🇯🇵Japan ptmkenny

Forgot to wire up the attribute; that's fixed now and I think this is ready to go.

🇯🇵Japan ptmkenny

It depends on how you want mail on your site to work, but generally speaking, you can get rid of the other two, too, if you are using this module.

First I would install and configure this module and make sure you have it working properly before uninstalling the other modules.

🇯🇵Japan ptmkenny

Lockr now has a notice on the homepage:

Lockr will be suspending SaaS services effective November 30,2024. Owners of all active Lockr accounts have been contacted regarding the end of services and migrations options. Please contact support@lockr.io with any questions.

Since both providers are no longer in business, I will remove this information from the README, but we'll leave this issue open in case someone has a recomendation.

🇯🇵Japan ptmkenny

This MR now basically works; I am running my behat tests on my site locally with the MR on 11.1.x-dev and there seem to be no errors related to field_encrypt.

Suggested release notes/change record snippet:

Field Encrypt 4.0 no longer uses eval(). If you used Field Encrypt 3.x and your server did not allow the use of eval(), you had to define hook_entity_type_insert() and hook_entity_type_update() in a custom module to allow entities to be decrypted. This code is no longer necessary in 4.x and should be removed prior to upgrading.

@alexpott FieldEncryptUpdatePathTest is failing; do you have any idea why that might be?

I'm leaving this issue "Postponed" for now because I think we should commit the hook conversion first and then commit this ServiceProvider change separately instead of committing everything at once.

🇯🇵Japan ptmkenny

Perfect!

I just tested this MR locally and can confirm that my problem reported in #7 (composer require of a module that needs 11.1 works, but actually enabling the module in drupal fails) is fixed.

🇯🇵Japan ptmkenny

@alexpott Yep, I saw that. But note that my comment seems to be that the reverse is also the case.

field_encrypt 3.2, which has a constraint "do not install on 11.1", can be composer required with 11.x-dev, even though it won't work. (your report)

But field_encrypt 4.0, which has a constraint "at least 11.1", can be composer required with 11.x-dev, but the module can't be enabled (giving the message "incompatible with this version of Drupal core")-- it seems it still thinks it is 11.0.x?.

So I'm not sure if this behavior should be a separate issue or part of this one.

🇯🇵Japan ptmkenny

I'm not sure if this is related, but I also ran into trouble getting field_encrypt 4.x, which requires ^11.1 in the module.info.yml, working locally.

In my case, when I tried using the constraint drupal/core: "^11.1.0-alpha1", composer install worked, but when I tried to re-initialize my site (I have a drush script that resets the datebase and reimports config), the config import failed with the error:

Unable to install modules: module 'field_encrypt' is incompatible with this version of Drupal core.

The same thing happened with the constraint "drupal/core": "11.x-dev@dev".

The module can be installed with composer and in Drupal with "drupal/core": "11.1.x-dev@dev".

🇯🇵Japan ptmkenny

ptmkenny changed the visibility of the branch oop_hooks4 to hidden.

🇯🇵Japan ptmkenny

Whoops, already set, nevermind.

Production build 0.71.5 2024