diff options
| author | Remi Collet <remi@remirepo.net> | 2017-10-30 05:25:58 +0100 | 
|---|---|---|
| committer | Remi Collet <remi@remirepo.net> | 2017-10-30 05:25:58 +0100 | 
| commit | e9a05201b3866cecc52f6f5b907cbf3d8a3c4c83 (patch) | |
| tree | 70866e554f1be0d98110d2ac2a4f4fa3846c0b91 | |
| parent | e24539a42ddb94f3eee1fafb6cd983687931f764 (diff) | |
Update to 3.1.1zend-loader
add autoloader for class aliases
| -rw-r--r-- | 55.patch | 38 | ||||
| -rw-r--r-- | composer.json | 10 | ||||
| -rw-r--r-- | php-zendframework-zend-test.spec | 29 | 
3 files changed, 26 insertions, 51 deletions
diff --git a/55.patch b/55.patch deleted file mode 100644 index f5e5c95..0000000 --- a/55.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5818e1abe0155401b066a416e98d3623973004c7 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Sun, 29 Oct 2017 10:53:40 +0100 -Subject: [PATCH] Prefer expectException over deprecated setExpectedException - ---- - src/PHPUnit/Controller/AbstractControllerTestCase.php | 3 ++- - test/ExpectedExceptionTrait.php                       | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/PHPUnit/Controller/AbstractControllerTestCase.php b/src/PHPUnit/Controller/AbstractControllerTestCase.php -index eda6eed68..b60ad9228 100644 ---- a/src/PHPUnit/Controller/AbstractControllerTestCase.php -+++ b/src/PHPUnit/Controller/AbstractControllerTestCase.php -@@ -490,7 +490,8 @@ public function assertApplicationException($type, $message = null) -             $this->getApplication()->getMvcEvent()->setParam('exception', null); -         } -  --        if (method_exists($this, 'setExpectedException')) { -+        if (!method_exists($this, 'expectException')) { -+            // For old PHPUnit 4 -             $this->setExpectedException($type, $message); -         } else { -             $this->expectException($type); -diff --git a/test/ExpectedExceptionTrait.php b/test/ExpectedExceptionTrait.php -index 25793dda1..4270ec8b7 100644 ---- a/test/ExpectedExceptionTrait.php -+++ b/test/ExpectedExceptionTrait.php -@@ -16,7 +16,8 @@ -      */ -     public function expectedException($exceptionClass, $message = '') -     { --        if (method_exists($this, 'setExpectedException')) { -+        if (!method_exists($this, 'expectException')) { -+            // For old PHPUnit 4 -             $this->setExpectedException($exceptionClass, $message); -             return; -         } diff --git a/composer.json b/composer.json index 29c6780..af4ad45 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,10 @@      "autoload": {          "psr-4": {              "Zend\\Test\\": "src/" -        } +        }, +        "files": [ +            "autoload/phpunit-class-aliases.php" +        ]      },      "require": {          "php": "^5.6 || ^7.0", @@ -59,10 +62,7 @@      "autoload-dev": {          "psr-4": {              "ZendTest\\Test\\": "test/" -        }, -        "files": [ -            "autoload/phpunit-class-aliases.php" -        ] +        }      },      "scripts": {          "check": [ diff --git a/php-zendframework-zend-test.spec b/php-zendframework-zend-test.spec index 1727fd5..9d47834 100644 --- a/php-zendframework-zend-test.spec +++ b/php-zendframework-zend-test.spec @@ -7,7 +7,7 @@  # Please, preserve the changelog entries  #  %global bootstrap    0 -%global gh_commit    9665205827ed6ee69f1ef82990362057c789250c +%global gh_commit    9976fb519851276d56e201bc6211b3a94e6c3b19  %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})  %global gh_owner     zendframework  %global gh_project   zend-test @@ -20,8 +20,8 @@  %endif  Name:           php-%{gh_owner}-%{gh_project} -Version:        3.1.0 -Release:        3%{?dist} +Version:        3.1.1 +Release:        1%{?dist}  Summary:        Zend Framework %{library} component  Group:          Development/Libraries @@ -30,8 +30,6 @@ URL:            https://zendframework.github.io/%{gh_project}/  Source0:        %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz  Source1:        makesrc.sh -Patch0:         https://patch-diff.githubusercontent.com/raw/zendframework/zend-test/pull/55.patch -  BuildArch:      noarch  # Tests  %if %{with_tests} @@ -135,7 +133,14 @@ Documentation: https://zendframework.github.io/%{gh_project}/  %prep  %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 + +: Create dependency autoloader +mv autoload/*.php src + +cat << 'EOF' | tee autoload.php +<?php +require_once __DIR__ . '/%{library}/phpunit-class-aliases.php'; +EOF  mv LICENSE.md LICENSE @@ -148,12 +153,16 @@ mv LICENSE.md LICENSE  mkdir -p   %{buildroot}%{php_home}/Zend/  cp -pr src %{buildroot}%{php_home}/Zend/%{library} +install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php +  %check  %if %{with_tests}  mkdir vendor  cat << 'EOF' | tee vendor/autoload.php  <?php +define('RPM_BUILDROOT', '%{buildroot}%{php_home}/Zend'); +  require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';  Zend\Loader\AutoloaderFactory::factory(array(      'Zend\Loader\StandardAutoloader' => array( @@ -162,12 +171,11 @@ Zend\Loader\AutoloaderFactory::factory(array(             'Zend\\%{library}'     => '%{buildroot}%{php_home}/Zend/%{library}'  ))));  require_once '%{php_home}/Zend/autoload.php'; -require_once 'autoload/phpunit-class-aliases.php';  EOF  # 7.2: https://github.com/zendframework/zend-session/issues/74  ret=0 -for cmd in php php56 php70 php71; do +for cmd in php php56 php70 php71 php72; do    if which $cmd; then      $cmd %{_bindir}/phpunit --verbose || ret=1    fi @@ -189,9 +197,14 @@ exit $ret  %doc *.md  %doc composer.json  %{php_home}/Zend/%{library} +%{php_home}/Zend/%{library}-autoload.php  %changelog +* Mon Oct 30 2017 Remi Collet <remi@remirepo.net> - 3.1.1-1 +- Update to 3.1.1 +- add autoloader for class aliases +  * Sun Oct 29 2017 Remi Collet <remi@remirepo.net> - 3.1.0-3  - fix FTBFS from Koschei, add fix for recent PHPUnit from    https://github.com/zendframework/zend-test/pull/55  | 
