olvlvl / composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes
Other
152 stars 3 forks source link

Ignore incomplete cache entries #23

Closed slepic closed 1 year ago

slepic commented 1 year ago

This should resolve the issue with cache during upgrade ~1.2 -> ^1.3

  - Upgrading olvlvl/composer-attribute-collector (v1.2.2 => dev-ignore-unserialize-errors a27b061): Extracting archive
Generating autoload files
Generating attributes file

In MemoizeAttributeCollector.php line 62:

  Undefined array key 3 

It also moved the call to datastore::get from memoize collector contructor to its action method, because it caused sideeffect on construction site.

olvlvl commented 1 year ago

I'm closing this PR since v2.0.0 prefixes cache files with the version of the plugin. We should no longer have cases of mismatching schemas. Thanks for your contribution.