Mise à jour des dépendences
This commit is contained in:
parent
bfecdbfe98
commit
4b3fa030d8
180 changed files with 2026 additions and 737 deletions
12
lib/MPDF/vendor/myclabs/deep-copy/.github/FUNDING.yml
vendored
Normal file
12
lib/MPDF/vendor/myclabs/deep-copy/.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: "packagist/myclabs/deep-copy"
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
9
lib/MPDF/vendor/myclabs/deep-copy/README.md
vendored
9
lib/MPDF/vendor/myclabs/deep-copy/README.md
vendored
|
|
@ -7,11 +7,6 @@ DeepCopy helps you create deep copies (clones) of your objects. It is designed t
|
|||
[](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
|
||||
[](https://packagist.org/packages/myclabs/deep-copy)
|
||||
|
||||
|
||||
**You are browsing the 1.x version, this version is in maintenance mode only. Please check the new
|
||||
[2.x](https://github.com/myclabs/DeepCopy/tree/2.x) version.**
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [How](#how)
|
||||
|
|
@ -374,3 +369,7 @@ Running the tests is simple:
|
|||
```php
|
||||
vendor/bin/phpunit
|
||||
```
|
||||
|
||||
### Support
|
||||
|
||||
Get professional support via [the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-myclabs-deep-copy?utm_source=packagist-myclabs-deep-copy&utm_medium=referral&utm_campaign=readme).
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
|
||||
"require": {
|
||||
"php": "^7.1"
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.0",
|
||||
|
|
|
|||
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/clone.png
vendored
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/clone.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/deep-clone.png
vendored
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/deep-clone.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/deep-copy.png
vendored
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/deep-copy.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/graph.png
vendored
BIN
lib/MPDF/vendor/myclabs/deep-copy/doc/graph.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 6.3 KiB |
|
|
@ -2,19 +2,21 @@
|
|||
|
||||
namespace DeepCopy;
|
||||
|
||||
use ArrayObject;
|
||||
use DateInterval;
|
||||
use DateTimeInterface;
|
||||
use DateTimeZone;
|
||||
use DeepCopy\Exception\CloneException;
|
||||
use DeepCopy\Filter\Filter;
|
||||
use DeepCopy\Matcher\Matcher;
|
||||
use DeepCopy\Reflection\ReflectionHelper;
|
||||
use DeepCopy\TypeFilter\Date\DateIntervalFilter;
|
||||
use DeepCopy\TypeFilter\Spl\ArrayObjectFilter;
|
||||
use DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter;
|
||||
use DeepCopy\TypeFilter\TypeFilter;
|
||||
use DeepCopy\TypeMatcher\TypeMatcher;
|
||||
use ReflectionObject;
|
||||
use ReflectionProperty;
|
||||
use DeepCopy\Reflection\ReflectionHelper;
|
||||
use SplDoublyLinkedList;
|
||||
|
||||
/**
|
||||
|
|
@ -59,6 +61,7 @@ class DeepCopy
|
|||
{
|
||||
$this->useCloneMethod = $useCloneMethod;
|
||||
|
||||
$this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class));
|
||||
$this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
|
||||
$this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
|
||||
}
|
||||
|
|
@ -237,6 +240,12 @@ class DeepCopy
|
|||
}
|
||||
|
||||
$property->setAccessible(true);
|
||||
|
||||
// Ignore uninitialized properties (for PHP >7.4)
|
||||
if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$propertyValue = $property->getValue($object);
|
||||
|
||||
// Copy the property
|
||||
|
|
|
|||
36
lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php
vendored
Normal file
36
lib/MPDF/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
namespace DeepCopy\TypeFilter\Spl;
|
||||
|
||||
use DeepCopy\DeepCopy;
|
||||
use DeepCopy\TypeFilter\TypeFilter;
|
||||
|
||||
/**
|
||||
* In PHP 7.4 the storage of an ArrayObject isn't returned as
|
||||
* ReflectionProperty. So we deep copy its array copy.
|
||||
*/
|
||||
final class ArrayObjectFilter implements TypeFilter
|
||||
{
|
||||
/**
|
||||
* @var DeepCopy
|
||||
*/
|
||||
private $copier;
|
||||
|
||||
public function __construct(DeepCopy $copier)
|
||||
{
|
||||
$this->copier = $copier;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply($arrayObject)
|
||||
{
|
||||
$clone = clone $arrayObject;
|
||||
foreach ($arrayObject->getArrayCopy() as $k => $v) {
|
||||
$clone->offsetSet($k, $this->copier->copy($v));
|
||||
}
|
||||
|
||||
return $clone;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue