summaryrefslogtreecommitdiffstats
path: root/php-cs-fixer.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-cs-fixer.spec')
-rw-r--r--php-cs-fixer.spec29
1 files changed, 21 insertions, 8 deletions
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index c0d6ef9..53b13a5 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit a0484335b26a05b4353f7a0691a887b7a3706fe5
+%global gh_commit e4e93a120117e879cfc1f231fbf29274707cd834
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner FriendsOfPHP
@@ -14,8 +14,14 @@
%global php_home %{_datadir}/php
%global with_tests 0%{!?_without_tests:1}
+# Bundled this fork which is not designed for use outside of php-cs-fixer
+%global gh_diff_owner PHP-CS-Fixer
+%global gh_diff_version 1.1.0
+%global gh_diff_commit d068edadcb8f7bc2ea3d3769cdbaf609026ec4f4
+%global gh_diff_short %(c=%{gh_diff_commit}; echo ${c:0:7})
+
Name: php-cs-fixer
-Version: 2.6.1
+Version: 2.7.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: A tool to automatically fix PHP code style
@@ -24,7 +30,8 @@ License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to get upstream test suite
Source0: %{name}-%{version}-%{gh_short}.tgz
-Source1: makesrc.sh
+Source1: %{name}-diff-%{gh_diff_version}-%{gh_diff_short}.tgz
+Source2: makesrc.sh
# Use our autoloader
Patch0: %{name}-autoload.patch
@@ -98,7 +105,8 @@ BuildRequires: php-fedora-autoloader-devel
# "composer/semver": "^1.4",
# "doctrine/annotations": "^1.2",
# "gecko-packages/gecko-php-unit": "^2.0",
-# "sebastian/diff": "^1.4",
+# Bundled
+# "php-cs-fixer/diff": "^1.0",
# "symfony/console": "^3.2",
# "symfony/event-dispatcher": "^3.0",
# "symfony/filesystem": "^3.0",
@@ -170,8 +178,10 @@ projects. This tool does not only detect them, but also fixes them for you.
%prep
-%setup -q -n %{gh_project}-%{gh_commit}
+%setup -q -n %{gh_project}-%{gh_commit} -a1
%patch0 -p1 -b .rpm
+mv diff-%{gh_diff_commit}/src src/diff
+
find src -name \*rpm -delete -print
# from composer.json, "autoload" / "classmap"
@@ -191,7 +201,7 @@ done
sed -e 's:../../../dev-tools/::' -i src/Console/Command/HelpCommand.php
cp -pr dev-tools/ci-integration.sh src/Console/Command/
-phpab --template fedora --output src/autoload.php src/tests
+phpab --template fedora --output src/autoload.php src/tests src/diff
cat << 'EOF' | tee -a src/autoload.php
@@ -207,7 +217,6 @@ cat << 'EOF' | tee -a src/autoload.php
'%{php_home}/Symfony3/Component/OptionsResolver/autoload.php',
'%{php_home}/Symfony3/Component/Process/autoload.php',
'%{php_home}/Symfony3/Component/Stopwatch//autoload.php',
- '%{php_home}/SebastianBergmann/Diff/autoload.php',
'%{php_home}/Symfony/Polyfill/autoload.php',
]);
EOF
@@ -252,7 +261,7 @@ sed -e 's/listeners/nolistener/' phpunit.xml.dist >phpunit.xml
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' -i %{name}
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php70 php71 php72; do
if which $cmd; then
$cmd -d memory_limit=1G %{_bindir}/phpunit || ret=1
fi
@@ -273,6 +282,10 @@ exit $ret
%changelog
+* Mon Oct 2 2017 Remi Collet <remi@remirepo.net> - 2.7.0-1
+- Update to 2.7.0
+- drop dependency on sebastian/diff, bundle fork instead
+
* Mon Oct 2 2017 Remi Collet <remi@remirepo.net> - 2.6.1-1
- Update to 2.6.1