diff options
author | Remi Collet <remi@remirepo.net> | 2017-04-14 07:43:46 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-04-14 07:43:46 +0200 |
commit | 76ad42f108a9f963a28ed8768f1e9d05a0aef884 (patch) | |
tree | b229239d7b4b43d2508cdb8c3e400e278a95e59e | |
parent | 43f65498795c738257a151fcc516ad38519fd052 (diff) |
sync with Fedora
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | php-phpspec-prophecy-autoload.php | 11 | ||||
-rw-r--r-- | php-phpspec-prophecy.spec | 16 |
3 files changed, 24 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php index da7df3b..599ad20 100644 --- a/php-phpspec-prophecy-autoload.php +++ b/php-phpspec-prophecy-autoload.php @@ -9,7 +9,15 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; // Dependencies require_once 'Doctrine/Instantiator/autoload.php'; -require_once 'phpDocumentor/Reflection/DocBlock/autoload.php'; +if ($dep = stream_resolve_include_path('phpDocumentor/Reflection/DocBlock/autoload.php')) { + require_once $dep; +} else if ($dep = stream_resolve_include_path('phpDocumentor/Reflection/DocBlock2/autoload.php')) { + require_once $dep; +} else { + trigger_error('phpDocumentor reflection docblock autoloader not found in include path', E_USER_ERROR); + exit(1); +} +unset($dep); if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec require_once (stream_resolve_include_path('SebastianBergmann/Comparator2/autoload.php') ?: 'SebastianBergmann/Comparator/autoload.php'); @@ -17,4 +25,3 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from php if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v3 from phpunit, v2 from phpspec (via exporter) require_once (stream_resolve_include_path('SebastianBergmann/RecursionContext3/autoload.php') ?: 'SebastianBergmann/RecursionContext/autoload.php'); } - diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 3f420de..89aeafb 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -20,7 +20,7 @@ Name: php-phpspec-prophecy Version: 1.7.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Highly opinionated mocking framework for PHP Group: Development/Libraries @@ -31,7 +31,6 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Autoloader Source1: %{name}-autoload.php -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} # from composer.json, "require-dev": { @@ -88,7 +87,6 @@ cp %{SOURCE1} src/Prophecy/autoload.php %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php cp -pr src/* %{buildroot}%{_datadir}/php @@ -121,12 +119,7 @@ exit $ret %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -135,6 +128,13 @@ rm -rf %{buildroot} %changelog +* Thu Apr 13 2017 Shawn Iwinski <shawn@iwin.ski> - 1.7.0-4 +- Prepare for php-phpdocumentor-reflection-docblock => + php-phpdocumentor-reflection-docblock2 dependency rename +- Update autoloader to try loading newest + php-composer(phpdocumentor/reflection-docblock), then try loading older v2, + then trigger an error if neither are found in include path + * Sat Mar 4 2017 Remi Collet <remi@remirepo.net> - 1.7.0-3 - drop implicit dependency on sebastian/recursion-context |