This commit improves the export of enumerations (see https://wiki.php.net/rfc/enumerations). This change is backwards-compatible with PHP 8.0. Previously, enums would be exported as objects (which they are internally), for instance:
```
SebastianBergmann\Exporter\ExampleEnum Object #%d (
'name' => 'Value'
)"
```
This commit changes that behaviour and improves the export for both backed and non-backed enums:
Unit enum:
SebastianBergmann\Exporter\ExampleEnum Enum #%d (Value)
Backed enum:
SebastianBergmann\Exporter\ExampleBackedEnum Enum #%d (Value, 'value')
This proposes using `#` instead of `&` to
1. Avoid overlapping with the hash numbers for `Array &%d ()`
2. Be similar to var_dump.
This proposes a `Object #` prefix for SplObjectStorage object id keys
to make **accidental** ambiguity with dynamic properties less likely.
Closes#39
As the 3.x branch has a minimum PHP version of PHP 7.0 and the `resource (closed)` return value for `gettype()` was only introduced in PHP 7.2, a slightly more involved solution for the same is needed for the 3.x branch.
The methods I'm adding are based on code I've used to polyfill the `assertClosedResource()` assertion in the PHPUnit Polyfills and has been (and still is) extensively tested there.
Fixes 36
* Added visible representation of line endings for diffs
* Added fix to avoid the Replacement order gotcha from str_replace
* cs-fixer
* Fixed expectation of shortened string
* I misunderstood the problem, the length of the string now is longer because we are showing \n and \r characters