New Upstream Snapshot - php-enum

Ready changes

Summary

Merged new upstream version: 4.7.0 (was: 4.6.1).

Resulting package

Built on 2023-01-16T12:52 (took 7m52s)

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

apt install -t fresh-snapshots php-enum

Lintian Result

Diff

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 3d9dcd1..0000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: Bug report
-about: Report incorrect or unexpected behaviors
-title: ''
-labels: bug
-assignees: ''
-
----
-
-**NOTE**: Please file security related issues to security@mabe.berlin
-          to be able to coordinate releases across dependent projects privately.
-
-**Detailed description:**
-
-...
-
-**Steps to reproduce:**
-
-1. ...
-2. ....
-
-**Expected behavior:**
-
-A clear and concise description of what you expected to happen.
-
-**Environment:**
-
-Important information of your environment.
- - PHP Version: ...
- - PHP Extensions + Versions: ...
- - PHP Configuration: ...
- - ...
-
-**Additional context:**
-
-Add any other context about the problem here.
diff --git a/.github/workflows/test.Dockerfile b/.github/workflows/test.Dockerfile
deleted file mode 100644
index a7acaf1..0000000
--- a/.github/workflows/test.Dockerfile
+++ /dev/null
@@ -1,18 +0,0 @@
-ARG PHP_VERSION=latest
-FROM php:${PHP_VERSION}-cli-alpine
-
-WORKDIR /workdir
-
-# install composer
-RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
-ENV COMPOSER_ALLOW_SUPERUSER=1
-ENV COMPOSER_HTACCESS_PROTECT=0
-ENV COMPOSER_CACHE_DIR=/.composer
-
-# install PHP extension pcov
-RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
-    && mkdir -p /usr/src/php/ext/pcov && curl -fsSL https://pecl.php.net/get/pcov | tar xvz -C /usr/src/php/ext/pcov --strip 1 \
-    && docker-php-ext-install pcov \
-    && docker-php-ext-enable pcov \
-    && rm -Rf /usr/src/php/ext/pcov \
-    && apk del --no-cache .build-deps
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index f3834e5..0000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,109 +0,0 @@
-name: Test
-
-on:
-  pull_request:
-  push:
-    branches:
-      - master
-      - '[0-9]+.x'
-
-jobs:
-  php:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        include:
-          - PHP_VERSION: 7.1
-            CODE_COVERAGE: false
-            RUN_PHPSTAN: false
-            RUN_PSALM: false
-            RUN_BENCHMARK: false
-          - PHP_VERSION: 7.2
-            CODE_COVERAGE: true
-            RUN_PHPSTAN: false
-            RUN_PSALM: false
-            RUN_BENCHMARK: true
-          - PHP_VERSION: 7.3
-            CODE_COVERAGE: true
-            RUN_PHPSTAN: false
-            RUN_PSALM: false
-            RUN_BENCHMARK: false
-          - PHP_VERSION: 7.4
-            CODE_COVERAGE: true
-            RUN_PHPSTAN: true
-            RUN_PSALM: true
-            RUN_BENCHMARK: false
-          - PHP_VERSION: 8.0
-            CODE_COVERAGE: true
-            RUN_PHPSTAN: true
-            RUN_PSALM: true
-            RUN_BENCHMARK: false
-          - PHP_VERSION: 8.1
-            CODE_COVERAGE: true
-            RUN_PHPSTAN: true
-            RUN_PSALM: true
-            RUN_BENCHMARK: true
-
-    steps:
-      - uses: actions/checkout@v2
-
-      - name: Cache Docker Image
-        id: cache-docker-image
-        uses: actions/cache@v2
-        with:
-          path: /tmp/docker-image.tar
-          key: cache-docker-image-test:${{ matrix.PHP_VERSION }}
-
-      - name: Load Docker Image
-        if: steps.cache-docker-image.outputs.cache-hit == 'true'
-        run: docker load --input /tmp/docker-image.tar
-
-      - name: Build Docker Image
-        if: steps.cache-docker-image.outputs.cache-hit != 'true'
-        run: docker build -f .github/workflows/test.Dockerfile -t 'test:${{ matrix.PHP_VERSION }}' --build-arg 'PHP_VERSION=${{ matrix.PHP_VERSION }}' .
-
-      - name: Cache Composer Cache Files
-        uses: actions/cache@v2
-        with:
-          path: /tmp/composer-cache-files
-          key: cache-composer-cache-files-${{ matrix.PHP_VERSION }}
-          restore-keys: |
-            cache-composer-cache-files-
-
-      - name: Install Composer Dependencies
-        run: |
-          if [ "${{ matrix.RUN_PHPSTAN }}" != "true" ]; then composer remove --dev phpstan/phpstan --no-update --no-interaction; fi
-          if [ "${{ matrix.RUN_PSALM }}" != "true" ]; then composer remove --dev vimeo/psalm --no-update --no-interaction; fi
-          if [ "${{ matrix.RUN_BENCHMARK }}" != "true" ]; then composer remove --dev phpbench/phpbench --no-update --no-interaction; fi
-          docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" -v '/tmp/composer-cache-files:/.composer' 'test:${{ matrix.PHP_VERSION }}' composer install --no-interaction --no-progress --prefer-dist ${{ matrix.COMPOSER_EXTRA_ARGS }}
-
-      - name: Run Unit Test
-        run: |
-          if [ "${{ matrix.CODE_COVERAGE }}" == "true" ]; then
-            docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'zend.assertions=1' -d 'pcov.enabled=1' ./vendor/bin/phpunit --coverage-clover=.clover.xml
-          else
-            docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'zend.assertions=1' ./vendor/bin/phpunit
-          fi
-
-      - name: Upload Codecov Report
-        uses: codecov/codecov-action@v1
-        if: ${{ matrix.CODE_COVERAGE }}
-        with:
-          token: ${{ secrets.CODECOV_TOKEN }}
-          file: .clover.xml
-
-      - name: Run PHPStan
-        if: ${{ matrix.RUN_PHPSTAN }}
-        run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'memory_limit=2G' ./vendor/bin/phpstan analyse --level max src/ tests/
-
-      - name: Run psalm
-        if: ${{ matrix.RUN_PSALM }}
-        run: mkdir -p "$HOME/.cache/psalm" && docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" -v "$HOME/.cache/psalm:/.cache/psalm" 'test:${{ matrix.PHP_VERSION }}' php ./vendor/bin/psalm
-
-      - name: Run benchmark
-        if: ${{ matrix.RUN_BENCHMARK }}
-        run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'zend.assertions=-1' ./vendor/bin/phpbench run --no-interaction --revs=1 --retry-threshold=100 --progress=none
-
-      - name: Export Docker Image
-        if: steps.cache-docker-image.outputs.cache-hit != 'true'
-        run: docker save --output /tmp/docker-image.tar 'test:${{ matrix.PHP_VERSION }}'
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 60452a5..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-# hidden files
-.*
-!.gitignore
-!.github
-
-#composer
-composer.lock
-vendor
-
-#phpbench
-_storage
diff --git a/composer.json b/composer.json
index 2014673..5749337 100644
--- a/composer.json
+++ b/composer.json
@@ -29,7 +29,10 @@
     "autoload": {
         "psr-4": {
             "MabeEnum\\": "src/"
-        }
+        },
+        "classmap": [
+            "stubs/Stringable.php"
+        ]
     },
     "autoload-dev": {
         "psr-4": {
diff --git a/debian/changelog b/debian/changelog
index 1a8c8c0..668ceec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+php-enum (4.7.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Mon, 16 Jan 2023 12:46:06 -0000
+
 php-enum (4.6.1-1) experimental; urgency=medium
 
   [ Marc Bennewitz ]
diff --git a/debian/patches/0001-Use-homemade-autoload.php-for-tests.patch b/debian/patches/0001-Use-homemade-autoload.php-for-tests.patch
index 93723c0..d6ebc53 100644
--- a/debian/patches/0001-Use-homemade-autoload.php-for-tests.patch
+++ b/debian/patches/0001-Use-homemade-autoload.php-for-tests.patch
@@ -6,11 +6,11 @@ Subject: Use homemade autoload.php for tests
  tests/bootstrap.php | 8 ++++++++
  1 file changed, 8 insertions(+)
 
-diff --git a/tests/bootstrap.php b/tests/bootstrap.php
-index 6751f34..fc84afd 100644
---- a/tests/bootstrap.php
-+++ b/tests/bootstrap.php
-@@ -19,6 +19,14 @@ if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
+Index: php-enum.git/tests/bootstrap.php
+===================================================================
+--- php-enum.git.orig/tests/bootstrap.php
++++ php-enum.git/tests/bootstrap.php
+@@ -19,6 +19,14 @@ if (file_exists(__DIR__ . '/../vendor/au
  } elseif (file_exists(__DIR__ . '/../../../autoload.php')) {
      require_once __DIR__ . '/../../../autoload.php';
  
diff --git a/psalm.xml b/psalm.xml
index 5cfb3f9..1aff26b 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0"?>
 <psalm
-    totallyTyped="true"
     errorLevel="1"
     resolveFromConfigFile="true"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/src/Enum.php b/src/Enum.php
index 3c9c293..9d09ae6 100644
--- a/src/Enum.php
+++ b/src/Enum.php
@@ -17,7 +17,7 @@ use LogicException;
  *
  * @psalm-immutable
  */
-abstract class Enum
+abstract class Enum implements \Stringable
 {
     /**
      * The selected enumerator value
diff --git a/stubs/Stringable.php b/stubs/Stringable.php
new file mode 100644
index 0000000..77e037c
--- /dev/null
+++ b/stubs/Stringable.php
@@ -0,0 +1,11 @@
+<?php
+
+if (\PHP_VERSION_ID < 80000) {
+    interface Stringable
+    {
+        /**
+         * @return string
+         */
+        public function __toString();
+    }
+}

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details