New Upstream Release - php-opis-closure

Ready changes

Summary

Merged new upstream version: 3.6.3 (was: 3.6.1).

Resulting package

Built on 2023-05-31T18:39 (took 4m20s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases php-opis-closure

Lintian Result

Diff

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..edd7365
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+.github         export-ignore
+tests/          export-ignore
+phpunit.xml     export-ignore
+.gitattributes  export-ignore
+.gitignore      export-ignore
diff --git a/.gitignore b/.gitignore
index 9e4d482..916104d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ vendor/
 _site/
 shared/
 Gemfile.lock
-composer.lock
\ No newline at end of file
+composer.lock
+.phpunit.result.cache
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e03515..16c9e3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
 CHANGELOG
 ---------
 
+### v3.6.2, 2021.04.09
+
+- Fixed string interpolation
+
 ### v3.6.1, 2020.11.07
 
 - Fixed serialization error [#84](https://github.com/opis/closure/issues/84)
diff --git a/README.md b/README.md
index 1933800..f5f3ad8 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ The full documentation for this library can be found [here][documentation].
 
 ## Requirements
 
-* PHP ^5.4 || ^7.0
+* PHP ^5.4 || ^7.0 || ^8.0
 
 ## Installation
 
@@ -89,4 +89,4 @@ So our advice regarding the `Opis\Closure\serialize|unserialize` functions is to
 [Packagist]: https://packagist.org/packages/opis/closure "Packagist"
 [Composer]: https://getcomposer.org "Composer"
 [SemVer]: http://semver.org/ "Semantic versioning"
-[CHANGELOG]: https://github.com/opis/closure/blob/master/CHANGELOG.md "Changelog"
\ No newline at end of file
+[CHANGELOG]: https://github.com/opis/closure/blob/master/CHANGELOG.md "Changelog"
diff --git a/autoload.php b/autoload.php
index a928014..2354ea5 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1,11 +1,11 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
 
-require_once 'functions.php';
+require_once __DIR__ . '/functions.php';
 
 spl_autoload_register(function($class){
    
diff --git a/debian/changelog b/debian/changelog
index f5c161f..4a1e099 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+php-opis-closure (3.6.3-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 31 May 2023 18:35:37 -0000
+
 php-opis-closure (3.6.1-1) unstable; urgency=medium
 
   * New upstream version 3.6.1
diff --git a/functions.php b/functions.php
index 681854c..38dcb91 100644
--- a/functions.php
+++ b/functions.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/Analyzer.php b/src/Analyzer.php
index a30be77..9618b1c 100644
--- a/src/Analyzer.php
+++ b/src/Analyzer.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/ClosureContext.php b/src/ClosureContext.php
index d68cf98..d8f13d9 100644
--- a/src/ClosureContext.php
+++ b/src/ClosureContext.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/ClosureScope.php b/src/ClosureScope.php
index 71ad414..3afd9b5 100644
--- a/src/ClosureScope.php
+++ b/src/ClosureScope.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/ClosureStream.php b/src/ClosureStream.php
index f538419..d77d97c 100644
--- a/src/ClosureStream.php
+++ b/src/ClosureStream.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/ISecurityProvider.php b/src/ISecurityProvider.php
index d3b0a29..54e2e20 100644
--- a/src/ISecurityProvider.php
+++ b/src/ISecurityProvider.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/ReflectionClosure.php b/src/ReflectionClosure.php
index dad0b33..1f6a832 100644
--- a/src/ReflectionClosure.php
+++ b/src/ReflectionClosure.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
@@ -271,7 +271,7 @@ class ReflectionClosure extends ReflectionFunction
                         case T_CURLY_OPEN:
                         case T_DOLLAR_OPEN_CURLY_BRACES:
                         case '{':
-                            $code .= '{';
+                            $code .= is_array($token) ? $token[1] : $token;
                             $open++;
                             break;
                         case '}':
diff --git a/src/SecurityException.php b/src/SecurityException.php
index 6a107ee..b65f5cb 100644
--- a/src/SecurityException.php
+++ b/src/SecurityException.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/SecurityProvider.php b/src/SecurityProvider.php
index 5ae4116..1952917 100644
--- a/src/SecurityProvider.php
+++ b/src/SecurityProvider.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/SelfReference.php b/src/SelfReference.php
index 3c6ec80..425edf2 100644
--- a/src/SelfReference.php
+++ b/src/SelfReference.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/src/SerializableClosure.php b/src/SerializableClosure.php
index 8f254d1..1025ff5 100644
--- a/src/SerializableClosure.php
+++ b/src/SerializableClosure.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ClosureTest.php b/tests/ClosureTest.php
index 18a65be..3b9baf0 100644
--- a/tests/ClosureTest.php
+++ b/tests/ClosureTest.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/JsonSerializableClosure.php b/tests/JsonSerializableClosure.php
index 2e33110..481ad5d 100644
--- a/tests/JsonSerializableClosure.php
+++ b/tests/JsonSerializableClosure.php
@@ -1,19 +1,9 @@
 <?php
 /* ===========================================================================
- * Copyright 2019 Zindex Software
+ * Copyright (c) 2019-2021 Zindex Software
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================================ */
+ * Licensed under the MIT License
+ * =========================================================================== */
 
 namespace Opis\Closure\Test;
 
diff --git a/tests/RecursiveArrayTest.php b/tests/RecursiveArrayTest.php
index b786db1..c58444a 100644
--- a/tests/RecursiveArrayTest.php
+++ b/tests/RecursiveArrayTest.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ReflectionClosure2Test.php b/tests/ReflectionClosure2Test.php
index 828cfa9..29eeb5f 100644
--- a/tests/ReflectionClosure2Test.php
+++ b/tests/ReflectionClosure2Test.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ReflectionClosure3Test.php b/tests/ReflectionClosure3Test.php
index d5ee7af..12d0739 100644
--- a/tests/ReflectionClosure3Test.php
+++ b/tests/ReflectionClosure3Test.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ReflectionClosure4Test.php b/tests/ReflectionClosure4Test.php
index 10c57d5..47fd5b8 100644
--- a/tests/ReflectionClosure4Test.php
+++ b/tests/ReflectionClosure4Test.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ReflectionClosure5Test.php b/tests/ReflectionClosure5Test.php
index acdc675..379bf24 100644
--- a/tests/ReflectionClosure5Test.php
+++ b/tests/ReflectionClosure5Test.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/ReflectionClosureTest.php b/tests/ReflectionClosureTest.php
index ba4b5c4..efe9abd 100644
--- a/tests/ReflectionClosureTest.php
+++ b/tests/ReflectionClosureTest.php
@@ -181,4 +181,12 @@ class ReflectionClosureTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($e1, $this->c($f1));
         $this->assertEquals($e2, $this->c($f2));
     }
+
+    public function testInterpolation1()
+    {
+        $f1 = function() { return "${foo}${bar}{$foobar}"; };
+        $e1 = 'function() { return "${foo}${bar}{$foobar}"; }';
+
+        $this->assertEquals($e1, $this->c($f1));
+    }
 }
\ No newline at end of file
diff --git a/tests/SerializeTest.php b/tests/SerializeTest.php
index f4d9393..cfefcee 100644
--- a/tests/SerializeTest.php
+++ b/tests/SerializeTest.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */
diff --git a/tests/SignedClosureTest.php b/tests/SignedClosureTest.php
index 61cc1bd..6da82d4 100644
--- a/tests/SignedClosureTest.php
+++ b/tests/SignedClosureTest.php
@@ -1,6 +1,6 @@
 <?php
 /* ===========================================================================
- * Copyright (c) 2018-2019 Zindex Software
+ * Copyright (c) 2018-2021 Zindex Software
  *
  * Licensed under the MIT License
  * =========================================================================== */

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details