[packages/php-cs-fixer] drop weird logic disabling cache on non-phar, non-composer builds

glen glen at pld-linux.org
Tue Jul 18 17:08:25 CEST 2017


commit 3fb920cdea80d3877b98d8fe9c0c79d10d8eed8c
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Jul 18 18:07:45 2017 +0300

    drop weird logic disabling cache on non-phar, non-composer builds

 allow-cache.patch | 13 +++++++++++++
 php-cs-fixer.spec |  4 +++-
 2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/php-cs-fixer.spec b/php-cs-fixer.spec
index fb2a268..c02d701 100644
--- a/php-cs-fixer.spec
+++ b/php-cs-fixer.spec
@@ -7,13 +7,14 @@
 Summary:	PHP Coding Standards Fixer
 Name:		php-cs-fixer
 Version:	1.13.1
-Release:	1
+Release:	2
 License:	MIT
 Group:		Development/Languages/PHP
 Source0:	https://github.com/FriendsOfPHP/PHP-CS-Fixer/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	9dbb09988ea36876d49601cb8e862939
 Source1:	autoload.php
 Patch0:		autoload.patch
+Patch1:		allow-cache.patch
 URL:		http://cs.sensiolabs.org/
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.461
@@ -50,6 +51,7 @@ especially on large projects. This tool does the job for you.
 %prep
 %setup -qn PHP-CS-Fixer-%{version}
 %patch0 -p1
+%patch1 -p1
 
 mv Symfony/CS/Resources/phar-stub.php .
 cp -p %{SOURCE1} Symfony/CS/autoload.php
diff --git a/allow-cache.patch b/allow-cache.patch
new file mode 100644
index 0000000..f9ad397
--- /dev/null
+++ b/allow-cache.patch
@@ -0,0 +1,13 @@
+diff --git a/Symfony/CS/FileCacheManager.php b/Symfony/CS/FileCacheManager.php
+index 80dfb11b..98ef6243 100644
+--- a/Symfony/CS/FileCacheManager.php
++++ b/Symfony/CS/FileCacheManager.php
+@@ -94,7 +94,7 @@ private function isCacheAvailable()
+         static $result;
+ 
+         if (null === $result) {
+-            $result = $this->isEnabled && (ToolInfo::isInstalledAsPhar() || ToolInfo::isInstalledByComposer());
++            $result = $this->isEnabled;
+         }
+ 
+         return $result;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-cs-fixer.git/commitdiff/3fb920cdea80d3877b98d8fe9c0c79d10d8eed8c



More information about the pld-cvs-commit mailing list