summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--composer.json12
-rw-r--r--php-symfony-polyfill.spec51
3 files changed, 38 insertions, 32 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/composer.json b/composer.json
index 44b7d7e..ca30161 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,10 @@
"php": ">=5.3.3",
"ircmaxell/password-compat": "~1.0",
"paragonie/random_compat": "~1.0|~2.0",
- "symfony/intl": "~2.3|~3.0"
+ "symfony/intl": "~2.3|~3.0|~4.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~3.2"
},
"replace": {
"symfony/polyfill-apcu": "self.version",
@@ -28,6 +31,7 @@
"symfony/polyfill-php56": "self.version",
"symfony/polyfill-php70": "self.version",
"symfony/polyfill-php71": "self.version",
+ "symfony/polyfill-php72": "self.version",
"symfony/polyfill-iconv": "self.version",
"symfony/polyfill-intl-grapheme": "self.version",
"symfony/polyfill-intl-icu": "self.version",
@@ -45,12 +49,12 @@
"src/Php56/bootstrap.php",
"src/Php70/bootstrap.php",
"src/Php71/bootstrap.php",
+ "src/Php72/bootstrap.php",
"src/Iconv/bootstrap.php",
"src/Intl/Grapheme/bootstrap.php",
"src/Intl/Icu/bootstrap.php",
"src/Intl/Normalizer/bootstrap.php",
- "src/Mbstring/bootstrap.php",
- "src/Xml/bootstrap.php"
+ "src/Mbstring/bootstrap.php"
],
"classmap": [
"src/Intl/Normalizer/Resources/stubs",
@@ -61,7 +65,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.4-dev"
}
}
}
diff --git a/php-symfony-polyfill.spec b/php-symfony-polyfill.spec
index 8f8e9a6..9a034c8 100644
--- a/php-symfony-polyfill.spec
+++ b/php-symfony-polyfill.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-symfony-polyfill
#
-# Copyright (c) 2015-2016 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2015-2017 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner symfony
%global github_name polyfill
-%global github_version 1.3.0
-%global github_commit 385d033a8e1d8778446d699ecbd886480716eba7
+%global github_version 1.4.0
+%global github_commit a80c6de45ebd2a041415ba17879ff7309ead51f6
%global composer_vendor symfony
%global composer_project polyfill
@@ -39,7 +39,6 @@ License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -83,6 +82,7 @@ Provides: php-composer(%{composer_vendor}/%{composer_project}-php55) = %{ve
Provides: php-composer(%{composer_vendor}/%{composer_project}-php56) = %{version}
Provides: php-composer(%{composer_vendor}/%{composer_project}-php70) = %{version}
Provides: php-composer(%{composer_vendor}/%{composer_project}-php71) = %{version}
+Provides: php-composer(%{composer_vendor}/%{composer_project}-php72) = %{version}
%description
%{summary}.
@@ -94,13 +94,14 @@ Autoloader: %{phpdir}/Symfony/Polyfill/autoload.php
%setup -qn %{github_name}-%{github_commit}
: Docs
-mkdir -p docs/{Php54,Php55,Php56,Php70,Php71,Util}
+mkdir -p docs/{Php54,Php55,Php56,Php70,Php71,Php72,Util}
mv *.md composer.json docs/
mv src/Php54/{*.md,composer.json} docs/Php54/
mv src/Php55/{*.md,composer.json} docs/Php55/
mv src/Php56/{*.md,composer.json} docs/Php56/
mv src/Php70/{*.md,composer.json} docs/Php70/
mv src/Php71/{*.md,composer.json} docs/Php71/
+mv src/Php72/{*.md,composer.json} docs/Php72/
mv src/Util/{*.md,composer.json} docs/Util/
: Remove unneeded polyfills
@@ -121,6 +122,7 @@ cat <<'AUTOLOAD' | tee -a src/autoload.php
__DIR__ . '/Php56/bootstrap.php',
__DIR__ . '/Php70/bootstrap.php',
__DIR__ . '/Php71/bootstrap.php',
+ __DIR__ . '/Php72/bootstrap.php',
'%{phpdir}/password_compat/password.php',
'%{phpdir}/random_compat/autoload.php',
));
@@ -128,7 +130,6 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
: Library
mkdir -p %{buildroot}%{phpdir}/Symfony/Polyfill
@@ -137,34 +138,23 @@ cp -rp src/* %{buildroot}%{phpdir}/Symfony/Polyfill/
%check
%if %{with_tests}
-# remirepo:11
-run=0
-ret=0
-if which php56; then
- php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Symfony/Polyfill/autoload.php
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Symfony/Polyfill/autoload.php
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --verbose \
- --bootstrap %{buildroot}%{phpdir}/Symfony/Polyfill/autoload.php
-# remirepo:2
-fi
-exit $ret
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose \
+ --bootstrap %{buildroot}%{phpdir}/Symfony/Polyfill/autoload.php \
+ || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc docs/*
@@ -174,6 +164,11 @@ rm -rf %{buildroot}
%changelog
+* Sun Jul 09 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.4.0-1
+- Updated to 1.4.0 (RHBZ #1460473)
+- Provide php-composer(symfony/polyfill-php72)
+- Test with SCLs if available
+
* Mon Nov 14 2016 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
- Updated to 1.3.0
- provide php-composer(symfony/polyfill-php71)